Model Advisor Checks for MISRA SLSF Modeling Standards
R2026bThe MISRA™ SLSF 2023 guidelines define best practices for modeling in Simulink® and Stateflow®. These guidelines help improve model correctness, readability, and long-term maintainability. They also promote a consistent modeling style across teams and reduce ambiguity in model behavior, especially for models intended for automatic code generation.
Model Advisor checks for MISRA SLSF 2023 focus on identifying modeling constructs, configuration settings, and structural patterns that affect determinism, clarity, and tool compatibility. The checks cover various modeling aspects, including model configuration, data typing, signal routing, block usage, execution order, and graphical layout in both Simulink and Stateflow.
The MISRA SLSF 2023 guidelines also include cross‑references to MathWorks Advisory Board (MAB) guidelines version 5.0.
To evaluate how well your model or subsystem aligns with MISRA based modeling practices for Simulink and Stateflow, open the Model Advisor and run the checks under By Task > MISRA Compliance > Modeling Standards for MISRA SLSF.
Running these checks requires Simulink, Stateflow, and Simulink Check™ licenses.
This table provides a cross-reference between MISRA SLSF 2023 rules and their corresponding MAB v5.0 checks. As of the R2026b release of Simulink Check, only those MISRA SLSF 2023 guidelines that have corresponding MAB v5.0 checks are supported.
| MISRA SLSF Rule ID | MISRA SLSF Rule Name | Model Advisor Checks | Check IDs |
|---|---|---|---|
| MISRA AC SLSF 002 | Data types | Check output data type of operation blocks | mathworks.jmaab.jc_0651 |
| MISRA AC SLSF 004 | Diagnostic settings | Check model diagnostic parameters | mathworks.maab.jc_0021 |
| MISRA AC SLSF 005 | Allowable Simulink blocks | Check for prohibited sink blocks | mathworks.maab.hd_0001 |
| MISRA AC SLSF 006 | Block parameters | Check usage of tunable parameters in blocks | mathworks.maab.db_0110 |
| MISRA AC SLSF 008 | Rounding and saturation in Simulink blocks |
| |
| MISRA AC SLSF 010 | Arithmetic operation order |
| |
| MISRA AC SLSF 012 | Switch block | Check usage of Switch blocks | mathworks.maab.jc_0141 |
| MISRA AC SLSF 013 | Multiport switch block | Check settings for data ports in Multiport Switch blocks | mathworks.jmaab.jc_0630 |
| MISRA AC SLSF 015 | Vector and matrix signals | Check usage of vector and bus signals | mathworks.jmaab.na_0010 |
| MISRA AC SLSF 016 | Buses | Check usage of vector and bus signals | mathworks.jmaab.na_0010 |
| MISRA AC SLSF 017 | Unconnected blocks, signal lines and buses | Check for unconnected signal lines and blocks | mathworks.jmaab.db_0081 |
| MISRA AC SLSF 018 | Usage of From and Goto blocks | Check scope of From and Goto blocks | mathworks.maab.na_0011 |
| MISRA AC SLSF 020 | Text appearance | Check model font settings | mathworks.jmaab.db_0043 |
| MISRA AC SLSF 023 | Simulink block, subsystem, and library color | Check for Simulink diagrams using nonstandard display attributes | mathworks.maab.na_0004 |
| MISRA AC SLSF 024 | Simulink block, subsystem, and library drop shadow | Check if blocks are shaded in the model | mathworks.jmaab.jc_0604 |
| MISRA AC SLSF 026 | Simulink block, subsystem, and library naming |
| |
| MISRA AC SLSF 027 | Signal and bus label usage |
| |
| MISRA AC SLSF 028 | Signal and bus label positioning | Check position of signal labels | mathworks.jmaab.db_0097 |
| MISRA AC SLSF 029 | Signal and bus line positioning | Check position of signal labels | mathworks.jmaab.db_0097 |
| MISRA AC SLSF 030 | Port location | Check position of Inport and Outport blocks | mathworks.jmaab.db_0042 |
| MISRA AC SLSF 031 | Data flow and block orientation | Check signal flow in model | mathworks.maab.db_0141 |
| MISRA AC SLSF 034 | Chart properties |
| |
| MISRA AC SLSF 036 | Stateflow/Simulink interface signals, parameters and naming | Check for names of Stateflow ports and associated signals | mathworks.maab.db_0123 |
| MISRA AC SLSF 037 | Internal data | Check definition of Stateflow data | mathworks.jmaab.db_0125 |
| MISRA AC SLSF 039 | States | Check for state in state machines | mathworks.jmaab.db_0137 |
| MISRA AC SLSF 040 | Parallel states | Check usage of parallel states | mathworks.jmaab.jc_0721 |
| MISRA AC SLSF 042 | Default transitions | Check default transition placement in Stateflow charts | mathworks.jmaab.jc_0531 |
| MISRA AC SLSF 043 | Transitions |
| |
| MISRA AC SLSF 044 | State actions | Check prohibited combination of state action and flow chart | mathworks.jmaab.jc_0762 |
| MISRA AC SLSF 045 | Condition actions, transition actions, and state actions | Check condition actions and transition actions in Stateflow | mathworks.jmaab.jc_0753 |
| MISRA AC SLSF 048 | Stateflow coding |
| |
| MISRA AC SLSF 049 | Return values from graphical functions | Check return value assignments in Stateflow graphical functions | mathworks.maab.jc_0511 |
| MISRA AC SLSF 050 | Stateflow window and text appearance |
| |
| MISRA AC SLSF 051 | State chart and flow chart layout | Check transitions in Stateflow Flow charts | mathworks.jmaab.db_0132 |
| MISRA AC SLSF 052 | State labelling |
| |
| MISRA AC SLSF 053 | Transition positioning |
| |
| MISRA AC SLSF 054 | Transition labelling |
| |
| MISRA AC SLSF 055 | State action formatting | Check order of state action types | mathworks.jmaab.jc_0733 |