Main Content

Check prohibited comparison operation of logical type signals

Check ID: mathworks.jmaab.jc_0655

Guideline: jc_0655: Prohibition of logical value comparison in Stateflow®


Identifies the Boolean type transitions in Stateflow charts that use either comparison with numbers or logical values (true or false), or use negation operators (! or ~) variably in the model.

This check requires a Simulink® Check™ and Stateflow license.

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 — No recommendations

  • JMAAB — a

Results and Recommended Actions

ConditionRecommended Action
Boolean type transactions are compared with numbers or logical values (true or false).Do not compare Boolean type transactions with numbers or logical values.

Capabilities and Limitations

  • Runs on library models.

  • Allows exclusions of blocks and 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.