diff options
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.pledge.originalFiles/Constraints/CaseB_1.ocl')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.pledge.originalFiles/Constraints/CaseB_1.ocl | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.originalFiles/Constraints/CaseB_1.ocl b/Tests/MODELS2020-CaseStudies/case.study.pledge.originalFiles/Constraints/CaseB_1.ocl new file mode 100644 index 00000000..e81c675f --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.originalFiles/Constraints/CaseB_1.ocl | |||
@@ -0,0 +1,144 @@ | |||
1 | import 'file:/Users/Aren Babikian/git/VIATRA-Attributes/original.PLEDGE.case.studies/model/CD_Case_B.uml' | ||
2 | --e.g., import 'file:/Users/User_X/CD_Case_B.uml' | ||
3 | |||
4 | package DomainModel | ||
5 | |||
6 | context BodySenseSystem inv: Set{self.itsTimer}->size()>=1 | ||
7 | |||
8 | context BodySenseSystem inv: Set{self.itsNVM}->size()>=1 | ||
9 | |||
10 | context BodySenseSystem inv: Set{self.itsWatchdog}->size()>=1 | ||
11 | |||
12 | context BodySenseSystem inv: Set{self.itsTemperatureSensor}->size()>=1 | ||
13 | |||
14 | context BodySenseSystem inv: Set{self.itsPreviousOccupancyStatus}->size()>=1 | ||
15 | |||
16 | context BodySenseSystem inv: Set{self.itsALU}->size()>=1 | ||
17 | |||
18 | context BodySenseSystem inv: Set{self.itsOccupancyStatus}->size()>=1 | ||
19 | |||
20 | context BodySenseSystem inv: Set{self.itsBodySenseElectronics}->size()>=1 | ||
21 | |||
22 | context BodySenseSystem inv: Set{self.itsROM}->size()>=1 | ||
23 | |||
24 | context BodySenseSystem inv: Set{self.itsMeasurementValue}->size()>=1 | ||
25 | |||
26 | context BodySenseSystem inv: Set{self.itsRAM}->size()>=1 | ||
27 | |||
28 | context BodySenseSystem inv: Set{self.itsIgnitionResetButton}->size()>=1 | ||
29 | |||
30 | context BodySenseSystem inv: Set{self.itsSFR}->size()>=1 | ||
31 | |||
32 | context BodySenseSystem inv: Set{self.itsBodySenseSensor}->size()>=1 | ||
33 | |||
34 | context BodySenseSystem inv: Set{self.itsVoltageSensor}->size()>=1 | ||
35 | |||
36 | context BodySenseSystem inv: Set{self.itsDefaultCalibrationData}->size()>=1 | ||
37 | |||
38 | context BodySenseSystem inv: Set{self.itsAirbagControlUnit}->size()>=1 | ||
39 | |||
40 | context BodySenseSystem inv: BodySenseSystem.allInstances()->forAll(b|b.itsOccupancyStatus.OccupantClassForAirbagControl = OccupantClassAirbag::Init) | ||
41 | |||
42 | context BodySenseSystem inv: BodySenseSystem.allInstances()->forAll(b|b.itsOccupancyStatus.OccupantClassForSeatBeltReminder = OccupantClassSbr::Init) | ||
43 | |||
44 | context BodySenseSystem inv: BodySenseSystem.allInstances()->forAll(b|b.discardFlag = true) | ||
45 | |||
46 | context NVM inv: Set{self.itsCalibrationData}->size()>=1 | ||
47 | |||
48 | context Thermistor inv: Set{self.itsTemperatureSensor}->size()>=1 | ||
49 | |||
50 | context OccupancyStatus inv: Set{self.itsAirbagControlUnit}->size()>=1 | ||
51 | |||
52 | context AirbagControlUnit inv: Set{self.itsOccupancyStatus}->size()>=1 | ||
53 | |||
54 | context TemperatureSensor inv: self.itsThermistor->size() = 2 | ||
55 | |||
56 | context RAM inv RAMIsValid: RAM.allInstances()->forAll(r|r.isValid = true) | ||
57 | |||
58 | context SFR inv SFRIsValid: SFR.allInstances()->forAll(s|s.isValid = true) | ||
59 | |||
60 | context ALU inv ALUIsValid: ALU.allInstances()->forAll(a|a.isValid = true) | ||
61 | |||
62 | context ROM inv ROMIsValid: ROM.allInstances()->forAll(r|r.isValid = true) | ||
63 | |||
64 | context Error inv e1: Error.allInstances()->select(e|e.oclIsTypeOf(SeatHeaterCircuitIntegrityError))->forAll(e| e.qualificationCounter = 0) | ||
65 | |||
66 | context Error inv e2: Error.allInstances()->select(e|(not e.oclIsKindOf(CommunicationError)) and (not e.oclIsKindOf(VoltageError)))->forAll(r| r.isQualified = false) | ||
67 | |||
68 | context Error inv e6: Error.allInstances()->select(e|e.oclIsKindOf(VoltageError))->forAll(v|v.isQualified = true) | ||
69 | |||
70 | context Error inv e7: Error.allInstances()->select(e|e.oclIsKindOf(VoltageError))->forAll(v|v.isDetected = false) | ||
71 | |||
72 | context Error inv e8: Error.allInstances()->select(e|e.oclIsTypeOf(TemperatureRangeLimitError))->forAll(e|e.isDetected = true) | ||
73 | |||
74 | context Error inv e9: Error.allInstances()->select(e|e.oclIsTypeOf(NVMAccessError))->forAll(e|e.isDetected = true) | ||
75 | |||
76 | context Error inv e10: Error.allInstances()->select(e|e.oclIsTypeOf(VoltageHighError))->forAll(e|e.isDetected = true) | ||
77 | |||
78 | context Error inv e11: Error.allInstances()->select(e|e.oclIsTypeOf(DiscardError))->forAll(e|e.isDetected = true) | ||
79 | |||
80 | context Error inv e12: Error.allInstances()->select(e|e.oclIsTypeOf(MeasurementRangeError))->forAll(e|e.isDetected = true) | ||
81 | |||
82 | context Error inv e13: Error.allInstances()->select(e|e.oclIsTypeOf(CableShieldIntegrityError))->forAll(e|e.isDetected = true) | ||
83 | |||
84 | context Error inv e14: Error.allInstances()->select(e|e.oclIsTypeOf(CalibrationNotLearnedError))->forAll(e|e.isDetected = true) | ||
85 | |||
86 | context Error inv e15: Error.allInstances()->select(e|e.oclIsTypeOf(BuildCheckFailedError))->forAll(e|e.isDetected = true) | ||
87 | |||
88 | context Error inv e16: Error.allInstances()->select(e|e.oclIsTypeOf(SFRError))->forAll(e|e.isDetected = true) | ||
89 | |||
90 | context Error inv e17: Error.allInstances()->select(e|e.oclIsTypeOf(MeasurementSensePathError))->forAll(e|e.isDetected = true) | ||
91 | |||
92 | context Error inv e18: Error.allInstances()->select(e|e.oclIsTypeOf(ROMError))->forAll(e|e.isDetected = true) | ||
93 | |||
94 | context Error inv e19: Error.allInstances()->select(e|e.oclIsTypeOf(BuildCheckNotRunError))->forAll(e|e.isDetected = true) | ||
95 | |||
96 | context Error inv e20: Error.allInstances()->select(e|e.oclIsTypeOf(SeatFrameConnectionError))->forAll(e|e.isDetected = true) | ||
97 | |||
98 | context Error inv e21: Error.allInstances()->select(e|e.oclIsTypeOf(TemperatureSensorError))->forAll(e|e.isDetected = true) | ||
99 | |||
100 | context Error inv e22: Error.allInstances()->select(e|e.oclIsTypeOf(TemperatureRangeError))->forAll(e|e.isDetected = true) | ||
101 | |||
102 | context Error inv e23: Error.allInstances()->select(e|e.oclIsTypeOf(NVMCRCError))->forAll(e|e.isDetected = true) | ||
103 | |||
104 | context Error inv e24: Error.allInstances()->select(e|e.oclIsTypeOf(WatchdogError))->forAll(e|e.isDetected = true) | ||
105 | |||
106 | context Error inv e25: Error.allInstances()->select(e|e.oclIsTypeOf(VoltageLowError))->forAll(e|e.isDetected = true) | ||
107 | |||
108 | context Error inv e26: Error.allInstances()->select(e|e.oclIsTypeOf(SeatHeaterCircuitIntegrityError))->forAll(e|e.isDetected = true) | ||
109 | |||
110 | context Error inv e27: Error.allInstances()->select(e|e.oclIsTypeOf(ShortSenseUbatGndError))->forAll(e|e.isDetected = true) | ||
111 | |||
112 | context Error inv e28: Error.allInstances()->select(e|e.oclIsTypeOf(InternalMeasurementPathError))->forAll(e|e.isDetected = true) | ||
113 | |||
114 | context Error inv e29: Error.allInstances()->select(e|e.oclIsTypeOf(RAMError))->forAll(e|e.isDetected = true) | ||
115 | |||
116 | context Error inv e30: Error.allInstances()->select(e|e.oclIsTypeOf(ALUError))->forAll(e|e.isDetected = true) | ||
117 | |||
118 | context Error inv e31: Error.allInstances()->select(e|e.oclIsTypeOf(CalibrationDataError))->forAll(e|e.isDetected = true) | ||
119 | |||
120 | context Error inv e32: Error.allInstances()->select(e|e.oclIsTypeOf(MeasurementRangeError))->forAll(e|e.isDetected = true) | ||
121 | |||
122 | context Error inv e33: Error.allInstances()->select(e|e.oclIsTypeOf(VoltageHighError))->forAll(e|e.isDetected = false) | ||
123 | |||
124 | context Error inv e34: Error.allInstances()->select(e|e.oclIsTypeOf(VoltageLowError))->forAll(e|e.isDetected = false) | ||
125 | |||
126 | context Error inv e35: Error.allInstances()->select(e|e.oclIsKindOf(InternalMeasurementDeviceError))->forAll(e|e.isDetected = false) | ||
127 | |||
128 | context Error inv e36: Error.allInstances()->select(e|e.oclIsKindOf(ExternalMeasurementDeviceError))->forAll(e|e.isDetected = false) | ||
129 | |||
130 | context Error inv e37: Error.allInstances()->select(e|e.oclIsKindOf(TemperatureError))->forAll(e|e.isDetected = false) | ||
131 | |||
132 | context Error inv e38: Error.allInstances()->select(e|e.oclIsTypeOf(RAMError) or e.oclIsTypeOf(SFRError) or e.oclIsTypeOf(ALUError) or e.oclIsTypeOf(ROMError))->forAll(e|e.isDetected = false) | ||
133 | |||
134 | context Error inv e39: Error.allInstances()->select(e|e.oclIsTypeOf(SeatHeaterCircuitIntegrityError))->forAll(e|e.isQualified = true) | ||
135 | |||
136 | context Error inv e40: Error.allInstances()->select(e|e.oclIsTypeOf(DiscardError))->forAll(e|e.isQualified = true) | ||
137 | |||
138 | context Error inv e41: Error.allInstances()->select(e|e.oclIsTypeOf(VoltageLowError))->forAll(e|e.isQualified = true) | ||
139 | |||
140 | context Error inv e43: Error.allInstances()->select(e|e.oclIsTypeOf(VoltageHighError))->forAll(e|e.isQualified = true) | ||
141 | |||
142 | |||
143 | |||
144 | endpackage \ No newline at end of file | ||