Stateflow    

Debugging Conflicting Transitions

A transition conflict exists if, at any step in the simulation, there are two equally valid transition paths from the same source. In the case of a conflict, equivalent transitions (based on their labels) are evaluated based on the geometry of the outgoing transitions. See Ordering Single Source Transitions for more information.

Detecting Conflicting Transitions

To detect conflicting transitions during a simulation, do the following:

  1. Build the target with debugging enabled.
  2. Invoke the Debugger and enable Transition Conflict checking.
  3. Start the simulation.

Conflicting Transition Example

This Stateflow diagram has a conflicting transition.

The default transition to state A assigns data a equal to 1 and data b equal to 10. State A's during action increments a and decrements b. The transition from state A to state B is valid if the condition [a > 4] is true. The transition from state A to state C is valid if the condition [b < 7] is true. As the simulation proceeds, there is a point where state A is active and both conditions are true. This is a transition conflict.

Multiple outgoing transitions from states that are of equivalent label priority are evaluated in a clockwise progression starting from the twelve o'clock position on the state. In this example, the transition from state A to state B is taken.

Although the geometry is used to continue after the transition conflict, it is not recommended that you design your Stateflow diagram based on an expected execution order.


  Debugging State Inconsistencies Debugging Data Range Violations