Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '8'
java-version: '17'

# run omc runTest.mos using docker!
#- name: run OM docker
Expand All @@ -39,6 +39,7 @@ jobs:

- name: build the crml-compiler
run: |
sudo apt install openjdk-8-jdk
java -version
make distribution

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
plugins {
id 'application'
id 'antlr'
id 'com.github.johnrengelman.shadow' version "8.1.1"
id 'com.gradleup.shadow' version "9.2.0"
id 'java'
}

Expand Down Expand Up @@ -78,7 +78,7 @@ test {
testLogging {
events "passed", "skipped", "failed"
}
test.ignoreFailures true
test.ignoreFailures = true
}

jar {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
40 changes: 22 additions & 18 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 13 additions & 12 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/test/java/ctests/UseCaseTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ void testPumpingSystem () throws InterruptedException, IOException, ModelicaSimu
Util.runTest(filePath, cs, CompileStage.TRANSLATE);
} */



}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
model SetOperatorsExample7_no_ext is {
// extracting from a set of pieces of equipment
// the pieces of equipment that are in operation
class Equipment is {
String id; // Equipment identification
Boolean inOperation is external; // inOperation is true if the equipment is in operation
};

class Pump is {
extends Equipment;
String type = "Centrifugal";
};

class Motor is {
extends Equipment;
String provider = "JohnDoe";
};

Pump Equip1(id = "E1", inOperation = false);
Motor Equip2(id = "E2", inOperation = true);
Equipment Equip3(id = "E3", inOperation = true);

Equipment {} S is filter { Equipment (id is "E1"), Equipment (id is "E2"), Equipment (id is "E3") } (element.inOperation == true); // S should be equal to {Equip2}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
model FunctionalRequirements is {

Operator [ Boolean ] 'decide' Boolean phi 'over' Period P = phi 'or' new Boolean (P end));
Operator [ Boolean ] 'evaluate' Boolean phi 'over' Period P = integrate (('decide' phi 'over' P) * phi) on P;
Operator [ Boolean ] 'check' Boolean phi 'over' Periods P = and ({'evaluate' phi 'over' P.element});
// and ({'evaluate' phi 'over' P.element})
// = and( {'evaluate' phi 'over' P.e1, ..., 'evaluate' phi 'over' P.en} )
// = 'evaluate over'(phi, P.e1) and ... and 'evaluate over'(phi, P.en)
// = fold( and, {'evaluate' phi 'over' P.element})
// = fold( and, map( 'evaluate over', P))

Periods P1;
Periods P2;

Boolean phi;

Boolean R1 is 'check' phi 'over' P1;
Boolean R2 is 'check' phi 'over' P2;
Boolean R_on_all_periods is 'check' phi 'over' (P1 union P2); // Illegal (i.e. currently not defined) since Periods are not considered as typed set and 'union' operator is not defined for this specific type
Boolean R_on_all_periods2 is ('check' phi 'over' P1) and ('check' phi 'over' P2); // OK but a 'functional notation' would be preferable to be more concise
Boolean R_on_all_periods3 is 'check' phi 'over' {P1,P2}; // Should be equivalent to R_on_all_periods2
// 'check' phi 'over' {P1,P2}
// = 'check over'(phi,{P1,P2})
// = and( { 'evaluate over'( phi , {P1,P2}.element ) } )
// = and( { 'evaluate over'( phi , P1.element ) }, { 'evaluate over'( phi , P2.element ) } )
// = fold( 'check over', phi, {P1, P2} )
};
Loading
Loading