Main Content

Check description of execution statements

Check ID: mathworks.jmaab_v6.mp_0007

Guideline: mp_0007: How to describe execution statements

Description

Checks if execution statements are written on separate lines and if each execution statement ends with a semicolon.

Execution statements are nonempty statements that are not conditional statements.

This check applies to the following target components:

  • MATLAB Function blocks in Simulink®.

  • MATLAB® functions in Stateflow® charts.

  • States, transitions, and truth tables in Stateflow MATLAB charts.

  • External MATLAB files referenced in a model.

This check requires a Simulink Check™ license.

Check Parameterization

This check contains sub-checks that correspond to sub IDs specified in the JMAAB modeling guidelines. You can use the Model Advisor Configuration Editor to specify which sub IDs (one or multiple) to execute.

For reference, the guideline sub ID(s) that are recommended for use by the JMAAB modeling standards organizations are:

  • JMAAB — a, b

Select Check external .m files referenced in the model, to include .m files referenced by a model in the analysis. The check box is selected by default.

Results and Recommended Actions

Guideline Sub IDConditionRecommended Action
mp_0007_a: Check whether each execution statement is written in a new line.Multiple execution statements are written in a single line.Write each execution statement on a separate line.
mp_0007_b: Check for a semicolon at the end of each execution statement. One or more execution statements do not end with a semicolon.Add a semicolon at the end of each execution statement.

Capabilities and Limitations

  • Does not analyze state and transition labels in Stateflow charts.

  • 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 all.

  • Runs on library models.

  • Allows exclusion of blocks and charts.