Main Content

Check for implicit type casting in Stateflow

Check ID: mathworks.jmaab.jc_0802

Guideline: jc_0802: Prohibited use of implicit type casting in Stateflow®


Identifies implicit type casting in Stateflow.

This check requires Simulink® Check™ and Stateflow licenses.

Check Parameterization

This check does not include sub-checks because the MAB modeling guideline provides only 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 operations and/or function calls in Stateflow charts have data type mismatch.All operations and function calls must be made between variables of the same data type. If the data types are different, the variables need to be explicitly type cast to match data types.

Capabilities and Limitations

  • This check will not analyze the enumeration types in Stateflow if the enumeration types are not specified with full class name.

  • This check does not analyze the Fixed-Point Context-Sensitive Constants.

  • Does not run on library models.

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

  • Does not analyze C function calls and its return value.