clingo
|
#include <constraint.h>
Public Member Functions | |
MessageHandler () | |
virtual bool | handleMessages ()=0 |
virtual uint32 | priority () const |
Shall return a value representing the priority of this propagator. More... | |
virtual bool | propagateFixpoint (Solver &, PostPropagator *) |
Shall enqueue and propagate new assignments implied by this propagator. More... | |
Public Member Functions inherited from Clasp::PostPropagator | |
PostPropagator () | |
virtual | ~PostPropagator () |
virtual bool | init (Solver &s) |
Called during initialization of s. More... | |
virtual void | reset () |
Aborts an active propagation operation. More... | |
virtual bool | isModel (Solver &s) |
Is the current total assignment a model? More... | |
Public Member Functions inherited from Clasp::Constraint | |
Constraint () | |
virtual void | destroy (Solver *s=0, bool detach=false) |
Default is to call delete this. More... | |
virtual ConstraintType | type () const |
Returns the type of this constraint. More... | |
virtual bool | minimize (Solver &s, Literal p, CCMinRecursive *rec) |
virtual void | undoLevel (Solver &s) |
Called when the solver undid a decision level watched by this constraint. More... | |
virtual bool | simplify (Solver &s, bool reinit=false) |
virtual uint32 | estimateComplexity (const Solver &s) const |
Returns an estimate of the constraint's complexity relative to a clause (complexity = 1). More... | |
virtual ClauseHead * | clause () |
Shall return this if constraint is a clause, otherwise 0. More... | |
virtual bool | valid (Solver &s) |
Shall return whether the constraint is valid (i.e. not conflicting) w.r.t the current assignment in s. More... | |
Additional Inherited Members | |
Public Types inherited from Clasp::PostPropagator | |
enum | Priority { priority_class_simple = 0, priority_reserved_msg = 0, priority_reserved_ufs = 10, priority_reserved_look = 1023, priority_class_general = 1024 } |
Default priorities for post propagators. More... | |
Public Attributes inherited from Clasp::PostPropagator | |
PostPropagator * | next |
Protected Member Functions inherited from Clasp::PostPropagator | |
Constraint * | cloneAttach (Solver &) |
PostPropagators are not clonable by default. More... | |
PropResult | propagate (Solver &, Literal, uint32 &) |
void | reason (Solver &, Literal, LitVec &) |
Protected Member Functions inherited from Clasp::Constraint | |
virtual | ~Constraint () |
Clasp::MessageHandler::MessageHandler | ( | ) |
|
pure virtual |
Implemented in Clasp::SequentialSolve::InterruptHandler.
|
inlinevirtual |
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.
|
inlinevirtual |
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:
Implements Clasp::PostPropagator.
Reimplemented in Clasp::SequentialSolve::InterruptHandler.