public final class DebugModule extends Object implements AssertionListener, BackjumpListener, ConflictListener, PropagateListener, SolutionListener, ForgetListener, ExplanationListener, ClauseListener, StartStopListener
| Constructor and Description |
|---|
DebugModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(Core core)
initializes the component with the given solver.
|
void |
onAssertion(int literal,
int level)
Called when a variable is set
|
void |
onBackjump(int oldLevel,
int newLevel)
Called when the solver backtracks.
|
void |
onClauseAdd(int[] clause,
int clauseId,
boolean isModelClause)
called when the given clause is added.
|
void |
onClauseRemoval(int clauseId)
called when the clause with unique Id @param clauseId is removed
|
void |
onConflict(MapClause conflictClause,
int level)
called when a conflict occurs
|
void |
onExplain(MapClause explanation)
called when the conflict clause is explained
|
void |
onForget()
called when the solver's forget() method is applied.
|
void |
onPropagate(int literal,
int clauseId)
called when a propagation occurs
|
void |
onRestart(int level)
called when the solver restarts.
|
void |
onSolution(boolean satisfiable)
a handler called when a solution is found.
|
void |
onStart()
called when the solver starts search.
|
void |
onStop()
called when the solver stop search, for any reason
|
public void onRestart(int level)
BackjumpListenercomponents that want to be warned about restarts should put themselves in Core.restartModules.
onRestart in interface BackjumpListenerlevel - the level at which the solver was before restartingpublic void onConflict(MapClause conflictClause, int level)
ConflictListeneronConflict in interface ConflictListenerconflictClause - the conflict (unsatisfiable) clauselevel - the level at which the conflict occurredpublic void onBackjump(int oldLevel,
int newLevel)
BackjumpListenercomponents that want to be warned about backjumps should put themselves in Core.backjumpModules.
onBackjump in interface BackjumpListeneroldLevel - the level at which the solver was before backtrackingnewLevel - the level to which the solver backtrackspublic void onAssertion(int literal,
int level)
AssertionListeneronAssertion in interface AssertionListenerliteral - the literal that is set
propagation, false otherwiselevel - the search levelpublic void onPropagate(int literal,
int clauseId)
PropagateListeneronPropagate in interface PropagateListenerliteral - the literal propagatedclauseId - the unique ID of the unit clausepublic void onSolution(boolean satisfiable)
SolutionListeneronSolution in interface SolutionListenersatisfiable - true when the solution is Satisfiable, false if
it is Unsatisfiable.public void onExplain(MapClause explanation)
ExplanationListeneronExplain in interface ExplanationListenerexplanation - the explanation clausepublic void onClauseAdd(int[] clause,
int clauseId,
boolean isModelClause)
ClauseListeneronClauseAdd in interface ClauseListenerclause - the clauseclauseId - the clause's unique IdisModelClause - is this clause a model clause ?public void onClauseRemoval(int clauseId)
ClauseListeneronClauseRemoval in interface ClauseListenerclauseId - the idpublic void onForget()
ForgetListeneronForget in interface ForgetListenerpublic void onStart()
StartStopListeneronStart in interface StartStopListenerpublic void onStop()
StartStopListeneronStop in interface StartStopListenerpublic void initialize(Core core)
SolverComponentinitialize in interface SolverComponentcore - core component to initializeCopyright © 2022. All rights reserved.