pl_search_cpp 2.2
Loading...
Searching...
No Matches
Classes | Namespaces | Functions | Variables
pred.hpp File Reference

The Pred class and its derived classes. More...

#include "term.hpp"
#include "typedefs.hpp"
#include "trail.hpp"
#include <memory>
#include <stack>
#include <vector>
Include dependency graph for pred.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  pl_search::Pred
 Base class for Prolog-like predicates. More...
 
class  pl_search::FailPred
 Represents a failure predicate that always fails when called. More...
 
class  pl_search::ChoicePred
 A base class that represents a choice predicate. More...
 
class  pl_search::VarChoicePred
 Represents a choice predicate that makes choices for a variable from a set of terms. More...
 
class  pl_search::DisjPred
 Represents a disjunction of predicates. More...
 
class  pl_search::Once
 Represents the equivalent of Prolog's once(Pred). The aim is to remove any choicepoints produced by Pred. More...
 
class  pl_search::NotNot
 Represents an equivalent of the Prolog call \+\+Pred. The aim is to determine if Pred succeeds without binding any variables in the call. More...
 
class  pl_search::IfThenElse
 Represents the equivalent of Prolog if-then-else i.e. (G1 -> G2; G3) - similar to (G1, !, G2; G3) More...
 
class  pl_search::LoopBodyFactory
 LoopBodyFactory is an abstract base class used for generating instances of a predicate class used in the body of a loop. See the Loop class for details of how this is used. More...
 
class  pl_search::Loop
 Represents a loop predicate that iterates over instances of a predicate. More...
 

Namespaces

 

Functions

PredPtr pl_search::conjunction (std::vector< PredPtr > preds)
 Represents a conjunction of predicates by chaining them together via continuations. The continuations of each predicate is modified to point to the next predicate in the conjunction. The continuation of the last predicate in the conjunction is not modified.
 
std::string pl_search::repr (PredPtr pred)
 

Variables

std::shared_ptr< FailPredpl_search::fail_pred = std::make_shared<FailPred>(nullptr)
 A shared pointer to a reusable failure predicate.
 

Detailed Description

The Pred class and its derived classes.