Skip to content

Commit 0c12d44

Browse files
committed
Merge branch 'ST6RI-836' into ST6RI-823
2 parents 635ee45 + a24f936 commit 0c12d44

779 files changed

Lines changed: 269555 additions & 194955 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Java CI with Maven
10+
11+
on:
12+
push:
13+
branches: [ "master" ]
14+
pull_request:
15+
branches: '**'
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up JDK 17
25+
uses: actions/setup-java@v4
26+
with:
27+
java-version: '17'
28+
distribution: 'temurin'
29+
cache: maven
30+
- name: Build with Maven
31+
run: ./mvnw -B clean verify --file pom.xml
32+
- name: Publish Test Report
33+
uses: mikepenz/action-junit-report@v5
34+
if: success() || failure() # always run even if the previous step fails
35+
with:
36+
report_paths: '**/target/surefire-reports/TEST-*.xml'
37+
include_passed: true
38+
- name: Verify index generation
39+
run: echo $(git diff -- sysml.library/.index.json) | grep -e '^$' || (echo "Library index in the git repository is not up to date. Please re-generate it and push changes to the repository."; exit 1)
40+
- name: Publish to Github Packages
41+
if: github.event_name != 'pull_request'
42+
run: ./mvnw -B deploy -DskipTests=true
43+
env:
44+
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password

kerml/src/examples/Behavior Examples/TakePicture.kerml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ behavior TakePicture {
1111
step step1: Focus[1];
1212
step step2: Shoot[1];
1313

14-
succession flow exposure[1] from step1.xrsl to step2.xsf;
14+
succession flow exposure[1] of Exposure from step1.xrsl to step2.xsf;
1515

1616
succession step1 then camera.focusedState;
1717
succession step2 then camera.shotState;

kerml/src/examples/KerML Spec Annex A Examples/A-3-5-TimingForStructures.kerml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,13 @@ package TimingForStructuresExecution2 {
6262
private import Atoms::*;
6363
private import TimingForStructuresModelToBeExecuted2::*;
6464
private import Occurrences::HappensDuring;
65-
private import OneToOneConnectorsExecution::MyWheel1;
66-
private import OneToOneConnectorsExecution::MyWheel2;
6765
private import OneToOneConnectorsExecution::MyWheel;
68-
private import OneToOneConnectorsExecution::MyBikeFork1;
69-
private import OneToOneConnectorsExecution::MyBikeFork2;
7066
private import OneToOneConnectorsExecution::MyBikeFork;
67+
68+
struct MyWheel1 specializes OneToOneConnectorsExecution::MyWheel1;
69+
struct MyWheel2 specializes OneToOneConnectorsExecution::MyWheel2;
70+
struct MyBikeFork1 specializes OneToOneConnectorsExecution::MyBikeFork1;
71+
struct MyBikeFork2 specializes OneToOneConnectorsExecution::MyBikeFork2;
7172

7273
#atom
7374
assoc MyBike_During_Wheel1_Link specializes HappensDuring {

kerml/src/examples/KerML Spec Annex A Examples/A-3-8-ChangingFeatureValues.kerml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ package ChangingFeatureValuesModelToBeExecuted {
2323
}
2424

2525
struct Product {
26-
feature isPainted : Boolean [1] := false;
27-
feature isDry : Boolean [1] := true;
28-
feature isShipped : Boolean [1] := false;
26+
var feature isPainted : Boolean [1] := false;
27+
var feature isDry : Boolean [1] := true;
28+
var feature isShipped : Boolean [1] := false;
2929
}
3030

3131
behavior Paint {
@@ -80,9 +80,9 @@ package ChangingFeatureValuesExecution {
8080
private import FeatureReferencingPerformances::FeatureWritePerformance;
8181

8282
struct ProductTimeSlice specializes Product {
83-
readonly feature redefines isPainted;
84-
readonly feature redefines isDry;
85-
readonly feature redefines isShipped;
83+
feature redefines isPainted;
84+
feature redefines isDry;
85+
feature redefines isShipped;
8686
}
8787

8888
#atom

kerml/src/examples/Simple Tests/ArgumentResolution.kerml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package ArgumentResolutionBug {
55

66
behavior B {
77
in feature x;
8-
out feature : A = A(x);
8+
out feature : A = new A(x);
99
}
1010

1111
class C {

kerml/src/examples/Simple Tests/Behaviors.kerml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ package Behaviors {
88
}
99
behavior B specializes A {
1010
in x1;
11-
out y1;
11+
out var y1;
12+
}
13+
class C {
14+
var z = A().y;
15+
step a : A;
16+
binding z = a.y;
1217
}
1318
}

kerml/src/examples/Simple Tests/Expressions.kerml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ package Expressions {
2121
behavior w { inout v : Integer;
2222
step : ControlPerformances::LoopPerformance {
2323
in expr whileTest {v > 3}
24-
in expr untilTest;
2524
in step body {
2625
step decrement {
2726
out v_decr : Integer = v - 1;
2827
}
2928
succession decrement then update;
3029
step update : FeatureReferencingPerformances::FeatureWritePerformance {
31-
in redefines onOccurrence = w::self {
30+
in onOccurrence = w::self {
3231
feature redefines startingAt : w {
3332
inout feature redefines accessedFeature redefines v;
3433
}
@@ -57,7 +56,7 @@ package Expressions {
5756
bb : Boolean = f.s(1);
5857

5958
class C {
60-
count : ScalarValues::Integer := 0;
59+
var count : ScalarValues::Integer := 0;
6160
}
6261

6362
feature obj1 : C;
@@ -71,6 +70,6 @@ package Expressions {
7170
feature count : ScalarValues::Integer = c#(1).count;
7271
}
7372

74-
feature l = L();
73+
feature l = new L();
7574
feature w1 = w(xx);
7675
}

kerml/src/examples/Simple Tests/Features.kerml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,24 @@ package Features {
4949
feature guardian[1];
5050
}
5151

52-
classifier RegisteredAsset {
53-
composite readonly feature identifier[0..1];
54-
}
55-
56-
classifier Vehicle :> RegisteredAsset {
57-
derived feature vin[1] = identifier;
58-
}
59-
52+
class RegisteredAsset {
53+
composite var feature identifier[0..1];
54+
}
55+
56+
classifier Vehicle :> RegisteredAsset {
57+
derived var feature vin[1] = identifier;
58+
59+
var feature v : Vehicle;
60+
binding vin = v.vin;
61+
var feature w = v.vin;
62+
63+
feature x = vin;
64+
binding x = vin;
65+
}
6066
feature legalIdentification;
6167

6268
specialization Redef redefinition LegalRecord::guardian redefines parent;
63-
specialization redefinition Vehicle::vin redefines RegisteredAsset::identifier;
69+
specialization redefinition Vehicle::vin redefines RegisteredAsset::identifier;
6470

6571
redefinition Vehicle::vin redefines legalIdentification;
6672
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package Scoping {
2+
package P1 {
3+
class A {
4+
feature f;
5+
}
6+
package P2 {
7+
class A {
8+
feature g;
9+
}
10+
package P3 {
11+
class B :> A {
12+
feature :>> g;
13+
}
14+
}
15+
}
16+
package Objects {
17+
class Object {
18+
feature test1;
19+
}
20+
}
21+
package '$' {
22+
class Objects {
23+
class Object {
24+
feature test2;
25+
}
26+
}
27+
}
28+
package P4 {
29+
class C :> Objects::Object {
30+
feature :>> test1;
31+
}
32+
class D :> '$'::Objects::Object {
33+
feature :>> test2;
34+
}
35+
class E :> $::Objects::Object {
36+
feature :>> subobjects;
37+
}
38+
}
39+
}
40+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
package ExtendedOccurrences {
2+
class Interval;
3+
class Moment :> Interval;
4+
class Timeslice {
5+
feature interval : Interval;
6+
:>> self : Timeslice;
7+
}
8+
class Snapshot :> Timeslice {
9+
feature moment :>> interval : Moment;
10+
:>> self : Snapshot;
11+
}
12+
class Life :> Timeslice;
13+
class ExtendedOccurrence :> Life {
14+
:>> timeSlices : Timeslice [1..*];
15+
:>> snapshots :> timeSlices : Snapshot [1..*];
16+
expr at {
17+
:>> that : Timeslice;
18+
in interval : Interval;
19+
return result : Timeslice;
20+
21+
binding result.portionOf = that;
22+
binding result.interval = interval;
23+
}
24+
25+
expr while {
26+
in timeslice : Timeslice;
27+
return result : Timeslice = at(timeslice.interval);
28+
}
29+
30+
var feature activeOccurrences :> Occurrences::occurrences {
31+
connector : Occurrences::HappensDuring from [1] that to [1] self;
32+
}
33+
34+
var feature activeSuboccurrences :> Occurrences::occurrences {
35+
connector : Occurrences::HappensDuring from [1] that to [1] self;
36+
}
37+
38+
// occurrences and performances are abstract package-level features.
39+
// It would be nice to put the variable next to them, but they cannot
40+
// be package-level, or featured by Anything. Nevertheless, since
41+
// Occurrence is a specialization of Anything, it will have these
42+
// features (might be worth redefining them explicitly), so the
43+
// variables can subset them. In the case below, performances will
44+
// contain every step in the occurrence, which is the correct domain
45+
// for the variable.
46+
var feature activePerformances :> Performances::performances {
47+
connector : Occurrences::HappensDuring from [1] that to [1] self;
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)