Main Content

Check transitions in Stateflow Flow charts

Check ID: mathworks.jmaab.db_0132

Guideline: db_0132: Transitions in flow charts

Description

Check transition orientations in Stateflow® flow charts.

The following rules apply to transitions in flow charts:

  • Draw transition conditions horizontally.

  • Draw transitions with a condition action vertically.

  • Junctions in flow charts should have a default exit transition.

  • Transitions in flow charts should not combine condition and action.

This check requires a Simulink® Check™ and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to sub IDs specified in the MAB and JMAAB modeling guidelines. You can use the Model Advisor Configuration Editor to specify which sub IDs (one or multiple) to execute.

For reference, the MAB guideline sub-ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:

  • NA-MAAB — a, b

  • JMAAB — a, b

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
db_0132_a: Check usage of transition actions in Stateflow Flow chartsOne or more transition actions are used in flow charts in the model.Do not use transition actions in flow charts.
db_0132_b: Check for transition orientation in Flow chartsOne or more transitions with condition expressions are not drawn horizontally.Draw transitions with condition expressions horizontally.
One or more transitions with condition actions are not drawn vertically.Draw transitions with condition actions vertically.
One or more transitions have both condition expressions and condition actions.Do not use condition expressions and condition actions in the same transition.

Capabilities and Limitations

  • The check only flags flow charts containing loop constructs if the transition violates the orientation rule.

  • Runs on library models.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

Edit-Time Checking

This check is supported by edit-time checking.