-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Original Idea (already implemented)
There are some hard cases where running concrete execution for a little bit will get us a win. For example:
function prove_distributivity(uint120 x, uint120 y, uint120 z) public pure {
assert(x + (y * z) == (x + y) * (x + z));
}
In the benchmark suite https://github.com/eth-sc-comp/benchmarks/ will take forever for an SMT solver to deal with, but a fuzzer should find a counterexample in <1s.
This sounds like a hack, and in some sense it is, but I can very easily see this being helpful to the users. The perceived utility of HEVM would be higher, and that's all that matters.
We could even run a thread that just does fuzzing, while the other threads do the symbolic interpretation, etc.
Follow-ups
The original idea as per above has been implemented already, see Fuzz.hs. However, as detailed below by d-xo, there are a number of significant improvements that can be done that could improve the performance in very significant ways.