Main Content

Review Requirements Implementation Status

Requirements Toolbox™ provides you with implementation status summaries for your requirement sets. You can use these status summaries to identify requirement implementation gaps in your design.

Implement Functional Requirements by Linking to Model Elements

The requirement type specifies the role that a requirement has. Functional requirements are meant to be implemented and contribute to the implementation status, as well as requirements with a custom type that is a subtype of Functional. For more information, see Define Custom Requirement and Link Types by Using sl_customization Files. When you select a requirement in the Requirements Editor, the requirement type is displayed in the right pane, under Properties. When you add a requirement, it is created with the Functional type by default. If a requirement is not meant to be implemented, you can change the requirement type. To read more about requirement types, see Requirement Types.

To implement a functional requirement, you can link it with a Simulink®, Stateflow®, or System Composer™ model element. Requirements that have an incoming link with the Implement type or a custom link type that is defined as a subtype of Implement are considered implemented by the implementation status. For more information, see Link Types and Define Custom Requirement and Link Types by Using sl_customization Files.

The implementation status for a requirement set is cumulatively aggregated over the requirements in the set. Each child requirement must be implemented for the parent requirement to be considered implemented. If you need to manually implement a requirement, you can link it to a justification object for implementation. The implementation status considers this requirement's lack of implementation to be justified. To read more about justifying requirements, see Justify Requirements.

Note

The implementation status will consider any requirement to be implemented if it has an incoming link of the Implement type, regardless of the link source item (unless the link source is a justification, in which case it will be considered justified). To read about how to change an existing link type, see Link Types.

When you link a requirement to a Simulink, Stateflow, or System Composer model element, the link is created with the Implement type by default. When you select a requirement in the Requirements Editor, associated links and the link type are displayed in the right pane, under Links.

The Requirements Editor shows the crs_req_func_spec requirement set and displays the Implemented and Verified columns.

Tip

If a requirement can be implemented by multiple items and you want to get the detailed status of the implementation of each item, you can split a requirement into smaller requirements and implement each requirement separately.

Run Link Implementation Analysis

Requirements Toolbox does not perform link implementation analysis until you run it. You can run the analysis in the Requirements Editor or Requirements Perspective.

A banner in the Requirements Editor or Requirements Perspective indicates when results are pending. To run the analysis, click Analyze now in the banner. Alternatively, click Refresh in the Requirements Editor or the Refresh button in the Requirements Perspective.

Link implementation analysis continuously runs in the background until you use slreq.clear.

Alternatively, you can use updateImplementationStatus and getImplementationStatus to view the implementation status at the MATLAB® command line without running the analysis in the Requirements Editor or Requirements Perspective.

View the Implementation Status

You can view the implementation status for your requirement sets from both the Requirements Editor and the Requirements Browser in the Requirements Perspective View. To toggle the status display in theRequirements Editor, select Columns > Implementation Status. In the Requirements Editor or the Requirements Browser, point to the Implemented column for each requirement or requirement set to view the implementation status associated with it.

The mouse points to the implementation status bar for the crs_req_func_spec requirement set. The tooltip indicates the 48 of the requirements are implemented, 4 are justified, and 14 do not have links.

The fullness of the bar indicates how many requirements in a group (including the parent requirement and child requirements) are linked to implementation items. The color indicates the level of implementation:

  • Implemented (blue): The requirement is linked to an item with an Implement type link.

  • Justified (light blue): The requirement is linked to a justification with an Implement type link. For more information, see Justify Requirements.

  • None (colorless): The requirement does not have any Implement type links.

See Also

Related Topics