-
Notifications
You must be signed in to change notification settings - Fork 53
Description
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:
- Let's assume we have the formulas
$a$ and$b$ on the current stack:$\langle a, b\rangle$ . - As a first option, we want to continue with formula
$c$ , so we push to get$\langle a, b, c\rangle$ . - As a second option, we want to continue with formula
$\neg c$ instead. So we would like to clone the environment with$\langle a, b\rangle$ on the stack, and push$\neg c$ to get$\langle a, b, \neg c\rangle$ .
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
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!