User`s guide
Model Coverage for Stateflow Charts
18-61
decision to execute this transition and turn the Heater on is made. For other time
intervals or environment conditions, the decision is made not to execute.
For decision coverage, both true and false outcomes occurred. Because two of two decision
outcomes occurred, coverage was full or 100%.
Condition coverage shows that only 4 of 6 condition outcomes were tested. The temporal
logic statement after(40,sec) represents two conditions: the occurrence of sec and
the time delay after(40,sec). Therefore, three conditions on the transition exist: sec,
after(40,sec), and cold(). Since each of these decisions can be true or false, six
possible condition outcomes exist.
The Conditions analyzed table shows each condition as a row with the recorded
number of occurrences for each outcome (true or false). Decision rows in which a possible
outcome did not occur are shaded. For example, the first and the third rows did not
record an occurrence of a false outcome.
In the MC/DC report, all sets of occurrences of the transition conditions are scanned for a
particular pair of decisions for each condition in which the following are true:
• The condition varies from true to false.
• All other conditions contributing to the decision outcome remain constant.
• The outcome of the decision varies from true to false, or the reverse.
For three conditions related by an implied AND operator, these criteria can be satisfied
by the occurrence of these conditions.
Condition Tested True Outcome False Outcome
1 TTT Fxx
2 TTT TFx
3 TTT TTF
Notice that in each line, the condition tested changes from true to false while the other
condition remains constant. Irrelevant contributors are coded with an "x" (discussed
below). If both outcomes occur during testing, coverage is complete (100%) for the
condition tested.
The preceding report example shows coverage only for condition 2. The false outcomes
required for conditions 1 and 3 did not occur, and are indicated by parentheses for both