public class LoggingInterpolatingProverEnvironment<T> extends Object implements InterpolatingProverEnvironmentWithAssumptions<T>
| Constructor and Description |
|---|
LoggingInterpolatingProverEnvironment(LogManager logger,
InterpolatingProverEnvironmentWithAssumptions<T> ipe) |
| Modifier and Type | Method and Description |
|---|---|
T |
addConstraint(BooleanFormula constraint)
Add constraint to the context.
|
void |
close()
Closes the prover environment.
|
BooleanFormula |
getInterpolant(List<T> formulasOfA)
Get an interpolant for two groups of formulas.
|
Model |
getModel()
Get a satisfying assignment.
|
List<BooleanFormula> |
getSeqInterpolants(List<Set<T>> partitionedFormulas)
This method returns interpolants of an 'inductive sequence'.
|
List<BooleanFormula> |
getTreeInterpolants(List<Set<T>> partitionedFormulas,
int[] startOfSubTree)
Compute a sequence of interpolants.
|
boolean |
isUnsat()
Check whether the conjunction of all formulas on the stack is unsatisfiable.
|
boolean |
isUnsatWithAssumptions(List<BooleanFormula> pAssumptions)
Check whether the conjunction of all formulas on the stack is unsatisfiable
with regards to provided assumptions.
|
void |
pop()
Remove one formula from the environment stack.
|
void |
push()
Create backtracking point.
|
T |
push(BooleanFormula f)
Add a formula to the environment stack, asserting it.
|
public LoggingInterpolatingProverEnvironment(LogManager logger, InterpolatingProverEnvironmentWithAssumptions<T> ipe)
public T push(BooleanFormula f)
InterpolatingProverEnvironmentpush in interface BasicProverEnvironment<T>push in interface InterpolatingProverEnvironment<T>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 InterruptedException,
SolverException
BasicProverEnvironmentisUnsat in interface BasicProverEnvironment<T>InterruptedExceptionSolverExceptionpublic boolean isUnsatWithAssumptions(List<BooleanFormula> pAssumptions) throws SolverException, InterruptedException
InterpolatingProverEnvironmentWithAssumptionsisUnsatWithAssumptions in interface InterpolatingProverEnvironmentWithAssumptions<T>SolverExceptionInterruptedExceptionpublic BooleanFormula getInterpolant(List<T> formulasOfA) throws SolverException, InterruptedException
InterpolatingProverEnvironmentBasicProverEnvironment.isUnsat() call
that returned true.
There is no direct guarantee that the interpolants returned are part of an inductive sequence', however this seems to work for most (all?) solvers as long as the same proof is used, i.e. all interpolants are computed after the same SAT-check.
getInterpolant in interface InterpolatingProverEnvironment<T>formulasOfA - A list of values returned by InterpolatingProverEnvironment.push(BooleanFormula).
All the corresponding formulas from group A, the remaining formulas form group B.SolverException - if interpolant cannot be computed,
for example because interpolation procedure is incompleteInterruptedExceptionpublic List<BooleanFormula> getSeqInterpolants(List<Set<T>> partitionedFormulas) throws SolverException, InterruptedException
InterpolatingProverEnvironmentThe stack must contain exactly the partitioned formulas, but any order is allowed. For an input of N partitions we return N-1 interpolants.
getSeqInterpolants in interface InterpolatingProverEnvironment<T>AND(I_i, P_i) => I_(i+1) is satisfied for all i,
where P_i is the conjunction of all formulas in partition i.SolverException - if interpolant cannot be computed,
for example because interpolation procedure is incompleteInterruptedExceptionpublic List<BooleanFormula> getTreeInterpolants(List<Set<T>> partitionedFormulas, int[] startOfSubTree) throws SolverException, InterruptedException
InterpolatingProverEnvironmentExample:
A D | | B E | / C | F H | / G arrayIndex = [0,1,2,3,4,5,6,7] // only for demonstration, not needed partition = [A,B,D,E,C,F,H,G] // post-order of tree startOfSubTree = [0,0,2,2,0,0,6,0] // index of left-most leaf of the current element
getTreeInterpolants in interface InterpolatingProverEnvironment<T>partitionedFormulas - of formulasstartOfSubTree - The start of the subtree containing the formula at this index as root.SolverException - if interpolant cannot be computed,
for example because interpolation procedure is incompleteInterruptedExceptionpublic Model getModel() throws SolverException
BasicProverEnvironmentBasicProverEnvironment.isUnsat() call
that returned false.getModel in interface BasicProverEnvironment<T>SolverExceptionpublic void close()
BasicProverEnvironmentclose in interface AutoCloseableclose in interface BasicProverEnvironment<T>