File tree Expand file tree Collapse file tree 2 files changed +484
-5
lines changed Expand file tree Collapse file tree 2 files changed +484
-5
lines changed Original file line number Diff line number Diff line change 3
3
//
4
4
5
5
module ERC20
6
- syntax Int ::= "MAXVALUE" [function]
6
+ syntax Value ::= Int // this can be changed
7
7
syntax Address ::= Int // this can be changed
8
- syntax AExp ::= Int
9
- | Address
8
+ syntax AExp ::= Value | Address
10
9
| "totalSupply" "(" ")"
11
10
| "balanceOf" "(" AExp ")" [strict]
12
11
| "allowance" "(" AExp "," AExp ")" [strict]
@@ -15,8 +14,8 @@ module ERC20
15
14
| "transfer" "(" AExp "," AExp ")" [strict]
16
15
| "transferFrom" "(" AExp "," AExp "," AExp ")" [strict]
17
16
| "throw"
18
- syntax Event ::= "Transfer" "(" Address "," Address "," Int ")"
19
- | "Approval" "(" Address "," Address "," Int ")"
17
+ syntax Event ::= "Transfer" "(" Address "," Address "," Value ")"
18
+ | "Approval" "(" Address "," Address "," Value ")"
20
19
syntax EventLog ::= "Events:"
21
20
| EventLog Event
22
21
@@ -44,6 +43,7 @@ module ERC20
44
43
<supply> 0 </supply>
45
44
</ERC20>
46
45
46
+ syntax Int ::= "MAXVALUE" [function]
47
47
rule MAXVALUE => 2 ^Int 256 -Int 1
48
48
49
49
rule <k> totalSupply() => Total ...</k>
You can’t perform that action at this time.
0 commit comments