Skip to content

Commit

Permalink
Updated training material for 2020-11 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
seidewitz committed Dec 16, 2020
1 parent 9203a49 commit 3dec1ff
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 0 deletions.
Binary file modified doc/Intro to the SysML v2 Language.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package 'Verification Case Definition Example' {

part def Vehicle {
attribute mass :> ISQ::mass;
}

requirement vehicleMassRequirement {
subject vehicle : Vehicle;
doc /* The vehicle mass shall be less than or equal to 2500 kg. */

require constraint { vehicle::mass <= 2500@[SI::kg] }
}

verification def VehicleMassTest {
import Verifications::*;

subject testVehicle : Vehicle;
objective vehicleMassVerificationObjective {
// The subject of the verify is automatically bound to 'testVehicle' here.
verify vehicleMassRequirement;
}

action collectData {
in part testVehicle : Vehicle = VehicleMassTest::testVehicle;
out massMeasured :> ISQ::mass;
}

action processData {
in massMeasured :> ISQ::mass = collectData::massMeasured;
out massProcessed :> ISQ::mass;
}

action evaluateData {
in massProcessed :> ISQ::mass = processData::massProcessed;
out verdict : VerdictKind =
// Check that 'testVehicle' statisfies 'vehicleMassRequirement' if its mass equals 'massProcessed'.
PassIf(vehicleMassRequirement(vehicle => testVehicle, massActual => massProcessed));
}

return verdict : VerdictKind = evaluateData::verdict;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package 'Verification Case Usage Example' {
import 'Verification Case Definition Example'::*;

part def MassVerificationSystem;
part def Scale;

part vehicleTestConfig : Vehicle {
// ...
}

verification vehicleMassTest : VehicleMassTest {
subject testVehicle :> vehicleTestConfig;
}

part massVerificationSystem : MassVerificationSystem {
perform vehicleMassTest;

part scale : Scale {
perform vehicleMassTest::collectData {
in part :>> testVehicle;

// In reality, this would be some more involved process.
measurement = testVehicle::mass;

out :>> massMeasured = measurement;
}
}
}

individual def TestSystem :> MassVerificationSystem;

individual def TestVehicle1 :> Vehicle;
individual def TestVehicle2 :> Vehicle;

individual testSystem : TestSystem :> massVerificationSystem {
timeslice test1 {
perform action :>> vehicleMassTest {
individual :>> testVehicle : TestVehicle1 {
:>> mass = 2500@[SI::kg];
}
}
}

then timeslice test2 {
perform action :>> vehicleMassTest {
individual :>> testVehicle : TestVehicle2 {
:>> mass = 3000@[SI::kg];
}
}
}
}
}

0 comments on commit 3dec1ff

Please sign in to comment.