Model Execution: Concepts and Terms : Simulation Support of Flowcharts : Flowchart Semantics

Flowchart Semantics

There is a major difference between Statechart and Flowchart behavior in the model: whereas the execution of a Statechart is time-consuming, with each transition in a Statechart is considered a simulation “step”, a flowchart is executed in “zero time” and single simulation step. Whenever the Flowchart is entered, it is executed from start to end in one simulation step (much like a Procedural-Statechart).

Since the Flowchart is executed in a single simulation step, the elements used in the flowchart are single-buffered during the Flowchart execution, except for events and event expressions. Events and event expressions are sensed in the next step. Timeout and Delay expressions are not allowed at all.

A Flowchart connected to a control-activity are executed (start to end) once in every simulation step, for as long as the controlled activity is active.

Examples:

Example A: When setting a value in one action box of the Flowchart, that (new) value is sensed in the next action box, e.g.: The condition “[num==5]” evaluated immediately after the action box “num=5” is always “true”.
Example B: When the action in the action-box is “st!(A1)”, with A1 being a sibling activity of the control activity, the event “st(A1)” is “true” only in the next step, i.e., the expression “st(A1)” is evaluated to “false” immediately after the action box, and to “true” in the next step, i.e., the next run of the Flowchart.