hisf_0211: Protect against use of unary operators in Stateflow Charts to improve code compliance
R2026bImprove code compliance of the generated code
Usage: High-Integrity System Modeling
Guideline ID: hisf_0211
Rules
| hisf_0211: Protect against use of unary operators in Stateflow® Charts to improve code compliance | |
|---|---|
| A | Do not use unary minus operators on unsigned data types. Rationale Improve code compliance of the generated code. Verification Check Stateflow charts for unary operators (Simulink Check) |
Tips
The MATLAB® and C action languages do not restrict the use of unary minus operators on unsigned expressions.
Industry Standards
DO-331 Section MB.6.3.1.b 'High-level requirements are accurate and consistent'
DO-331 Section MB.6.3.2.b 'Low-level requirements are accurate and consistent'IEC 61508–3, Table A.3 (2) Strongly typed programming language
IEC 61508–3, Table A.4 (3) Defensive programmingIEC 62304, 5.5.3 - Software Unit acceptance criteria
ISO 26262-6, Table 1 (1b) Use of language subsets
ISO 26262-6, Table 1 (1c) Enforcement of strong typing
ISO 26262-6, Table 1 (1d) Use of defensive implementation techniquesEN 50128, Table A.4 (8) Strongly Typed Programming Language
EN 50128, Table A.3 (1) Defensive ProgrammingEN 50657, Table A.4 (8) Strongly Typed Programming Language
EN 50657, Table A.3 (1) Defensive ProgrammingEN 50716, Table A.3 (1) Defensive Programming
MISRA C:2012, Rule 10.1
MISRA C:2023, Rule 10.1