Main Content

Check for prohibited overlapping of states and transition lines in Stateflow charts

Check ID: mathworks.jmaab_v6.jc_0904

Guideline: jc_0904: Prohibition of overlap/intersection of states and transition lines

Description

Checks if states, transition lines, or other graphical elements of a Stateflow® chart overlap or intersect.

This check applies to the following target components in a Stateflow chart.

  • States, state names, state labels.

  • Junctions, transition labels, transition lines.

  • Truth tables, boxes, annotations, subcharts, atomic subcharts.

  • Graphical functions, Simulink® functions, MATLAB® functions, Simulink based states.

Exception 1: Stateflow objects with a parent-child relationship. For example, the check does not prohibit substates overlapping with the states that contain them.

Exception 2: Connective junctions and transitions that constitute the modeling logic within a graphical function.

Exception 3: A state name or state label within its own state boundaries.

Exception 4: A transition line from a child object that crosses the boundary of its parent to reach another Stateflow object. For example, the check does not prohibit a transition line from a substate intersecting with the boundary of its parent state when it connects to a new state.

Exception 5: A transition line intersecting its own transition label.

This check requires a Simulink Check™ and Stateflow license.

Check Parameterization

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

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

  • JMAAB — a, b

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
jc_0904_a: Check for objects in Stateflow charts that overlap.States, graphical functions, Simulink functions, MATLAB functions, truth tables, boxes, junctions, annotations, state names, state labels or transition labels overlap.Change the model so that states, graphical functions, Simulink functions, MATLAB functions, truth tables, boxes, junctions, annotations, state names, state labels, and transition labels do not overlap.
jc_0903_b: Check for transition lines overlapping objects in Stateflow charts. Transition lines overlap with or intersect other transition lines, states, graphical functions, Simulink functions, MATLAB functions, truth tables, boxes, junctions, annotations, state names, state labels, or transition labels.Change the model so that transition lines do not overlap with or intersect other transition lines, states, graphical functions, Simulink functions, MATLAB functions, truth tables, boxes, junctions, annotations, state names, state labels, or transition labels.

Capabilities and Limitations

  • Does not check whether junctions intersect or overlap with other Stateflow objects.

  • Does not report a violation for an annotation that overlaps with a Stateflow object. In this case, the check reports a violation only for the Stateflow object.

  • Does not detect overlapping annotations in Stateflow charts.

  • Does not report a violation for a state name or state label overlapping a separate Stateflow object. In this case, the check reports a violation only for the state name or the state label crossing its own state boundary before overlapping with the other Stateflow object.

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

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

  • Runs on library models.

  • Allows exclusion of blocks and charts.