Main Content

Check usage of numeric literals in Stateflow

Check ID: mathworks.jmaab.jc_0702

Guideline: jc_0702: Use of named Stateflow parameters and constants

Description

Identifies the use of numeric literals in Stateflow states and transitions.

Note

Following are the exceptions for this check:

  • Initial value set to0.

  • Increment, decrement value set to 1.

This check requires Simulink® Check™ and Stateflow® licenses.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline only provides one sub ID.

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

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
One or more expressions in Stateflow states and Stateflow transitions contain numeric literals.Consider remodeling to use named parameters and constants instead of numeric literals.

Capabilities and Limitations

  • Runs on library models.

  • Supports exclusions of blocks or charts.

  • 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.