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,66 +1,66 @@
1
- standard library package TransitionPerformances {
2
- doc
3
- /*
4
- * This package contains a library model of the semantics of conditional transitions between occurrences,
5
- * including the performance of specified Behaviors when the transition occurs.
6
- */
7
-
8
- private import ScalarValues::Boolean;
9
- private import ScalarValues::Natural;
10
- private import SequenceFunctions::isEmpty;
11
- private import Occurrences::Occurrence;
12
- private import Occurrences::HappensBefore;
13
- private import Performances::Performance;
14
- private import Performances::Evaluation;
15
- private import Transfers::MessageTransfer;
16
- private import Transfers::AcceptPerformance;
17
- private import Transfers::acceptPerformances;
18
- private import ControlFunctions::allTrue;
19
- private import SequenceFunctions::size;
20
-
21
- abstract behavior TransitionPerformance {
22
- in feature transitionLinkSource: Performance[1];
23
-
24
- feature trigger: MessageTransfer[*];
25
- bool guard[*] subsets enclosedPerformances;
26
- step effect[*] subsets enclosedPerformances;
27
-
28
- feature triggerTarget : Occurrence [1] default this;
29
- feature transitionLink: HappensBefore[0..1];
30
-
31
- private binding [0..1] transitionLink.earlierOccurrence = [1] transitionLinkSource;
32
- private succession [1] transitionLinkSource then [*] effect;
33
- private succession [*] effect then [1] transitionLink.laterOccurrence;
34
-
35
- private connector [0..1] transitionLink to [1..*] trigger;
36
- private connector all guardConstraint: TPCGuardConstraint[*]
37
- from [0..1] transitionLink to [*] guard;
38
-
39
- private succession all [*] trigger then [*] guard;
40
- private succession all [*] guard then [*] effect;
41
-
42
- feature accNum: Natural [1] = if isEmpty(trigger) ? 0 else 1;
43
- step accept: AcceptPerformance[accNum] subsets timeEnclosedOccurrences, acceptPerformances {
44
- feature redefines acceptedTransfer = trigger;
45
- }
46
- binding accept.receiver = triggerTarget;
47
-
48
- private succession [*] guard then [accNum] accept;
49
- }
50
-
51
- behavior NonStateTransitionPerformance specializes TransitionPerformance {
52
- feature isTriggerAfter: Boolean default true;
53
- private succession [1] transitionLinkSource then [1] Performance::self;
54
- private feature taNum: Natural [1] = if isTriggerAfter ? size(trigger) else 0;
55
- private succession triggerAfter [taNum] first [0..1] transitionLinkSource then [*] trigger.endShot;
56
-
57
- private succession all [*] guard then [0..1] transitionLink.laterOccurrence;
58
- }
59
-
60
- assoc struct TPCGuardConstraint {
61
- end guardedLink [0..1] feature constrainedHBLink: HappensBefore;
62
- end bool constrainedGuard;
63
-
64
- private inv { allTrue(constrainedGuard()) }
65
- }
1
+ standard library package TransitionPerformances {
2
+ doc
3
+ /*
4
+ * This package contains a library model of the semantics of conditional transitions between occurrences,
5
+ * including the performance of specified Behaviors when the transition occurs.
6
+ */
7
+
8
+ private import ScalarValues::Boolean;
9
+ private import ScalarValues::Natural;
10
+ private import SequenceFunctions::isEmpty;
11
+ private import Occurrences::Occurrence;
12
+ private import Occurrences::HappensBefore;
13
+ private import Performances::Performance;
14
+ private import Performances::Evaluation;
15
+ private import Transfers::MessageTransfer;
16
+ private import Transfers::AcceptPerformance;
17
+ private import Transfers::acceptPerformances;
18
+ private import ControlFunctions::allTrue;
19
+ private import SequenceFunctions::size;
20
+
21
+ abstract behavior TransitionPerformance {
22
+ in feature transitionLinkSource: Performance[1];
23
+
24
+ feature trigger: MessageTransfer[*];
25
+ bool guard[*] subsets enclosedPerformances;
26
+ step effect[*] subsets enclosedPerformances;
27
+
28
+ feature triggerTarget : Occurrence [1] default this;
29
+ feature transitionLink: HappensBefore[0..1];
30
+
31
+ private binding [0..1] transitionLink.earlierOccurrence = [1] transitionLinkSource;
32
+ private succession [1] transitionLinkSource then [*] effect;
33
+ private succession [*] effect then [1] transitionLink.laterOccurrence;
34
+
35
+ private connector [0..1] transitionLink to [1..*] trigger;
36
+ private connector all guardConstraint: TPCGuardConstraint[*]
37
+ from [0..1] transitionLink to [*] guard;
38
+
39
+ private succession all [*] trigger then [*] guard;
40
+ private succession all [*] guard then [*] effect;
41
+
42
+ feature accNum: Natural [1] = if isEmpty(trigger) ? 0 else 1;
43
+ step accept: AcceptPerformance[accNum] subsets timeEnclosedOccurrences, acceptPerformances {
44
+ feature redefines acceptedTransfer = trigger;
45
+ }
46
+ binding accept.receiver = triggerTarget;
47
+
48
+ private succession [*] guard then [accNum] accept;
49
+ }
50
+
51
+ behavior NonStateTransitionPerformance specializes TransitionPerformance {
52
+ feature isTriggerAfter: Boolean default true;
53
+ private succession [1] transitionLinkSource then [1] Performance::self;
54
+ private feature taNum: Natural [1] = if isTriggerAfter ? size(trigger) else 0;
55
+ private succession triggerAfter [taNum] first [0..1] transitionLinkSource then [*] trigger.endShot;
56
+
57
+ private succession all [*] guard then [0..1] transitionLink.laterOccurrence;
58
+ }
59
+
60
+ assoc struct TPCGuardConstraint {
61
+ end guardedLink [0..1] feature constrainedHBLink: HappensBefore;
62
+ end bool constrainedGuard;
63
+
64
+ private inv { allTrue(constrainedGuard()) }
65
+ }
66
66
  }
@@ -1,188 +1,188 @@
1
- standard library package Triggers {
2
- doc
3
- /*
4
- * This package contains functions that return ChangeSignals for triggering
5
- * when a Boolean condition changes from false to true, at a specific time
6
- * or after a specific time delay.
7
- */
8
-
9
- private import ScalarValues::Boolean;
10
- private import ScalarValues::NumericalValue;
11
- private import Occurrences::Occurrence;
12
-
13
- public import Clocks::*;
14
- public import Observation::*;
15
-
16
- struct TimeSignal :> ChangeSignal {
17
- doc
18
- /*
19
- * A TimeSignal is a ChangeSignal whose condition is the currentTime
20
- * of a given Clock reaching a specific signalTime.
21
- */
22
-
23
- feature signalTime : NumericalValue[1] {
24
- doc
25
- /*
26
- * The time at which the TimeSignal should be sent.
27
- */
28
- }
29
-
30
- feature signalClock : Clock[1] {
31
- doc
32
- /*
33
- * The Clock whose currentTime is being monitored.
34
- */
35
- }
36
-
37
- private bool :>> signalCondition {
38
- doc
39
- /*
40
- * The Boolean condition of the currentTime of the signalClock being
41
- * equal to the signalTime.
42
- */
43
-
44
- signalClock.currentTime == signalTime
45
- }
46
- }
47
-
48
- function TriggerWhen {
49
- doc
50
- /*
51
- * TriggerWhen returns a monitored ChangeSignal for a given condition,
52
- * to be sent to a given receiver when the condition occurs.
53
- */
54
-
55
- in bool condition[1] {
56
- doc
57
- /*
58
- * The BooleanExpression to be monitored for changing from
59
- * false to true.
60
- */
61
- }
62
-
63
- in feature receiver : Occurrence [1] {
64
- doc
65
- /*
66
- * The Occurrence to which the ChangeSignal is to be sent.
67
- */
68
- }
69
-
70
- in feature monitor : ChangeMonitor[1] default defaultMonitor {
71
- doc
72
- /*
73
- * The ChangeMonitor to be used to monitor the ChangeSignal condition.
74
- * The default is the Observation::defaultMonitor.
75
- */
76
- }
77
-
78
- return feature changeSignal : ChangeSignal[1] = new ChangeSignal(condition, monitor) {
79
- doc
80
- /*
81
- * The ChangeSignal for the condition, as monitored by the monitor.
82
- */
83
- }
84
-
85
- step :> monitor.startObservation {
86
- in observer = receiver;
87
- in signal = changeSignal;
88
- }
89
- }
90
-
91
- function TriggerAt {
92
- doc
93
- /*
94
- * TriggerAt returns a monitored TimeSignal to be sent to a receiver when
95
- * the currentTime of a given Clock reaches a specific timeInstant.
96
- */
97
-
98
- in feature timeInstant : NumericalValue[1] {
99
- doc
100
- /*
101
- * The time instant, relative to the clock, at which the TimeSignal should be sent.
102
- */
103
- }
104
-
105
- in feature receiver : Occurrence[1] {
106
- doc
107
- /*
108
- * The Occurrence to which the TimeSignal is to be sent.
109
- */
110
- }
111
-
112
- in feature clock : Clock[1] default localClock {
113
- doc
114
- /*
115
- * The Clock to be used as the reference for the timeInstant. The default is
116
- * the localClock, which will be bound when the function is invoked.
117
- */
118
- }
119
-
120
- in feature monitor : ChangeMonitor[1] default defaultMonitor {
121
- doc
122
- /*
123
- * The ChangeMonitor to be used to monitor the TimeSignal condition.
124
- * The default is the Observation::defaultMonitor.
125
- */
126
- }
127
-
128
- return feature timeSignal : TimeSignal[1] = new TimeSignal(timeInstant, clock, monitor) {
129
- doc
130
- /*
131
- * The TimeSignal for the given timeInstant, as monitored by the monitor.
132
- */
133
- }
134
-
135
- step :> monitor.startObservation {
136
- in observer = receiver;
137
- in signal = timeSignal;
138
- }
139
- }
140
-
141
- function TriggerAfter {
142
- doc
143
- /*
144
- * TriggerAfter returns a monitored TimeSignal to be sent to a receiver after
145
- * a certain time delay relative to a given Clock.
146
- */
147
-
148
- in feature delay : NumericalValue[1] {
149
- doc
150
- /*
151
- * The time duration, relative to the clock, after which the TimeSignal is sent.
152
- */
153
- }
154
-
155
- in feature receiver : Occurrence[1] {
156
- doc
157
- /*
158
- * The Occurrence to which the TimeSignal is to be sent.
159
- */
160
- }
161
-
162
- in feature clock : Clock[1] default localClock {
163
- doc
164
- /*
165
- * The Clock to be used as the reference for the time delay. The default is
166
- * the localClock, which will be bound when the function is invoked.
167
- */
168
- }
169
-
170
- in feature monitor : ChangeMonitor[1] default defaultMonitor {
171
- doc
172
- /*
173
- * The ChangeMonitor to be used to monitor the TimeSignal condition.
174
- * The default is the Observation::defaultMonitor.
175
- */
176
- }
177
-
178
- return signal : TimeSignal[1] =
179
- TriggerAt(clock.currentTime + delay, receiver, clock, monitor) {
180
- doc
181
- /*
182
- * The TimeSignal for the currentTime of the clock when the function is invoked
183
- * plus the given time delay, as monitored by the monitor.
184
- */
185
- }
186
- }
187
-
1
+ standard library package Triggers {
2
+ doc
3
+ /*
4
+ * This package contains functions that return ChangeSignals for triggering
5
+ * when a Boolean condition changes from false to true, at a specific time
6
+ * or after a specific time delay.
7
+ */
8
+
9
+ private import ScalarValues::Boolean;
10
+ private import ScalarValues::NumericalValue;
11
+ private import Occurrences::Occurrence;
12
+
13
+ public import Clocks::*;
14
+ public import Observation::*;
15
+
16
+ struct TimeSignal :> ChangeSignal {
17
+ doc
18
+ /*
19
+ * A TimeSignal is a ChangeSignal whose condition is the currentTime
20
+ * of a given Clock reaching a specific signalTime.
21
+ */
22
+
23
+ feature signalTime : NumericalValue[1] {
24
+ doc
25
+ /*
26
+ * The time at which the TimeSignal should be sent.
27
+ */
28
+ }
29
+
30
+ feature signalClock : Clock[1] {
31
+ doc
32
+ /*
33
+ * The Clock whose currentTime is being monitored.
34
+ */
35
+ }
36
+
37
+ private bool :>> signalCondition {
38
+ doc
39
+ /*
40
+ * The Boolean condition of the currentTime of the signalClock being
41
+ * equal to the signalTime.
42
+ */
43
+
44
+ signalClock.currentTime == signalTime
45
+ }
46
+ }
47
+
48
+ function TriggerWhen {
49
+ doc
50
+ /*
51
+ * TriggerWhen returns a monitored ChangeSignal for a given condition,
52
+ * to be sent to a given receiver when the condition occurs.
53
+ */
54
+
55
+ in bool condition[1] {
56
+ doc
57
+ /*
58
+ * The BooleanExpression to be monitored for changing from
59
+ * false to true.
60
+ */
61
+ }
62
+
63
+ in feature receiver : Occurrence [1] {
64
+ doc
65
+ /*
66
+ * The Occurrence to which the ChangeSignal is to be sent.
67
+ */
68
+ }
69
+
70
+ in feature monitor : ChangeMonitor[1] default defaultMonitor {
71
+ doc
72
+ /*
73
+ * The ChangeMonitor to be used to monitor the ChangeSignal condition.
74
+ * The default is the Observation::defaultMonitor.
75
+ */
76
+ }
77
+
78
+ return feature changeSignal : ChangeSignal[1] = new ChangeSignal(condition, monitor) {
79
+ doc
80
+ /*
81
+ * The ChangeSignal for the condition, as monitored by the monitor.
82
+ */
83
+ }
84
+
85
+ step :> monitor.startObservation {
86
+ in observer = receiver;
87
+ in signal = changeSignal;
88
+ }
89
+ }
90
+
91
+ function TriggerAt {
92
+ doc
93
+ /*
94
+ * TriggerAt returns a monitored TimeSignal to be sent to a receiver when
95
+ * the currentTime of a given Clock reaches a specific timeInstant.
96
+ */
97
+
98
+ in feature timeInstant : NumericalValue[1] {
99
+ doc
100
+ /*
101
+ * The time instant, relative to the clock, at which the TimeSignal should be sent.
102
+ */
103
+ }
104
+
105
+ in feature receiver : Occurrence[1] {
106
+ doc
107
+ /*
108
+ * The Occurrence to which the TimeSignal is to be sent.
109
+ */
110
+ }
111
+
112
+ in feature clock : Clock[1] default localClock {
113
+ doc
114
+ /*
115
+ * The Clock to be used as the reference for the timeInstant. The default is
116
+ * the localClock, which will be bound when the function is invoked.
117
+ */
118
+ }
119
+
120
+ in feature monitor : ChangeMonitor[1] default defaultMonitor {
121
+ doc
122
+ /*
123
+ * The ChangeMonitor to be used to monitor the TimeSignal condition.
124
+ * The default is the Observation::defaultMonitor.
125
+ */
126
+ }
127
+
128
+ return feature timeSignal : TimeSignal[1] = new TimeSignal(timeInstant, clock, monitor) {
129
+ doc
130
+ /*
131
+ * The TimeSignal for the given timeInstant, as monitored by the monitor.
132
+ */
133
+ }
134
+
135
+ step :> monitor.startObservation {
136
+ in observer = receiver;
137
+ in signal = timeSignal;
138
+ }
139
+ }
140
+
141
+ function TriggerAfter {
142
+ doc
143
+ /*
144
+ * TriggerAfter returns a monitored TimeSignal to be sent to a receiver after
145
+ * a certain time delay relative to a given Clock.
146
+ */
147
+
148
+ in feature delay : NumericalValue[1] {
149
+ doc
150
+ /*
151
+ * The time duration, relative to the clock, after which the TimeSignal is sent.
152
+ */
153
+ }
154
+
155
+ in feature receiver : Occurrence[1] {
156
+ doc
157
+ /*
158
+ * The Occurrence to which the TimeSignal is to be sent.
159
+ */
160
+ }
161
+
162
+ in feature clock : Clock[1] default localClock {
163
+ doc
164
+ /*
165
+ * The Clock to be used as the reference for the time delay. The default is
166
+ * the localClock, which will be bound when the function is invoked.
167
+ */
168
+ }
169
+
170
+ in feature monitor : ChangeMonitor[1] default defaultMonitor {
171
+ doc
172
+ /*
173
+ * The ChangeMonitor to be used to monitor the TimeSignal condition.
174
+ * The default is the Observation::defaultMonitor.
175
+ */
176
+ }
177
+
178
+ return signal : TimeSignal[1] =
179
+ TriggerAt(clock.currentTime + delay, receiver, clock, monitor) {
180
+ doc
181
+ /*
182
+ * The TimeSignal for the currentTime of the clock when the function is invoked
183
+ * plus the given time delay, as monitored by the monitor.
184
+ */
185
+ }
186
+ }
187
+
188
188
  }