Holarch
Rozdziały kursu

Szkolenia · Ścieżka 9. Podstawy SysML v2 · Rozdział 9.6 z 8

9.6 Weryfikacja i identyfikowalność 3:32

Pisanie przypadków weryfikacji, odczytywanie RVTM, śledzenie kroku w macierzy i wyprowadzanie wymagania.

Pokazuje Holarch 2.22.

← 9.5 Wymagania · Wszystkie rozdziały · 9.7 Ograniczenia i obliczenia →

Czego się nauczysz

  • Pisanie definicji weryfikacji z celem i werdyktem oraz stosowanie jej do podmiotu
  • Rejestrowanie kroku i wyniku na stronie Przypadki weryfikacji
  • Odczytywanie przypadków weryfikujących wymaganie i jego statusu w RVTM
  • Powiązanie wymagania z akcją w Macierzy identyfikowalności
  • Wyprowadzanie jednego wymagania z drugiego za pomocą połączenia Derivation

Weryfikuj i śledź wymagania SysML v2 w Holarch zgodnie z samouczkiem SysML v2 Weryfikacja i identyfikowalność na małym projekcie Hybrid Car: definicja weryfikacji, której cel weryfikuje wymaganie, użycie weryfikacji zastosowane do sedana, strona Przypadki weryfikacji i RVTM, satisfy utworzone w Macierzy identyfikowalności, wyprowadzenie między wymaganiami oraz Kontrole modelu. SysML jest zastrzeżonym znakiem towarowym Object Management Group, Inc.

Pliki projektu

  • Projekt ukończony (.holarch.json; Zarządzaj projektami → Pliki projektu ▾ → Importuj projekt (.json)…)

Film jest odtwarzany z holarch.app; zobacz Politykę prywatności.

Ćwiczenie

Wykonaj to samodzielnie w Holarch na projekcie demonstracyjnym Hybrid Car (SysML v2).

  1. Otwórz swój projekt demonstracyjny Hybrid Car (w razie potrzeby utwórz go: Zarządzaj projektami → Pliki projektu ▾ → Nowy projekt demonstracyjny → Hybrid Car (SysML v2)), otwórz Model → Edytor i pakiet VehicleRequirements.
  2. Po verification <'VC-1.1'> sedanWeighing dodaj verification def <'VC-2'> BatteryWeighing { subject battery : Battery; objective { verify batteryMassLimit; } return verdict : Boolean = battery.mass <= 50 [kg]; } i verification <'VC-2.1'> sedanBatteryWeighing : BatteryWeighing { subject battery = fleet.sedan.powertrain.battery; }.
  3. Otwórz Weryfikacja → Przypadki weryfikacji. W wierszu nowego przypadku kliknij + Kroki, a następnie + Dodaj krok, wpisz Weigh the battery on a bench scale w kolumnie Działanie, kliknij Zastosuj i kliknij Zaliczone wśród przycisków statusu.
  4. Otwórz Weryfikacja → RVTM i znajdź VR-6 batteryMassLimit z nowym przypadkiem i jego statusem.
  5. Otwórz Weryfikacja → Macierz identyfikowalności, pokaż wymagania jako wiersze, a klasę Działanie jako kolumny, kliknij komórkę, w której sedanAcceleration spotyka się z accelerate, i wybierz satisfied by.
  6. Na końcu pakietu dodaj requirement <'VR-9'> tankVolume { doc /* The fuel tank shall hold at least 40 L. */ subject tank : FuelTank; } i connection tankDerivation : Derivation connect carSpec.sedanRange to tankVolume;. Następnie otwórz Weryfikacja → Kontrole modelu.

Gotowe, gdy RVTM wymienia nowy przypadek przy VR-6 jako zaliczony, Edytor zawiera nowe satisfy i tankDerivation, a stan nie zgłasza problemów.

Sprawdź się

  1. Co mówi verify w objective massObjective { verify carSpec.sedanMass; } i gdzie to widać?
  2. Czym różni się werdykt przypadku weryfikacji od statusu na stronie Przypadki weryfikacji?
  3. Kiedy używać satisfy, a kiedy Derivation?
  4. Co się dzieje, gdy wybierasz satisfied by w komórce Macierzy identyfikowalności?
Pokaż odpowiedzi
  1. Co mówi verify w objective massObjective { verify carSpec.sedanMass; } i gdzie to widać?

    Że ten przypadek weryfikacji weryfikuje wymaganie sedanMass. RVTM wymienia przypadek przy tym wymaganiu.

  2. Czym różni się werdykt przypadku weryfikacji od statusu na stronie Przypadki weryfikacji?

    Werdykt jest częścią modelu: wyrażeniem, tutaj tym, czy masa własna mieści się w limicie. Kroki, wyniki i status przebiegu testu to dane Holarch przechowywane obok modelu.

  3. Kiedy używać satisfy, a kiedy Derivation?

    satisfy mówi, że element projektu, np. część lub akcja, spełnia wymaganie. Derivation łączy wymaganie pierwotne z wymaganiem z niego wyprowadzonym; wymaga private import RequirementDerivation::*;.

  4. Co się dzieje, gdy wybierasz satisfied by w komórce Macierzy identyfikowalności?

    Holarch zapisuje satisfy w tekście SysML, więc ślad jest częścią modelu i jest widoczny w Edytorze.

Więcej informacji

Transkrypcja

Pokaż transkrypcję (narracja i to, co widać na ekranie)

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.