Main Content

Check usage of recursions

mathworks.hism.hisf_0004

Since R2021a

Dependencies: Simulink® Check™ and Stateflow®

Usage: High-Integrity System Modeling

Guideline: hisf_0004: Protect against recursive function calls to improve code compliance

Description

Use this check to identify the use of recursion.

Note

The undirected events in Stateflow or state machines refer to events that do not have a specific target state or action defined. They are known to cause recursions in the generated code.

Check Parameters

Use the Model Advisor Configuration Editor to define the scope of the analysis by specifying the input parameters.

ParameterDescription
Follow links

Specify whether to include content of library-linked blocks in the analysis.

on (default) | off

Look under masks

Specify whether to include masked model elements in the analysis.

all (default) | none | graphical | functional

  • all — Check analysis includes all masked model elements.

  • none — Check analysis excludes masked model elements.

  • graphical — Check analysis includes only the graphical masked model elements.

  • functional — Check analysis includes only the functional masked model elements.

Recommended Actions and Results

Review the violations that are flagged by the check and the recommended action for fixing the issue. After applying the changes, save the model and rerun the check analysis.

Modeling ConditionRecommended Action
One or more entities are using recursions.Remodel the entities to remove recursions.

Capabilities and Limitations

  • Can be run only from root level of the model

  • Runs on library models

  • Analyzes only active variant choices

  • Performs extensive analysis

Version History

Introduced in R2021a