Kurs bölümleri
Eğitim · Kurs 9. SysML v2 temelleri · Bölüm 9.6 / 8
9.6 Doğrulama ve izlenebilirlik 3:32
Doğrulama durumları yazın, RVTM'yi okuyun, matriste bir adımı izleyin ve bir gereksinim türetin.
Holarch 2.22 sürümünü gösterir.
Neler öğreneceksiniz
- Bir hedefi ve bir hükmü olan bir doğrulama tanımı yazın ve onu bir konuya uygulayın
- Doğrulama durumları sayfasında bir adımı ve bir sonucu kaydedin
- Bir gereksinimi doğrulayan durumları ve durumunu RVTM'de okuyun
- İzlenebilirlik Matrisinde bir gereksinimi bir eyleme izleyin
- Bir Derivation bağlantısıyla bir gereksinimi başka bir gereksinimden türetin
Küçük bir Hybrid Car projesi üzerinde SysML v2 öğreticisi Verification and Traceability'yi izleyerek Holarch'ta SysML v2 gereksinimlerini doğrulayın ve izleyin: hedefi bir gereksinimi doğrulayan bir doğrulama tanımı, sedana uygulanan bir doğrulama kullanımı, Doğrulama durumları sayfası ve RVTM, İzlenebilirlik Matrisinde yapılan bir satisfy, gereksinimler arasında bir türetme ve Model denetimleri. SysML, Object Management Group, Inc.'in tescilli ticari markasıdır.
Proje dosyaları
- Bitmiş proje (.holarch.json; Projeleri yönet → Proje dosyaları ▾ → Proje içe aktar (.json)…)
Video holarch.app'ten oynatılır; bkz. Gizlilik Politikası.
Alıştırma
Bunu Holarch'ta, Hybrid Car demo projesinde (SysML v2) kendiniz yapın.
- Hybrid Car demo projenizi açın (gerekirse oluşturun: Projeleri yönet → Proje dosyaları ▾ → Yeni demo proje → Hybrid Car (SysML v2)), Model → Düzenleyici'yi ve
VehicleRequirementspaketini açın. verification <'VC-1.1'> sedanWeighing'den sonraverification def <'VC-2'> BatteryWeighing { subject battery : Battery; objective { verify batteryMassLimit; } return verdict : Boolean = battery.mass <= 50 [kg]; }veverification <'VC-2.1'> sedanBatteryWeighing : BatteryWeighing { subject battery = fleet.sedan.powertrain.battery; }ekleyin.- Doğrulama → Doğrulama durumları'nı açın. Yeni durumun satırında + Adımlar'a, ardından + Adım ekle'ye tıklayın, Eylem altına
Weigh the battery on a bench scaleyazın, Uygula'ya tıklayın ve durum düğmelerinde Başarılı'ya tıklayın. - Doğrulama → RVTM'yi açın ve VR-6
batteryMassLimit'i yeni durum ve onun durumuyla birlikte bulun. - Doğrulama → İzlenebilirlik Matrisi'ni açın, gereksinimleri satır, Eylem sınıfını sütun olarak gösterin,
sedanAccelerationileaccelerate'in kesiştiği hücreye tıklayın ve satisfied by'ı seçin. - Paketin sonuna
requirement <'VR-9'> tankVolume { doc /* The fuel tank shall hold at least 40 L. */ subject tank : FuelTank; }veconnection tankDerivation : Derivation connect carSpec.sedanRange to tankVolume;ekleyin. Ardından Doğrulama → Model denetimleri'ni açın.
RVTM yeni durumu VR-6'ya karşı başarılı olarak listelediğinde, Düzenleyici yeni satisfy'ı ve tankDerivation'ı içerdiğinde ve durum hiçbir sorun bildirmediğinde işiniz bitmiştir.
Kendinizi sınayın
objective massObjective { verify carSpec.sedanMass; }içindeverifyne söyler ve bunu nerede görürsünüz?- Bir doğrulama durumunun hükmü ile Doğrulama durumları sayfasındaki durum arasındaki fark nedir?
- Ne zaman
satisfy, ne zaman birDerivationkullanırsınız? - Bir İzlenebilirlik Matrisi hücresinde satisfied by'ı seçtiğinizde ne olur?
Yanıtları göster
objective massObjective { verify carSpec.sedanMass; }içindeverifyne söyler ve bunu nerede görürsünüz?Bu doğrulama durumunun sedanMass gereksinimini doğruladığını. RVTM durumu o gereksinime karşı listeler.
Bir doğrulama durumunun hükmü ile Doğrulama durumları sayfasındaki durum arasındaki fark nedir?
Hüküm modelin parçasıdır: bir ifade, burada boş ağırlığın sınır içinde olup olmadığı. Bir test çalıştırmasının adımları, sonuçları ve durumu ise modelin yanında tutulan Holarch verileridir.
Ne zaman
satisfy, ne zaman birDerivationkullanırsınız?satisfy, parça veya eylem gibi bir tasarım öğesinin bir gereksinimi karşıladığını söyler. Bir Derivation ise özgün bir gereksinimi ondan türetilen bir gereksinime bağlar;private import RequirementDerivation::*;gerektirir.Bir İzlenebilirlik Matrisi hücresinde satisfied by'ı seçtiğinizde ne olur?
Holarch, SysML metnine bir
satisfyyazar, böylece iz modelin parçası olur ve Düzenleyici'de görünür.
Daha fazla bilgi
- Öğretici: Verification and Traceability (SysML v2 öğreticileri)
- Belgeler: SysML v2 projelerinde gereksinimler, Doğrulamayı planlama ve yürütme
- Belgeler: SysML v2 projelerinde gereksinimler, RVTM
- Belgeler: SysML v2 projelerinde gereksinimler, İzlenebilirlik Matrisi
- Yardım: SysML v2 projelerinde doğrulama
Döküm
Dökümü göster (anlatım ve ekranda görünenler)
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.