Documentation Center

  • Trial Software
  • Product Updates

Chart Properties

hisf_0001: Mealy and Moore semantics

ID: Titlehisf_0001: Mealy and Moore semantics
DescriptionTo create Stateflow® charts that implement a subset of Stateflow semantics,
A In the Chart properties dialog box, set State Machine Type to Mealy or Moore.
BApply consistent settings to the Stateflow charts in a model.
Note

Setting State Machine Type restricts the Stateflow semantics to pure Mealy or Moore semantics. Mealy and Moore charts might be easier to understand and use in high-integrity applications.

In Mealy charts, actions are associated with transitions. In the Moore charts, actions are associated with states.

At compile time, the Stateflow software verifies that the chart semantics comply with the formal definitions and rules of the selected type of state machine. If the chart semantics are not in compliance, the software provides a diagnostic message.

RationaleA, B Promote a clear modeling style.
Model Advisor Checks
References
  • IEC 61508-3,Table A.7 (2) 'Simulation/modeling'

  • ISO 26262-6, Table 1 (b) 'Use of language subsets'

  • EN 50128, Table A.4 (11) 'Language Subset'
    EN 50128, Table A.11 (3) 'Simulation'

  • DO-331, Section MB.6.3.1.b 'High-level requirements are accurate and consistent'
    DO-331, Section MB.6.3.1.e 'High-level requirements conform to standards'
    DO-331, Section MB.6.3.2.b 'Low-level requirements are accurate and consistent'
    DO-331, Section MB.6.3.2.e 'Low-level requirements conform to standards'
    DO-331, Section MB.6.3.3.b 'Software architecture is consistent'
    DO-331, Section MB.6.3.3.e 'Software architecture conform to standards'

See AlsoCreate Mealy and Moore Charts in the Stateflow documentation
Last ChangedR2013b

hisf_0002: User-specified state/transition execution order

ID: Titlehisf_0002: User-specified state/transition execution order
Description

Do the following to explicitly set the execution order for active states and valid transitions in Stateflow charts:

A

In the Chart Properties dialog box, select User specified state/transition execution order.

B

In the Stateflow Editor View menu, select Show Transition Execution Order.

C

Set default transition to evaluate last.

Note

Selecting User specified state/transition execution order restricts the dependency of a Stateflow chart semantics on the geometric position of parallel states and transitions.

Specifying the execution order of states and transitions allows you to enforce determinism in the search order for active states and valid transitions. You have control of the order in which parallel states are executed and transitions originating from a source are tested for execution. If you do not explicitly set the execution order, the Stateflow software determines the execution order following a deterministic algorithm.

Selecting Show Transition Execution Order displays the transition testing order.

RationaleA, B, CPromote an unambiguous modeling style.
Model Advisor Checks
References

This guideline supports adhering to:

  • IEC 61508-3, Table A.3 (3) 'Language subset'

  • ISO 26262-6, Table 1 (b) 'Use of language subsets'
    ISO 26262-6, Table 1 (f) 'Use of unambiguous graphical representation'

  • EN 50128, Table A.4 (11) 'Language Subset'

  • DO-331, Section MB.6.3.3.b 'Software architecture is consistent'
    DO-331, Section MB.6.3.3.e 'Software architecture conform to standards '

See Also

The following topics in the Stateflow documentation

Last ChangedR2013b

hisf_0009: Strong data typing (Simulink and Stateflow boundary)

ID: Title

hisf_0009: Strong data typing (Simulink and Stateflow boundary)

Description

To support strong data typing between Simulink® and Stateflow ,

ASelect Use Strong Data Typing with Simulink I/O.
Notes

By default, input to and output from Stateflow charts are of type double. To interface directly with Simulink signals of data types other than double, select Use Strong Data Typing with Simulink I/O. In this mode, data types between the Simulink and Stateflow boundary are strongly typed, and the Simulink software does not treat the data types as double. The Stateflow chart accepts input signals of any data type supported by the Simulink software, provided that the type of the input signal matches the type of the corresponding Stateflow input data object. Otherwise, the software reports a type mismatch error.

RationaleASupport strongly typed code.
Model Advisor Checks
References
  • IEC 61508-3, Table A.3 (2) ‘Strongly typed programming language'

  • ISO 26262-6, Table 1 (c) 'Enforcement of strong typing'

  • EN 50128, Table A.4 (8) 'Strongly Typed Programming Language'

  • DO-331, Section MB.6.3.1.b 'High-level requirements are accurate and consistent'
    DO-331, Section MB.6.3.1.e 'High-level requirements conform to standards'
    DO-331, Section MB.6.3.1.g 'Algorithms are accurate'
    DO-331, Section MB.6.3.2.b 'Low-level requirements are accurate and consistent'
    DO-331, Section MB.6.3.2.e 'Low-level requirements conform to standards'
    DO-331, Section MB.6.3.2.g 'Algorithms are accurate'

  • MISRA-C:2004, Rules 10.1, 10.2, 10.3 and 10.4

Last ChangedR2013b

hisf_0011: Stateflow debugging settings

ID: Title

hisf_0011: Stateflow debugging settings

Description

To protect against unreachable code and indeterminate execution time,

A

Select the following run-time diagnostics:

  • In the Configuration Parameters dialog box, on the Simulation Target pane, select:

    Enable debugging/animation
    Enable overflow detection (with debugging)
  • In the Stateflow Debugging window, select

    Transition Conflict
    Detect Cycles
    Data Range
B

For each truth table in the model, in the Settings menu of the Truth Table Editor, set the following parameters to Error:

Underspecified
Overspecified
Notes

Run-time diagnostics are only triggered during simulation. If the error condition is not reached during simulation, the error message is not triggered for code generation.

RationaleA, BProtect against unreachable code and unpredictable execution time.
Model Advisor Checks
References
  • IEC 61508-3, Table A.7 (2) 'Simulation/modeling'

  • ISO 26262 Table 1 (d) 'Use of defensive implementation techniques'

  • EN 50128, Table A.3 (1) 'Defensive Programming'
    EN 50128, Table A.11 (3) 'Simulation'

  • DO-331, Section MB.6.3.1.b 'High-level requirements are accurate and consistent'
    DO-331, Section MB.6.3.1.e 'High-level requirements conform to standards'
    DO-331, Section MB.6.3.2.b 'Low-level requirements are accurate and consistent'
    DO-331, Section MB.6.3.2.e 'Low-level requirements conform to standards'

Last ChangedR2014a

Was this topic helpful?