Kurskapitel
Schulung · Reihe 9. SysML-v2-Grundlagen · Kapitel 9.6 von 8
9.6 Verifikation und Nachverfolgbarkeit 3:32
Verification Cases schreiben, die RVTM lesen, einen Schritt in der Matrix nachverfolgen und eine Anforderung ableiten.
Zeigt Holarch 2.22.
Das lernen Sie
- Eine Verification-Definition mit Ziel und Verdict schreiben und sie auf ein Subjekt anwenden
- Einen Schritt und ein Ergebnis auf der Seite „Verifikationsfälle“ erfassen
- Die verifizierenden Fälle und den Status einer Anforderung in der RVTM lesen
- Eine Anforderung in der Nachverfolgbarkeitsmatrix zu einer Action nachverfolgen
- Eine Anforderung mit einer Derivation-Connection aus einer anderen ableiten
Verifizieren und verfolgen Sie SysML-v2-Anforderungen in Holarch nach, nach dem SysML-v2-Tutorial „Verification and Traceability“ an einem kleinen Hybrid-Car-Projekt: eine Verification-Definition, deren Ziel eine Anforderung verifiziert, eine auf die Limousine angewendete Verification-Usage, die Seite „Verifikationsfälle“ und die RVTM, ein in der Nachverfolgbarkeitsmatrix angelegtes satisfy, eine Ableitung zwischen Anforderungen und die Modellprüfungen. SysML ist eine eingetragene Marke der Object Management Group, Inc.
Projektdateien
- Fertiges Projekt (.holarch.json; Projekte verwalten → Projektdateien ▾ → Projekt importieren (.json)…)
Das Video wird von holarch.app abgespielt; siehe Datenschutzerklärung.
Übung
Führen Sie dies selbst in Holarch durch, am Demoprojekt Hybrid Car (SysML v2).
- Öffnen Sie Ihr Demoprojekt Hybrid Car (erstellen Sie es bei Bedarf: Projekte verwalten → Projektdateien ▾ → Neues Demoprojekt → Hybridauto (SysML v2)), öffnen Sie Modell → Editor und das Package
VehicleRequirements. - Fügen Sie nach
verification <'VC-1.1'> sedanWeighingverification def <'VC-2'> BatteryWeighing { subject battery : Battery; objective { verify batteryMassLimit; } return verdict : Boolean = battery.mass <= 50 [kg]; }undverification <'VC-2.1'> sedanBatteryWeighing : BatteryWeighing { subject battery = fleet.sedan.powertrain.battery; }hinzu. - Öffnen Sie Verifikation → Verifikationsfälle. Klicken Sie in der Zeile des neuen Falls auf + Schritte, dann auf + Schritt hinzufügen, geben Sie unter Aktion
Weigh the battery on a bench scaleein, klicken Sie auf Anwenden und klicken Sie in seinen Statusschaltflächen auf Bestanden. - Öffnen Sie Verifikation → RVTM und suchen Sie VR-6
batteryMassLimitmit dem neuen Fall und seinem Status. - Öffnen Sie Verifikation → Nachverfolgbarkeitsmatrix, zeigen Sie Anforderungen als Zeilen und die Klasse Action als Spalten, klicken Sie auf die Zelle, in der sich
sedanAccelerationundacceleratetreffen, und wählen Sie satisfied by. - Fügen Sie am Ende des Package
requirement <'VR-9'> tankVolume { doc /* The fuel tank shall hold at least 40 L. */ subject tank : FuelTank; }undconnection tankDerivation : Derivation connect carSpec.sedanRange to tankVolume;hinzu. Öffnen Sie dann Verifikation → Modellprüfungen.
Sie sind fertig, wenn die RVTM den neuen Fall gegen VR-6 als bestanden auflistet, der Editor das neue satisfy und tankDerivation enthält und der Status keine Probleme meldet.
Selbsttest
- Was sagt
verifyinobjective massObjective { verify carSpec.sedanMass; }aus, und wo sehen Sie es? - Was ist der Unterschied zwischen dem Verdict eines Verification Case und dem Status auf der Seite „Verifikationsfälle“?
- Wann verwenden Sie
satisfyund wann eineDerivation? - Was geschieht, wenn Sie in einer Zelle der Nachverfolgbarkeitsmatrix satisfied by wählen?
Antworten anzeigen
Was sagt
verifyinobjective massObjective { verify carSpec.sedanMass; }aus, und wo sehen Sie es?Dass dieser Verification Case die Anforderung sedanMass verifiziert. Die RVTM listet den Fall gegen diese Anforderung auf.
Was ist der Unterschied zwischen dem Verdict eines Verification Case und dem Status auf der Seite „Verifikationsfälle“?
Das Verdict ist Teil des Modells: ein Ausdruck, hier ob die Leermasse innerhalb des Grenzwerts liegt. Schritte, Ergebnisse und der Status eines Testlaufs sind Holarch-Daten, die neben dem Modell gehalten werden.
Wann verwenden Sie
satisfyund wann eineDerivation?satisfysagt, dass ein Entwurfselement, etwa ein Part oder eine Action, eine Anforderung erfüllt. Eine Derivation verbindet eine ursprüngliche Anforderung mit einer daraus abgeleiteten Anforderung; sie brauchtprivate import RequirementDerivation::*;.Was geschieht, wenn Sie in einer Zelle der Nachverfolgbarkeitsmatrix satisfied by wählen?
Holarch schreibt ein
satisfyin den SysML-Text, sodass die Nachverfolgung Teil des Modells ist und im Editor erscheint.
Weiterlesen
- Tutorial: Verification and Traceability (SysML-v2-Tutorials)
- Dokumentation: Anforderungen in SysML-v2-Projekten, Verifikation planen und ausführen
- Dokumentation: Anforderungen in SysML-v2-Projekten, RVTM
- Dokumentation: Anforderungen in SysML-v2-Projekten, Nachverfolgbarkeitsmatrix
- Hilfe: Verifikation in SysML-v2-Projekten
Transkript
Transkript anzeigen (Erzählung und Bildschirminhalt)
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.