Skip to content

Commit e2b44e0

Browse files
committed
SYSML2_-416 Updated SysML Xpect tests.
1 parent 137735b commit e2b44e0

24 files changed

Lines changed: 462 additions & 455 deletions

org.omg.sysml.xpect.tests/library.domain/Cause and Effect/CausationConnections.sysml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ standard library package CausationConnections {
4141
isEmpty(intersection(causes, effects))
4242
}
4343

44-
private succession causalOrdering first causes.startShot[nCauses] then effects[nEffects] {
44+
private succession causalOrdering first [nCauses] causes.startShot then [nEffects] effects {
4545
doc /* All causes must exist before all effects. */
4646
attribute nCauses = size(causes);
4747
attribute nEffects = size(effects);
@@ -61,11 +61,9 @@ standard library package CausationConnections {
6161
* connections with multiple causes.)
6262
*/
6363

64-
end occurrence theCause[*] :>> causes :>> source {
65-
doc /* The single causing occurrence. */
66-
}
64+
end theCauses [*] occurrence theCause :>> causes :>> source;
6765

68-
end occurrence theEffect[*] :>> effects :>> target {
66+
end theEffects [*] occurrence theEffect :>> effects :>> target {
6967
doc /* The single effect occurrence resulting from the cause. */
7068
}
7169
}

org.omg.sysml.xpect.tests/library.domain/Geometry/ShapeItems.sysml

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ standard library package ShapeItems {
6565
item :>> edges [1..*] {
6666
item :>> vertices [0..2];
6767
}
68-
item :>> vertices = edges.vertices;
68+
item :>> vertices [*] = edges.vertices;
6969

7070
assert constraint { isClosed == vertices->forAll{in p1 : Point;
7171
vertices->exists{p2 : Point; p1 != p2 and
@@ -406,11 +406,11 @@ standard library package ShapeItems {
406406
assert constraint { isEmpty(af) == notEmpty(vertices) }
407407

408408
/* Bind face edges to specific edges */
409-
binding [1] bind base.edges [0..*] = be [0..*];
410-
binding [1] bind cf.edges [0..*] = be [0..*];
409+
binding [1] bind [0..*] base.edges = [0..*] be;
410+
binding [1] bind [0..*] cf.edges = [0..*] be;
411411

412412
/* Meeting edges */
413-
connection :MatesWith connect be [1] to be [1];
413+
connection :MatesWith connect [1] be to [1] be;
414414

415415
attribute :>> genus = 0;
416416
}
@@ -426,7 +426,7 @@ standard library package ShapeItems {
426426
item apex :>> vertices;
427427

428428
/* Bind face vertices to specific vertices */
429-
binding [1] bind cf.vertices [0..*] = apex [0..*];
429+
binding [1] bind [0..*] cf.vertices = [0..*] apex;
430430
}
431431

432432
item def EccentricCone :> Cone {
@@ -469,9 +469,9 @@ standard library package ShapeItems {
469469

470470
item :>> af [1];
471471

472-
binding [1] bind cf.edges [0..*] = ae [0..*];
472+
binding [1] bind [0..*] cf.edges = [0..*] ae;
473473

474-
connection :MatesWith connect ae [1] to ae [1] {
474+
connection :MatesWith connect [1] ae to [1] ae {
475475
doc /* Meeting edges */
476476
}
477477
}
@@ -575,61 +575,61 @@ standard library package ShapeItems {
575575
assert constraint { ( isEmpty(tfrv) == isEmpty(trrv) ) }
576576

577577
/* Bind face edges to specific edges */
578-
binding [1] bind tf.edges [0..1] = tfe [0..1];
579-
binding [1] bind tf.edges [0..1] = tre [0..1];
580-
binding [1] bind tf.edges [0..1] = tsle [0..1];
581-
binding [1] bind bf.edges [0..1] = bfe [0..1];
582-
binding [1] bind bf.edges [0..1] = bre [0..1];
583-
binding [1] bind bf.edges [0..1] = bsle [0..1];
584-
binding [1] bind bf.edges [0..1] = bsre [0..1];
585-
586-
binding [1] bind ff.edges [0..1] = tfe [0..1];
587-
binding [1] bind ff.edges [0..1] = bfe [0..1];
588-
binding [1] bind ff.edges [0..1] = ufle [0..1];
589-
590-
binding [1] bind rf.edges [0..1] = tre [0..1];
591-
binding [1] bind rf.edges [0..1] = bre [0..1];
592-
binding [1] bind rf.edges [0..1] = urle [0..1];
578+
binding [1] bind [0..1] tf.edges = [0..1] tfe;
579+
binding [1] bind [0..1] tf.edges = [0..1] tre;
580+
binding [1] bind [0..1] tf.edges = [0..1] tsle;
581+
binding [1] bind [0..1] bf.edges = [0..1] bfe;
582+
binding [1] bind [0..1] bf.edges = [0..1] bre;
583+
binding [1] bind [0..1] bf.edges = [0..1] bsle;
584+
binding [1] bind [0..1] bf.edges = [0..1] bsre;
585+
586+
binding [1] bind [0..1] ff.edges = [0..1] tfe;
587+
binding [1] bind [0..1] ff.edges = [0..1] bfe;
588+
binding [1] bind [0..1] ff.edges = [0..1] ufle;
589+
590+
binding [1] bind [0..1] rf.edges = [0..1] tre;
591+
binding [1] bind [0..1] rf.edges = [0..1] bre;
592+
binding [1] bind [0..1] rf.edges = [0..1] urle;
593593

594594
/* Bind edge vertices to specific vertices */
595-
binding [1] bind tfe.vertices [0..1] = tflv [0..1];
596-
binding [1] bind tre.vertices [0..1] = trlv [0..1];
597-
binding [1] bind tsle.vertices [0..1] = tflv [0..1];
598-
binding [1] bind tsle.vertices [0..1] = trlv [0..1];
599-
600-
binding [1] bind bfe.vertices [0..1] = bflv [0..1];
601-
binding [1] bind bfe.vertices [0..1] = bfrv [0..1];
602-
binding [1] bind bre.vertices [0..1] = brlv [0..1];
603-
binding [1] bind bre.vertices [0..1] = brrv [0..1];
604-
binding [1] bind bsle.vertices [0..1] = bflv [0..1];
605-
binding [1] bind bsle.vertices [0..1] = brlv [0..1];
606-
binding [1] bind bsre.vertices [0..1] = bfrv [0..1];
607-
binding [1] bind bsre.vertices [0..1] = brrv [0..1];
608-
609-
binding [1] bind ufle.vertices [0..1] = tflv [0..1];
610-
binding [1] bind ufle.vertices [0..1] = bflv [0..1];
611-
binding [1] bind urle.vertices [0..1] = trlv [0..1];
612-
binding [1] bind urle.vertices [0..1] = brlv [0..1];
595+
binding [1] bind [0..1] tfe.vertices = [0..1] tflv;
596+
binding [1] bind [0..1] tre.vertices = [0..1] trlv;
597+
binding [1] bind [0..1] tsle.vertices = [0..1] tflv;
598+
binding [1] bind [0..1] tsle.vertices = [0..1] trlv;
599+
600+
binding [1] bind [0..1] bfe.vertices = [0..1] bflv;
601+
binding [1] bind [0..1] bfe.vertices = [0..1] bfrv;
602+
binding [1] bind [0..1] bre.vertices = [0..1] brlv;
603+
binding [1] bind [0..1] bre.vertices = [0..1] brrv;
604+
binding [1] bind [0..1] bsle.vertices = [0..1] bflv;
605+
binding [1] bind [0..1] bsle.vertices = [0..1] brlv;
606+
binding [1] bind [0..1] bsre.vertices = [0..1] bfrv;
607+
binding [1] bind [0..1] bsre.vertices = [0..1] brrv;
608+
609+
binding [1] bind [0..1] ufle.vertices = [0..1] tflv;
610+
binding [1] bind [0..1] ufle.vertices = [0..1] bflv;
611+
binding [1] bind [0..1] urle.vertices = [0..1] trlv;
612+
binding [1] bind [0..1] urle.vertices = [0..1] brlv;
613613

614614
/* Meeting edges */
615-
connection :MatesWith connect tfe [1] to tfe [1];
616-
connection :MatesWith connect tre [1] to tre [1];
617-
connection :MatesWith connect tsle [1] to tsle [1];
618-
connection :MatesWith connect bfe [1] to bfe [1];
619-
connection :MatesWith connect bre [1] to bre [1];
620-
connection :MatesWith connect bsle [1] to bsle [1];
621-
connection :MatesWith connect bsre [1] to bsre [1];
622-
connection :MatesWith connect ufle [1] to ufle [1];
623-
connection :MatesWith connect urle [1] to urle [1];
624-
connection :MatesWith connect bsre [1] to bsre [1];
615+
connection :MatesWith connect [1] tfe to [1] tfe;
616+
connection :MatesWith connect [1] tre to [1] tre;
617+
connection :MatesWith connect [1] tsle to [1] tsle;
618+
connection :MatesWith connect [1] bfe to [1] bfe;
619+
connection :MatesWith connect [1] bre to [1] bre;
620+
connection :MatesWith connect [1] bsle to [1] bsle;
621+
connection :MatesWith connect [1] bsre to [1] bsre;
622+
connection :MatesWith connect [1] ufle to [1] ufle;
623+
connection :MatesWith connect [1] urle to [1] urle;
624+
connection :MatesWith connect [1] bsre to [1] bsre;
625625

626626
/* Meeting vertices */
627-
connection :MatesWith connect tflv [2] to tflv [2];
628-
connection :MatesWith connect trlv [2] to trlv [2];
629-
connection :MatesWith connect bflv [2] to bflv [2];
630-
connection :MatesWith connect bfrv [2] to bfrv [2];
631-
connection :MatesWith connect brlv [2] to brlv [2];
632-
connection :MatesWith connect brrv [2] to brrv [2];
627+
connection :MatesWith connect [2] tflv to [2] tflv;
628+
connection :MatesWith connect [2] trlv to [2] trlv;
629+
connection :MatesWith connect [2] bflv to [2] bflv;
630+
connection :MatesWith connect [2] bfrv to [2] bfrv;
631+
connection :MatesWith connect [2] brlv to [2] brlv;
632+
connection :MatesWith connect [2] brrv to [2] brrv;
633633
}
634634

635635
item def TriangularPrism :> CuboidOrTriangularPrism {
@@ -649,11 +649,11 @@ standard library package ShapeItems {
649649
item :>> vertices;
650650

651651
/* Bind face edges to specific edges */
652-
binding [1] bind tf.edges [0..1] = bsre [0..1];
652+
binding [1] bind [0..1] tf.edges = [0..1] bsre;
653653

654654
/* Bind edge vertices to specific vertices */
655-
binding [1] bind tfe.vertices [0..1] = bfrv [0..1];
656-
binding [1] bind tre.vertices [0..1] = bfrv [0..1];
655+
binding [1] bind [0..1] tfe.vertices = [0..1] bfrv;
656+
binding [1] bind [0..1] tre.vertices = [0..1] bfrv;
657657
}
658658

659659
item def RightTriangularPrism :> TriangularPrism {
@@ -707,35 +707,35 @@ standard library package ShapeItems {
707707
item :>> vertices;
708708

709709
/* Bind face edges to specific edges */
710-
binding [1] bind tf.edges [0..1] = tsre [0..1];
711-
binding [1] bind ff.edges [0..1] = ufre [0..1];
712-
binding [1] bind rf.edges [0..1] = urre [0..1];
710+
binding [1] bind [0..1] tf.edges = [0..1] tsre;
711+
binding [1] bind [0..1] ff.edges = [0..1] ufre;
712+
binding [1] bind [0..1] rf.edges = [0..1] urre;
713713

714-
binding [1] bind srf.edges [0..1] = tsre [0..1];
715-
binding [1] bind srf.edges [0..1] = bsre [0..1];
716-
binding [1] bind srf.edges [0..1] = ufre [0..1];
717-
binding [1] bind srf.edges [0..1] = urre [0..1];
714+
binding [1] bind [0..1] srf.edges = [0..1] tsre;
715+
binding [1] bind [0..1] srf.edges = [0..1] bsre;
716+
binding [1] bind [0..1] srf.edges = [0..1] ufre;
717+
binding [1] bind [0..1] srf.edges = [0..1] urre;
718718

719719
/* Bind edge vertices to specific vertices */
720-
binding [1] bind tfe.vertices [0..1] = tfrv [0..1];
721-
binding [1] bind tre.vertices [0..1] = trrv [0..1];
722-
binding [1] bind tsre.vertices [0..1] = tfrv [0..1];
723-
binding [1] bind tsre.vertices [0..1] = trrv [0..1];
720+
binding [1] bind [0..1] tfe.vertices = [0..1] tfrv;
721+
binding [1] bind [0..1] tre.vertices = [0..1] trrv;
722+
binding [1] bind [0..1] tsre.vertices = [0..1] tfrv;
723+
binding [1] bind [0..1] tsre.vertices = [0..1] trrv;
724724

725-
binding [1] bind ufre.vertices [0..1] = tfrv [0..1];
726-
binding [1] bind ufre.vertices [0..1] = bfrv [0..1];
727-
binding [1] bind urre.vertices [0..1] = trrv [0..1];
728-
binding [1] bind urre.vertices [0..1] = brrv [0..1];
725+
binding [1] bind [0..1] ufre.vertices = [0..1] tfrv;
726+
binding [1] bind [0..1] ufre.vertices = [0..1] bfrv;
727+
binding [1] bind [0..1] urre.vertices = [0..1] trrv;
728+
binding [1] bind [0..1] urre.vertices = [0..1] brrv;
729729

730730
/* Meeting edges */
731-
connection :MatesWith connect tsre [1] to tsre [1];
732-
connection :MatesWith connect ufre [1] to ufre [1];
733-
connection :MatesWith connect urre [1] to urre [1];
734-
connection :MatesWith connect bsre [1] to bsre [1];
731+
connection :MatesWith connect [1] tsre to [1] tsre;
732+
connection :MatesWith connect [1] ufre to [1] ufre;
733+
connection :MatesWith connect [1] urre to [1] urre;
734+
connection :MatesWith connect [1] bsre to [1] bsre;
735735

736736
/* Meeting vertices */
737-
connection :MatesWith connect tfrv [2] to tfrv [2];
738-
connection :MatesWith connect trrv [2] to trrv [2];
737+
connection :MatesWith connect [2] tfrv to [2] tfrv;
738+
connection :MatesWith connect [2] trrv to [2] trrv;
739739
}
740740

741741
item def RectangularCuboid :> Cuboid {
@@ -800,7 +800,7 @@ standard library package ShapeItems {
800800
wall#(if i==wallNumber ? 1 else i+1).edges#(2)) } }
801801

802802
/* Meeting apices. */
803-
connection :MatesWith connect apex [wallNumber] to apex [wallNumber];
803+
connection :MatesWith connect [wallNumber] apex to [wallNumber] apex;
804804
}
805805

806806
item def Tetrahedron :> Pyramid {

org.omg.sysml.xpect.tests/library.kernel/ControlPerformances.kerml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ standard library package ControlPerformances {
7575

7676
in redefines ifTest;
7777
in thenClause : Occurrence[0..1];
78-
succession ifTest[1] then thenClause[0..1];
78+
succession [1] ifTest then [0..1] thenClause;
7979
inv { ifTest() == thenClause->notEmpty() }
8080
}
8181

@@ -88,7 +88,7 @@ standard library package ControlPerformances {
8888

8989
in redefines ifTest;
9090
in elseClause : Occurrence[0..1];
91-
succession ifTest[1] then elseClause[0..1];
91+
succession [1] ifTest then [0..1] elseClause;
9292
inv { not ifTest() == elseClause->notEmpty() }
9393
}
9494

@@ -102,7 +102,7 @@ standard library package ControlPerformances {
102102
in redefines ifTest;
103103
in redefines thenClause;
104104
in elseClause : Occurrence[0..1];
105-
succession ifTest[1] then elseClause[0..1];
105+
succession [1] ifTest then [0..1] elseClause;
106106
inv { not ifTest() == elseClause->notEmpty() }
107107
}
108108

@@ -122,13 +122,13 @@ standard library package ControlPerformances {
122122
step whileDecision : IfThenPerformance[1..*];
123123
step untilDecision : IfElsePerformance[0..*];
124124

125-
binding whileDecision.ifTest[1] = whileTest[1];
126-
binding whileDecision.thenClause[1] = body[1];
125+
binding [1] whileDecision.ifTest = [1] whileTest;
126+
binding [1] whileDecision.thenClause = [1] body;
127127

128128
succession body then untilDecision;
129129

130-
binding untilDecision.ifTest[1] = untilTest[1];
131-
binding loopBack of untilDecision.elseClause[0..1] = whileDecision[1];
130+
binding [1] untilDecision.ifTest = [1] untilTest;
131+
binding loopBack of [0..1] untilDecision.elseClause = [1] whileDecision;
132132

133133
inv { loopBack->size() == whileDecision->size() - 1 }
134134
}

org.omg.sysml.xpect.tests/library.kernel/FeatureReferencingPerformances.kerml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ standard library package FeatureReferencingPerformances {
114114
inv { not beforeValues->equals(afterValues) }
115115

116116
private connector : HappensWhile
117-
from onOccurrence.monitoredOccurrence.beforeTimeSlice.startShot[1] to startShot[1];
117+
from [1] onOccurrence.monitoredOccurrence.beforeTimeSlice.startShot to [1] startShot;
118118
private connector : SelfSameLifeLink
119-
from onOccurrence.monitoredOccurrence.beforeTimeSlice.monitoredFeature[1] to beforeValues[1];
119+
from [1] onOccurrence.monitoredOccurrence.beforeTimeSlice.monitoredFeature to [1] beforeValues;
120120
private connector : SelfSameLifeLink
121-
from onOccurrence.monitoredOccurrence.afterSnapshot.monitoredFeature[1] to afterValues[1];
121+
from [1] onOccurrence.monitoredOccurrence.afterSnapshot.monitoredFeature to [1] afterValues;
122122
protected connector endWhen : HappensBefore
123-
from onOccurrence.monitoredOccurrence.afterSnapshot[1] to endShot[1];
123+
from [1] onOccurrence.monitoredOccurrence.afterSnapshot to [1] endShot;
124124
}
125125

126126
behavior EvaluationResultMonitorPerformance specializes FeatureMonitorPerformance {
@@ -173,10 +173,10 @@ standard library package FeatureReferencingPerformances {
173173
feature redefines endWhen : HappensJustBefore;
174174
}
175175

176-
private connector : HappensJustBefore from monitor1 [1] to monitor2 [0..1];
176+
private connector : HappensJustBefore from [1] monitor1 to [0..1] monitor2;
177177
inv { isEmpty(monitor2) == (monitor1.afterValues == isToTrue) }
178178

179-
private binding monitor1.onOccurrence[1] = onOccurrence[1];
180-
private binding monitor2.onOccurrence[1] = onOccurrence[1];
179+
private binding [1] monitor1.onOccurrence = [1] onOccurrence;
180+
private binding [1] monitor2.onOccurrence = [1] onOccurrence;
181181
}
182182
}

0 commit comments

Comments
 (0)