Public Member Functions | |
bool | init (Solver &) |
Called during initialization of s. | |
uint32 | priority () const |
Shall return a value representing the priority of this propagator. | |
bool | propagateFixpoint (Solver &s, PostPropagator *) |
Shall enqueue and propagate new assignments implied by this propagator. | |
void | reset () |
Aborts an active propagation operation. | |
TestingPostProp (bool cfl, uint32 p=PostPropagator::priority_class_simple) | |
Public Attributes | |
bool | conflict |
bool | deleteOnProp |
int | inits |
uint32 | prio |
int | props |
int | resets |
Definition at line 58 of file solver_test.cpp.
Clasp::Test::TestingPostProp::TestingPostProp | ( | bool | cfl, |
uint32 | p = PostPropagator::priority_class_simple |
||
) | [inline, explicit] |
Definition at line 59 of file solver_test.cpp.
bool Clasp::Test::TestingPostProp::init | ( | Solver & | s | ) | [inline, virtual] |
Called during initialization of s.
Reimplemented from Clasp::PostPropagator.
Definition at line 72 of file solver_test.cpp.
uint32 Clasp::Test::TestingPostProp::priority | ( | ) | const [inline, virtual] |
Shall return a value representing the priority of this propagator.
The priority is used to order sequences of post propagators and to classify post propagators w.r.t the classes: class_simple and class_general.
Implements Clasp::PostPropagator.
Definition at line 73 of file solver_test.cpp.
bool Clasp::Test::TestingPostProp::propagateFixpoint | ( | Solver & | s, |
PostPropagator * | ctx | ||
) | [inline, virtual] |
Shall enqueue and propagate new assignments implied by this propagator.
This function shall enqueue and propagate all assignments currently implied by this propagator until a fixpoint is reached w.r.t this post propagator or a conflict is detected.
s | The solver in which this post propagator is used. |
ctx | The post propagator from which this post propagator is called or 0 if no other post propagator is currently active. |
Typically, propagateFixpoint() should implemet a loop like this:
for (;;) { if (!assign_newly_implied_literals(s)){ return false; } if (s.queueSize() == 0) { return true; } if (!s.propagateUntil(this)) { return false; } }
Implements Clasp::PostPropagator.
Definition at line 60 of file solver_test.cpp.
void Clasp::Test::TestingPostProp::reset | ( | ) | [inline, virtual] |
Aborts an active propagation operation.
The function reset() is called whenever propagation on the current decision level is stopped before a fixpoint is reached. In particular, a solver calls reset() when a conflict is detected during propagation.
Reimplemented from Clasp::PostPropagator.
Definition at line 69 of file solver_test.cpp.
Definition at line 78 of file solver_test.cpp.
Definition at line 79 of file solver_test.cpp.
Definition at line 76 of file solver_test.cpp.
Definition at line 77 of file solver_test.cpp.
Definition at line 74 of file solver_test.cpp.
Definition at line 75 of file solver_test.cpp.