8#ifndef PL_SEARCH_CHOICE_ITERATOR_HPP
9#define PL_SEARCH_CHOICE_ITERATOR_HPP
Base class for choice iterators.
Definition choice_iterator.hpp:23
virtual bool test_choice()
Tests a choice which would tyically involve constraint deductions based on the choice.
Definition choice_iterator.hpp:42
virtual bool has_next()=0
Checks if there are more choices available.
virtual ~ChoiceIterator()=default
Virtual destructor for proper cleanup.
virtual bool make_choice()=0
Makes a choice.
Represents a Prolog variable.
Definition pvar.hpp:44
Choice iterator for variables.
Definition choice_iterator.hpp:53
virtual bool make_choice() override
Makes a choice.
Definition choice_iterator.hpp:76
VarChoiceIterator(Trail *trail, PVarPtr v, std::vector< TermPtr > ch)
Constructs a VarChoiceIterator.
Definition choice_iterator.hpp:61
std::vector< TermPtr > choices
Reference to the vector of choices.
Definition choice_iterator.hpp:85
int index
Current index in the choices vector.
Definition choice_iterator.hpp:83
PVarPtr var
Pointer to the variable.
Definition choice_iterator.hpp:84
Trail * trail
Pointer to the Trail.
Definition choice_iterator.hpp:82
bool has_next() override
Checks if there are more choices available.
Definition choice_iterator.hpp:69
Definition choice_iterator.hpp:16
bool unify(TermPtr t1, TermPtr t2, Trail *trail)
Unifies two terms.
Definition term.cpp:165
std::shared_ptr< PVar > PVarPtr
Definition typedefs.hpp:45
std::shared_ptr< Term > TermPtr
Typedefs for shared pointers to Terms and subclasses.
Definition typedefs.hpp:44
Definition of the binding trail.
Definition of common typedefs used in the pl_search library.