|
Clingo
|
Interface for user-defined propagators. More...
#include <propagate.hh>
Public Member Functions | |
| Propagator ()=default | |
| The default constructor. | |
| Propagator (Propagator &&other)=delete | |
| Disable copy and move operations. | |
| auto | operator= (Propagator &&other) -> Propagator &=delete |
| Disable copy and move operations. | |
| virtual | ~Propagator ()=default |
| The destructor. | |
| void | init (Assignment assignment, PropagateInit init) |
| Callback to initialize the propagator before each solving step. | |
| void | attach (Assignment assignment, PropagateControl ctl) |
| Callback to initialize/setup thread-specific data for the propagator. | |
| void | propagate (Assignment assignment, PropagateControl ctl, ProgramLiteralSpan changes) |
| Callback to propagate consequences of the given literals. | |
| void | undo (Assignment assignment, ProgramLiteralSpan changes) |
| Called when the solver backtracks to a previous decision level. | |
| void | check (Assignment assignment, PropagateControl ctl) |
| Callback that is called on propagation fixpoints or total assignments. | |
Interface for user-defined propagators.
|
inline |
Callback to initialize/setup thread-specific data for the propagator.
This function is called once for each solving thread before solving of the current step is started.
| assignment | the current assignment of the solver |
| ctl | the propagate control object |
|
inline |
Callback that is called on propagation fixpoints or total assignments.
Clingo::PropagateInit::check_mode() can be used to control when this callback is called.
Like in Clingo::Propagator::Propagate(), a propagator can add clauses here to propagate consequences or discard the current assignment.
| assignment | the current assignment of the solver |
| ctl | the propagate control object |
|
inline |
Callback to initialize the propagator before each solving step.
| assignment | the current assignment of the solver |
| init | the initialization object |
|
inline |
Callback to propagate consequences of the given literals.
The function is only called for watched literals assigned on the current decision level.
A propagator can add clauses here to propagate consequences of the underlying theory.
| assignment | the current assignment of the solver |
| ctl | the propagate control object |
| changes | the literals that were assigned on the current decision level |
|
inline |
Called when the solver backtracks to a previous decision level.
The function is called with literals from all previous propagate calls on the same decision level.
Clingo::PropagateInit::undo_mode() can be used to control when this function is called.
| assignment | the current assignment of the solver |
| changes | the literals that were assigned on the current decision level |