Closed ethever closed 2 months ago
The inputs for this branch then becomes
--- Branch ---
Inputs:
Calldata:
0x0dbe671f
Addrs:
SymAddr "caller": 0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5
Transaction Context:
TxValue: 0x0
Wow, also that printing is horrible, it needs to be more tight:
--- Branch ---
Inputs:
Calldata:
0x0dbe671f
Transaction Context:
TxValue: 0x0
End State:
Should look like:
--- Branch ---
Inputs:
Calldata:
0x0dbe671f
Transaction Context:
TxValue: 0x0
End State:
I'm fixing this and also will try to add the Addrs...
Fixed in https://github.com/ethereum/hevm/pull/535
Thanks again. Once it's reviewed, I'll merge!
Just to be clear, it now prints:
Discovered the following 1 counterexample(s):
Calldata:
0x0dbe671f
Storage:
Addr SymAddr "origin": []
Addr LitAddr 0x388C818CA8B9251b393131C08a736A67ccB19297: []
Transaction Context:
TxValue: 0x0
Addrs:
SymAddr "caller": 0x0000000000000000000000000000000000000000
=== Reachable Expression ===
...
=== Models for 5 branches ===
--- Branch ---
Inputs:
Calldata:
Empty
End State:
(Failure
....
--- Branch ---
Inputs:
Calldata:
0x0dbe671f
Transaction Context:
TxValue: 0x0
Addrs:
SymAddr "caller": 0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5
End State:
(Success
Data:
(ConcreteBuf "")
State:
(SymAddr "entrypoint"):
...
BTW, this also helped inspire me to write a PR https://github.com/ethereum/hevm/pull/539 to improve the symbolic execution tutorial :) Thanks again!
BTW, this also helped inspire me to write a PR https://github.com/ethereum/hevm/pull/539 to improve the symbolic execution tutorial :) Thanks again!
It's great to see how it has improved the symbolic execution tutorial. Thanks again for your efforts!
Fixed in #535.
With following solidity code:
and
it then generates
It is obvious that we need
SymAddr "caller"
==851400861302238403048500845587900479529441538021
for the only Success state. Why don't we display the inputs for this branch by addingAddrs: SymAddr "caller": 0x95222290DD7278Aa3Ddd389Cc1.nsE1d165CC4BAfe5
?I found the
SMTCex
already contained theaddrs
map.