-
Notifications
You must be signed in to change notification settings - Fork 45
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
Feature Request: Clone ProverEnvironment with Stack #322
Comments
Answer to question 1: Answer to question 2:
|
I asked around for question 1: I've asked the MathSAT5 devs (but he is currently not available till August, i guess vacation). I also created a issue for Z3. And we are currently in contact with the CVC5 and Bitwuzla team, where this question will also be asked. Depending on the results of this, i will investigate this further. |
Z3 might support the feature requests for Q1. |
@kfriedberger thanks for the suggestions! We are currently investigating possibility 2, and it seems to work well for our use cases. On average, we can keep about 40% of formulas on the stack when "traversing" through a tree of boolean formulas with bfs, and significantly more with dfs. This also yields a performance boost. @baierd thank you for asking around. Does java-smt already use Z3's Q1-version? |
JavaSMT does currently not provide this feature. |
I've already added a possible implementation in a branch. I've added 2 methods to the context to copy a prover with and without interpolation enabled. The context was chosen by me as we create all provers from there and may need additional information besides the original prover from either the context or the user (options), hence why i didn't use the prover interface. Please have a look at the PR and tell me what you think of it. |
It would be nice to clone a full ProverEnvironment with its current stack (it would also be ok if the full SolverContext is cloned).
Our use case: We incrementally build a conjunction of boolean formulas and want to check the satisfiability of the conjunction after each additional boolean formula.
To do this, the use of the prover stack yields a significant speedup (compared to always using a new prover environment).
Now we have the case that, for a given formula, we have two different options that we want to follow.
Example:
Currently, we have to create a new prover environment for one of the two options because we can not clone the prover environment. This means that we have to do a first expensive SAT-check that (at least in my expectation) has to recompute everything it already knows about$\langle a, b \rangle$ .
Question 1: Is it possible to clone a ProverEnvironment or SolverContext with current ProverEnvironment?
Question 2: Is this the correct way to go about it, or is there some other smart way to do this?
Thanks!
The text was updated successfully, but these errors were encountered: