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


Public Member Functions | |
| NotNot (Trail *trail, PredPtr pred) | |
| Create the equivalent of Prolog's \+\+p call. | |
| bool | call () override |
| Calls the NotNot predicate. | |
Public Member Functions inherited from pl_search::Pred | |
| Pred (Trail *trail) | |
| 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. | |
| virtual void | call_init () |
| Initialize call. | |
| bool | call_continuation () |
| Calls the continuation of the predicate - first call_init and then call. | |
| virtual | ~Pred ()=default |
| Virtual destructor for proper cleanup. | |
| virtual std::string | get_name () |
| For debugging. | |
Protected Attributes | |
| PredPtr | pred |
Protected Attributes inherited from pl_search::Pred | |
| PredPtr | continuation |
| The continuation of the predicate. | |
| Trail * | trail |
| Pointer to the trail for managing variable bindings. | |
Represents an equivalent of the Prolog call \+\+Pred. The aim is to determine if Pred succeeds without binding any variables in the call.
The NotNot meta-predicate is very similar to the Once predicate except that any variable bindings made by Pred are undone both on failure and success of the Pred call. NotNot is used to determine if Pred would succeed without committing to any variable bindings made by the call to Pred. Note that Pred is a local call - i.e. its continuation is not related to the continuation of the NotNot predicate.
Create the equivalent of Prolog's \+\+p call.
| trail | Pointer to the trail. |
| pred | is the predicate called within NotNot. |
|
overridevirtual |
Calls the NotNot predicate.
NotNot is very similar to Once except that any variable bindings made by pred are undone both on failure and success of the pred call.
Reimplemented from pl_search::Pred.
|
protected |