1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
1
+ requires "asm.k"
10
2
requires "edsl.k"
11
3
requires "../lemmas.k"
12
4
@@ -34,50 +26,9 @@ module VERIFICATION
34
26
) [macro]
35
27
endmodule
36
28
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
29
module SUM-TO-N-SPEC
48
- imports ETHEREUM-SIMULATION
49
30
imports VERIFICATION
50
31
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
32
rule <k> #execute ... </k>
82
33
<mode> NORMAL </mode>
83
34
<schedule> DEFAULT </schedule>
@@ -88,32 +39,14 @@ module SUM-TO-N-SPEC
88
39
<program> #asMapOpCodes(#dasmOpCodes(sumToN, DEFAULT)) </program>
89
40
<programBytes> sumToN </programBytes>
90
41
42
+ <pc> 0 => 21 </pc>
43
+ <wordStack> N : WS => 0 : N *Int (N +Int 1) /Int 2 : WS </wordStack>
44
+ <gas> G => G -Int (52 *Int N +Int 27) </gas>
91
45
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <pc> 0 => 21 </pc>
101
- <wordStack> N : WS => 0 : N *Int (N +Int 1) /Int 2 : WS </wordStack>
102
- <gas> G => G -Int (52 *Int N +Int 27) </gas>
103
-
104
- requires N >=Int 0
105
- andBool N <=Int 340282366920938463463374607431768211455
106
- andBool #sizeWordStack(WS) <Int 1021
107
- andBool G >=Int 52 *Int N +Int 27
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
46
+ requires N >=Int 0
47
+ andBool N <=Int 340282366920938463463374607431768211455
48
+ andBool #sizeWordStack(WS) <Int 1021
49
+ andBool G >=Int 52 *Int N +Int 27
117
50
118
51
rule <k> #execute ... </k>
119
52
<mode> NORMAL </mode>
@@ -125,30 +58,16 @@ module SUM-TO-N-SPEC
125
58
<program> #asMapOpCodes(#dasmOpCodes(sumToN, DEFAULT)) </program>
126
59
<programBytes> sumToN </programBytes>
127
60
61
+ <pc> 3 => 21 </pc>
62
+ <gas> G => G -Int (52 *Int I +Int 21) </gas>
128
63
64
+ <wordStack> I : S : WS
65
+ => 0 : S +Int I *Int (I +Int 1) /Int 2 : WS </wordStack>
129
66
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
- <pc> 3 => 21 </pc>
141
- <gas> G => G -Int (52 *Int I +Int 21) </gas>
142
-
143
- <wordStack> I : S : WS
144
- => 0 : S +Int I *Int (I +Int 1) /Int 2 : WS </wordStack>
145
-
146
- requires I >=Int 0
147
- andBool S >=Int 0
148
- andBool S +Int I *Int (I +Int 1) /Int 2 <Int pow256
149
- andBool #sizeWordStack(WS) <Int 1021
150
- andBool G >=Int 52 *Int I +Int 21
67
+ requires I >=Int 0
68
+ andBool S >=Int 0
69
+ andBool S +Int I *Int (I +Int 1) /Int 2 <Int pow256
70
+ andBool #sizeWordStack(WS) <Int 1021
71
+ andBool G >=Int 52 *Int I +Int 21
151
72
152
73
endmodule
153
-
154
-
0 commit comments