|
pl_search_cpp 1.4
|
Represents an equivalent of the Prolog call \+\+Call. The aim is to determine if Call succeeds without binding any variables in the call. More...
#include <pred.hpp>


Public Member Functions | |
| NotNot (Engine *eng, PredPtr p) | |
| Create the equivalent of Prolog's \+\+p call. | |
| void | initialize_call () override |
| Initializes the call for the not-not predicate. | |
| bool | apply_choice () override |
| Applies a choice for the not-not predicate. | |
| bool | more_choices () override |
| Checks if there are more choices for the not-not predicate. | |
Public Member Functions inherited from pl_search::Pred | |
| 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 | |
| PredPtr | pred |
| bool | succeeded |
| bool | another_choice |
| PredPtr | saved_continuation |
Protected Attributes inherited from pl_search::Pred | |
| PredPtr | continuation |
| The continuation of the predicate. | |
| Engine * | engine |
Represents an equivalent of the Prolog call \+\+Call. The aim is to determine if Call succeeds without binding any variables in the call.
Create the equivalent of Prolog's \+\+p call.
| eng | Pointer to the engine. |
| p | is the predicate called within NotNot. |
|
overridevirtual |
Applies a choice for the not-not predicate.
< simply succeed for the first choice
< for the second choice we test if we reached NotNotEnd if so then the call of NotNot succeeded and so we move to the next predicate.
Reimplemented from pl_search::Pred.
|
overridevirtual |
Initializes the call for the not-not predicate.
Reimplemented from pl_search::Pred.
|
overridevirtual |
Checks if there are more choices for the not-not predicate.
< only two choices
Reimplemented from pl_search::Pred.
|
protected |
|
protected |
|
protected |
|
protected |