This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

What Do Semantics Mean for Stateflow Charts?

What Are Chart Semantics?

Chart semantics describe execution behavior according to the interaction of graphical and nongraphical constructs.

Graphical Constructs

Graphical constructs consist of objects that appear graphically in a chart. You use the object palette in the Stateflow® Editor to build graphical constructs (see Stateflow Editor Operations).

Graphical ConstructsTypesReferences

Flow charts

  • Decision logic patterns

  • Loop logic patterns

What Is a Flow Chart?


  • Graphical functions

  • MATLAB® functions

  • Truth table functions

  • Simulink® functions


  • Connective junctions

  • History junctions


  • States with exclusive (OR) decomposition

  • States with parallel (AND) decomposition

  • Substates and superstates


  • Default transitions

  • Object-to-object transitions

  • Inner transitions

  • Self-loop transitions

Nongraphical Constructs

Nongraphical constructs appear textually in a chart and often refer to data, events, and messages. See Add Stateflow Data ,Define Events, and Define Messages in a Stateflow Chart for details. Examples of nongraphical constructs include:

  • Conditions and condition actions

  • Function calls

  • State actions

  • Temporal logic statements

Common Graphical and Nongraphical Constructs

The following chart shows commonly used graphical and nongraphical constructs.

Chart ConstructGraphical or Nongraphical?DescriptionReference
ConditionNongraphicalBoolean expression that specifies that a transition path is valid if the expression is true; part of a transition label

Transition Label Notation and Conditions

Condition actionNongraphicalAction that executes as soon as the condition evaluates to true; part of a transition label

Transition Label Notation and Condition Actions

Connective junctionGraphicalObject that enables representation of different possible transition paths in a flow chart

Connective Junctions

Default transitionGraphicalObject that specifies which state to enter when two or more exclusive (OR) states exist at the same level of hierarchy

Default Transitions

Flow chartGraphicalConstruct that models logic patterns by using connective junctions and transitions

What Is a Flow Chart?

History junctionGraphicalObject that remembers the previously active state at the level of hierarchy in which it appears

History Junctions

MATLAB functionGraphicalMethod of performing computations using a subset of the MATLAB language

MATLAB Functions in a Chart

State actionsNongraphicalExpressions that specify actions to take when a state is active, such as initializing or updating data; part of a state label

State Labels and State Action Types

State with exclusive (OR) decompositionGraphicalState where no more than one substate can be active at a time

Exclusive (OR) State Decomposition

State with parallel (AND) decompositionGraphicalState where all substates can be active at the same time

Parallel (AND) State Decomposition

SubstateGraphicalState that resides inside another state

Create Substates and Superstates

SuperstateGraphicalState that contains one or more states

Create Substates and Superstates

Transition guarded by input eventGraphicalDecision path that occurs if the chart receives a specific event broadcast from another block in the model

Transition Action Types

For details on how these graphical and nongraphical constructs interact during chart execution, see How Chart Constructs Interact During Execution.

References for Chart Semantics

For detailed information on types of chart semantics, see these references.


How do events affect chart execution?

How Events Drive Chart Execution

How does a chart switch between being active and inactive?

Types of Chart Execution

In what order do flow charts execute?

Process for Grouping and Executing Transitions

In what order do outgoing transitions from a single source execute?

Evaluation Order for Outgoing Transitions

What happens when you enter, execute, or exit a state?

Process for Entering, Executing, and Exiting States

How do parallel (AND) states work?

Execution Order for Parallel States

How does early return logic affect chart execution?

Early Return Logic for Event Broadcasts

For detailed examples of chart semantics, see Semantic Examples.

Was this topic helpful?