Package org.sosy_lab.java_smt.basicimpl
Class AbstractProverWithAllSat<T>
java.lang.Object
org.sosy_lab.java_smt.basicimpl.AbstractProver<T>
org.sosy_lab.java_smt.basicimpl.AbstractProverWithAllSat<T>
- All Implemented Interfaces:
AutoCloseable,BasicProverEnvironment<T>
This class is a utility-class to avoid repeated implementation of the AllSAT computation.
If a solver does not support direct AllSAT computation, please inherit from this class.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.sosy_lab.java_smt.api.BasicProverEnvironment
BasicProverEnvironment.AllSatCallback<R> -
Field Summary
FieldsFields inherited from class org.sosy_lab.java_smt.basicimpl.AbstractProver
closed, enableSL, generateUnsatCoresFields inherited from interface org.sosy_lab.java_smt.api.BasicProverEnvironment
NO_MODEL_HELP -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractProverWithAllSat(Set<SolverContext.ProverOptions> pOptions, BooleanFormulaManager pBmgr, ShutdownNotifier pShutdownNotifier) -
Method Summary
Modifier and TypeMethodDescription<R> RallSat(BasicProverEnvironment.AllSatCallback<R> callback, List<BooleanFormula> importantPredicates) Get all satisfying assignments of the current environment with regard to a subset of terms, and create a region representing all those models.protected abstract EvaluatorGet an evaluator instance for model evaluation without executing checks for prover options.Methods inherited from class org.sosy_lab.java_smt.basicimpl.AbstractProver
addConstraint, addConstraintImpl, checkEnableSeparationLogic, checkGenerateAllSat, checkGenerateModels, checkGenerateUnsatCores, checkGenerateUnsatCoresOverAssumptions, close, closeAllEvaluators, getAssertedConstraintIds, getAssertedFormulas, pop, popImpl, push, pushImpl, registerEvaluator, size, unregisterEvaluatorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.sosy_lab.java_smt.api.BasicProverEnvironment
getEvaluator, getModel, getModelAssignments, getStatistics, getUnsatCore, isUnsat, isUnsatWithAssumptions, push, registerUserPropagator, unsatCoreOverAssumptions
-
Field Details
-
shutdownNotifier
-
-
Constructor Details
-
AbstractProverWithAllSat
protected AbstractProverWithAllSat(Set<SolverContext.ProverOptions> pOptions, BooleanFormulaManager pBmgr, ShutdownNotifier pShutdownNotifier)
-
-
Method Details
-
allSat
public <R> R allSat(BasicProverEnvironment.AllSatCallback<R> callback, List<BooleanFormula> importantPredicates) throws InterruptedException, SolverException Description copied from interface:BasicProverEnvironmentGet all satisfying assignments of the current environment with regard to a subset of terms, and create a region representing all those models.importantPredicates- A set of (positive) variables appearing in the asserted queries. Only these variables will appear in the region.- Returns:
- A region representing all satisfying models of the formula.
- Throws:
InterruptedExceptionSolverException
-
getEvaluatorWithoutChecks
Get an evaluator instance for model evaluation without executing checks for prover options.This method allows model evaluation without explicitly enabling the prover-option
SolverContext.ProverOptions.GENERATE_MODELS. We only use this method internally, when we know about a valid solver state. The returned evaluator does not have caching or any direct optimization for user interaction.- Throws:
SolverException- if model can not be constructed.
-