-
Notifications
You must be signed in to change notification settings - Fork 0
/
istar4safety.ecore
121 lines (121 loc) · 9.09 KB
/
istar4safety.ecore
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="istar4safety" nsURI="http://www.example.org/istar4safety" nsPrefix="istar4safety">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="invocationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
<details key="settingDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
<details key="validationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
</eAnnotations>
<eClassifiers xsi:type="ecore:EEnum" name="AccidentLevel">
<eLiterals name="L1"/>
<eLiterals name="L2"/>
<eLiterals name="L3"/>
<eLiterals name="L4"/>
<eLiterals name="L5"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Actor">
<eStructuralFeatures xsi:type="ecore:EReference" name="wants" upperBound="-1"
eType="#//IntentionalElement" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="participatesIn" upperBound="-1"
eType="#//Actor"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="isA" upperBound="-1" eType="#//Actor"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Agent" eSuperTypes="#//Actor"/>
<eClassifiers xsi:type="ecore:EClass" name="Role" eSuperTypes="#//Actor"/>
<eClassifiers xsi:type="ecore:EClass" name="Model">
<eStructuralFeatures xsi:type="ecore:EReference" name="actors" upperBound="-1"
eType="#//Actor" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="dependencies" upperBound="-1"
eType="#//Dependency" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IntentionalElement" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="contributesTo" upperBound="-1"
eType="#//Quality"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Resource" eSuperTypes="#//IntentionalElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="neededBy" upperBound="-1"
eType="#//GoalOrTask"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Quality" eSuperTypes="#//IntentionalElement">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="constraints" value="CanQualifyOnlyGoalTaskOrResource"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="CanQualifyOnlyGoalTaskOrResource" value="
			self.qualifies->forAll(e | e.oclIsKindOf(Goal) or e.oclIsKindOf(Task) or e.oclIsKindOf(Resource))"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="qualifies" upperBound="-1"
eType="#//IntentionalElement"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GoalOrTask" abstract="true" eSuperTypes="#//IntentionalElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="refinedBy" eType="#//Refinement"
containment="true" eOpposite="#//Refinement/from"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Goal" eSuperTypes="#//GoalOrTask"/>
<eClassifiers xsi:type="ecore:EClass" name="Task" eSuperTypes="#//GoalOrTask"/>
<eClassifiers xsi:type="ecore:EClass" name="SafetyGoal" eSuperTypes="#//Goal">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="accidentLevel" eType="#//AccidentLevel"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Hazard" eSuperTypes="#//Goal">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="constraints" value="AtLeastOneRefinement"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="AtLeastOneRefinement" value="
			self.refinedBy->size() > 0"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="obstructs" upperBound="-1"
eType="#//SafetyGoal"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="SafetyTask" eSuperTypes="#//Task"/>
<eClassifiers xsi:type="ecore:EClass" name="SafetyResource" eSuperTypes="#//Resource">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="constraints" value="NeededByOnlyByHazardOrTask"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="NeededByOnlyByHazardOrTask" value="
			self.neededBy->forAll(e | e.oclIsKindOf(Hazard) or e.oclIsKindOf(Task))"/>
</eAnnotations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Dependency">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="constraints" value="DependumCannotBeSafetyElement"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="DependumCannotBeSafetyElement" value="
			not (self.dependum.oclIsKindOf(Hazard) or self.dependum.oclIsKindOf(SafetyGoal) or self.dependum.oclIsKindOf(SafetyTask) or self.dependum.oclIsKindOf(SafetyResource))"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="depender" eType="#//Actor"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="dependee" eType="#//Actor"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="dependeeElmt" eType="#//IntentionalElement"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="dependerElmt" eType="#//IntentionalElement"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="dependum" lowerBound="1"
eType="#//IntentionalElement" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Refinement" abstract="true">
<eStructuralFeatures xsi:type="ecore:EReference" name="from" eType="#//GoalOrTask"
eOpposite="#//GoalOrTask/refinedBy"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AndRefinement" eSuperTypes="#//Refinement">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="constraints" value="SafetyGoalCanOnlyBeRefinedAsSafetyGoalXorHazard NonRootHazardsCannotRefineSafetyGoal HazardRefinementKindsConstraint"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="SafetyGoalCanOnlyBeRefinedAsSafetyGoalXorHazard" value="
			self.from.oclIsKindOf(SafetyGoal)
				implies 
					self.to->forAll(e | e.oclIsTypeOf(SafetyGoal)) or self.to->forAll(e | e.oclIsTypeOf(Hazard))"/>
<details key="NonRootHazardsCannotRefineSafetyGoal" value="
			self.from.oclIsKindOf(SafetyGoal)
			implies
				self.to->select(e | e.oclIsKindOf(Hazard))->forAll(e | not Refinement.allInstances()->exists(e | self.to->includes(e.from) and e <> self))"/>
<details key="HazardRefinementKindsConstraint" value=" 
			self.from.oclIsKindOf(Hazard)
			implies
				self.to->forAll(e | e.oclIsTypeOf(SafetyTask) or e.oclIsTypeOf(SafetyResource)) or self.to->forAll(e | e.oclIsTypeOf(Hazard))"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="to" lowerBound="2" upperBound="-1"
eType="#//GoalOrTask"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="OrRefinement" eSuperTypes="#//Refinement">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="constraints" value="SafetyGoalCanOnlyBeRefinedAsSafetyGoalXorHazard NonRootHazardsCannotRefineSafetyGoal HazardRefinementKindsConstraint"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="SafetyGoalCanOnlyBeRefinedAsSafetyGoalXorHazard" value="
			self.from.oclIsKindOf(SafetyGoal)
				implies 
					self.to->forAll(e | e.oclIsTypeOf(SafetyGoal)) or self.to->forAll(e | e.oclIsTypeOf(Hazard))"/>
<details key="NonRootHazardsCannotRefineSafetyGoal" value="
			self.from.oclIsKindOf(SafetyGoal)
			implies
				self.to->select(e | e.oclIsKindOf(Hazard))->forAll(e | not Refinement.allInstances()->exists(e | self.to->includes(e.from) and e <> self))"/>
<details key="HazardRefinementKindsConstraint" value="
			self.from.oclIsKindOf(Hazard)
			implies
				self.to->forAll(e | e.oclIsTypeOf(SafetyTask) or e.oclIsTypeOf(SafetyResource)) or self.to->forAll(e | e.oclIsTypeOf(Hazard))"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="to" lowerBound="1" upperBound="-1"
eType="#//GoalOrTask"/>
</eClassifiers>
</ecore:EPackage>