Check usage of unary minus operations in Stateflow charts
Check ID:
mathworks.maab.jc_0451
Guideline: jc_0451: Use of unary minus on unsigned integers
Description
Identify unary minus operations applied to unsigned integers in Stateflow® objects.
Do not perform unary minus operations on unsigned integers in Stateflow objects.
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 — a
JMAAB — a
Results and Recommended Actions
Condition | Recommended Action |
---|---|
Unary minus operations are applied to unsigned integers in Stateflow objects. | Modify the specified objects to remove dependency on unary minus operations. |
The Model Advisor could not determine the data types in expressions with unary minus operations. | Typecast the specified expressions explicitly to allow Model Advisor to determine the data types. |
Capabilities and Limitations
Does not run on library models.
Does not analyze content of library linked blocks.
Analyzes content in all masked subsystems.
Allows exclusions of blocks and charts.
Does not support Truth Table (Stateflow) blocks and Stateflow transition tables.