Main Content

Check for model elements that do not link to requirements

Check ID: mathworks.hism.hisl_0070

Check whether Simulink® or System Composer™ model elements link to a requirements document.

Description

This check verifies whether model elements or groups of model elements link to a document containing engineering requirements for traceability.

This check also verifies whether each component adheres to the maximum number of unique requirement links, and that each linked component, in turn, adheres to the maximum number of child objects.

  • Component — A component is a group of model elements. Components can be further defined as follows:

    • In Simulink, a component is a top-level block diagram, subsystem, MATLAB function, or area annotation.

    • In Stateflow®, a component is a chart, superstate, box, Simulink function, graphical function, Simulink State, MATLAB Function, or Truth Table.

    • In MATLAB®, a component is a function.

    • In System Composer, a component is a Component block or an Adapter block.

  • Child object — A child object can be defined as follows:

    • In Simulink, child objects are all model elements without requirement links except subsystems.

    • In Stateflow, child objects are the following without requirement links: states, boxes, graphical functions, embedded MATLAB functions, truth tables, subcharts, and atomic subcharts. The exceptions are Simulink based states and Simulink functions.

    • In MATLAB, child objects are lines of code contained within each MATLAB function.

    • In System Composer, child objects are the following without requirement links: System Composer components and Adapter blocks.

Available with Simulink Check™.

This check requires a Requirements Toolbox™ license.

Check Parameterization

The following configuration can be set through Model Advisor Configuration Editor.

  • The check behavior can be set to expecting requirement links at the component level or at the non-exempt model element level through the input parameter Check Behavior. By default, the value is set to Check requirement links to components only (HISL_0070).

  • The maximum number of requirement links per elements allowed can be set through the input parameter Maximum number of requirement links per model elements. By default, the value is set to 5.

  • Maximum number of child objects per linked component in Simulink allowed can be set through the input parameter Maximum number of child objects per linked component in Simulink/System Composer. By default, the value is set to 100.

  • Maximum number of child objects per linked component in Stateflow allowed can be set through the input parameter Maximum number of child objects per linked component in Stateflow. By default, the value is set to 100.

  • Maximum number of lines of code per linked MATLAB function allowed can be set through the input parameter Maximum number of lines of code per linked MATLAB function. By default, the value is set to 200.

  • The model elements that can be exempted from requirement links can be set through the input parameter List of model elements exempt from requirement links.By default, the following list of blocks are included in the parameter. You can also add or remove the blocks as per your requirement.

    • Ground

    • Terminator

    • Inport

    • Outport

    • InportShadow

    • Goto

    • From

    • Mux

    • Demux

    • CMBlock

    • DocBlock

    • System Requirements

Results and Recommended Actions

ConditionRecommended Action
Model elements or groups of model elements do not link to a requirements document.For each model element in the model, in the Model Editor, right-click the model element, select Requirements and specify a requirement.
Model elements have link requirements that exceed the set threshold.Make sure that model elements do not exceed the set threshold for maximum links to requirements.
Components in the model with links to requirements exceed the threshold for number of child objects.Make sure that components with links to requirements do not exceed the threshold for number of child objects.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes the content of library linked blocks. By default, the input parameter Follow links is set to on.

  • Analyzes content in masked subsystems that have no workspaces and no dialogs. By default, the input parameter Look under masks is set to all.

  • Allows exclusions of blocks and charts.

  • Does not allow the exclusion of Stateflow elements.

  • This check verifies the requirements that are added to the MATLAB function headers or to the entire MATLAB function body only.

  • The check report provides a link in the recommended actions tab for opening the Traceability Matrix.

Tip

Run this check from the top model or subsystem that you want to check.

See Also