YAPQuery¶
Queries and engines.
Queries
interface to a YAP Query; uses an SWI-like status info internally.
Public Function:¶
1. YAPQuery::~YAPQuery(): : main constructor, uses a predicate and an array of terms
It is given a YAPPredicate _p_ , and an array of terms that must have at
least
the same arity as the functor.
1. YAPQuery::YAPQuery(YAPPredicate p, YAPTerm t[]): : full constructor,
It is given a functor, module, and an array of terms that must have at least the same arity as the functor.
1. YAPQuery::YAPQuery(YAPFunctor f, YAPTerm mod, YAPTerm t[]): : often, this is more efficient
1. YAPQuery::YAPQuery(YAPFunctor f, YAPTerm mod, Term t[]): : functor/term constructor,
It is given a functor, and an array of terms that must have at least the same arity as the functor. Works within the current module.
1. YAPQuery::YAPQuery(const char *s): : < string constructor without varnames
It is given a string, calls the parser and obtains a Prolog term that should be a callable goal.
1. YAPQuery::YAPQuery(YAPTerm t): : < string constructor with just an atom
It i; }; build a query from a term set flags for query execution, currently only for exception handling
1. void YAPQuery::setFlag(int flag): : reset flags for query execution, currently only for exception handling
1. void YAPQuery::resetFlag(int flag): : first query
actually implemented by calling the next();
1. bool YAPQuery::first(): : ask for the next solution of the current query same call for every solution
1. bool YAPQuery::next(): : an alias to avoid saying [next()][1a16a1391065d3705dc7980f90a24a594e]
1. bool YAPQuery::answer(): : does this query have open choice-points? or is it deterministic?
1. bool YAPQuery::deterministic(): : represent the top-goal
1. const char * YAPQuery::text(): : remove alternatives in the current search space, and finish the current query finish the current query: undo all bindings.
1. void YAPQuery::close(): : query variables.
1. Term YAPQuery::namedVars():
1. YAPPairTerm * YAPQuery::namedVarTerms():
1. std::vector< Term > YAPQuery::namedVarsVector(): : query variables, but copied out
1. YAPTerm YAPQuery::getTerm(yhandle_t t): : convert a ref to a binding.
simple YAP Query; just calls YAP and reports success or failure, Useful when we just want things done, eg YAPCommand("load_files(library(lists), )")
1. YAPTerm YAPQuery::X(int i):
1. bool YAPQuery::output(Term t, int i):
1. bool YAPQuery::output(YAPTerm t, int i):
1. bool YAPQuery::ensureStorage(size_t cells):
1. bool YAPQuery::ensureStorage(size_t cells, std::vector< Term > ts):
Private-func:¶
1. void YAPQuery::openQuery():
1. PredEntry * YAPQuery::rewriteUndefQuery():
Private-attrib:¶
1. YAP_dogoalinfo YAPQuery::q_h:
1. YAPPairTerm* YAPQuery::names: