Contenuto principale

Check Consistency Between Requirements and Linked Artifacts

R2026b

If you have the Third-Party Tool Connector for Requirements Toolbox™ add-on and a MATLAB® Copilot license, you can use the Requirements Advisor to check whether requirements are consistent with their linked implementation artifacts. The Requirements Advisor analyzes links between requirements and Simulink® models or code files, identifies contradictions, and suggests modifications to resolve inconsistencies.

Note

The Requirements Advisor uses MATLAB Copilot to analyze links and check for issues. Consequently, consistency checks might contain errors or incorrect results. Before you update requirements or apply modifications suggested by the Requirements Advisor, validate the results and suggested modifications.

About Link Consistency Checks

The link consistency check evaluates whether the behavior described in a requirement contradicts the behavior implemented in the linked artifact. The check analyzes each traceability link between a requirement and its linked implementation artifact.

The check does not flag an issue when behavior described in the requirement is absent from the linked artifact. Because multiple blocks or functions may implement one requirement, the absence of specific behavior in a linked artifact does not indicate an inconsistency.

Check for Link Consistency

To check link consistency, your requirements must have traceability links to implementation artifacts. You can check links from these artifact types:

  • Simulink models (.slx)

  • MATLAB code files (.m)

  • Plain-text external code files, such as C and H files

To run a link consistency check:

  1. Sign in to your MathWorks® account.

  2. Open the new Requirements Editor UI.

  3. Open the requirements set. Click Open, then click Browse this PC In the Open Requirement or Link Set File dialog box, select the requirement set file and click Open.

  4. Open the link set file. In the Requirements Editor, click Open, then click Browse this PC. In the Open Requirement or Link Set File dialog box, select the link set file and click Open.

  5. Open the Requirements Advisor. In the Requirements Editor, in the Tools section, click Requirements Advisor.

  6. Select the link consistency check. In the Advisor tab, click Run Analysis and select Link Consistency.

  7. Select the requirement property that contains the requirement text that you want to evaluate for consistency. In the Run section, click Preferences. In the Requirements Advisor Preferences dialog box, set the Requirement Property property to Summary or Description click Apply.

  8. Analyze the requirement set. Click Run Analysis. By default, the analysis checks all the requirements in the requirement set.

    Tip

    To analyze a subset of requirements, select the requirements to analyze and click Run Analysis. Then, click Start on Selection.

Review Link Consistency Results

After you run link consistency checks, you can view the results in the Requirements Advisor.

To view results in the requirement set, in the Requirements Advisor, in the View section, click Show Results in Table. Then, select Link Consistency.

The requirement set column displays a status icon for each linked requirement. Each icon indicates whether the check found consistency issues, found no issues, returned warnings, or has stale results. For example:

  • A red Links status icon with an X — The check found consistency issues.

  • A green Links status icon with a checkmark — The check found no issues.

  • A yellow Links status icon with a warning symbol — The analysis completed with warnings or the results are stale.

If the requirement is not linked to an artifact, the property column does not display a result.

You can view detailed information about the analysis results in the Requirements Advisor panel. In the Requirements Advisor, in the View section, click Result Details Panel.

To view link consistency analysis details for a specific requirement, select the requirement and, in the Requirements Advisor panel, expand the Link Consistency section. If the consistency check finds issues, the details include:

  • The linked artifact label. Click the label to navigate to the artifact in MATLAB or Simulink.

  • An explanation of the contradiction between the requirement and the linked artifact.

Link Consistency section of the Requirements Advisor panel, showing a contradiction explanation and a link to the flagged Simulink model block

After you address the issues, rerun the link consistency analysis to check for additional issues.

See Also

Topics