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,557 +1,557 @@
1
- standard library package Actions {
2
- doc
3
- /*
4
- * This package defines the base types for actions and related behavioral elements in the
5
- * SysML language.
6
- */
7
-
8
- private import Base::Anything;
9
- private import ScalarValues::Positive;
10
- private import ScalarValues::Natural;
11
- private import SequenceFunctions::size;
12
- private import SequenceFunctions::isEmpty;
13
- private import Occurrences::Occurrence;
14
- private import Occurrences::HappensWhile;
15
- private import Performances::Performance;
16
- private import Performances::performances;
17
- private import Transfers::SendPerformance;
18
- private import Transfers::sendPerformances;
19
- private import Transfers::AcceptPerformance;
20
- private import Transfers::acceptPerformances;
21
- private import FeatureReferencingPerformances::FeatureWritePerformance;
22
- private import ControlPerformances::MergePerformance;
23
- private import ControlPerformances::DecisionPerformance;
24
- private import ControlPerformances::IfThenPerformance;
25
- private import ControlPerformances::IfThenElsePerformance;
26
- private import ControlPerformances::LoopPerformance;
27
- private import TransitionPerformances::TransitionPerformance;
28
- private import TransitionPerformances::NonStateTransitionPerformance;
29
- private import Transfers::MessageTransfer;
30
- private import Flows::MessageAction;
31
- private import OccurrenceFunctions::destroy;
32
-
33
- abstract action def Action :> Performance {
34
- doc
35
- /*
36
- * Action is the most general class of Performances of ActionDefinitions in a system or
37
- * part of a system. Action is the base class of all ActionDefinitions.
38
- */
39
-
40
- ref action self: Action :>> Performance::self;
41
- ref action incomingTransfers :>> Performance::incomingTransfers;
42
-
43
- action start: Action :>> startShot {
44
- doc
45
- /*
46
- * The starting snapshot of an Action.
47
- */
48
- }
49
-
50
- action done: Action :>> endShot {
51
- doc
52
- /*
53
- * The ending snapshot of an Action.
54
- */
55
- }
56
-
57
- action subactions: Action[0..*] :> actions, subperformances {
58
- doc
59
- /*
60
- * The subperformances of this Action that are Actions.
61
- */
62
-
63
- ref occurrence :>> Action::this, actions::this, subperformances::this = (that as Action).this {
64
- doc
65
- /*
66
- * The "this" reference of a subaction is always the same as that of
67
- * its owning Action.
68
- */
69
- }
70
- }
71
-
72
- action sendSubactions: SendAction[0..*] :> subactions, sendActions {
73
- doc
74
- /*
75
- * The subactions of this Action that are SendActions.
76
- */
77
- }
78
-
79
- action acceptSubactions: AcceptAction[0..*] :> subactions, acceptActions {
80
- doc
81
- /*
82
- * The subactions of this Action that are AcceptActions.
83
- */
84
- }
85
-
86
- abstract action terminateSubactions : TerminateAction[0..*] :> subactions, terminateActions {
87
- doc
88
- /*
89
- * The subactions of this Action that are TerminateActions.
90
- */
91
- }
92
-
93
- abstract action controls : ControlAction[0..*] :> subactions {
94
- doc
95
- /*
96
- * The subactions of this Action that are ControlActions.
97
- */
98
- }
99
-
100
- abstract action merges : MergeAction[0..*] :> controls {
101
- doc
102
- /*
103
- * The controls of this Action that are MergeActions.
104
- */
105
- }
106
-
107
- abstract action decisions : DecisionAction :> controls {
108
- doc
109
- /*
110
- * The controls of this Action that are DecisionActions.
111
- */
112
- }
113
-
114
- abstract action joins : JoinAction :> controls {
115
- doc
116
- /*
117
- * The controls of this Action that are JoinActions.
118
- */
119
- }
120
-
121
- abstract action forks : ForkAction :> controls {
122
- doc
123
- /*
124
- * The controls of this Action that are ForkActions.
125
- */
126
- }
127
-
128
- abstract action transitions : TransitionAction[0..*] :> subactions, transitionActions {
129
- doc
130
- /*
131
- * The subactions of this Action that are TransitionActions.
132
- */
133
- }
134
-
135
- abstract action decisionTransitions : DecisionTransitionAction[0..*] :> transitions {
136
- doc
137
- /*
138
- * The subactions of this Action that are DecisionTransitionActions.
139
- */
140
- }
141
-
142
- abstract action assignments : AssignmentAction[0..*] :> subactions, assignmentActions {
143
- doc
144
- /*
145
- * The subactions of this Action that are AssignmentActions.
146
- */
147
-
148
- in target;
149
- }
150
-
151
- abstract action ifSubactions : IfThenAction[0..*] :> subactions, ifThenActions {
152
- doc
153
- /*
154
- * The subactions of this Action that are IfThenActions (including IfThenElseActions).
155
- */
156
- }
157
-
158
- abstract action loops : LoopAction[0..*] :> subactions, loopActions {
159
- doc
160
- /*
161
- * The subactions of this Action that are LoopActions.
162
- */
163
- }
164
-
165
- abstract action whileLoops : WhileLoopAction[0..*] :> loops, whileLoopActions {
166
- doc
167
- /*
168
- * The loops of this Action that are WhileLoopActions.
169
- */
170
- }
171
-
172
- abstract action forLoops : ForLoopAction[0..*] :> loops, forLoopActions {
173
- doc
174
- /*
175
- * The loops of this Action that are ForLoopActions.
176
- */
177
- }
178
- }
179
-
180
- abstract action actions: Action[0..*] nonunique :> performances {
181
- doc
182
- /*
183
- * actions is the base feature for all ActionUsages.
184
- */
185
- }
186
-
187
- action def SendAction :> Action, SendPerformance {
188
- doc
189
- /*
190
- * A SendAction is an Action and SendPerformance used to type SendActionUsages.
191
- * It initiates an outgoingTransferFromSelf from a designated sender Occurrence
192
- * with a given payload, optionally to a designated receiver Occurrence.
193
- */
194
-
195
- in :>> payload [0..*];
196
- ref sentMessage :>> sentTransfer: MessageTransfer, MessageAction {
197
- in :>> MessageTransfer::payload, MessageAction::payload;
198
- }
199
- }
200
-
201
- abstract action sendActions: SendAction[0..*] nonunique :> actions, sendPerformances {
202
- doc
203
- /*
204
- * sendActions is the base feature for all SendActionUsages.
205
- */
206
- }
207
-
208
- action def AcceptMessageAction :> Action, AcceptPerformance {
209
- doc
210
- /*
211
- * An AcceptMessageAction is an Action and AcceptPerformance that identifies an
212
- * incomingTransferToSelf of a designated receiver Occurrence, providing its payload
213
- * as output.
214
- */
215
- inout :>> payload;
216
- ref acceptedMessage :>> acceptedTransfer: MessageTransfer, MessageAction {
217
- in :>> MessageTransfer::payload, MessageAction::payload;
218
- }
219
- }
220
-
221
- action def AcceptAction :> AcceptMessageAction {
222
- doc
223
- /*
224
- * An AcceptAction is an AcceptMessageAction used to type AcceptActionUsages that are
225
- * not accepters for TransitionActions. It waits for a payload or message of the specified
226
- * kind to be accepted by a nested state transition.
227
- */
228
- ref :>> acceptedMessage = aState.aTransition.accepter.acceptedMessage;
229
- state aState {
230
- transition aTransition first start accept apayload: Anything via receiver then done;
231
- }
232
- bind payload = aState.aTransition.apayload;
233
- }
234
-
235
- abstract action acceptActions: AcceptAction[0..*] nonunique :> actions, acceptPerformances {
236
- doc
237
- /*
238
- * acceptActions is the base feature for standalone AcceptActionUsages.
239
- */
240
- }
241
-
242
- abstract action def TerminateAction :> Action {
243
- doc
244
- /*
245
- * A TerminateAction is an Action that terminates a given Occurrence, meaning
246
- * that the Occurrence ends during the performance of this Action. TerminateAction
247
- * is the base type for all TerminateActionUsages.
248
- */
249
-
250
- in occurrence terminatedOccurrence[1] {
251
- doc
252
- /*
253
- * The Occurrence to be terminated.
254
- */
255
- }
256
-
257
- action terminateOccurrence : destroy[1] {
258
- in occ = terminatedOccurrence;
259
- }
260
- }
261
-
262
- abstract action terminateActions : TerminateAction[0..*] nonunique :> actions {
263
- doc
264
- /*
265
- * terminateActions is the base feature for all TerminateActionUsages.
266
- */
267
-
268
- in occurrence terminatedOccurrence default that as Occurrence {
269
- doc
270
- /*
271
- * The default terminatedOccurrence for a terminateAction is its
272
- * featuring occurrence (which will generally be a containing Action).
273
- */
274
- }
275
- }
276
-
277
- abstract action def ControlAction :> Action {
278
- doc
279
- /*
280
- * A ControlAction is the Action of a control node, which has no inherent behavior.
281
- */
282
-
283
- bind start = done {
284
- doc
285
- /*
286
- * A ControlAction is instantaneous.
287
- */
288
- }
289
- }
290
-
291
- action def MergeAction :> ControlAction, MergePerformance {
292
- doc
293
- /*
294
- * A MergeAction is the ControlAction for a merge node.
295
- *
296
- * Note: Incoming succession connectors to a MergeAction must have source multiplicity
297
- * 0..1 and subset the incomingHBLink feature inherited from MergePerformance.
298
- *
299
- * A MergeAction is the ControlAction for a MergeNode. It is a MergePerformance that
300
- * selects exactly one incoming HappensBeforeLink. Incoming succession connectors to a
301
- * MergeAction must have source multiplicity 0..1 and subset the incomingHBLink feature
302
- * inherited from MergePerformance.
303
- */
304
- }
305
-
306
- action def DecisionAction :> ControlAction, DecisionPerformance {
307
- doc
308
- /*
309
- * A DecisionAction is the ControlAction for a DecisionNode. It is a DecisionPerformance that
310
- * selects one outgoing HappensBeforeLink. Outgoing succession connectors from a DecisionAction
311
- * must have target multiplicity 0..1 and subset the outgoingHBLink feature inherited from
312
- * DecisionPerformance.
313
- */
314
- }
315
-
316
- action def JoinAction :> ControlAction {
317
- doc
318
- /*
319
- * A JoinAction is the ControlAction for a JoinNode.
320
- *
321
- * Note: Join behavior results from requiring that the source multiplicity of all
322
- * incoming succession connectors be 1..1.
323
- */
324
- }
325
-
326
- action def ForkAction :> ControlAction {
327
- doc
328
- /*
329
- * A ForkAction is the ControlAction for a ForkNode.
330
- *
331
- * Note: Fork behavior results from requiring that the target multiplicity of all
332
- * outgoing succession connectors be 1..1.
333
- */
334
- }
335
-
336
- abstract action def TransitionAction :> Action, TransitionPerformance {
337
- doc
338
- /*
339
- * A TransitionAction is a TransitionPerformance with an Action as transitionLinkSource.
340
- * It is the base type of all TransitionUsages.
341
- */
342
-
343
- in transitionLinkSource : Action :>> TransitionPerformance::transitionLinkSource;
344
- ref acceptedMessage : MessageTransfer, MessageAction :>> trigger {
345
- in :>> MessageTransfer::payload, MessageAction::payload;
346
- }
347
-
348
- ref receiver :>> triggerTarget;
349
-
350
- action accepter : AcceptMessageAction :>> 'accept';
351
-
352
- bind receiver = accepter.receiver;
353
- bind acceptedMessage = accepter.acceptedMessage;
354
-
355
- action effect: Action :>> TransitionPerformance::effect;
356
- }
357
-
358
- action def DecisionTransitionAction :> TransitionAction, NonStateTransitionPerformance {
359
- doc
360
- /*
361
- * A DecisionTransitionAction is a TransitionAction and NonStateTransitionPerformance that has a
362
- * guard, but no trigger or effects. It is the base type of TransitionUsages used as
363
- * conditional successions in action models.
364
- */
365
-
366
- ref action :>> accepter[0..0];
367
- ref action :>> effect[0..0];
368
- }
369
-
370
- abstract action transitionActions: TransitionAction[0..*] nonunique :> actions {
371
- doc
372
- /*
373
- * transitionActions is the base feature for all TransitionUsages.
374
- */
375
- }
376
-
377
- action def AssignmentAction :> FeatureWritePerformance, Action {
378
- doc
379
- /*
380
- * An AssignmentAction is an Action, used to type an AssignmentActionUsage. It is also a
381
- * FeatureWritePerformance that updates the accessedFeature of its target Occurrence with
382
- * the given replacementValues.
383
- */
384
-
385
- in target : Occurrence[1];
386
- inout replacementValues : Anything[0..*] nonunique;
387
- }
388
-
389
- abstract action assignmentActions : AssignmentAction[0..*] nonunique :> actions {
390
- doc
391
- /*
392
- * assignmentActions is the base feature for all AssignmentActionsUsages.
393
- */
394
-
395
- in target : Occurrence[1] default that as Occurrence {
396
- doc
397
- /*
398
- * The default target for assignmentActions is its featuring instance (if that is
399
- * an Occurrence).
400
- */
401
- }
402
- }
403
-
404
- action def IfThenAction :> Action, IfThenPerformance {
405
- doc
406
- /*
407
- * An IfThenAction is a Kernel IfThenPerformance that is also an Action.
408
- * It is the base type for all IfActionUsages.
409
- */
410
-
411
- in ifTest[1];
412
- in action thenClause[0..1];
413
- }
414
-
415
- action def IfThenElseAction :> IfThenAction, IfThenElsePerformance {
416
- doc
417
- /*
418
- * An IfThenElseAction is a Kernel IfThenElsePeformance that is also an IfThenAction.
419
- * It is the base type for all IfActionUsages that have an elseAction.
420
- */
421
-
422
- in ifTest[1];
423
- in action thenClause[0..1];
424
- in action elseClause[0..1];
425
- }
426
-
427
- abstract action ifThenActions : IfThenAction[0..*] nonunique :> actions {
428
- doc
429
- /*
430
- * ifThenActions is the base feature for all IfActionUsages.
431
- */
432
- }
433
-
434
- abstract action ifThenElseActions : IfThenElseAction[0..*] nonunique :> actions {
435
- doc
436
- /*
437
- * ifThenElseActions is the base feature for all IfActionUsages that have an elseAction.
438
- */
439
- }
440
-
441
- abstract action def LoopAction :> Action {
442
- doc
443
- /*
444
- * A LoopAction is the base type for all LoopActionUsages.
445
- */
446
-
447
- in ref iterator;
448
-
449
- in action body[0..*] {
450
- doc
451
- /*
452
- * The action that is performed repeatedly in the loop.
453
- */
454
- }
455
- }
456
-
457
- action def WhileLoopAction :> LoopAction, LoopPerformance {
458
- doc
459
- /*
460
- * A WhileLoopAction is a Kernel LoopPerformance that is also a LoopAction.
461
- * It is the base type for all WhileLoopActionUsages.
462
- */
463
-
464
- in whileTest default {true} {
465
- doc
466
- /*
467
- * A Boolean expression that must be true for the loop to continue.
468
- * It is evaluated before the body is performed and is always evaluated at
469
- * least once.
470
- */
471
- }
472
-
473
- in action body {
474
- doc
475
- /*
476
- * The action that is performed while the whileTest is true and the
477
- * untilTest is false.
478
- */
479
- }
480
-
481
- in untilTest default {false} {
482
- doc
483
- /*
484
- * A Boolean expression that must be false for the loop to continue.
485
- * It is evaluated after the body is performed.
486
- */
487
- }
488
- }
489
-
490
- action def ForLoopAction :> LoopAction {
491
- doc
492
- /*
493
- * A ForLoopAction is a LoopAction that iterates over an ordered sequence of values.
494
- * It is the base type for all ForLoopActionUsages.
495
- */
496
-
497
- protected ref var[0..1] :> seq {
498
- doc
499
- /*
500
- * The loop variable that is assigned successive elements of seq on each
501
- * iteration of the loop.
502
- */
503
- }
504
-
505
- in ref seq {
506
- doc
507
- /*
508
- * The sequence of values over which the loop iterates.
509
- */
510
- }
511
-
512
- in action body {
513
- doc
514
- /*
515
- * The action that is performed on each iteration of the loop.
516
- */
517
- }
518
-
519
- private attribute index : Positive {
520
- doc
521
- /*
522
- * The index of the element of seq assigned to var on the current iteration
523
- * of the loop.
524
- */
525
- }
526
-
527
- private action initialization
528
- assign index := 1;
529
- then private action whileLoop
530
- while index <= size(seq) {
531
- assign var := seq#(index);
532
- then perform body;
533
- then assign index := index + 1;
534
- }
535
- }
536
-
537
- abstract action loopActions : LoopAction[0..*] nonunique :> actions {
538
- doc
539
- /*
540
- * loopActions is the base feature for all LoopActionUsages.
541
- */
542
- }
543
-
544
- abstract action whileLoopActions : WhileLoopAction[0..*] nonunique :> loopActions {
545
- doc
546
- /*
547
- * whileLoopActions is the base feature for all WhileLoopActionUsages.
548
- */
549
- }
550
-
551
- abstract action forLoopActions : ForLoopAction[0..*] nonunique :> loopActions {
552
- doc
553
- /*
554
- * forLoopActions is the base feature for all ForLoopActionUsages.
555
- */
556
- }
1
+ standard library package Actions {
2
+ doc
3
+ /*
4
+ * This package defines the base types for actions and related behavioral elements in the
5
+ * SysML language.
6
+ */
7
+
8
+ private import Base::Anything;
9
+ private import ScalarValues::Positive;
10
+ private import ScalarValues::Natural;
11
+ private import SequenceFunctions::size;
12
+ private import SequenceFunctions::isEmpty;
13
+ private import Occurrences::Occurrence;
14
+ private import Occurrences::HappensWhile;
15
+ private import Performances::Performance;
16
+ private import Performances::performances;
17
+ private import Transfers::SendPerformance;
18
+ private import Transfers::sendPerformances;
19
+ private import Transfers::AcceptPerformance;
20
+ private import Transfers::acceptPerformances;
21
+ private import FeatureReferencingPerformances::FeatureWritePerformance;
22
+ private import ControlPerformances::MergePerformance;
23
+ private import ControlPerformances::DecisionPerformance;
24
+ private import ControlPerformances::IfThenPerformance;
25
+ private import ControlPerformances::IfThenElsePerformance;
26
+ private import ControlPerformances::LoopPerformance;
27
+ private import TransitionPerformances::TransitionPerformance;
28
+ private import TransitionPerformances::NonStateTransitionPerformance;
29
+ private import Transfers::MessageTransfer;
30
+ private import Flows::MessageAction;
31
+ private import OccurrenceFunctions::destroy;
32
+
33
+ abstract action def Action :> Performance {
34
+ doc
35
+ /*
36
+ * Action is the most general class of Performances of ActionDefinitions in a system or
37
+ * part of a system. Action is the base class of all ActionDefinitions.
38
+ */
39
+
40
+ ref action self: Action :>> Performance::self;
41
+ ref action incomingTransfers :>> Performance::incomingTransfers;
42
+
43
+ action start: Action :>> startShot {
44
+ doc
45
+ /*
46
+ * The starting snapshot of an Action.
47
+ */
48
+ }
49
+
50
+ action done: Action :>> endShot {
51
+ doc
52
+ /*
53
+ * The ending snapshot of an Action.
54
+ */
55
+ }
56
+
57
+ action subactions: Action[0..*] :> actions, subperformances {
58
+ doc
59
+ /*
60
+ * The subperformances of this Action that are Actions.
61
+ */
62
+
63
+ ref occurrence :>> Action::this, actions::this, subperformances::this = (that as Action).this {
64
+ doc
65
+ /*
66
+ * The "this" reference of a subaction is always the same as that of
67
+ * its owning Action.
68
+ */
69
+ }
70
+ }
71
+
72
+ action sendSubactions: SendAction[0..*] :> subactions, sendActions {
73
+ doc
74
+ /*
75
+ * The subactions of this Action that are SendActions.
76
+ */
77
+ }
78
+
79
+ action acceptSubactions: AcceptAction[0..*] :> subactions, acceptActions {
80
+ doc
81
+ /*
82
+ * The subactions of this Action that are AcceptActions.
83
+ */
84
+ }
85
+
86
+ abstract action terminateSubactions : TerminateAction[0..*] :> subactions, terminateActions {
87
+ doc
88
+ /*
89
+ * The subactions of this Action that are TerminateActions.
90
+ */
91
+ }
92
+
93
+ abstract action controls : ControlAction[0..*] :> subactions {
94
+ doc
95
+ /*
96
+ * The subactions of this Action that are ControlActions.
97
+ */
98
+ }
99
+
100
+ abstract action merges : MergeAction[0..*] :> controls {
101
+ doc
102
+ /*
103
+ * The controls of this Action that are MergeActions.
104
+ */
105
+ }
106
+
107
+ abstract action decisions : DecisionAction :> controls {
108
+ doc
109
+ /*
110
+ * The controls of this Action that are DecisionActions.
111
+ */
112
+ }
113
+
114
+ abstract action joins : JoinAction :> controls {
115
+ doc
116
+ /*
117
+ * The controls of this Action that are JoinActions.
118
+ */
119
+ }
120
+
121
+ abstract action forks : ForkAction :> controls {
122
+ doc
123
+ /*
124
+ * The controls of this Action that are ForkActions.
125
+ */
126
+ }
127
+
128
+ abstract action transitions : TransitionAction[0..*] :> subactions, transitionActions {
129
+ doc
130
+ /*
131
+ * The subactions of this Action that are TransitionActions.
132
+ */
133
+ }
134
+
135
+ abstract action decisionTransitions : DecisionTransitionAction[0..*] :> transitions {
136
+ doc
137
+ /*
138
+ * The subactions of this Action that are DecisionTransitionActions.
139
+ */
140
+ }
141
+
142
+ abstract action assignments : AssignmentAction[0..*] :> subactions, assignmentActions {
143
+ doc
144
+ /*
145
+ * The subactions of this Action that are AssignmentActions.
146
+ */
147
+
148
+ in target;
149
+ }
150
+
151
+ abstract action ifSubactions : IfThenAction[0..*] :> subactions, ifThenActions {
152
+ doc
153
+ /*
154
+ * The subactions of this Action that are IfThenActions (including IfThenElseActions).
155
+ */
156
+ }
157
+
158
+ abstract action loops : LoopAction[0..*] :> subactions, loopActions {
159
+ doc
160
+ /*
161
+ * The subactions of this Action that are LoopActions.
162
+ */
163
+ }
164
+
165
+ abstract action whileLoops : WhileLoopAction[0..*] :> loops, whileLoopActions {
166
+ doc
167
+ /*
168
+ * The loops of this Action that are WhileLoopActions.
169
+ */
170
+ }
171
+
172
+ abstract action forLoops : ForLoopAction[0..*] :> loops, forLoopActions {
173
+ doc
174
+ /*
175
+ * The loops of this Action that are ForLoopActions.
176
+ */
177
+ }
178
+ }
179
+
180
+ abstract action actions: Action[0..*] nonunique :> performances {
181
+ doc
182
+ /*
183
+ * actions is the base feature for all ActionUsages.
184
+ */
185
+ }
186
+
187
+ action def SendAction :> Action, SendPerformance {
188
+ doc
189
+ /*
190
+ * A SendAction is an Action and SendPerformance used to type SendActionUsages.
191
+ * It initiates an outgoingTransferFromSelf from a designated sender Occurrence
192
+ * with a given payload, optionally to a designated receiver Occurrence.
193
+ */
194
+
195
+ in :>> payload [0..*];
196
+ ref sentMessage :>> sentTransfer: MessageTransfer, MessageAction {
197
+ in :>> MessageTransfer::payload, MessageAction::payload;
198
+ }
199
+ }
200
+
201
+ abstract action sendActions: SendAction[0..*] nonunique :> actions, sendPerformances {
202
+ doc
203
+ /*
204
+ * sendActions is the base feature for all SendActionUsages.
205
+ */
206
+ }
207
+
208
+ action def AcceptMessageAction :> Action, AcceptPerformance {
209
+ doc
210
+ /*
211
+ * An AcceptMessageAction is an Action and AcceptPerformance that identifies an
212
+ * incomingTransferToSelf of a designated receiver Occurrence, providing its payload
213
+ * as output.
214
+ */
215
+ inout :>> payload;
216
+ ref acceptedMessage :>> acceptedTransfer: MessageTransfer, MessageAction {
217
+ in :>> MessageTransfer::payload, MessageAction::payload;
218
+ }
219
+ }
220
+
221
+ action def AcceptAction :> AcceptMessageAction {
222
+ doc
223
+ /*
224
+ * An AcceptAction is an AcceptMessageAction used to type AcceptActionUsages that are
225
+ * not accepters for TransitionActions. It waits for a payload or message of the specified
226
+ * kind to be accepted by a nested state transition.
227
+ */
228
+ ref :>> acceptedMessage = aState.aTransition.accepter.acceptedMessage;
229
+ state aState {
230
+ transition aTransition first start accept apayload: Anything via receiver then done;
231
+ }
232
+ bind payload = aState.aTransition.apayload;
233
+ }
234
+
235
+ abstract action acceptActions: AcceptAction[0..*] nonunique :> actions, acceptPerformances {
236
+ doc
237
+ /*
238
+ * acceptActions is the base feature for standalone AcceptActionUsages.
239
+ */
240
+ }
241
+
242
+ abstract action def TerminateAction :> Action {
243
+ doc
244
+ /*
245
+ * A TerminateAction is an Action that terminates a given Occurrence, meaning
246
+ * that the Occurrence ends during the performance of this Action. TerminateAction
247
+ * is the base type for all TerminateActionUsages.
248
+ */
249
+
250
+ in occurrence terminatedOccurrence[1] {
251
+ doc
252
+ /*
253
+ * The Occurrence to be terminated.
254
+ */
255
+ }
256
+
257
+ action terminateOccurrence : destroy[1] {
258
+ in occ = terminatedOccurrence;
259
+ }
260
+ }
261
+
262
+ abstract action terminateActions : TerminateAction[0..*] nonunique :> actions {
263
+ doc
264
+ /*
265
+ * terminateActions is the base feature for all TerminateActionUsages.
266
+ */
267
+
268
+ in occurrence terminatedOccurrence default that as Occurrence {
269
+ doc
270
+ /*
271
+ * The default terminatedOccurrence for a terminateAction is its
272
+ * featuring occurrence (which will generally be a containing Action).
273
+ */
274
+ }
275
+ }
276
+
277
+ abstract action def ControlAction :> Action {
278
+ doc
279
+ /*
280
+ * A ControlAction is the Action of a control node, which has no inherent behavior.
281
+ */
282
+
283
+ bind start = done {
284
+ doc
285
+ /*
286
+ * A ControlAction is instantaneous.
287
+ */
288
+ }
289
+ }
290
+
291
+ action def MergeAction :> ControlAction, MergePerformance {
292
+ doc
293
+ /*
294
+ * A MergeAction is the ControlAction for a merge node.
295
+ *
296
+ * Note: Incoming succession connectors to a MergeAction must have source multiplicity
297
+ * 0..1 and subset the incomingHBLink feature inherited from MergePerformance.
298
+ *
299
+ * A MergeAction is the ControlAction for a MergeNode. It is a MergePerformance that
300
+ * selects exactly one incoming HappensBeforeLink. Incoming succession connectors to a
301
+ * MergeAction must have source multiplicity 0..1 and subset the incomingHBLink feature
302
+ * inherited from MergePerformance.
303
+ */
304
+ }
305
+
306
+ action def DecisionAction :> ControlAction, DecisionPerformance {
307
+ doc
308
+ /*
309
+ * A DecisionAction is the ControlAction for a DecisionNode. It is a DecisionPerformance that
310
+ * selects one outgoing HappensBeforeLink. Outgoing succession connectors from a DecisionAction
311
+ * must have target multiplicity 0..1 and subset the outgoingHBLink feature inherited from
312
+ * DecisionPerformance.
313
+ */
314
+ }
315
+
316
+ action def JoinAction :> ControlAction {
317
+ doc
318
+ /*
319
+ * A JoinAction is the ControlAction for a JoinNode.
320
+ *
321
+ * Note: Join behavior results from requiring that the source multiplicity of all
322
+ * incoming succession connectors be 1..1.
323
+ */
324
+ }
325
+
326
+ action def ForkAction :> ControlAction {
327
+ doc
328
+ /*
329
+ * A ForkAction is the ControlAction for a ForkNode.
330
+ *
331
+ * Note: Fork behavior results from requiring that the target multiplicity of all
332
+ * outgoing succession connectors be 1..1.
333
+ */
334
+ }
335
+
336
+ abstract action def TransitionAction :> Action, TransitionPerformance {
337
+ doc
338
+ /*
339
+ * A TransitionAction is a TransitionPerformance with an Action as transitionLinkSource.
340
+ * It is the base type of all TransitionUsages.
341
+ */
342
+
343
+ in transitionLinkSource : Action :>> TransitionPerformance::transitionLinkSource;
344
+ ref acceptedMessage : MessageTransfer, MessageAction :>> trigger {
345
+ in :>> MessageTransfer::payload, MessageAction::payload;
346
+ }
347
+
348
+ ref receiver :>> triggerTarget;
349
+
350
+ action accepter : AcceptMessageAction :>> 'accept';
351
+
352
+ bind receiver = accepter.receiver;
353
+ bind acceptedMessage = accepter.acceptedMessage;
354
+
355
+ action effect: Action :>> TransitionPerformance::effect;
356
+ }
357
+
358
+ action def DecisionTransitionAction :> TransitionAction, NonStateTransitionPerformance {
359
+ doc
360
+ /*
361
+ * A DecisionTransitionAction is a TransitionAction and NonStateTransitionPerformance that has a
362
+ * guard, but no trigger or effects. It is the base type of TransitionUsages used as
363
+ * conditional successions in action models.
364
+ */
365
+
366
+ ref action :>> accepter[0..0];
367
+ ref action :>> effect[0..0];
368
+ }
369
+
370
+ abstract action transitionActions: TransitionAction[0..*] nonunique :> actions {
371
+ doc
372
+ /*
373
+ * transitionActions is the base feature for all TransitionUsages.
374
+ */
375
+ }
376
+
377
+ action def AssignmentAction :> FeatureWritePerformance, Action {
378
+ doc
379
+ /*
380
+ * An AssignmentAction is an Action, used to type an AssignmentActionUsage. It is also a
381
+ * FeatureWritePerformance that updates the accessedFeature of its target Occurrence with
382
+ * the given replacementValues.
383
+ */
384
+
385
+ in target : Occurrence[1];
386
+ inout replacementValues : Anything[0..*] nonunique;
387
+ }
388
+
389
+ abstract action assignmentActions : AssignmentAction[0..*] nonunique :> actions {
390
+ doc
391
+ /*
392
+ * assignmentActions is the base feature for all AssignmentActionsUsages.
393
+ */
394
+
395
+ in target : Occurrence[1] default that as Occurrence {
396
+ doc
397
+ /*
398
+ * The default target for assignmentActions is its featuring instance (if that is
399
+ * an Occurrence).
400
+ */
401
+ }
402
+ }
403
+
404
+ action def IfThenAction :> Action, IfThenPerformance {
405
+ doc
406
+ /*
407
+ * An IfThenAction is a Kernel IfThenPerformance that is also an Action.
408
+ * It is the base type for all IfActionUsages.
409
+ */
410
+
411
+ in ifTest[1];
412
+ in action thenClause[0..1];
413
+ }
414
+
415
+ action def IfThenElseAction :> IfThenAction, IfThenElsePerformance {
416
+ doc
417
+ /*
418
+ * An IfThenElseAction is a Kernel IfThenElsePeformance that is also an IfThenAction.
419
+ * It is the base type for all IfActionUsages that have an elseAction.
420
+ */
421
+
422
+ in ifTest[1];
423
+ in action thenClause[0..1];
424
+ in action elseClause[0..1];
425
+ }
426
+
427
+ abstract action ifThenActions : IfThenAction[0..*] nonunique :> actions {
428
+ doc
429
+ /*
430
+ * ifThenActions is the base feature for all IfActionUsages.
431
+ */
432
+ }
433
+
434
+ abstract action ifThenElseActions : IfThenElseAction[0..*] nonunique :> actions {
435
+ doc
436
+ /*
437
+ * ifThenElseActions is the base feature for all IfActionUsages that have an elseAction.
438
+ */
439
+ }
440
+
441
+ abstract action def LoopAction :> Action {
442
+ doc
443
+ /*
444
+ * A LoopAction is the base type for all LoopActionUsages.
445
+ */
446
+
447
+ in ref iterator;
448
+
449
+ in action body[0..*] {
450
+ doc
451
+ /*
452
+ * The action that is performed repeatedly in the loop.
453
+ */
454
+ }
455
+ }
456
+
457
+ action def WhileLoopAction :> LoopAction, LoopPerformance {
458
+ doc
459
+ /*
460
+ * A WhileLoopAction is a Kernel LoopPerformance that is also a LoopAction.
461
+ * It is the base type for all WhileLoopActionUsages.
462
+ */
463
+
464
+ in whileTest default {true} {
465
+ doc
466
+ /*
467
+ * A Boolean expression that must be true for the loop to continue.
468
+ * It is evaluated before the body is performed and is always evaluated at
469
+ * least once.
470
+ */
471
+ }
472
+
473
+ in action body {
474
+ doc
475
+ /*
476
+ * The action that is performed while the whileTest is true and the
477
+ * untilTest is false.
478
+ */
479
+ }
480
+
481
+ in untilTest default {false} {
482
+ doc
483
+ /*
484
+ * A Boolean expression that must be false for the loop to continue.
485
+ * It is evaluated after the body is performed.
486
+ */
487
+ }
488
+ }
489
+
490
+ action def ForLoopAction :> LoopAction {
491
+ doc
492
+ /*
493
+ * A ForLoopAction is a LoopAction that iterates over an ordered sequence of values.
494
+ * It is the base type for all ForLoopActionUsages.
495
+ */
496
+
497
+ protected ref var[0..1] :> seq {
498
+ doc
499
+ /*
500
+ * The loop variable that is assigned successive elements of seq on each
501
+ * iteration of the loop.
502
+ */
503
+ }
504
+
505
+ in ref seq {
506
+ doc
507
+ /*
508
+ * The sequence of values over which the loop iterates.
509
+ */
510
+ }
511
+
512
+ in action body {
513
+ doc
514
+ /*
515
+ * The action that is performed on each iteration of the loop.
516
+ */
517
+ }
518
+
519
+ private attribute index : Positive {
520
+ doc
521
+ /*
522
+ * The index of the element of seq assigned to var on the current iteration
523
+ * of the loop.
524
+ */
525
+ }
526
+
527
+ private action initialization
528
+ assign index := 1;
529
+ then private action whileLoop
530
+ while index <= size(seq) {
531
+ assign var := seq#(index);
532
+ then perform body;
533
+ then assign index := index + 1;
534
+ }
535
+ }
536
+
537
+ abstract action loopActions : LoopAction[0..*] nonunique :> actions {
538
+ doc
539
+ /*
540
+ * loopActions is the base feature for all LoopActionUsages.
541
+ */
542
+ }
543
+
544
+ abstract action whileLoopActions : WhileLoopAction[0..*] nonunique :> loopActions {
545
+ doc
546
+ /*
547
+ * whileLoopActions is the base feature for all WhileLoopActionUsages.
548
+ */
549
+ }
550
+
551
+ abstract action forLoopActions : ForLoopAction[0..*] nonunique :> loopActions {
552
+ doc
553
+ /*
554
+ * forLoopActions is the base feature for all ForLoopActionUsages.
555
+ */
556
+ }
557
557
  }