sysml-validate 0.10.18 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/LICENSE +27 -27
  2. package/README.md +200 -200
  3. package/out/main.js +596 -141
  4. package/out/main.js.map +4 -4
  5. package/package.json +57 -57
  6. package/resources/sysml.dimension-table.json +1 -1
  7. package/resources/sysml.library/Domain Libraries/Analysis/.meta.json +9 -9
  8. package/resources/sysml.library/Domain Libraries/Analysis/.project.json +26 -26
  9. package/resources/sysml.library/Domain Libraries/Analysis/AnalysisTooling.sysml +33 -33
  10. package/resources/sysml.library/Domain Libraries/Analysis/SampledFunctions.sysml +118 -118
  11. package/resources/sysml.library/Domain Libraries/Analysis/StateSpaceRepresentation.sysml +143 -143
  12. package/resources/sysml.library/Domain Libraries/Analysis/TradeStudies.sysml +170 -170
  13. package/resources/sysml.library/Domain Libraries/Cause and Effect/.meta.json +7 -7
  14. package/resources/sysml.library/Domain Libraries/Cause and Effect/.project.json +22 -22
  15. package/resources/sysml.library/Domain Libraries/Cause and Effect/CausationConnections.sysml +82 -82
  16. package/resources/sysml.library/Domain Libraries/Cause and Effect/CauseAndEffect.sysml +81 -81
  17. package/resources/sysml.library/Domain Libraries/Geometry/.meta.json +7 -7
  18. package/resources/sysml.library/Domain Libraries/Geometry/.project.json +26 -26
  19. package/resources/sysml.library/Domain Libraries/Geometry/ShapeItems.sysml +898 -898
  20. package/resources/sysml.library/Domain Libraries/Geometry/SpatialItems.sysml +167 -167
  21. package/resources/sysml.library/Domain Libraries/Metadata/.meta.json +9 -9
  22. package/resources/sysml.library/Domain Libraries/Metadata/.project.json +18 -18
  23. package/resources/sysml.library/Domain Libraries/Metadata/ImageMetadata.sysml +77 -77
  24. package/resources/sysml.library/Domain Libraries/Metadata/ModelingMetadata.sysml +142 -142
  25. package/resources/sysml.library/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml +38 -38
  26. package/resources/sysml.library/Domain Libraries/Metadata/RiskMetadata.sysml +99 -99
  27. package/resources/sysml.library/Domain Libraries/Quantities and Units/.meta.json +28 -28
  28. package/resources/sysml.library/Domain Libraries/Quantities and Units/.project.json +22 -22
  29. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQ.sysml +42 -42
  30. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQAcoustics.sysml +439 -439
  31. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml +2726 -2726
  32. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQBase.sysml +206 -206
  33. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml +1991 -1991
  34. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml +1353 -1353
  35. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml +1223 -1223
  36. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml +2333 -2333
  37. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQInformation.sysml +958 -958
  38. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQLight.sysml +1537 -1537
  39. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQMechanics.sysml +1564 -1564
  40. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml +1169 -1169
  41. package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml +1256 -1256
  42. package/resources/sysml.library/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml +30 -30
  43. package/resources/sysml.library/Domain Libraries/Quantities and Units/MeasurementReferences.sysml +526 -526
  44. package/resources/sysml.library/Domain Libraries/Quantities and Units/Quantities.sysml +107 -107
  45. package/resources/sysml.library/Domain Libraries/Quantities and Units/QuantityCalculations.sysml +70 -70
  46. package/resources/sysml.library/Domain Libraries/Quantities and Units/SI.sysml +378 -378
  47. package/resources/sysml.library/Domain Libraries/Quantities and Units/SIPrefixes.sysml +48 -48
  48. package/resources/sysml.library/Domain Libraries/Quantities and Units/TensorCalculations.sysml +49 -49
  49. package/resources/sysml.library/Domain Libraries/Quantities and Units/Time.sysml +274 -274
  50. package/resources/sysml.library/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml +260 -260
  51. package/resources/sysml.library/Domain Libraries/Quantities and Units/VectorCalculations.sysml +62 -62
  52. package/resources/sysml.library/Domain Libraries/Requirement Derivation/.meta.json +7 -7
  53. package/resources/sysml.library/Domain Libraries/Requirement Derivation/.project.json +18 -18
  54. package/resources/sysml.library/Domain Libraries/Requirement Derivation/DerivationConnections.sysml +62 -62
  55. package/resources/sysml.library/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml +38 -38
  56. package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/.meta.json +8 -8
  57. package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/.project.json +10 -10
  58. package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/Collections.kerml +176 -176
  59. package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/ScalarValues.kerml +23 -23
  60. package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/VectorValues.kerml +63 -63
  61. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/.meta.json +22 -22
  62. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/.project.json +14 -14
  63. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/BaseFunctions.kerml +79 -79
  64. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/BooleanFunctions.kerml +22 -22
  65. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/CollectionFunctions.kerml +68 -68
  66. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/ComplexFunctions.kerml +47 -47
  67. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/ControlFunctions.kerml +116 -116
  68. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/DataFunctions.kerml +42 -42
  69. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/IntegerFunctions.kerml +43 -43
  70. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/NaturalFunctions.kerml +27 -27
  71. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/NumericalFunctions.kerml +42 -42
  72. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/OccurrenceFunctions.kerml +153 -153
  73. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/RationalFunctions.kerml +49 -49
  74. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/RealFunctions.kerml +56 -56
  75. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/ScalarFunctions.kerml +32 -32
  76. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/SequenceFunctions.kerml +110 -110
  77. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/StringFunctions.kerml +25 -25
  78. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/TrigFunctions.kerml +34 -34
  79. package/resources/sysml.library/Kernel Libraries/Kernel Function Library/VectorFunctions.kerml +272 -272
  80. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/.meta.json +21 -21
  81. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/.project.json +14 -14
  82. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Base.kerml +94 -94
  83. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Clocks.kerml +155 -155
  84. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/ControlPerformances.kerml +134 -134
  85. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/FeatureReferencingPerformances.kerml +189 -189
  86. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/KerML.kerml +483 -483
  87. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Links.kerml +66 -66
  88. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Metaobjects.kerml +57 -57
  89. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Objects.kerml +212 -212
  90. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Observation.kerml +160 -160
  91. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml +992 -992
  92. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Performances.kerml +292 -292
  93. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/SpatialFrames.kerml +196 -196
  94. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/StatePerformances.kerml +144 -144
  95. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Transfers.kerml +280 -280
  96. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/TransitionPerformances.kerml +65 -65
  97. package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Triggers.kerml +187 -187
  98. package/resources/sysml.library/LICENSE +276 -276
  99. package/resources/sysml.library/NOTICE.md +20 -20
  100. package/resources/sysml.library/Systems Library/Actions.sysml +556 -556
  101. package/resources/sysml.library/Systems Library/Allocations.sysml +28 -28
  102. package/resources/sysml.library/Systems Library/AnalysisCases.sysml +37 -37
  103. package/resources/sysml.library/Systems Library/Attributes.sysml +24 -24
  104. package/resources/sysml.library/Systems Library/Calculations.sysml +36 -36
  105. package/resources/sysml.library/Systems Library/Cases.sysml +70 -70
  106. package/resources/sysml.library/Systems Library/Connections.sysml +59 -59
  107. package/resources/sysml.library/Systems Library/Constraints.sysml +43 -43
  108. package/resources/sysml.library/Systems Library/Flows.sysml +125 -125
  109. package/resources/sysml.library/Systems Library/Interfaces.sysml +88 -88
  110. package/resources/sysml.library/Systems Library/Items.sysml +152 -152
  111. package/resources/sysml.library/Systems Library/Metadata.sysml +31 -31
  112. package/resources/sysml.library/Systems Library/Parts.sysml +80 -80
  113. package/resources/sysml.library/Systems Library/Ports.sysml +53 -53
  114. package/resources/sysml.library/Systems Library/Requirements.sysml +193 -193
  115. package/resources/sysml.library/Systems Library/StandardViewDefinitions.sysml +123 -123
  116. package/resources/sysml.library/Systems Library/States.sysml +102 -102
  117. package/resources/sysml.library/Systems Library/SysML.sysml +539 -539
  118. package/resources/sysml.library/Systems Library/UseCases.sysml +56 -56
  119. package/resources/sysml.library/Systems Library/VerificationCases.sysml +102 -102
  120. package/resources/sysml.library/Systems Library/Views.sysml +163 -163
  121. package/resources/sysml.library.index.json +1 -1
@@ -1,135 +1,135 @@
1
- standard library package ControlPerformances {
2
- doc
3
- /*
4
- * This package defines Behaviors to be used to type Steps that control the sequencing of performance
5
- * of other Steps.
6
- */
7
-
8
- private import ScalarValues::Boolean;
9
- private import SequenceFunctions::size;
10
- private import SequenceFunctions::notEmpty;
11
- private import Occurrences::Occurrence;
12
- private import Occurrences::HappensBefore;
13
- private import Occurrences::SelfSameLifeLink;
14
- private import Performances::Performance;
15
- private import Performances::BooleanEvaluation;
16
-
17
- behavior DecisionPerformance specializes Performance {
18
- doc
19
- /*
20
- * A DecisionPerformance is a Performance that represents the selection of one of the Successions
21
- * that have the DecisionPerforance behavior as their source. All such Successions must subset the
22
- * outgoingHBLink feature of the source DecisionPerformance. For each instance of DecisionPerformance,
23
- * the outgoingHBLink is an instance of exactly one of the Successions, ordering the DecisionPerformance
24
- * as happening before an instance of the target of that Succcession.
25
- */
26
-
27
- feature outgoingHBLink: HappensBefore[1] {
28
- doc
29
- /*
30
- * Specializations subset this by all
31
- * successions going out of a decision step.
32
- */
33
-
34
- end feature redefines earlierOccurrence subsets that;
35
- }
36
- }
37
-
38
- behavior MergePerformance specializes Performance {
39
- doc
40
- /*
41
- * A MergePerformance is a Performance that represents the merging of all Successions that
42
- * target the MergePerforance behavior. All such Successions must subset the incomingHBLink
43
- * feature of the target MergePerformance. For each instance of MergePerformance, the
44
- * incomingHBLink is an instance of exactly one of the Successions, ordering the
45
- * MergePerformance as happening after an instance of the source of that Succession.
46
- */
47
-
48
- feature incomingHBLink: HappensBefore[1] {
49
- doc
50
- /*
51
- * Specializations subset this by all
52
- * successions coming into a merge step.
53
- */
54
-
55
- end feature redefines laterOccurrence subsets that;
56
- }
57
- }
58
-
59
- abstract behavior IfPerformance specializes Performance {
60
- doc
61
- /*
62
- * An IfPerformance is a Performance that determines whether the ifTest evaluation result is true
63
- * (by whether ifTrue has a value).
64
- */
65
-
66
- in ifTest : BooleanEvaluation[1];
67
- }
68
-
69
- behavior IfThenPerformance specializes IfPerformance {
70
- doc
71
- /*
72
- * An IfThenPerformance is an IfPerformance where the thenClause occurs after and only after the
73
- * ifTest evaluation result is true.
74
- */
75
-
76
- in redefines ifTest;
77
- in thenClause : Occurrence[0..1];
78
- succession [1] ifTest then [0..1] thenClause;
79
- inv { ifTest() == thenClause->notEmpty() }
80
- }
81
-
82
- behavior IfElsePerformance specializes IfPerformance {
83
- doc
84
- /*
85
- * An IfElsePerformance is an IfPerformance where the elseClause occurs after and only
86
- * after the ifTest evaluation result is not true.
87
- */
88
-
89
- in redefines ifTest;
90
- in elseClause : Occurrence[0..1];
91
- succession [1] ifTest then [0..1] elseClause;
92
- inv { not ifTest() == elseClause->notEmpty() }
93
- }
94
-
95
- behavior IfThenElsePerformance specializes IfThenPerformance {
96
- doc
97
- /*
98
- * An IfThenElsePerformance is an IfThenPerformance with an additional elseClause that
99
- * occurs after and only after the ifTest evaluation is false.
100
- */
101
-
102
- in redefines ifTest;
103
- in redefines thenClause;
104
- in elseClause : Occurrence[0..1];
105
- succession [1] ifTest then [0..1] elseClause;
106
- inv { not ifTest() == elseClause->notEmpty() }
107
- }
108
-
109
- behavior LoopPerformance specializes Performance {
110
- doc
111
- /*
112
- * A LoopPerformance is a Performance where the body occurs repeatedly in sequence (iterates)
113
- * as long as the whileTest evaluation result is true before each iteration (and after the
114
- * previous one, except the first time) and the untilTest evaluation result is not true after
115
- * each iteration and before the next one (except the last one).
116
- */
117
-
118
- in whileTest : BooleanEvaluation[1..*];
119
- in body : Occurrence[0..*];
120
- in untilTest : BooleanEvaluation[0..*];
121
-
122
- step whileDecision : IfThenPerformance[1..*];
123
- step untilDecision : IfElsePerformance[0..*];
124
-
125
- binding [1] whileDecision.ifTest = [1] whileTest;
126
- binding [1] whileDecision.thenClause = [1] body;
127
-
128
- succession body then untilDecision;
129
-
130
- binding [1] untilDecision.ifTest = [1] untilTest;
131
- binding loopBack of [0..1] untilDecision.elseClause = [1] whileDecision;
132
-
133
- inv { loopBack->size() == whileDecision->size() - 1 }
134
- }
1
+ standard library package ControlPerformances {
2
+ doc
3
+ /*
4
+ * This package defines Behaviors to be used to type Steps that control the sequencing of performance
5
+ * of other Steps.
6
+ */
7
+
8
+ private import ScalarValues::Boolean;
9
+ private import SequenceFunctions::size;
10
+ private import SequenceFunctions::notEmpty;
11
+ private import Occurrences::Occurrence;
12
+ private import Occurrences::HappensBefore;
13
+ private import Occurrences::SelfSameLifeLink;
14
+ private import Performances::Performance;
15
+ private import Performances::BooleanEvaluation;
16
+
17
+ behavior DecisionPerformance specializes Performance {
18
+ doc
19
+ /*
20
+ * A DecisionPerformance is a Performance that represents the selection of one of the Successions
21
+ * that have the DecisionPerforance behavior as their source. All such Successions must subset the
22
+ * outgoingHBLink feature of the source DecisionPerformance. For each instance of DecisionPerformance,
23
+ * the outgoingHBLink is an instance of exactly one of the Successions, ordering the DecisionPerformance
24
+ * as happening before an instance of the target of that Succcession.
25
+ */
26
+
27
+ feature outgoingHBLink: HappensBefore[1] {
28
+ doc
29
+ /*
30
+ * Specializations subset this by all
31
+ * successions going out of a decision step.
32
+ */
33
+
34
+ end feature redefines earlierOccurrence subsets that;
35
+ }
36
+ }
37
+
38
+ behavior MergePerformance specializes Performance {
39
+ doc
40
+ /*
41
+ * A MergePerformance is a Performance that represents the merging of all Successions that
42
+ * target the MergePerforance behavior. All such Successions must subset the incomingHBLink
43
+ * feature of the target MergePerformance. For each instance of MergePerformance, the
44
+ * incomingHBLink is an instance of exactly one of the Successions, ordering the
45
+ * MergePerformance as happening after an instance of the source of that Succession.
46
+ */
47
+
48
+ feature incomingHBLink: HappensBefore[1] {
49
+ doc
50
+ /*
51
+ * Specializations subset this by all
52
+ * successions coming into a merge step.
53
+ */
54
+
55
+ end feature redefines laterOccurrence subsets that;
56
+ }
57
+ }
58
+
59
+ abstract behavior IfPerformance specializes Performance {
60
+ doc
61
+ /*
62
+ * An IfPerformance is a Performance that determines whether the ifTest evaluation result is true
63
+ * (by whether ifTrue has a value).
64
+ */
65
+
66
+ in ifTest : BooleanEvaluation[1];
67
+ }
68
+
69
+ behavior IfThenPerformance specializes IfPerformance {
70
+ doc
71
+ /*
72
+ * An IfThenPerformance is an IfPerformance where the thenClause occurs after and only after the
73
+ * ifTest evaluation result is true.
74
+ */
75
+
76
+ in redefines ifTest;
77
+ in thenClause : Occurrence[0..1];
78
+ succession [1] ifTest then [0..1] thenClause;
79
+ inv { ifTest() == thenClause->notEmpty() }
80
+ }
81
+
82
+ behavior IfElsePerformance specializes IfPerformance {
83
+ doc
84
+ /*
85
+ * An IfElsePerformance is an IfPerformance where the elseClause occurs after and only
86
+ * after the ifTest evaluation result is not true.
87
+ */
88
+
89
+ in redefines ifTest;
90
+ in elseClause : Occurrence[0..1];
91
+ succession [1] ifTest then [0..1] elseClause;
92
+ inv { not ifTest() == elseClause->notEmpty() }
93
+ }
94
+
95
+ behavior IfThenElsePerformance specializes IfThenPerformance {
96
+ doc
97
+ /*
98
+ * An IfThenElsePerformance is an IfThenPerformance with an additional elseClause that
99
+ * occurs after and only after the ifTest evaluation is false.
100
+ */
101
+
102
+ in redefines ifTest;
103
+ in redefines thenClause;
104
+ in elseClause : Occurrence[0..1];
105
+ succession [1] ifTest then [0..1] elseClause;
106
+ inv { not ifTest() == elseClause->notEmpty() }
107
+ }
108
+
109
+ behavior LoopPerformance specializes Performance {
110
+ doc
111
+ /*
112
+ * A LoopPerformance is a Performance where the body occurs repeatedly in sequence (iterates)
113
+ * as long as the whileTest evaluation result is true before each iteration (and after the
114
+ * previous one, except the first time) and the untilTest evaluation result is not true after
115
+ * each iteration and before the next one (except the last one).
116
+ */
117
+
118
+ in whileTest : BooleanEvaluation[1..*];
119
+ in body : Occurrence[0..*];
120
+ in untilTest : BooleanEvaluation[0..*];
121
+
122
+ step whileDecision : IfThenPerformance[1..*];
123
+ step untilDecision : IfElsePerformance[0..*];
124
+
125
+ binding [1] whileDecision.ifTest = [1] whileTest;
126
+ binding [1] whileDecision.thenClause = [1] body;
127
+
128
+ succession body then untilDecision;
129
+
130
+ binding [1] untilDecision.ifTest = [1] untilTest;
131
+ binding loopBack of [0..1] untilDecision.elseClause = [1] whileDecision;
132
+
133
+ inv { loopBack->size() == whileDecision->size() - 1 }
134
+ }
135
135
  }
@@ -1,190 +1,190 @@
1
- standard library package FeatureReferencingPerformances {
2
- doc
3
- /*
4
- * This package defines Behaviors used to read, write and monitor values of a referenced Feature of an
5
- * Occurrence.
6
- */
7
-
8
- private import Base::Anything;
9
- private import Base::things;
10
- private import Occurrences::Occurrence;
11
- private import Occurrences::HappensWhile;
12
- private import Occurrences::HappensBefore;
13
- private import Occurrences::HappensJustBefore;
14
- private import Occurrences::SelfSameLifeLink;
15
- private import Performances::Performance;
16
- private import Performances::Evaluation;
17
- private import ScalarValues::Boolean;
18
- private import SequenceFunctions::isEmpty;
19
- private import SequenceFunctions::equals;
20
-
21
- abstract behavior FeatureReferencingPerformance specializes Performance {
22
- doc
23
- /*
24
- * A FeatureReferencingPerformance is the base Performance for specialized behaviors related
25
- * to values of a referenced Feature of a given Occurrence, as identified in specializations
26
- * of this Behavior.
27
- */
28
-
29
- in abstract feature onOccurrence : Occurrence [1] {
30
- doc
31
- /*
32
- * Occurrence with values for the referenced feature in specializations of this behavior.
33
- */
34
- }
35
-
36
- inout feature values : Anything [*] nonunique {
37
- doc
38
- /*
39
- * Values of the referenced feature, as specified in specializations of this behavior.
40
- */
41
- }
42
- }
43
-
44
- abstract behavior FeatureAccessPerformance specializes FeatureReferencingPerformance {
45
- doc
46
- /*
47
- * A FeatureAccessPerformance is a FeatureReferencingPerformance where the result values
48
- * are all the values of a feature of onOccurrence at the time the Performance ends. The
49
- * feature is specified by restricting accessedFeature in specializations or usages.
50
- */
51
-
52
- in abstract feature onOccurrence : Occurrence {
53
- abstract feature startingAt : Occurrence [1] subsets timeSlices {
54
- abstract feature accessedFeature : Anything [*] nonunique;
55
- }
56
- }
57
-
58
- connector :HappensWhile from onOccurrence.startingAt.startShot to endShot {
59
- doc
60
- /*
61
- * Requires some time slice of onOccurrence to start when this performance
62
- * ends (this connector), with particular feature values (following connector).
63
- * The feature is specified by restricting the onOccurrence::accessedFeature
64
- * on usages of this behavior.
65
- */
66
- }
67
- connector :SelfSameLifeLink from onOccurrence.startingAt.accessedFeature to values;
68
- }
69
-
70
- abstract function FeatureReadEvaluation specializes FeatureAccessPerformance, Evaluation {
71
- doc
72
- /*
73
- * A FeatureReadEvaluation is a FeatureAccessPerformance that is a function providing as
74
- * its result the values of a feature on an occurrence at the time its evaluation ends.
75
- */
76
-
77
- in onOccurrence: Occurrence [1];
78
- return resultValues : Anything [*] nonunique redefines result redefines values;
79
- }
80
-
81
- abstract behavior FeatureWritePerformance specializes FeatureAccessPerformance {
82
- doc
83
- /*
84
- * A FeatureWritePerformance is a FeatureAccessPerformance that assigns the values of a
85
- * feature on an occurrence to the given replacementValues at time its performance ends.
86
- */
87
-
88
- in feature onOccurrence : Occurrence[1] redefines onOccurrence;
89
- inout feature replacementValues : Anything redefines values [*] nonunique;
90
- }
91
-
92
- abstract behavior FeatureMonitorPerformance specializes FeatureReferencingPerformance {
93
- doc
94
- /*
95
- * A FeatureMonitorPerformance is a FeatureReferencingPerformance that waits for values
96
- * of monitoredFeature to change on onOccurrence from what they were when the performance
97
- * started. The values before and after the change are given by beforeValues and afterValues.
98
- */
99
-
100
- in feature redefines onOccurrence {
101
- feature monitoredOccurrence : Occurrence [1] subsets timeSlices {
102
- abstract feature monitoredFeature : Anything[*] nonunique;
103
- feature beforeTimeSlice : Occurrence [1] subsets timeSlices {
104
- feature redefines monitoredFeature;
105
- }
106
- feature afterSnapshot : Occurrence [1] subsets snapshots {
107
- feature redefines monitoredFeature;
108
- }
109
- connector :HappensJustBefore from beforeTimeSlice to afterSnapshot;
110
- }
111
- }
112
- out feature afterValues redefines values;
113
- out feature beforeValues : Anything[*] nonunique;
114
- inv { not beforeValues->equals(afterValues) }
115
-
116
- private connector : HappensWhile
117
- from [1] onOccurrence.monitoredOccurrence.beforeTimeSlice.startShot to [1] startShot;
118
- private connector : SelfSameLifeLink
119
- from [1] onOccurrence.monitoredOccurrence.beforeTimeSlice.monitoredFeature to [1] beforeValues;
120
- private connector : SelfSameLifeLink
121
- from [1] onOccurrence.monitoredOccurrence.afterSnapshot.monitoredFeature to [1] afterValues;
122
- protected connector endWhen : HappensBefore
123
- from [1] onOccurrence.monitoredOccurrence.afterSnapshot to [1] endShot;
124
- }
125
-
126
- behavior EvaluationResultMonitorPerformance specializes FeatureMonitorPerformance {
127
- doc
128
- /*
129
- * An EvaluationResultMonitorPerformance is a FeatureMonitorPerformance that waits for changes
130
- * in the result of an Evaluation identified by onOccurrence. The Predicate being evaluated must
131
- * be able to produce multiple results over time, for example by only using BindingConnectors
132
- * between Steps, rather than Successions or Flows, including in its Step behaviors.
133
- */
134
-
135
- in feature onOccurrence : Evaluation redefines onOccurrence {
136
- protected expr monitoredOccurrence : Evaluation [1] redefines monitoredOccurrence {
137
- return result : Anything[*] redefines result, monitoredFeature;
138
- }
139
- }
140
- }
141
-
142
- behavior BooleanEvaluationResultMonitorPerformance specializes EvaluationResultMonitorPerformance {
143
- doc
144
- /*
145
- * A BooleanEvaluationResultMonitorPerformance is a EvaluationResultMonitorPerformance
146
- * that waits for changes in the result of a BooleanEvaluation identified by onOccurrence.
147
- */
148
-
149
- in bool redefines onOccurrence {
150
- protected bool redefines monitoredOccurrence[1] {
151
- return result : Boolean [1];
152
- }
153
- }
154
- out redefines afterValues : Boolean [1];
155
- out redefines beforeValues : Boolean [1];
156
- }
157
-
158
- behavior BooleanEvaluationResultToMonitorPerformance specializes FeatureReferencingPerformance {
159
- doc
160
- /*
161
- * A BooleanEvaluationResultToMonitorPerformance is a FeatureReferencingPerformance that waits
162
- * for the result of a BooleanEvaluation (identified by onOccurrence) to change to either true
163
- * or false, as indicated by isToTrue (defaulting to true). If the result is already true (or false),
164
- * the performance waits for the result to become false (or true) before waiting again for it to
165
- * change back.
166
- */
167
-
168
- in bool redefines onOccurrence;
169
- feature isToTrue : Boolean [1] default true;
170
- out afterValues: Boolean[1] redefines values = isToTrue;
171
- private feature monitor1 : BooleanEvaluationResultMonitorPerformance [1] {
172
- feature redefines endWhen : HappensJustBefore {
173
- end feature earlierOccurrence;
174
- end feature laterOccurrence;
175
- }
176
- }
177
- private feature monitor2 : BooleanEvaluationResultMonitorPerformance [1] {
178
- feature redefines endWhen : HappensJustBefore {
179
- end feature earlierOccurrence;
180
- end feature laterOccurrence;
181
- }
182
- }
183
-
184
- private connector : HappensJustBefore from [1] monitor1 to [0..1] monitor2;
185
- inv { isEmpty(monitor2) == (monitor1.afterValues == isToTrue) }
186
-
187
- private binding [1] monitor1.onOccurrence = [1] onOccurrence;
188
- private binding [1] monitor2.onOccurrence = [1] onOccurrence;
189
- }
1
+ standard library package FeatureReferencingPerformances {
2
+ doc
3
+ /*
4
+ * This package defines Behaviors used to read, write and monitor values of a referenced Feature of an
5
+ * Occurrence.
6
+ */
7
+
8
+ private import Base::Anything;
9
+ private import Base::things;
10
+ private import Occurrences::Occurrence;
11
+ private import Occurrences::HappensWhile;
12
+ private import Occurrences::HappensBefore;
13
+ private import Occurrences::HappensJustBefore;
14
+ private import Occurrences::SelfSameLifeLink;
15
+ private import Performances::Performance;
16
+ private import Performances::Evaluation;
17
+ private import ScalarValues::Boolean;
18
+ private import SequenceFunctions::isEmpty;
19
+ private import SequenceFunctions::equals;
20
+
21
+ abstract behavior FeatureReferencingPerformance specializes Performance {
22
+ doc
23
+ /*
24
+ * A FeatureReferencingPerformance is the base Performance for specialized behaviors related
25
+ * to values of a referenced Feature of a given Occurrence, as identified in specializations
26
+ * of this Behavior.
27
+ */
28
+
29
+ in abstract feature onOccurrence : Occurrence [1] {
30
+ doc
31
+ /*
32
+ * Occurrence with values for the referenced feature in specializations of this behavior.
33
+ */
34
+ }
35
+
36
+ inout feature values : Anything [*] nonunique {
37
+ doc
38
+ /*
39
+ * Values of the referenced feature, as specified in specializations of this behavior.
40
+ */
41
+ }
42
+ }
43
+
44
+ abstract behavior FeatureAccessPerformance specializes FeatureReferencingPerformance {
45
+ doc
46
+ /*
47
+ * A FeatureAccessPerformance is a FeatureReferencingPerformance where the result values
48
+ * are all the values of a feature of onOccurrence at the time the Performance ends. The
49
+ * feature is specified by restricting accessedFeature in specializations or usages.
50
+ */
51
+
52
+ in abstract feature onOccurrence : Occurrence {
53
+ abstract feature startingAt : Occurrence [1] subsets timeSlices {
54
+ abstract feature accessedFeature : Anything [*] nonunique;
55
+ }
56
+ }
57
+
58
+ connector :HappensWhile from onOccurrence.startingAt.startShot to endShot {
59
+ doc
60
+ /*
61
+ * Requires some time slice of onOccurrence to start when this performance
62
+ * ends (this connector), with particular feature values (following connector).
63
+ * The feature is specified by restricting the onOccurrence::accessedFeature
64
+ * on usages of this behavior.
65
+ */
66
+ }
67
+ connector :SelfSameLifeLink from onOccurrence.startingAt.accessedFeature to values;
68
+ }
69
+
70
+ abstract function FeatureReadEvaluation specializes FeatureAccessPerformance, Evaluation {
71
+ doc
72
+ /*
73
+ * A FeatureReadEvaluation is a FeatureAccessPerformance that is a function providing as
74
+ * its result the values of a feature on an occurrence at the time its evaluation ends.
75
+ */
76
+
77
+ in onOccurrence: Occurrence [1];
78
+ return resultValues : Anything [*] nonunique redefines result redefines values;
79
+ }
80
+
81
+ abstract behavior FeatureWritePerformance specializes FeatureAccessPerformance {
82
+ doc
83
+ /*
84
+ * A FeatureWritePerformance is a FeatureAccessPerformance that assigns the values of a
85
+ * feature on an occurrence to the given replacementValues at time its performance ends.
86
+ */
87
+
88
+ in feature onOccurrence : Occurrence[1] redefines onOccurrence;
89
+ inout feature replacementValues : Anything redefines values [*] nonunique;
90
+ }
91
+
92
+ abstract behavior FeatureMonitorPerformance specializes FeatureReferencingPerformance {
93
+ doc
94
+ /*
95
+ * A FeatureMonitorPerformance is a FeatureReferencingPerformance that waits for values
96
+ * of monitoredFeature to change on onOccurrence from what they were when the performance
97
+ * started. The values before and after the change are given by beforeValues and afterValues.
98
+ */
99
+
100
+ in feature redefines onOccurrence {
101
+ feature monitoredOccurrence : Occurrence [1] subsets timeSlices {
102
+ abstract feature monitoredFeature : Anything[*] nonunique;
103
+ feature beforeTimeSlice : Occurrence [1] subsets timeSlices {
104
+ feature redefines monitoredFeature;
105
+ }
106
+ feature afterSnapshot : Occurrence [1] subsets snapshots {
107
+ feature redefines monitoredFeature;
108
+ }
109
+ connector :HappensJustBefore from beforeTimeSlice to afterSnapshot;
110
+ }
111
+ }
112
+ out feature afterValues redefines values;
113
+ out feature beforeValues : Anything[*] nonunique;
114
+ inv { not beforeValues->equals(afterValues) }
115
+
116
+ private connector : HappensWhile
117
+ from [1] onOccurrence.monitoredOccurrence.beforeTimeSlice.startShot to [1] startShot;
118
+ private connector : SelfSameLifeLink
119
+ from [1] onOccurrence.monitoredOccurrence.beforeTimeSlice.monitoredFeature to [1] beforeValues;
120
+ private connector : SelfSameLifeLink
121
+ from [1] onOccurrence.monitoredOccurrence.afterSnapshot.monitoredFeature to [1] afterValues;
122
+ protected connector endWhen : HappensBefore
123
+ from [1] onOccurrence.monitoredOccurrence.afterSnapshot to [1] endShot;
124
+ }
125
+
126
+ behavior EvaluationResultMonitorPerformance specializes FeatureMonitorPerformance {
127
+ doc
128
+ /*
129
+ * An EvaluationResultMonitorPerformance is a FeatureMonitorPerformance that waits for changes
130
+ * in the result of an Evaluation identified by onOccurrence. The Predicate being evaluated must
131
+ * be able to produce multiple results over time, for example by only using BindingConnectors
132
+ * between Steps, rather than Successions or Flows, including in its Step behaviors.
133
+ */
134
+
135
+ in feature onOccurrence : Evaluation redefines onOccurrence {
136
+ protected expr monitoredOccurrence : Evaluation [1] redefines monitoredOccurrence {
137
+ return result : Anything[*] redefines result, monitoredFeature;
138
+ }
139
+ }
140
+ }
141
+
142
+ behavior BooleanEvaluationResultMonitorPerformance specializes EvaluationResultMonitorPerformance {
143
+ doc
144
+ /*
145
+ * A BooleanEvaluationResultMonitorPerformance is a EvaluationResultMonitorPerformance
146
+ * that waits for changes in the result of a BooleanEvaluation identified by onOccurrence.
147
+ */
148
+
149
+ in bool redefines onOccurrence {
150
+ protected bool redefines monitoredOccurrence[1] {
151
+ return result : Boolean [1];
152
+ }
153
+ }
154
+ out redefines afterValues : Boolean [1];
155
+ out redefines beforeValues : Boolean [1];
156
+ }
157
+
158
+ behavior BooleanEvaluationResultToMonitorPerformance specializes FeatureReferencingPerformance {
159
+ doc
160
+ /*
161
+ * A BooleanEvaluationResultToMonitorPerformance is a FeatureReferencingPerformance that waits
162
+ * for the result of a BooleanEvaluation (identified by onOccurrence) to change to either true
163
+ * or false, as indicated by isToTrue (defaulting to true). If the result is already true (or false),
164
+ * the performance waits for the result to become false (or true) before waiting again for it to
165
+ * change back.
166
+ */
167
+
168
+ in bool redefines onOccurrence;
169
+ feature isToTrue : Boolean [1] default true;
170
+ out afterValues: Boolean[1] redefines values = isToTrue;
171
+ private feature monitor1 : BooleanEvaluationResultMonitorPerformance [1] {
172
+ feature redefines endWhen : HappensJustBefore {
173
+ end feature earlierOccurrence;
174
+ end feature laterOccurrence;
175
+ }
176
+ }
177
+ private feature monitor2 : BooleanEvaluationResultMonitorPerformance [1] {
178
+ feature redefines endWhen : HappensJustBefore {
179
+ end feature earlierOccurrence;
180
+ end feature laterOccurrence;
181
+ }
182
+ }
183
+
184
+ private connector : HappensJustBefore from [1] monitor1 to [0..1] monitor2;
185
+ inv { isEmpty(monitor2) == (monitor1.afterValues == isToTrue) }
186
+
187
+ private binding [1] monitor1.onOccurrence = [1] onOccurrence;
188
+ private binding [1] monitor2.onOccurrence = [1] onOccurrence;
189
+ }
190
190
  }