Closed msooseth closed 1 year ago
Just to document some of our discussion here -- this does not work because ITE can only be at toplevel. Forgot that. Also, some restricted version of this could be added, with exact check against Lit 0
, however, that would not be a semantic check, so it would not be as general as the ITE version. It may be worthwhile removing the restriction of toplevel-only-ITE, but we'll see.
In general I think what is desired here is to extend our simplification engine to allow for checking semantic equality (not just syntactic equality as currently works). One potential way to do this would be to start calling out to an smt solver during simplification.
I think I'm closing this, because I realized that (a*b)/b
is actually not necessarily a
anyway, due to overflow. Regarding calling out to the SMT during simplification is I think a good idea, and I think should be done as part of https://github.com/ethereum/hevm/issues/331.
This rule doesn't seem to type-check in
simplify
:Error:
Which is I think because
Div
isbut ITE is:
Probably I'd need some type restriction on rule? Maybe I'll try to discuss this in person.
Not an important thing.