Holarch
Course chapters

Training · Track 9. SysML v2 Fundamentals · Chapter 9.6 of 8

9.6 Verification and Traceability 3:32

Write verification cases, read the RVTM, trace a step in the matrix and derive a requirement.

Shows Holarch 2.22.

What you’ll learn

  • Write a verification definition with an objective and a verdict, and apply it to a subject
  • Record a step and a result on the Verification Cases page
  • Read a requirement's verifying cases and status in the RVTM
  • Trace a requirement to an action in the Traceability Matrix
  • Derive one requirement from another with a Derivation connection

Verify and trace SysML v2 requirements in Holarch, following the SysML v2 tutorial Verification and Traceability on a small Hybrid Car project: a verification definition whose objective verifies a requirement, a verification usage applied to the sedan, the Verification Cases page and the RVTM, a satisfy made in the Traceability Matrix, a derivation between requirements, and Model Checks. SysML is a registered trademark of Object Management Group, Inc.

Project files

  • Finished project (.holarch.json; Manage Projects → Project Files ▾ → Import Project (.json)…)

The video plays from holarch.app; see the Privacy Policy.

Practice

Do this yourself in Holarch, on the Hybrid Car demo project (SysML v2).

  1. Open your Hybrid Car demo project (create it if needed: Manage Projects → Project Files ▾ → New Demo Project → Hybrid Car (SysML v2)), open Model → Editor and the package VehicleRequirements.
  2. After verification <'VC-1.1'> sedanWeighing, add verification def <'VC-2'> BatteryWeighing { subject battery : Battery; objective { verify batteryMassLimit; } return verdict : Boolean = battery.mass <= 50 [kg]; } and verification <'VC-2.1'> sedanBatteryWeighing : BatteryWeighing { subject battery = fleet.sedan.powertrain.battery; }.
  3. Open Verification → Verification Cases. In the row of the new case, click + Steps, then + Add Step, type Weigh the battery on a bench scale under Action, click Apply, and click Passed in its status buttons.
  4. Open Verification → RVTM and find VR-6 batteryMassLimit with the new case and its status.
  5. Open Verification → Traceability Matrix, show requirements as rows and the class Action as columns, click the cell where sedanAcceleration meets accelerate, and choose satisfied by.
  6. At the end of the package, add requirement <'VR-9'> tankVolume { doc /* The fuel tank shall hold at least 40 L. */ subject tank : FuelTank; } and connection tankDerivation : Derivation connect carSpec.sedanRange to tankVolume;. Then open Verification → Model Checks.

You're done when the RVTM lists the new case against VR-6 as passed, the Editor holds the new satisfy and tankDerivation, and the status reports no problems.

Check yourself

  1. In objective massObjective { verify carSpec.sedanMass; }, what does verify say, and where do you see it?
  2. What is the difference between a verification case's verdict and the status on the Verification Cases page?
  3. When do you use satisfy, and when a Derivation?
  4. What happens when you choose satisfied by in a Traceability Matrix cell?
Show the answers
  1. In objective massObjective { verify carSpec.sedanMass; }, what does verify say, and where do you see it?

    That this verification case verifies the requirement sedanMass. The RVTM lists the case against that requirement.

  2. What is the difference between a verification case's verdict and the status on the Verification Cases page?

    The verdict is part of the model: an expression, here whether the curb mass is within the limit. Steps, results and the status of a test run are Holarch data kept next to the model.

  3. When do you use satisfy, and when a Derivation?

    satisfy says a design element, such as a part or an action, meets a requirement. A Derivation connects an original requirement to a requirement derived from it; it needs private import RequirementDerivation::*;.

  4. What happens when you choose satisfied by in a Traceability Matrix cell?

    Holarch writes a satisfy into the SysML text, so the trace is part of the model and shows in the Editor.

Read more

Transcript

Show the transcript (narration and what is on screen)

Introduction

Chapter six: verification and traceability. A verification case says how a requirement is checked, and traceability shows what connects to what.

In this chapter you write a verification case and apply it to the sedan, check the RVTM, trace a step to a requirement in the matrix, and derive a requirement.

Start the tutorial

Start the tutorial Verification and Traceability from Project Files, Start a Tutorial. Its starter project holds the curb mass requirement and the car specification, a short drive cycle, and two more requirements: a battery mass limit and stopping from cruise.

On screen: Project Files ▾ → Start a Tutorial… → SysML v2: Verification and Traceability → Start; Model → Editor.

Verification cases

After the verification comment, write the verification definition. Its objective names the requirement it verifies, and its verdict passes when the curb mass is within the limit.

On screen: After // ---- Verification ----: verification def <'VC-1'> CurbMassTest.

Below it, apply it to the sedan: a verification usage that weighs the sedan of the fleet.

On screen: Below it: verification <'VC-1.1'> sedanWeighing : CurbMassTest.

Open Verification, then Verification Cases. The model's verification cases are the test cases here. Steps, results and status are Holarch data next to the model, kept on this page.

On screen: Verification → Verification Cases; the Sedan Weighing row.

In the Sedan Weighing row, click Steps, then Add Step. Type weigh the car as the action, and click Apply.

On screen: + Steps → + Add Step; Action: Weigh the car; Apply.

Then set the result: click Passed in its status buttons.

On screen: Status buttons → Passed.

Open the RVTM. Each requirement is listed with its verification method, the cases that verify it, and their status.

On screen: Verification → RVTM.

Traceability

Now trace a step to a requirement. Open the Traceability Matrix. Its rows are the requirements; open Columns, and choose the class Action.

On screen: Verification → Traceability Matrix; rows: Requirement; Columns: class Action; Done.

Click the cell where stop from cruise meets the brake step, and choose satisfied by. Holarch writes a satisfy into the text.

On screen: Cell stopFromCruise × brake → satisfied by.

In the Editor, the satisfy is there. To derive a requirement, first import the requirement derivation package after the other imports.

On screen: Model → Editor: the new satisfy; import RequirementDerivation.

Then, at the end of the package, connect the sedan's mass requirement to the battery mass limit with a derivation: the battery limit is derived from the curb mass requirement.

On screen: After sedanWeighing: connection batteryMassDerivation : Derivation connect carSpec.sedanMass to batteryMassLimit;

Last, open Verification, then Model Checks. Rules run over the whole model, for example requirements without a satisfy or a verify, and each finding links to its element.

On screen: Verification → Model Checks.

Recap

Every step is ticked off. Click Mark as Done.

On screen: Step panel → Mark as Done.

Let's recap. You wrote a verification case with an objective and a verdict, applied it to the sedan, opened the Verification Cases and the RVTM, traced a step to a requirement in the matrix, and derived one requirement from another.

Next, constraints and calculations evaluate the sedan's values.