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>
public abstract class AbstractProverWithAllSat<T> extends AbstractProver<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
Fields Modifier and Type Field Description protected ShutdownNotifier
shutdownNotifier
-
Fields inherited from class org.sosy_lab.java_smt.basicimpl.AbstractProver
closed, enableSL, generateUnsatCores
-
Fields inherited from interface org.sosy_lab.java_smt.api.BasicProverEnvironment
NO_MODEL_HELP
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractProverWithAllSat(Set<SolverContext.ProverOptions> pOptions, BooleanFormulaManager pBmgr, ShutdownNotifier pShutdownNotifier)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <R> R
allSat(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 Evaluator
getEvaluatorWithoutChecks()
Get 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, unregisterEvaluator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sosy_lab.java_smt.api.BasicProverEnvironment
getEvaluator, getModel, getModelAssignments, getStatistics, getUnsatCore, isUnsat, isUnsatWithAssumptions, push, registerUserPropagator, unsatCoreOverAssumptions
-
-
-
-
Field Detail
-
shutdownNotifier
protected final ShutdownNotifier shutdownNotifier
-
-
Constructor Detail
-
AbstractProverWithAllSat
protected AbstractProverWithAllSat(Set<SolverContext.ProverOptions> pOptions, BooleanFormulaManager pBmgr, ShutdownNotifier pShutdownNotifier)
-
-
Method Detail
-
allSat
public <R> R allSat(BasicProverEnvironment.AllSatCallback<R> callback, List<BooleanFormula> importantPredicates) throws InterruptedException, SolverException
Description copied from interface:BasicProverEnvironment
Get 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:
InterruptedException
SolverException
-
getEvaluatorWithoutChecks
protected abstract Evaluator getEvaluatorWithoutChecks() throws SolverException
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.
-
-