Stateflow | ![]() ![]() |
Transition Report Section
Reports for transitions appear under the report sections of their owning states. They do not appear in the model hierarchy of the Summary section, since that is based entirely on superstates owning other Stateflow objects.
The decision for this transition is based on the broadcast of 40 sec
events and the condition [cold()]
. If, after the reception of 40 sec
events (equivalent to a 40 second delay) the environment is cold (cold() = 1
), the 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 the true and false evaluations for the decision occurred. Because two of two decision outcomes occurred, coverage was full (that is, 100%).
Condition coverage shows that only 4 of 6 condition outcomes were tested. The temporal condition after(40,sec)
is a short form expression for sec[after(40,sec]
which is actually two conditions: the event sec
and the accumulation condition after(40,sec)
. Consequently, there are actually three conditions on the transition: sec
, after(40,sec)
, and cold()
. Since each of these decisions can be true or false, there are now six possible outcomes.
A look at the Decisions analyzed table shows each of these conditions as a row with the recorded number of occurrences for each outcome for that decision (true or false). Decision rows in which a possible outcome did not occur are shaded. For example, the first and the third decision rows did not record an occurrence of a false outcome and are therefore shaded.
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:
For three conditions related by an implied AND operator, these criteria can be satisfied by the occurrence of the following 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 conditions. Therefore the table lines for conditions (rows) 1 and 3 are shaded in red. Thus, while condition 2 has been tested, conditions 1 and 3 have not and MCDC is 33%.
For some decisions, the values of some conditions are irrelevant under certain circumstances. For example, in the decision [C1 & C2 & C3 | C4 & C5] the left side of the "|" is false if any one of the conditions C1, C2, or C3 is false. The same applies to the right side result if either C4 or C5 is false. When searching for matching pairs that change the outcome of the decision by changing one condition, holding some of the remaining conditions constant is irrelevant. In these cases, the MC/DC report marks these conditions with an "x" to indicate their irrelevance as a contributor to the result. This is shown in the following example.
Consider the very first matched pair. Since condition 1 is true in the True outcome column, it must be false in the matching False outcome column. This makes the conditions C2 and C3 irrelevant for the false outcome since C1 & C2 & C3 is always false if C1 is false. Also, since the false outcome is required to evaluate to false, the evaluation of C4 & C5 must also be false. In this case, a match was found with C4 = F, making condition C5 irrelevant.
![]() | State Report Section | API Guide and Reference | ![]() |