T - The type of the objects which can be used to select formulas for interpolant creation.public interface InterpolatingProverEnvironment<T> extends BasicProverEnvironment<T>
BasicProverEnvironment.AllSatCallback<R>| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkTreeStructure(int numOfPartitions,
int[] startOfSubTree)
Checks for a valid subtree-structure.
|
BooleanFormula |
getInterpolant(List<T> formulasOfA)
Get an interpolant for two groups of formulas.
|
List<BooleanFormula> |
getSeqInterpolants(List<? extends Collection<T>> partitionedFormulas)
This method returns interpolants of an 'inductive sequence'.
|
default List<BooleanFormula> |
getSeqInterpolants0(List<T> formulas) |
List<BooleanFormula> |
getTreeInterpolants(List<? extends Collection<T>> partitionedFormulas,
int[] startOfSubTree)
Compute a sequence of interpolants.
|
default List<BooleanFormula> |
getTreeInterpolants0(List<T> formulas,
int[] startOfSubTree) |
default T |
push(BooleanFormula f)
Add a formula to the environment stack, asserting it.
|
addConstraint, allSat, close, getModel, getModelAssignments, getUnsatCore, isUnsat, isUnsatWithAssumptions, pop, push, unsatCoreOverAssumptions@CanIgnoreReturnValue default T push(BooleanFormula f) throws InterruptedException
push in interface BasicProverEnvironment<T>InterruptedExceptionBooleanFormula getInterpolant(List<T> formulasOfA) throws SolverException, InterruptedException
BasicProverEnvironment.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.
formulasOfA - A list of values returned by 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 incompleteInterruptedExceptionList<BooleanFormula> getSeqInterpolants(List<? extends Collection<T>> partitionedFormulas) throws SolverException, InterruptedException
The stack must contain exactly the partitioned formulas, but any order is allowed. For an input of N partitions we return N-1 interpolants.
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 incompleteInterruptedExceptiondefault List<BooleanFormula> getSeqInterpolants0(List<T> formulas) throws SolverException, InterruptedException
SolverExceptionInterruptedExceptionList<BooleanFormula> getTreeInterpolants(List<? extends Collection<T>> partitionedFormulas, int[] startOfSubTree) throws SolverException, InterruptedException
Example:
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
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 incompleteInterruptedExceptiondefault List<BooleanFormula> getTreeInterpolants0(List<T> formulas, int[] startOfSubTree) throws SolverException, InterruptedException
SolverExceptionInterruptedExceptionstatic boolean checkTreeStructure(int numOfPartitions,
int[] startOfSubTree)