Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGrulich committed Mar 23, 2024
1 parent 0d1bcd4 commit b540f38
Showing 20 changed files with 324 additions and 0 deletions.
17 changes: 17 additions & 0 deletions nautilus-common/tests/traces/andCondition.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Block0()
CONST 3
CONST 4
EQ 5 1 4
CONST 6
EQ 7 2 6
AND 8 5 7
CMP 9 8 1 2
Block1()
CONST 10
ADD 11 3 10
ASSIGN 3 11
JMP 0 3
Block2()
JMP 0 3
Block3() ControlFlowMerge
RETURN 3
18 changes: 18 additions & 0 deletions nautilus-common/tests/traces/andFunction.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Block0()
CONST 2
CONST 3
CONST 4
EQ 5 4 3
AND 6 2 5
ASSIGN 2 6
CONST 7
CONST 8
EQ 9 8 7
AND 10 2 9
ASSIGN 2 10
CONST 11
CONST 12
EQ 13 12 11
AND 14 2 13
ASSIGN 2 14
RETURN 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Block0()
CONST 2
CONST 3
ADD 4 3 2
RETURN 4
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Block0()
CONST 2
CONST 3
ADD 4 3 2
RETURN 4
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Block0()
CONST 2
CONST 3
ADD 4 2 3
RETURN 4
47 changes: 47 additions & 0 deletions nautilus-common/tests/traces/deeplyNestedIfElseCondition.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Block0()
CONST 1
CONST 2
LT 3 1 2
CMP 4 3 1 2
Block1()
CONST 5
GT 6 1 5
CMP 7 6 3 4
Block2()
CONST 12
ADD 13 1 12
ASSIGN 1 13
JMP 0 5
Block3()
CONST 8
ADD 9 1 8
ASSIGN 1 9
JMP 0 5
Block4()
CONST 14
LT 15 1 14
CMP 16 15 6 7
Block5() ControlFlowMerge
JMP 0 10
Block6()
CONST 17
EQ 18 1 17
CMP 19 18 8 9
Block7()
JMP 0 11
Block8()
CONST 20
ADD 21 1 20
ASSIGN 1 21
JMP 0 10
Block9()
JMP 0 12
Block10() ControlFlowMerge
JMP 0 11
Block11() ControlFlowMerge
JMP 0 12
Block12() ControlFlowMerge
CONST 10
ADD 11 1 10
ASSIGN 1 11
RETURN 1
39 changes: 39 additions & 0 deletions nautilus-common/tests/traces/deeplyNestedIfElseIfCondition.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Block0()
CONST 1
CONST 2
LT 3 1 2
CMP 4 3 1 2
Block1()
CONST 5
ADD 6 1 5
ASSIGN 1 6
JMP 0 5
Block2()
CONST 9
EQ 10 1 9
CMP 11 10 3 4
Block3()
CONST 12
ADD 13 1 12
ASSIGN 1 13
JMP 0 5
Block4()
CONST 14
EQ 15 1 14
CMP 16 15 6 7
Block5() ControlFlowMerge
JMP 0 8
Block6()
CONST 17
ADD 18 1 17
ASSIGN 1 18
JMP 0 8
Block7()
JMP 0 9
Block8() ControlFlowMerge
JMP 0 9
Block9() ControlFlowMerge
CONST 7
ADD 8 1 7
ASSIGN 1 8
RETURN 1
4 changes: 4 additions & 0 deletions nautilus-common/tests/traces/doubleAddExpression.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Block0()
CONST 2
ADD 3 1 2
RETURN 3
25 changes: 25 additions & 0 deletions nautilus-common/tests/traces/doubleIfCondition.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Block0()
CONST 1
CONST 2
EQ 3 1 2
CMP 4 3 1 2
Block1()
JMP 0 5
Block2()
JMP 0 5
Block3()
CONST 8
ADD 9 1 8
ASSIGN 1 9
JMP 0 6
Block4()
JMP 0 6
Block5() ControlFlowMerge
CONST 5
EQ 6 1 5
CMP 7 6 3 4
Block6() ControlFlowMerge
CONST 10
ADD 11 1 10
ASSIGN 1 11
RETURN 1
4 changes: 4 additions & 0 deletions nautilus-common/tests/traces/floatAddExpression.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Block0()
CONST 2
ADD 3 1 2
RETURN 3
28 changes: 28 additions & 0 deletions nautilus-common/tests/traces/ifElseIfCondition.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Block0()
CONST 1
CONST 2
EQ 3 1 2
CMP 4 3 1 2
Block1()
CONST 5
ADD 6 1 5
ASSIGN 1 6
JMP 0 5
Block2()
CONST 9
EQ 10 1 9
CMP 11 10 3 4
Block3()
CONST 12
ADD 13 1 12
ASSIGN 1 13
JMP 0 5
Block4()
JMP 0 6
Block5() ControlFlowMerge
JMP 0 6
Block6() ControlFlowMerge
CONST 7
ADD 8 1 7
ASSIGN 1 8
RETURN 1
16 changes: 16 additions & 0 deletions nautilus-common/tests/traces/ifThenCondition.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Block0()
CONST 2
CONST 3
EQ 4 1 3
CMP 5 4 1 2
Block1()
CONST 6
ADD 7 2 6
ASSIGN 2 7
CONST 8
ADD 9 2 8
RETURN 9
Block2()
CONST 11
ADD 12 2 11
RETURN 12
19 changes: 19 additions & 0 deletions nautilus-common/tests/traces/ifThenElseCondition.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Block0()
CONST 2
CONST 3
EQ 4 1 3
CMP 5 4 1 2
Block1()
CONST 6
ADD 7 2 6
ASSIGN 2 7
CONST 8
ADD 9 2 8
RETURN 9
Block2()
CONST 11
ADD 12 2 11
ASSIGN 2 12
CONST 13
ADD 14 2 13
RETURN 14
4 changes: 4 additions & 0 deletions nautilus-common/tests/traces/int16AddExpression.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Block0()
CONST 2
ADD 3 1 2
RETURN 3
4 changes: 4 additions & 0 deletions nautilus-common/tests/traces/int32AddExpression.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Block0()
CONST 2
ADD 3 1 2
RETURN 3
4 changes: 4 additions & 0 deletions nautilus-common/tests/traces/int64AddExpression.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Block0()
CONST 2
ADD 3 1 2
RETURN 3
6 changes: 6 additions & 0 deletions nautilus-common/tests/traces/int8AddExpression.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Block0()
CONST 2
ADD 3 1 2
ASSIGN 2 3
ADD 4 2 1
RETURN 4
31 changes: 31 additions & 0 deletions nautilus-common/tests/traces/nestedIfNoElseCondition.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Block0()
CONST 3
EQ 4 1 3
CMP 5 4 1 2
Block1()
CONST 6
ADD 7 2 6
ASSIGN 2 7
CONST 8
ADD 9 2 8
ASSIGN 2 9
RETURN 2
Block2()
CONST 12
ADD 13 11 12
ASSIGN 11 13
CONST 14
EQ 15 11 14
CMP 16 15 3 4
Block3()
CONST 17
ADD 18 11 17
CONST 19
ADD 20 11 19
ASSIGN 11 20
RETURN 11
Block4()
CONST 23
ADD 24 22 23
ASSIGN 22 24
RETURN 22
26 changes: 26 additions & 0 deletions nautilus-common/tests/traces/nestedIfThenElseCondition.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Block0()
CONST 3
EQ 4 1 3
CMP 5 4 1 2
Block1()
CONST 6
ADD 7 2 6
ASSIGN 2 7
RETURN 2
Block2()
CONST 10
EQ 11 9 10
CMP 12 11 3 4
Block3()
CONST 13
ADD 14 9 13
ASSIGN 9 14
RETURN 9
Block4()
CONST 17
ADD 18 16 17
ASSIGN 16 18
CONST 19
ADD 20 16 19
ASSIGN 16 20
RETURN 16
17 changes: 17 additions & 0 deletions nautilus-common/tests/traces/orCondition.trace
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Block0()
CONST 2
CONST 3
EQ 4 1 3
CONST 5
EQ 6 1 5
OR 7 4 6
CMP 8 7 1 2
Block1()
CONST 9
ADD 10 2 9
ASSIGN 2 10
JMP 0 3
Block2()
JMP 0 3
Block3() ControlFlowMerge
RETURN 2

0 comments on commit b540f38

Please sign in to comment.