Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Belonging to [master]: - OpenModelica/OMCompiler#2143 - OpenModelica/OpenModelica-testsuite#835
- Loading branch information
1 parent
432c831
commit 87c4710
Showing
24 changed files
with
1,086 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// name: OperationAdd1 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model OperationAdd1 | ||
Integer i1; | ||
Integer i2[2]; | ||
Integer i3[3, 3]; | ||
Real r1; | ||
Real r2[2]; | ||
Real r3[3, 3]; | ||
String s1; | ||
String s2[2]; | ||
equation | ||
i1 = 1 + 2; | ||
i2 = {1, 2} + {3, 4}; | ||
i3 = identity(3) + identity(3); | ||
r1 = 1.0 + 2; | ||
r2 = {1, 2.0} + {3.0, 4}; | ||
r3 = identity(3) + identity(3); | ||
s1 = "hello" + " world"; | ||
s2 = {s1, s1} + {"1", "2"}; | ||
end OperationAdd1; | ||
|
||
// Result: | ||
// class OperationAdd1 | ||
// Integer i1; | ||
// Integer i2[1]; | ||
// Integer i2[2]; | ||
// Integer i3[1,1]; | ||
// Integer i3[1,2]; | ||
// Integer i3[1,3]; | ||
// Integer i3[2,1]; | ||
// Integer i3[2,2]; | ||
// Integer i3[2,3]; | ||
// Integer i3[3,1]; | ||
// Integer i3[3,2]; | ||
// Integer i3[3,3]; | ||
// Real r1; | ||
// Real r2[1]; | ||
// Real r2[2]; | ||
// Real r3[1,1]; | ||
// Real r3[1,2]; | ||
// Real r3[1,3]; | ||
// Real r3[2,1]; | ||
// Real r3[2,2]; | ||
// Real r3[2,3]; | ||
// Real r3[3,1]; | ||
// Real r3[3,2]; | ||
// Real r3[3,3]; | ||
// String s1; | ||
// String s2[1]; | ||
// String s2[2]; | ||
// equation | ||
// i1 = 1 + 2; | ||
// i2[1] = 1 + 3; | ||
// i2[2] = 2 + 4; | ||
// i3 = identity(3) + identity(3); | ||
// r1 = 1.0 + 2; | ||
// r2[1] = 1 + 3.0; | ||
// r2[2] = 2.0 + 4; | ||
// r3 = /*Real[3, 3]*/(identity(3) + identity(3)); | ||
// s1 = "hello" + " world"; | ||
// s2[1] = s1 + "1"; | ||
// s2[2] = s1 + "2"; | ||
// end OperationAdd1; | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// name: OperationAddEW1 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model OperationAddEW1 | ||
Integer i1; | ||
Integer i2[2]; | ||
Integer i3[3, 3]; | ||
Real r1; | ||
Real r2[2]; | ||
equation | ||
i2 = i2 .+ i1; | ||
i2 = i1 .+ i2; | ||
i3 = i3 .+ i1; | ||
i3 = i1 .+ i3; | ||
r2 = i2 .+ r1; | ||
r2 = r1 .+ i2; | ||
end OperationAddEW1; | ||
|
||
// Result: | ||
// class OperationAddEW1 | ||
// Integer i1; | ||
// Integer i2[1]; | ||
// Integer i2[2]; | ||
// Integer i3[1,1]; | ||
// Integer i3[1,2]; | ||
// Integer i3[1,3]; | ||
// Integer i3[2,1]; | ||
// Integer i3[2,2]; | ||
// Integer i3[2,3]; | ||
// Integer i3[3,1]; | ||
// Integer i3[3,2]; | ||
// Integer i3[3,3]; | ||
// Real r1; | ||
// Real r2[1]; | ||
// Real r2[2]; | ||
// equation | ||
// i2[1] = i2[1] + i1; | ||
// i2[2] = i2[2] + i1; | ||
// i2[1] = i1 + i2[1]; | ||
// i2[2] = i1 + i2[2]; | ||
// i3[1,1] = i3[1,1] + i1; | ||
// i3[1,2] = i3[1,2] + i1; | ||
// i3[1,3] = i3[1,3] + i1; | ||
// i3[2,1] = i3[2,1] + i1; | ||
// i3[2,2] = i3[2,2] + i1; | ||
// i3[2,3] = i3[2,3] + i1; | ||
// i3[3,1] = i3[3,1] + i1; | ||
// i3[3,2] = i3[3,2] + i1; | ||
// i3[3,3] = i3[3,3] + i1; | ||
// i3[1,1] = i1 + i3[1,1]; | ||
// i3[1,2] = i1 + i3[1,2]; | ||
// i3[1,3] = i1 + i3[1,3]; | ||
// i3[2,1] = i1 + i3[2,1]; | ||
// i3[2,2] = i1 + i3[2,2]; | ||
// i3[2,3] = i1 + i3[2,3]; | ||
// i3[3,1] = i1 + i3[3,1]; | ||
// i3[3,2] = i1 + i3[3,2]; | ||
// i3[3,3] = i1 + i3[3,3]; | ||
// r2[1] = /*Real*/(i2[1]) + r1; | ||
// r2[2] = /*Real*/(i2[2]) + r1; | ||
// r2[1] = r1 + /*Real*/(i2[1]); | ||
// r2[2] = r1 + /*Real*/(i2[2]); | ||
// end OperationAddEW1; | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// name: OperationDiv1 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model OperationDiv1 | ||
Integer i1; | ||
Integer i2[2]; | ||
Real r1; | ||
Real r2[2]; | ||
Real r3[3, 3]; | ||
equation | ||
r1 = r1 / r1; | ||
r2 = r2 / r1; | ||
r3 = r3 / r1; | ||
r2 = i2 / i1; | ||
end OperationDiv1; | ||
|
||
// Result: | ||
// class OperationDiv1 | ||
// Integer i1; | ||
// Integer i2[1]; | ||
// Integer i2[2]; | ||
// Real r1; | ||
// Real r2[1]; | ||
// Real r2[2]; | ||
// Real r3[1,1]; | ||
// Real r3[1,2]; | ||
// Real r3[1,3]; | ||
// Real r3[2,1]; | ||
// Real r3[2,2]; | ||
// Real r3[2,3]; | ||
// Real r3[3,1]; | ||
// Real r3[3,2]; | ||
// Real r3[3,3]; | ||
// equation | ||
// r1 = r1 / r1; | ||
// r2[1] = r2[1] / r1; | ||
// r2[2] = r2[2] / r1; | ||
// r3[1,1] = r3[1,1] / r1; | ||
// r3[1,2] = r3[1,2] / r1; | ||
// r3[1,3] = r3[1,3] / r1; | ||
// r3[2,1] = r3[2,1] / r1; | ||
// r3[2,2] = r3[2,2] / r1; | ||
// r3[2,3] = r3[2,3] / r1; | ||
// r3[3,1] = r3[3,1] / r1; | ||
// r3[3,2] = r3[3,2] / r1; | ||
// r3[3,3] = r3[3,3] / r1; | ||
// r2[1] = /*Real*/(i2[1]) / /*Real*/(i1); | ||
// r2[2] = /*Real*/(i2[2]) / /*Real*/(i1); | ||
// end OperationDiv1; | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// name: OperationDivEW1 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model OperationDivEW1 | ||
Integer i1; | ||
Integer i2[2]; | ||
Integer i3[3, 3]; | ||
Real r1; | ||
Real r2[2]; | ||
Real r3[3, 3]; | ||
equation | ||
r1 = r1 ./ r1; | ||
r2 = r2 ./ r1; | ||
r3 = r3 ./ r1; | ||
r2 = i2 ./ i1; | ||
r3 = r3 ./ i3; | ||
end OperationDivEW1; | ||
|
||
// Result: | ||
// class OperationDivEW1 | ||
// Integer i1; | ||
// Integer i2[1]; | ||
// Integer i2[2]; | ||
// Integer i3[1,1]; | ||
// Integer i3[1,2]; | ||
// Integer i3[1,3]; | ||
// Integer i3[2,1]; | ||
// Integer i3[2,2]; | ||
// Integer i3[2,3]; | ||
// Integer i3[3,1]; | ||
// Integer i3[3,2]; | ||
// Integer i3[3,3]; | ||
// Real r1; | ||
// Real r2[1]; | ||
// Real r2[2]; | ||
// Real r3[1,1]; | ||
// Real r3[1,2]; | ||
// Real r3[1,3]; | ||
// Real r3[2,1]; | ||
// Real r3[2,2]; | ||
// Real r3[2,3]; | ||
// Real r3[3,1]; | ||
// Real r3[3,2]; | ||
// Real r3[3,3]; | ||
// equation | ||
// r1 = r1 / r1; | ||
// r2[1] = r2[1] / r1; | ||
// r2[2] = r2[2] / r1; | ||
// r3[1,1] = r3[1,1] / r1; | ||
// r3[1,2] = r3[1,2] / r1; | ||
// r3[1,3] = r3[1,3] / r1; | ||
// r3[2,1] = r3[2,1] / r1; | ||
// r3[2,2] = r3[2,2] / r1; | ||
// r3[2,3] = r3[2,3] / r1; | ||
// r3[3,1] = r3[3,1] / r1; | ||
// r3[3,2] = r3[3,2] / r1; | ||
// r3[3,3] = r3[3,3] / r1; | ||
// r2[1] = /*Real*/(i2[1]) / /*Real*/(i1); | ||
// r2[2] = /*Real*/(i2[2]) / /*Real*/(i1); | ||
// r3[1,1] = r3[1,1] / /*Real*/(i3[1,1]); | ||
// r3[1,2] = r3[1,2] / /*Real*/(i3[1,2]); | ||
// r3[1,3] = r3[1,3] / /*Real*/(i3[1,3]); | ||
// r3[2,1] = r3[2,1] / /*Real*/(i3[2,1]); | ||
// r3[2,2] = r3[2,2] / /*Real*/(i3[2,2]); | ||
// r3[2,3] = r3[2,3] / /*Real*/(i3[2,3]); | ||
// r3[3,1] = r3[3,1] / /*Real*/(i3[3,1]); | ||
// r3[3,2] = r3[3,2] / /*Real*/(i3[3,2]); | ||
// r3[3,3] = r3[3,3] / /*Real*/(i3[3,3]); | ||
// end OperationDivEW1; | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// name: OperationLogicalBinary1 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model OperationLogicalBinary1 | ||
Boolean b1, b2; | ||
Boolean[3] b3, b4; | ||
Boolean[3, 3] b5, b6; | ||
equation | ||
b1 = b1 and b2; | ||
b1 = b1 or b2; | ||
b3 = b3 and b4; | ||
b3 = b3 or b4; | ||
b5 = b5 and b6; | ||
b5 = b5 or b6; | ||
end OperationLogicalBinary1; | ||
|
||
// Result: | ||
// class OperationLogicalBinary1 | ||
// Boolean b1; | ||
// Boolean b2; | ||
// Boolean b3[1]; | ||
// Boolean b3[2]; | ||
// Boolean b3[3]; | ||
// Boolean b4[1]; | ||
// Boolean b4[2]; | ||
// Boolean b4[3]; | ||
// Boolean b5[1,1]; | ||
// Boolean b5[1,2]; | ||
// Boolean b5[1,3]; | ||
// Boolean b5[2,1]; | ||
// Boolean b5[2,2]; | ||
// Boolean b5[2,3]; | ||
// Boolean b5[3,1]; | ||
// Boolean b5[3,2]; | ||
// Boolean b5[3,3]; | ||
// Boolean b6[1,1]; | ||
// Boolean b6[1,2]; | ||
// Boolean b6[1,3]; | ||
// Boolean b6[2,1]; | ||
// Boolean b6[2,2]; | ||
// Boolean b6[2,3]; | ||
// Boolean b6[3,1]; | ||
// Boolean b6[3,2]; | ||
// Boolean b6[3,3]; | ||
// equation | ||
// b1 = b1 and b2; | ||
// b1 = b1 or b2; | ||
// b3[1] = b3[1] and b4[1]; | ||
// b3[2] = b3[2] and b4[2]; | ||
// b3[3] = b3[3] and b4[3]; | ||
// b3[1] = b3[1] or b4[1]; | ||
// b3[2] = b3[2] or b4[2]; | ||
// b3[3] = b3[3] or b4[3]; | ||
// b5[1,1] = b5[1,1] and b6[1,1]; | ||
// b5[1,2] = b5[1,2] and b6[1,2]; | ||
// b5[1,3] = b5[1,3] and b6[1,3]; | ||
// b5[2,1] = b5[2,1] and b6[2,1]; | ||
// b5[2,2] = b5[2,2] and b6[2,2]; | ||
// b5[2,3] = b5[2,3] and b6[2,3]; | ||
// b5[3,1] = b5[3,1] and b6[3,1]; | ||
// b5[3,2] = b5[3,2] and b6[3,2]; | ||
// b5[3,3] = b5[3,3] and b6[3,3]; | ||
// b5[1,1] = b5[1,1] or b6[1,1]; | ||
// b5[1,2] = b5[1,2] or b6[1,2]; | ||
// b5[1,3] = b5[1,3] or b6[1,3]; | ||
// b5[2,1] = b5[2,1] or b6[2,1]; | ||
// b5[2,2] = b5[2,2] or b6[2,2]; | ||
// b5[2,3] = b5[2,3] or b6[2,3]; | ||
// b5[3,1] = b5[3,1] or b6[3,1]; | ||
// b5[3,2] = b5[3,2] or b6[3,2]; | ||
// b5[3,3] = b5[3,3] or b6[3,3]; | ||
// end OperationLogicalBinary1; | ||
// endResult |
Oops, something went wrong.