public class BasicProverWithAssumptionsWrapper<T,P extends BasicProverEnvironment<T>> extends Object implements BasicProverEnvironment<T>
| Modifier and Type | Field and Description |
|---|---|
protected P |
delegate |
protected List<BooleanFormula> |
solverAssumptionsAsFormula |
| Modifier and Type | Method and Description |
|---|---|
T |
addConstraint(BooleanFormula constraint)
Add constraint to the context.
|
protected void |
clearAssumptions() |
void |
close()
Closes the prover environment.
|
Model |
getModel()
Get a satisfying assignment.
|
ImmutableList<Model.ValueAssignment> |
getModelAssignments()
Get a list of satisfying assignments.
|
boolean |
isUnsat()
Check whether the conjunction of all formulas on the stack is unsatisfiable.
|
void |
pop()
Remove one formula from the environment stack.
|
void |
push()
Create backtracking point.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpushprotected final P extends BasicProverEnvironment<T> delegate
protected final List<BooleanFormula> solverAssumptionsAsFormula
protected void clearAssumptions()
public void pop()
BasicProverEnvironmentpop in interface BasicProverEnvironment<T>public T addConstraint(BooleanFormula constraint)
BasicProverEnvironmentaddConstraint in interface BasicProverEnvironment<T>public void push()
BasicProverEnvironmentpush in interface BasicProverEnvironment<T>public boolean isUnsat()
throws SolverException,
InterruptedException
BasicProverEnvironmentisUnsat in interface BasicProverEnvironment<T>SolverExceptionInterruptedExceptionpublic Model getModel() throws SolverException
BasicProverEnvironmentBasicProverEnvironment.isUnsat() call
that returned false.
A model might contain additional symbols with their evaluation,
if a solver uses its own temporary symbols.
There should be at least an value-assignment for each free symbol.getModel in interface BasicProverEnvironment<T>SolverExceptionpublic ImmutableList<Model.ValueAssignment> getModelAssignments() throws SolverException
BasicProverEnvironmentImmutableList.copyOf(getModel()),
but removes the need for calling Model.close().
Note that if you need to iterate multiple times over the model
it may be more efficient to use this method instead of BasicProverEnvironment.getModel()
(depending on the solver).
getModelAssignments in interface BasicProverEnvironment<T>SolverExceptionpublic void close()
BasicProverEnvironmentclose in interface AutoCloseableclose in interface BasicProverEnvironment<T>