pl_search_cpp 1.4
|
Represents a Prolog like cut. When called it pops env_stack thus removing choicepoints. More...
#include <pred.hpp>
Public Member Functions | |
Cut (Engine *eng, int index) | |
Constructs a Cut predicate. | |
void | initialize_call () override |
Initializes the predicate call. | |
bool | apply_choice () override |
Applies a choice for the cut predicate. | |
void | set_cut_point (int cut_point) |
![]() | |
DetPred (Engine *eng) | |
Represents a deterministic predicate. | |
bool | apply_choice () override |
Noop - all the work is done in initialize_call. | |
![]() | |
SemiDetPred (Engine *eng) | |
Represents a semi-deterministic predicate. | |
bool | more_choices () override |
Applies a choice. | |
bool | is_non_det () |
![]() | |
Pred (Engine *eng) | |
Default constructor. | |
PredPtr | get_continuation () |
Gets the continuation of the predicate. | |
virtual void | set_continuation (PredPtr cont) |
Sets the continuation of the predicate. | |
PredPtr | last_pred () |
Follows the continuation chain to the last predicate. | |
bool | is_non_det () |
Determines if the predicate is non-deterministic. | |
void | wrap_with_once () |
Wraps the predicate with a once. | |
virtual | ~Pred ()=default |
Virtual destructor for proper cleanup. | |
std::string | get_name () |
For debugging. | |
Protected Attributes | |
int | env_index |
![]() | |
PredPtr | continuation |
The continuation of the predicate. | |
Engine * | engine |
Represents a Prolog like cut. When called it pops env_stack thus removing choicepoints.
|
inline |
Constructs a Cut predicate.
eng | Pointer to the engine. |
index | An index into env_stack. When called, env_stack is popped to index. |
|
overridevirtual |
|
inlineoverridevirtual |
Initializes the predicate call.
Reimplemented from pl_search::Pred.
|
inline |
|
protected |