pl_search_cpp 1.8
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
pl_search::NotNotEnd Class Reference

Intended for internal use by NotNot which injects this call directly after the predicate supplied to the NotNot constructor. More...

#include <pred.hpp>

Inheritance diagram for pl_search::NotNotEnd:
Inheritance graph
[legend]
Collaboration diagram for pl_search::NotNotEnd:
Collaboration graph
[legend]

Public Member Functions

 NotNotEnd (Engine *eng)
 NotNot::initialize_call uses this to "terminate" the call supplied to NotNot.
 
bool initialize_call () override
 Initializes the predicate call.
 
bool apply_choice () override
 Pop the environment stack to the corresponding NotNot predicate. This removes further choices (choicepoints) and backtrack to undo any variable bindings created after the NotNot predicate was called.
 
void set_env_index (int index)
 
- Public Member Functions inherited from pl_search::DetPred
 DetPred (Engine *eng)
 Represents a deterministic predicate.
 
- Public Member Functions inherited from pl_search::SemiDetPred
 SemiDetPred (Engine *eng)
 Represents a semi-deterministic predicate.
 
bool more_choices () override
 Applies a choice.
 
bool must_push () override
 Determines if the predicate needs to be pushed onto the environment stack when called.
 
- 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.
 
virtual ~Pred ()=default
 Virtual destructor for proper cleanup.
 
virtual std::string get_name ()
 For debugging.
 

Protected Attributes

int env_index
 
- Protected Attributes inherited from pl_search::Pred
PredPtr continuation
 The continuation of the predicate.
 
Engineengine
 

Detailed Description

Intended for internal use by NotNot which injects this call directly after the predicate supplied to the NotNot constructor.

Constructor & Destructor Documentation

◆ NotNotEnd()

pl_search::NotNotEnd::NotNotEnd ( Engine eng)
inline

NotNot::initialize_call uses this to "terminate" the call supplied to NotNot.

Parameters
engPointer to the engine.

Member Function Documentation

◆ apply_choice()

bool pl_search::NotNotEnd::apply_choice ( )
overridevirtual

Pop the environment stack to the corresponding NotNot predicate. This removes further choices (choicepoints) and backtrack to undo any variable bindings created after the NotNot predicate was called.

Returns
True

Reimplemented from pl_search::DetPred.

◆ initialize_call()

bool pl_search::NotNotEnd::initialize_call ( )
inlineoverridevirtual

Initializes the predicate call.

Returns
True if the initialization is successful, false otherwise.

Reimplemented from pl_search::Pred.

◆ set_env_index()

void pl_search::NotNotEnd::set_env_index ( int  index)
inline

Member Data Documentation

◆ env_index

int pl_search::NotNotEnd::env_index
protected

The documentation for this class was generated from the following files: