T - a subinterface to ISolver.public class HighLevelXplain<T extends ISolver> extends GroupClauseSelectorSolver<T> implements Explainer
| Constructor and Description | 
|---|
| HighLevelXplain(T solver) | 
| Modifier and Type | Method and Description | 
|---|---|
| IConstr | addAtLeast(IVecInt literals,
          int degree)Create a cardinality constraint of the type "at least n of those literals
 must be satisfied" | 
| IConstr | addAtMost(IVecInt literals,
         int degree)Create a cardinality constraint of the type "at most n of those literals
 must be satisfied" | 
| void | cancelExplanation() | 
| Collection<Integer> | explain() | 
| int[] | findModel()Look for a model satisfying all the clauses available in the problem. | 
| int[] | findModel(IVecInt assumps)Look for a model satisfying all the clauses available in the problem. | 
| boolean | isSatisfiable()Check the satisfiability of the set of constraints contained inside the
 solver. | 
| boolean | isSatisfiable(boolean global)Check the satisfiability of the set of constraints contained inside the
 solver. | 
| boolean | isSatisfiable(IVecInt assumps)Check the satisfiability of the set of constraints contained inside the
 solver. | 
| boolean | isSatisfiable(IVecInt assumps,
             boolean global)Check the satisfiability of the set of constraints contained inside the
 solver. | 
| int[] | minimalExplanation() | 
| void | setMinimizationStrategy(MinimizationStrategy strategy) | 
| String | toString(String prefix)Display a textual representation of the solver configuration. | 
addClause, addControlableClause, addNonControlableClause, getAddedVars, getVarToHighLevel, modelcreateNewVar, discardLastestVar, externalState, internalStateaddAllClauses, addBlockingClause, addClause, addExactly, clearDecorated, clearLearntClauses, decorated, expireTimeout, getLogPrefix, getSearchListener, getSolvingEngine, getStat, getTimeout, getTimeoutMs, isDBSimplificationAllowed, isSolverKeptHot, isVerbose, model, modelWithInternalVariables, nConstraints, newVar, newVar, nextFreeVarId, nVars, primeImplicant, primeImplicant, printInfos, printInfos, printStat, printStat, printStat, realNumberOfVariables, registerLiteral, removeConstr, removeSubsumedConstr, reset, setDBSimplificationAllowed, setExpectedNumberOfClauses, setKeepSolverHot, setLogPrefix, setSearchListener, setTimeout, setTimeoutMs, setTimeoutOnConflicts, setUnitClauseProvider, setVerbose, toString, unsatExplanationclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAllClauses, addBlockingClause, addClause, addExactly, clearLearntClauses, expireTimeout, getLogPrefix, getSearchListener, getSolvingEngine, getStat, getTimeout, getTimeoutMs, isDBSimplificationAllowed, isSolverKeptHot, isVerbose, modelWithInternalVariables, newVar, nextFreeVarId, printStat, printStat, printStat, realNumberOfVariables, registerLiteral, removeConstr, removeSubsumedConstr, reset, setDBSimplificationAllowed, setExpectedNumberOfClauses, setKeepSolverHot, setLogPrefix, setSearchListener, setTimeout, setTimeoutMs, setTimeoutOnConflicts, setUnitClauseProvider, setVerbose, unsatExplanationnConstraints, newVar, nVars, primeImplicant, primeImplicant, printInfos, printInfosmodelpublic HighLevelXplain(T solver)
public IConstr addAtLeast(IVecInt literals, int degree) throws ContradictionException
ISolveraddAtLeast in interface ISolveraddAtLeast in class SolverDecorator<T extends ISolver>literals - a set of literals. The vector can be reused since the solver
            is not supposed to keep a reference to that vector.degree - the degree (n) of the cardinality constraintContradictionException - iff the vector of literals is empty or if degree literals are
             not remaining unfalsified after unit propagationISolver.removeConstr(IConstr)public IConstr addAtMost(IVecInt literals, int degree) throws ContradictionException
ISolveraddAtMost in interface ISolveraddAtMost in class SolverDecorator<T extends ISolver>literals - a set of literals The vector can be reused since the solver is
            not supposed to keep a reference to that vector.degree - the degree (n) of the cardinality constraintContradictionException - iff the vector of literals is empty or if it contains more
             than degree satisfied literals after unit propagationISolver.removeConstr(IConstr)public int[] minimalExplanation()
                         throws TimeoutException
minimalExplanation in interface ExplainerTimeoutExceptionpublic Collection<Integer> explain() throws TimeoutException
TimeoutExceptionpublic void cancelExplanation()
public int[] findModel()
                throws TimeoutException
IProblem
     if (isSatisfiable()) {
     return model();
     }
     return null; 
     findModel in interface IProblemfindModel in class SolverDecorator<T extends ISolver>null if no model is foundTimeoutException - if a model cannot be found within the given timeout.public int[] findModel(IVecInt assumps) throws TimeoutException
IProblem
     if (isSatisfiable(assumpt)) {
     return model();
     }
     return null; 
     findModel in interface IProblemfindModel in class SolverDecorator<T extends ISolver>null if no model is foundTimeoutException - if a model cannot be found within the given timeout.public boolean isSatisfiable()
                      throws TimeoutException
IProblemisSatisfiable in interface IProblemisSatisfiable in class AbstractClauseSelectorSolver<T extends ISolver>TimeoutExceptionpublic boolean isSatisfiable(boolean global)
                      throws TimeoutException
IProblemisSatisfiable in interface IProblemisSatisfiable in class AbstractClauseSelectorSolver<T extends ISolver>global - whether that call is part of a global process (i.e.
            optimization) or not. if (global), the timeout will not be
            reset between each call.TimeoutExceptionpublic boolean isSatisfiable(IVecInt assumps) throws TimeoutException
IProblemisSatisfiable in interface IProblemisSatisfiable in class AbstractClauseSelectorSolver<T extends ISolver>assumps - a set of literals (represented by usual non null integers in
            Dimacs format).TimeoutExceptionpublic boolean isSatisfiable(IVecInt assumps, boolean global) throws TimeoutException
IProblemisSatisfiable in interface IProblemisSatisfiable in class AbstractClauseSelectorSolver<T extends ISolver>assumps - a set of literals (represented by usual non null integers in
            Dimacs format).global - whether that call is part of a global process (i.e.
            optimization) or not. if (global), the timeout will not be
            reset between each call.TimeoutExceptionpublic String toString(String prefix)
ISolverpublic void setMinimizationStrategy(MinimizationStrategy strategy)
setMinimizationStrategy in interface ExplainerCopyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.