Main Content

Check Stateflow charts for strong data typing

Check ID: mathworks.hism.hisf_0015

Identify variables and parameters in expressions with different data types in Stateflow® objects.

Description

To facilitate strong data typing, this check identifies the variables and parameters in expressions with different data types in Stateflow states and transitions.

Available with Simulink® Check™.

This check requires a Stateflow license.

Results and Recommended Actions

ConditionRecommended Action
The Stateflow objects have variables and parameters in expressions with different data types.

Explicitly cast variables and parameters in expressions to the same data types. For more information see, cast.

Capabilities and Limitations

  • Does not run on library models.

  • Allows exclusions of blocks and charts.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to all.

  • Analyzes content of library linked blocks. By default, the input parameter Follow links is set to on.

  • Does not analyze the type of literals in expressions in Stateflow objects. Explicitly casts types of literals to the intended data type.

  • Does not flag expressions with true and false keywords. For more information, see Other Common Reserved Keywords (Embedded Coder).

  • External functions written in C and embedded in Stateflow will not work with this check.

See Also