コースのチャプター
トレーニング · トラック 9. SysML v2 の基礎 · チャプター 9.6(全 8 チャプター)
9.6 検証とトレーサビリティ 3:32
検証ケースを記述し、RVTM を読み、マトリックスでステップをトレースし、要求を導出します。
Holarch 2.22 の画面です。
学習内容
- 目的と判定を持つ検証定義を記述し、対象に適用する
- 検証ケースページでステップと結果を記録する
- RVTM で要求を検証するケースとステータスを読む
- トレーサビリティマトリックスで要求をアクションにトレースする
- Derivation 接続で、ある要求から別の要求を導出する
小さな Hybrid Car プロジェクトで SysML v2 チュートリアル「Verification and Traceability」に沿って、Holarch で SysML v2 の要求を検証しトレースします。目的が要求を検証する検証定義、セダンに適用した検証使用、検証ケースページと RVTM、トレーサビリティマトリックスで作成する satisfy、要求間の導出、そしてモデルチェックを扱います。SysML は Object Management Group, Inc. の登録商標です。
プロジェクトファイル
- 完成したプロジェクト (.holarch.json。プロジェクトを管理 → プロジェクトファイル ▾ → プロジェクトをインポート (.json)…)
動画は holarch.app から再生されます。プライバシーポリシーをご覧ください。
演習
Hybrid Car デモプロジェクト(SysML v2)を使って、Holarch で実際に操作します。
- Hybrid Car デモプロジェクトを開き(必要に応じて作成します:プロジェクトを管理 → プロジェクトファイル ▾ → 新しいデモプロジェクト → Hybrid Car (SysML v2))、モデル → エディターとパッケージ
VehicleRequirementsを開きます。 verification <'VC-1.1'> sedanWeighingの後に、verification def <'VC-2'> BatteryWeighing { subject battery : Battery; objective { verify batteryMassLimit; } return verdict : Boolean = battery.mass <= 50 [kg]; }とverification <'VC-2.1'> sedanBatteryWeighing : BatteryWeighing { subject battery = fleet.sedan.powertrain.battery; }を追加します。- 検証 → 検証ケースを開きます。新しいケースの行で+ ステップをクリックし、続いて+ ステップを追加をクリックして、Action に
Weigh the battery on a bench scaleと入力し、適用をクリックしてから、ステータスボタンのPassedをクリックします。 - 検証 → RVTM を開き、新しいケースとそのステータスを持つ VR-6
batteryMassLimitを見つけます。 - 検証 → トレーサビリティマトリックスを開き、行に要求、列にクラス Action を表示して、
sedanAccelerationとaccelerateが交わるセルをクリックし、satisfied by を選びます。 - パッケージの末尾に、
requirement <'VR-9'> tankVolume { doc /* The fuel tank shall hold at least 40 L. */ subject tank : FuelTank; }とconnection tankDerivation : Derivation connect carSpec.sedanRange to tankVolume;を追加します。次に検証 → モデルチェックを開きます。
RVTM で新しいケースが VR-6 に対して合格と表示され、エディターに新しい satisfy と tankDerivation があり、ステータスに問題が表示されなければ完了です。
確認問題
objective massObjective { verify carSpec.sedanMass; }で、verifyは何を表し、それはどこで確認できますか?- 検証ケースの判定と、検証ケースページのステータスの違いは何ですか?
satisfyを使うのはどんなときで、Derivationを使うのはどんなときですか?- トレーサビリティマトリックスのセルで satisfied by を選ぶと、何が起こりますか?
解答を表示
objective massObjective { verify carSpec.sedanMass; }で、verifyは何を表し、それはどこで確認できますか?この検証ケースが要求 sedanMass を検証することです。RVTM では、その要求に対してこのケースが表示されます。
検証ケースの判定と、検証ケースページのステータスの違いは何ですか?
判定はモデルの一部で、式です。ここでは車両重量が制限内かどうかです。テスト実行のステップ、結果、ステータスは、モデルの横に保持される Holarch のデータです。
satisfyを使うのはどんなときで、Derivationを使うのはどんなときですか?satisfyは、パートやアクションなどの設計要素が要求を満たすことを表します。Derivation は、元の要求とそこから導出された要求を接続します。これにはprivate import RequirementDerivation::*;が必要です。トレーサビリティマトリックスのセルで satisfied by を選ぶと、何が起こりますか?
Holarch は SysML のテキストに
satisfyを書き込むため、トレースはモデルの一部となり、エディターに表示されます。
関連資料
トランスクリプト
トランスクリプトを表示 (ナレーションと画面の内容)
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.