|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISolverService
The aim on that interface is to allow power users to communicate with the SAT solver using Dimacs format. That way, there is no need to know the internals of the solver.
Method Summary | |
---|---|
void |
addClause(int[] literals)
Add a new clause in the SAT solver. |
void |
backtrack(int[] reason)
Ask the SAT solver to backtrack. |
int |
currentDecisionLevel()
To access the current decision level |
IVec<? extends IConstr> |
getLearnedConstraints()
Read-Only access to the list of constraints learned and not deleted so far in the solver. |
int[] |
getLiteralsPropagatedAt(int decisionLevel)
To access the literals propagated at a specific decision level. |
double[] |
getVariableHeuristics()
Read-Only access to the value of the heuristics for each variable. |
int |
nVars()
Read-Only access to the number of variables declared in the solver. |
void |
stop()
Ask the SAT solver to stop the search. |
void |
suggestNextLiteralToBranchOn(int l)
Suggests to the SAT solver to branch next on the given literal. |
Lbool |
truthValue(int literal)
To access the truth value of a specific literal under current assignment. |
Method Detail |
---|
void stop()
void backtrack(int[] reason)
reason
- a set of literals, in Dimacs format, currently falsified, i.e.
for (int l : reason) assert truthValue(l) == Lbool.FALSEvoid addClause(int[] literals)
literals
- a set of literals in Dimacs format.Lbool truthValue(int literal)
literal
- a Dimacs literal, i.e. a non-zero integer.
int currentDecisionLevel()
int[] getLiteralsPropagatedAt(int decisionLevel)
decisionLevel
- a decision level between 0 and #currentDecisionLevel()void suggestNextLiteralToBranchOn(int l)
l
- a literal in Dimacs format.double[] getVariableHeuristics()
IVec<? extends IConstr> getLearnedConstraints()
int nVars()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |