Skip to content

Commit 362f6ed

Browse files
committed
Adds transitivity to some occ feature
1 parent 2d4355c commit 362f6ed

1 file changed

Lines changed: 33 additions & 3 deletions

File tree

sysml.library/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,17 @@ standard library package Occurrences {
152152
* including at least this occurrence.
153153
*/
154154

155-
/* timeCoincidentOccurrences occurrences happen during each other. */
156155
feature thatOccurrence: Occurrence[1] subsets longerOccurrence;
157156
feature thisOccurrence: Occurrence[1] subsets shorterOccurrence;
158157

158+
/* timeCoincidentOccurrences occurrences happen during each other. */
159159
connector :HappensDuring
160160
from [1] shorterOccurrence references thisOccurrence
161161
to [1] longerOccurrence references thatOccurrence;
162+
163+
/* timeCoincidentOccurrences is transitive */
164+
subset thatOccurrence.timeCoincidentOccurrences
165+
subsets thisOccurrence.timeCoincidentOccurrences;
162166
}
163167

164168
feature spaceEnclosedOccurrences: Occurrence[1..*] subsets occurrences {
@@ -168,10 +172,14 @@ standard library package Occurrences {
168172
* including this one.
169173
*/
170174

171-
/* spaceEnclosedOccurrences is transitive. */
172175
feature largerSpace: Occurrence[1] subsets that;
173176
feature smallerSpace: Occurrence[1] subsets self;
177+
178+
/* spaceEnclosedOccurrences is transitive. */
174179
subset smallerSpace.spaceEnclosedOccurrences subsets largerSpace.spaceEnclosedOccurrences;
180+
181+
/* smallerSpace are outside occurrences that are outside their largerSpace */
182+
subset smallerSpace.outsideOfOccurrences subsets largerSpace.outsideOfOccurrences;
175183
}
176184

177185
feature all spaceTimeEnclosedOccurrences: Occurrence[1..*] subsets timeEnclosedOccurrences, spaceEnclosedOccurrences
@@ -181,6 +189,9 @@ standard library package Occurrences {
181189
* Occurrences that this one completely includes in both space and time,
182190
* including this one.
183191
*/
192+
193+
/* spaceTimeEnclosedOccurrences is transitive */
194+
subset largerSpace.spaceTimeEnclosedOccurrences subsets smallerSpace.spaceTimeEnclosedOccurrences;
184195
}
185196

186197
feature all spaceTimeEnclosedPoints : Occurrence[1..*] subsets spaceTimeEnclosedOccurrences {
@@ -202,13 +213,17 @@ standard library package Occurrences {
202213
* and vice-versa, including this one.
203214
*/
204215

205-
/* spaceTimeCoincidentOccurrences occurrences are inside of each other. */
206216
feature redefines thatOccurrence subsets largerSpace;
207217
feature redefines thisOccurrence subsets smallerSpace;
208218

219+
/* spaceTimeCoincidentOccurrences occurrences are inside of each other. */
209220
connector :InsideOf
210221
from [1] largerSpace references thatOccurrence
211222
to [1] smallerSpace references thisOccurrence;
223+
224+
/* spaceTimeCoincidentOccurrences is transitive */
225+
subset thatOccurrence.spaceTimeCoincidentOccurrences
226+
subsets thisOccurrence.spaceTimeCoincidentOccurrences;
212227
}
213228

214229
feature outsideOfOccurrences: Occurrence[0..*] subsets withoutOccurrences inverse of outsideOfOccurrences {
@@ -288,6 +303,9 @@ standard library package Occurrences {
288303
feature portionOccurrence: Occurrence[1] subsets that;
289304
feature portionedOccurrence: Occurrence[1] subsets self;
290305
binding [1] portionOccurrence.portionOfLife = [1] portionedOccurrence.portionOfLife;
306+
307+
/* portionOf is transitive */
308+
subset portionedOccurrence.portionOf subsets portionOccurrence.portionOf;
291309
}
292310

293311
portion feature timeSlices: Occurrence[1..*] subsets portions {
@@ -304,6 +322,12 @@ standard library package Occurrences {
304322
* Occurrences of which this occurrence is a time slice, including at least this
305323
* occurrence.
306324
*/
325+
326+
feature timeSliceOccurrence: Occurrence[1] subsets that;
327+
feature timeSlicedOccurrence: Occurrence[1] subsets self;
328+
329+
/* timeSliceOf is transitive */
330+
subset timeSlicedOccurrence.timeSliceOf subsets timeSliceOccurrence.timeSliceOf;
307331
}
308332

309333
portion feature all snapshots: Occurrence[1..*] subsets timeSlices {
@@ -383,6 +407,9 @@ standard library package Occurrences {
383407
feature spaceSliceOccurrence: Occurrence[1] subsets that;
384408
feature spaceSlicedOccurrence: Occurrence[1] subsets self;
385409
inv { spaceSliceOccurrence.innerSpaceDimension <= spaceSlicedOccurrence.innerSpaceDimension }
410+
411+
/* spaceSliceOf is transitive */
412+
subset spaceSlicedOccurrence.spaceSliceOf subsets spaceSliceOccurrence.spaceSliceOf;
386413
}
387414

388415
portion feature spaceShots: Occurrence[1..*] subsets spaceSlices {
@@ -401,6 +428,9 @@ standard library package Occurrences {
401428
feature spaceShotOccurrence: Occurrence[1] subsets that;
402429
feature spaceShottedOccurrence: Occurrence[1] subsets self;
403430
inv { spaceShotOccurrence.innerSpaceDimension < spaceShottedOccurrence.innerSpaceDimension }
431+
432+
/* spaceShotOf is transitive */
433+
subset spaceShottedOccurrence.spaceShotOf subsets spaceShotOccurrence.spaceShotOf;
404434
}
405435

406436
feature unionsOf: Set[0..*] {

0 commit comments

Comments
 (0)