public interface BasicProverEnvironment<T> extends AutoCloseable
ProverEnvironment and InterpolatingProverEnvironment
that provides only the common operations.
In most cases, just use one of the two sub-interfaces| Modifier and Type | Method and Description |
|---|---|
T |
addConstraint(BooleanFormula constraint)
Add constraint to the context.
|
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.
|
default T |
push(BooleanFormula f)
Push a backtracking point and
add a formula to the environment stack, asserting it.
|
@Nullable default T push(BooleanFormula f)
void pop()
@Nullable T addConstraint(BooleanFormula constraint)
void push()
boolean isUnsat()
throws SolverException,
InterruptedException
SolverExceptionInterruptedExceptionModel getModel() throws SolverException
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.SolverExceptionImmutableList<Model.ValueAssignment> getModelAssignments() throws SolverException
ImmutableList.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 getModel()
(depending on the solver).
SolverExceptionvoid close()
close in interface AutoCloseable