-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtest.sim
141 lines (120 loc) · 1.97 KB
/
test.sim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/* variable declaration */
int abv;
{int abv;}
/* variable declaration and assignment */
bool test := ~true & true & true;
int num1 := 4;
int af := (32*(3+3));
int abc:= -3 - (3-9) + num1;
int assign := af;
bool dfsddx := test;
bool a:= true and 1 > 3 or (~dfsddx & true);
bool test2:= ((1+4) > 3) and (false or true);
bool rel := af != abc;
/* variable assignment */
af := (32*(3+4));
abc:= -3 -(3-9);
a:= true and 1 > 3 or (false & true);
test:= ((1+4) > 3) and (false or true);
bool adf;
adf:=test;
/* self assignment */
int a_cou := 1;
int sum := 4;
sum := sum + a_cou;
/* if else */
if : 3>2 {
int a:= 3 +4;
}
else {
int b:=(3+4)*2;
}
/* if */
if : 4!=2 {
bool sh := true;
}
/* if else nested */
if : 3>2 {
int a:= 3 +8;
if : 4 == 4 {
bool te := false;
}
else {
int rt := 334;
}
}
else {
int b:=(3+4)*2;
}
/* if elif else */
if : 3>2 {
int ax:= 3 +4;
}
elif : 3 != 4 {
int b:=(3+4)*2;
}
elif : 4 != 3 {
int sec:= 99;
}
else {
bool af3:=true;
}
/* for loop */
for : iota in 1:3 {
int a:= 11;
}
/* while loop */
while : 3 == 3 {
int rt := 90;
}
/* nested and complex loops */
for : o in 2:4 {
for : h in 5:1 {
if : 2>3 {
int a ;
}
}
while : 3>4 {
if : 4==3 {
;
}
}
}
while : 4 < 5 {
for : jh in 4 : 9 {
bool nm := true;
}
}
/* function definitions */
def test_func : int : int rtpo , bool rty, int yy{
int we := 44;
while : 4 > 5 {
bool inr := true;
}
for : count in 1 :4 {
int for_inside := 44;
}
return we;
}
def tt : int : int r {
return 1;
}
def tt_b : bool : int e {
return true;
}
def tt_ : void : int r {
return ;
}
def blamk : void : {
int a;
return ;
}
/* function call */
test_func(34, true, 4);
tt(tt(1));
tt_(44+45*7*sum);
int f_c := -3 - (3-9) + test_func(1,false,1) + num1;
bool f_c_b := true and 1 > 3 or (~tt_b(1) & true);
for : rff in sum:1 {
;
}