Check Stateflow operators
Check ID:
mathworks.jmaab.na_0001
Guideline: na_0001: Standard usage of Stateflow® operators
Description
Identifies the usage of operators in Stateflow.
This check requires a Simulink® Check™ and Stateflow license.
Check Parameterization
This check contains sub-checks that correspond to the sub IDs specified in the MAB and JMAAB modeling guidelines. You can use the Model Advisor Configuration Editor to specify which sub IDs (one or multiple) to execute.
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, b1/b2/b3, c
Note
Sub-checks na_0001_a, na_0001_b1, and na_0001_c are selected by default.
Results and Recommended Actions
Guideline Sub ID | Condition | Recommended Action |
---|---|---|
na_0001_a: Usage of bitwise operators in Stateflow. | One or more expressions have incorrect usage of bitwise operators. | Consider using bitwise operators ('&', '|', '^', '~') for bit operations only. |
na_0001_b1: Usage of inequality operator (~=) in Stateflow. | One or more expressions have incorrect usage of inequality operators. | Consider using '~=' for inequality operations. |
na_0001_b2: Usage of inequality operator (!=) in Stateflow. | One or more expressions have incorrect usage of inequality operators. | Consider using '!=' for inequality operations. |
na_0001_b3: Usage of inequality operator (<>) in Stateflow. | One or more expressions have incorrect usage of inequality operators. | Consider using '<>' for inequality operations. |
na_0001_c: Usage of logical negation operator in Stateflow. | One or more scenarios have incorrect usage of logical negation operator. | Consider using '!' for logical negation operations. |
Capabilities and Limitations
Applies only to charts that use C as the action language.
Does not run on library models.
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
.Allows exclusions of blocks and charts.