pl_search_cpp 1.4
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
pl_search Namespace Reference

Classes

class  ChoiceIterator
 Base class for choice iterators. More...
 
class  ChoicePred
 Represents a choice predicate. More...
 
class  CList
 Represents a list of terms. More...
 
class  Cut
 Represents a Prolog like cut. When called it pops env_stack thus removing choicepoints. More...
 
class  DetPred
 Represents a deterministic predicate. More...
 
class  DisjPred
 Represents a disjunction of predicates. More...
 
class  Engine
 The Engine class manages the execution of predicates and backtracking. More...
 
struct  env_entry
 Represents an environment entry for predicates. More...
 
class  IfThenElse
 Represents the equivalent of Prolog if-then-else i.e. (G1 -> G2; G3) - similar to (G1, !, G2; G3) ) More...
 
class  Loop
 Constructs a predicate that loops over (instances of) a predicate while some condition (loop_continues) is satisfied. More...
 
class  LoopBodyFactory
 LoopBodyFactory is an abstract base class used for generating instances of a predicate class used in the body of a loop. More...
 
class  NotNot
 Represents an equivalent of the Prolog call \+\+Call. The aim is to determine if Call succeeds without binding any variables in the call. More...
 
class  NotNotEnd
 Intended for internal use by NotNot which injects this call directly after the predicate supplied to the NotNot constructor. More...
 
class  PAtom
 Represents a Prolog atom. More...
 
class  PFloat
 Represents a Prolog float. More...
 
class  PInt
 Represents a Prolog integer. More...
 
class  Pred
 Abstract base class for Prolog-like predicates. More...
 
class  PVar
 Represents a Prolog variable. More...
 
class  SemiDetPred
 Represents a semi-deterministic predicate. More...
 
class  Term
 Abstract base class for terms that approximate Prolog terms. More...
 
struct  trail_entry
 Represents a trail entry for backtracking. More...
 
class  UpdatablePVar
 UpdatableVar implements what some Prologs call updatable assignment. More...
 
class  VarChoiceIterator
 Choice iterator for variables. More...
 

Typedefs

typedef std::shared_ptr< ChoiceIteratorChoiceIteratorPtr
 
typedef std::shared_ptr< PredPredPtr
 Typedef for a shared pointer to a Pred object.
 
typedef std::shared_ptr< TermTermPtr
 Typedefs for shared pointers to Terms and subclasses.
 
typedef std::shared_ptr< PVarPVarPtr
 
typedef std::shared_ptr< PIntPIntPtr
 
typedef std::shared_ptr< PFloatPFloatPtr
 
typedef std::shared_ptr< PAtomPAtomPtr
 
typedef std::shared_ptr< CListCListPtr
 
typedef std::shared_ptr< UpdatablePVarUpdatablePVarPtr
 

Functions

PredPtr conjunction (std::vector< PredPtr > preds)
 Represents a conjunction of predicates by chaining them together via continuations.
 
std::string repr (PredPtr pred)
 
bool operator== (Term &t1, Term &t2)
 == test for TermPtrs
 
bool operator< (Term &t1, Term &t2)
 < operator for Terms. Approximates the < operator in Prolog. The ordering is as follows: pvar < pint, pfloat < patom < clist < user-defined classes "older" vars are less than "newer" vars patoms are ordered by name pints and pfloats are ordered by value clists are ordered by the first element, then the second, etc.
 
bool operator<= (Term &t1, Term &t2)
 <= operator for Terms
 

Typedef Documentation

◆ ChoiceIteratorPtr

typedef std::shared_ptr<ChoiceIterator> pl_search::ChoiceIteratorPtr

◆ CListPtr

typedef std::shared_ptr<CList> pl_search::CListPtr

◆ PAtomPtr

typedef std::shared_ptr<PAtom> pl_search::PAtomPtr

◆ PFloatPtr

typedef std::shared_ptr<PFloat> pl_search::PFloatPtr

◆ PIntPtr

typedef std::shared_ptr<PInt> pl_search::PIntPtr

◆ PredPtr

typedef std::shared_ptr<Pred> pl_search::PredPtr

Typedef for a shared pointer to a Pred object.

◆ PVarPtr

typedef std::shared_ptr<PVar> pl_search::PVarPtr

◆ TermPtr

typedef std::shared_ptr<Term> pl_search::TermPtr

Typedefs for shared pointers to Terms and subclasses.

◆ UpdatablePVarPtr

typedef std::shared_ptr<UpdatablePVar> pl_search::UpdatablePVarPtr

Function Documentation

◆ conjunction()

PredPtr pl_search::conjunction ( std::vector< PredPtr preds)

Represents a conjunction of predicates by chaining them together via continuations.

Creates a conjunction of predicates.

Parameters
predsA vector of shared pointers to the predicates.
Returns
A shared pointer to the first predicate in the conjunction.

◆ operator<()

bool pl_search::operator< ( Term t1,
Term t2 
)

< operator for Terms. Approximates the < operator in Prolog. The ordering is as follows: pvar < pint, pfloat < patom < clist < user-defined classes "older" vars are less than "newer" vars patoms are ordered by name pints and pfloats are ordered by value clists are ordered by the first element, then the second, etc.

< operator for Terms.

Parameters
t1The first term.
t2The second term.
Returns
True if the first term is less than the second term, false otherwise.

◆ operator<=()

bool pl_search::operator<= ( Term t1,
Term t2 
)

<= operator for Terms

<= operator for Term

Parameters
t1The first term.
t2The second term.
Returns
True if the first term is less than or equal to the second term, false otherwise.

◆ operator==()

bool pl_search::operator== ( Term t1,
Term t2 
)

== test for TermPtrs

== operator for Terms

Parameters
t1The first term.
t2The second term.
Returns
True if the terms are equal using the isEqualTo method, false otherwise.

◆ repr()

std::string pl_search::repr ( PredPtr  pred)