Check usage of floating-point expressions in Stateflow charts
Check ID:
mathworks.jmaab_v6.jc_0481
Guideline: jc_0481: Use of hard equality comparisons for floating point numbers in Stateflow®
Description
Identify equal to operations(==
) in expressions where at
least one side of the expression is a floating-point variable or
constant.
This check requires a Simulink® Check™ and Stateflow license.
Check Parameterization
This check does not include sub-checks because the JMAAB 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 |
---|---|
Expressions use equality comparison
operations(== ,
!= , ~= ,
<> ) where at least one side
of the expression is a floating-point variable or
constant. | Modify the specified expressions to avoid equality comparison operations between floating-point expressions. |
The Model Advisor could not determine the data types in expressions with equality operations. | To allow Model Advisor to determine the data types, consider explicitly typecasting the specified expressions. |
Capabilities and Limitations
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.
Does not support Truth Table (Stateflow) blocks and Stateflow transition tables.