hisf_0015: Strong data typing (casting variables and parameters in expressions)
R2026bExplicitly type cast variables and parameters of different data types in expressions
Usage: High-Integrity System Modeling
Guideline ID: hisf_0015
Rules
| hisf_0015: Strong data typing (casting variables and parameters in expressions) | |
|---|---|
| A | To facilitate strong data typing, explicitly type cast variables and parameters of different data types in Stateflow®. Rationale Apply strong data typing. Verification Check Stateflow charts for strong data typing (Simulink Check) Example — Correct Explicit type casting is applied to variables and parameters in the expression.
Example — Incorrect No explicit type casting is applied to variables and parameters in the expression.
|
Tips
The Stateflow software automatically casts variables of different type into the same data type. This guideline helps clarify data types of the intermediate variables.
Industry Standards
IEC 61508-3, Table A.3 (2) 'Strongly typed programming language'
IEC 62304, 5.5.3 - Software Unit acceptance criteria
ISO 26262-6, Table 1 (1c) 'Enforcement of strong typing'
EN 50128, Table A.4 (8) 'Strongly Typed Programming Language'
EN 50657, Table A.4 (8) 'Strongly Typed Programming Language'
DO-331, Section MB.6.3.2.g 'Algorithms are accurate'
MISRA C:2012, Rule 10.1
MISRA C:2012, Rule 12.2MISRA C:2023, Rule 10.1
MISRA C:2023, Rule 12.2
Version History
Introduced in R2010aSee Also
Topics
- Model Advisor Checks for High-Integrity Systems Modeling Guidelines (Simulink Check)

