-
Notifications
You must be signed in to change notification settings - Fork 112
/
isa.ppl
137 lines (104 loc) · 2.41 KB
/
isa.ppl
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
procedure IsolateAssertion(x: int, y: int);
implementation IsolateAssertion(x: int, y: int)
{
var z: int;
var z#AT#0: int;
var z#AT#1: int;
var z#AT#2: int;
var z#AT#3: int;
var z#AT#4: int;
var z#AT#5: int;
anon0:
goto anon7_Then, anon7_Else;
anon7_Then:
assume {:partition} x > 0;
assume z#AT#0 == 0 + 1;
assume z#AT#2 == z#AT#0;
goto anon3;
anon7_Else:
assume {:partition} 0 >= x;
assume z#AT#1 == 0 + 2;
assume z#AT#2 == z#AT#1;
goto anon3;
anon3:
goto anon8_Then, anon8_Else;
anon8_Then:
assume {:partition} y > 0;
assume z#AT#3 == z#AT#2 + 3;
assume z#AT#5 == z#AT#3;
goto anon6;
anon8_Else:
assume {:partition} 0 >= y;
assume z#AT#4 == z#AT#2 + 4;
assume z#AT#5 == z#AT#4;
goto anon6;
anon6:
assert z#AT#5 > 1;
assume z#AT#5 > 5;
assert z#AT#5 > 6;
return;
}
procedure IsolatePathsAssertion(x: int, y: int);
implementation IsolatePathsAssertion(x: int, y: int)
{
var z: int;
var z#AT#0: int;
var z#AT#1: int;
var z#AT#2: int;
var z#AT#3: int;
var z#AT#4: int;
var z#AT#5: int;
var z#AT#6: int;
var z#AT#7: int;
var z#AT#8: int;
var z#AT#9: int;
PreconditionGeneratedEntry:
goto anon0;
anon0:
goto anon11_Then, anon11_Else;
anon11_Else:
assume {:partition} 0 >= x;
goto anon12_Then, anon12_Else;
anon12_Else:
assume {:partition} 1 >= x;
assume z#AT#2 == 0 + 1;
assume z#AT#3 == z#AT#2;
goto anon13_Then, anon13_Else;
anon13_Else:
assume {:partition} 0 >= y;
assume z#AT#5 == z#AT#3 + 0;
assume z#AT#6 == z#AT#5;
goto anon7;
anon7:
goto anon14_Then, anon14_Else;
anon14_Else:
assume {:partition} 0 >= y;
assume z#AT#8 == z#AT#6 + 4;
assume z#AT#9 == z#AT#8;
goto anon10;
anon10:
assert z#AT#9 > 1;
assert {:isolate "paths"} z#AT#9 > 5;
assert z#AT#9 > 6;
return;
anon14_Then:
assume {:partition} y > 0;
assume z#AT#7 == z#AT#6 + 3;
assume z#AT#9 == z#AT#7;
goto anon10;
anon13_Then:
assume {:partition} y > 0;
assume z#AT#4 == z#AT#3 + 0;
assume z#AT#6 == z#AT#4;
goto anon7;
anon12_Then:
assume {:partition} x > 1;
assume z#AT#1 == 0 + 2;
assume z#AT#3 == z#AT#1;
goto anon13_Then, anon13_Else;
anon11_Then:
assume {:partition} x > 0;
assume z#AT#0 == 0 + 1;
assume z#AT#3 == z#AT#0;
goto anon13_Then, anon13_Else;
}