-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass fresh address counter to
makeVM
(#186)
* WIP in compiling Act * Act compiling * Nits * Thread fresh address to hevm * WIP fresh addresses * Fix fresh address bug * Add new tests * Fix merge error
- Loading branch information
Showing
6 changed files
with
109 additions
and
23 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,4 +57,4 @@ | |
}; | ||
} | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// contract A | ||
|
||
constructor of A | ||
interface constructor(uint z) | ||
|
||
iff | ||
CALLVALUE == 0 | ||
inRange(uint256, z + 1) | ||
|
||
creates | ||
uint x := z + 1 | ||
|
||
|
||
behaviour x of A | ||
interface x() | ||
|
||
iff | ||
CALLVALUE == 0 | ||
|
||
returns | ||
pre(x) | ||
|
||
behaviour add_x of A | ||
interface add_x(uint y) | ||
|
||
iff | ||
CALLVALUE == 0 | ||
inRange(uint256, x + y) | ||
|
||
storage | ||
|
||
x => x + y | ||
|
||
|
||
// contract B | ||
constructor of B | ||
interface constructor(uint i) | ||
iff | ||
CALLVALUE == 0 | ||
inRange(uint256, i + 42) | ||
|
||
creates | ||
uint z := i + 42 | ||
A a := create A(i) | ||
|
||
behaviour foo of B | ||
interface foo() | ||
|
||
iff | ||
CALLVALUE == 0 | ||
|
||
storage | ||
a => create A(42) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
contract A { | ||
uint public x; | ||
|
||
constructor (uint z) { | ||
x = z + 1; | ||
} | ||
|
||
function add_x(uint y) public { | ||
x = x + y; | ||
} | ||
} | ||
|
||
contract B { | ||
uint z; | ||
A a; | ||
|
||
constructor (uint i) { | ||
z = i + 42; | ||
a = new A(i); | ||
} | ||
|
||
function foo() public { | ||
a = new A(42); | ||
} | ||
} |