-
Notifications
You must be signed in to change notification settings - Fork 55
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
Don't dispatch SMT queries that can be proven False via simplification #683
Conversation
809704f
to
72ee7dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, but I would suggest to spend some more time. I think the design could be improved.
What do I mean by that?
There are more places that call checkSat
which might also benefit from this early check.
However, looking at them, there seems to be different strategies what they do with the propositions (and I admittedly do not understand everything that is going on there).
For example, in the function verify
in SymExec
, the queries are already being filtered for [PBool False]
(see canBeSat
).
On the other hand, function check
in the same file does not seem to be doing anything in this regard.
It seems to me the code would benefit from some abstraction, for example a new function that would encompass both the transformation (assertProps
) and dispatching to solver (checkSat
). The check for False
could be implemented inside this method. If all places that use checkSat
now would be ported to use the new function, they would automatically benefit from this optimization.
However, that may require further thinking, as some of these places use cache or dispatch queries in parallel, and I don't know if the code could be easily changed there.
Thanks! I actually agree with all what you said. Let me have another go at this, with a cleanup. I'll put this back into |
72ee7dc
to
dc0c2bf
Compare
Using a function specifically tailored to do this. Thanks to @blishko for the help and idea! Cleanup
dc0c2bf
to
7157051
Compare
@blishko I have now adjusted it to use a subfunction. You were 100% right, it's a lot cleaner. There's still one use of the plain Note that we now pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty nice!
Description
This fixes issues where we dispatched a query that was constant False after simplification.
Checklist