-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In order to combine PRECONDS + Expr we need to use the SMT solver #331
Comments
As discussed, while #358 does folding of the preconditions, it will NOT do the heavy-lifting of figuring out whether the path conditions contradict the Expr. For that, we'd need a SMT call. |
This just came up a little bit. This test:
Is very slow, 25s, to run. When one looks at the
It looks okay. However,
Notice the extension to 512b to make sure things stay within bounds. This is the proper way to encode
The generated SMT query runs in <1s. We could either query the solver to make sure we don't need to extend to 512b, or we can add type annotations to variables, and generate simpler SMT queries. The type annotation can be constructed & destructed as part of generating the SMT query, i.e. it could be ephemeral and may not need to be saved to |
This is potential future work.
It turns out we could do better in determining branching statically. Currently, in
SymExec.hs
we have:Where
_
is the set of path conditions, andcond
has been simplified (after #329 is merged). However, if e.g. the preconditions saya=b
and thecond
isa==b
then of course we should have this evaluate toTRUE
. Unfortunately, we don't do that, mostly because our simplifier is not capable of catching some things. For example,which is clearly FALSE, since
a
is both 0 and 1. So, we can't just do e.g. afold' (Expr.and) (Lit 1) (cond:pathConds)
.In other words, we need a more sophisticated constant folding system and then we can do better static path condition checking.
The text was updated successfully, but these errors were encountered: