![]() |
YAP 7.1.0
|
Modules | |
Inlined Tests and Term Manipulation | |
Term Visit and Manipulation | |
struct att_rec |
class cyclic_term/1 |
cyclic_term( + T )
cyclic_term(? Term)
Succeeds if the graph representation of the term has loops Say, The representation of a term X
that obeys the equation X=[X]
term has a loop from the list to its head
Succeed if the argument Term is a cyclic term
class ground/1 |
class variables_in_term/3 |
variables_in_term( +_t, +_SetOfVariables_, +_ExtendedSetOfVariables_ )
SetOfVariables must be a list of unbound variables If so, ExtendedSetOfVariables will include all te variables in the union of vars(_T_)
and SetOfVariables
class term_variables/3 |
term_variables(? Term, - Variables, +_ExternalVars_)
defined in the ISO standard
Unify the difference list between Variables and ExternaVars with the list of all variables of term Term The variables occur in the order of their first appearance when traversing the term depth-first, left-to-right
class term_variables_union/3 |
term_variables_union(? Term1, - Term2, +_Vars_)
defined in the ISO standard
Unify Vars with all variables in either term
class term_variables_difference/3 |
term_variables_difference(? Term1, - Term2, +_Vars_)
defined in the ISO standard
Unify Vars with all variables in Term1 and not in Term2
class term_variables/2 |
term_variables(? Term, - Variables)
defined in the ISO standard
Unify Variables with the list of all variables of term Term The variables occur in the order of their first appearance when traversing the term depth-first, left-to-right
class new_variables_in_term/3 |
new_variables_in_term(+_CurrentVariables_, ? Term, -_Variables_)
new_variables_in_term(+ Variables,? Term, - OutputVariables)
Unify Variables with the list of all variables of term Term that do not occur in CurrentVariables That is:
Variables = vars(Term) - CurrentVariables
= The variables occur in the order of their first appearance when traversing the term depth-first, left-to-right
Unify OutputVariables with all variables occurring in Term that are not in the list Variables
class term_attvars/2 |
term_attvars(+ Term,- AttVars)
AttVars is a list of all attributed variables in Term and its attributes I.e., term_attvars/2 works recursively through attributes This predicate is Cycle-safe
class numbervars/3 |
numbervars( t,+ _N1,- Nn)
Instantiates each variable in term _T_ to a term of the form:
$VAR( _I_)
, with I increasing from N1 to Nn
class singleton_vs_numbervars/3 |
singleton_vs_numbervars( t,+ _N1,- Nn)
Instantiates each variable in term T to a term of the form:
$VAR( _I_)
, with I increasing from N1 to Nnif
J is abs(I)`YAP also accepts atoms and strings
class unnumbervars/1 |
unnumbervars(+ Term)
Replace all terms of the form $VAR(_) by unbound variables
class varnumbers/2 |
varnumbers(+ Term, Term)
Replace all terms of the form $VAR(_) by unbound variables
#define ATOMIC_HOOK_CODE if (d0==TermNone) mSET(ptd0,(CELL)ptd0); |
#define ATOMIC_HOOK_CODE |
#define COMPOUND_HOOK_CODE if (IS_VISIT_MARKER(ptd1[0])) { goto found;} |
#define COMPOUND_HOOK_CODE |
#define LIST_HOOK_CODE if (IS_VISIT_MARKER(ptd1[0])) { goto found;} |
#define pop_sub_term | ( | A, | |
B, | |||
C | |||
) | ( DEB_DOOB("-",A) pop_sub_term__(A,B,C)) |
#define push_sub_term | ( | A, | |
B, | |||
C, | |||
D, | |||
E | |||
) |
#define RESET_TERM_VISITOR_0 | ( | ) |
#define RESET_TERM_VISITOR_1 | ( | v, | |
v0 | |||
) |
#define RESET_TERM_VISITOR_3 | ( | first, | |
tail, | |||
tail0, | |||
end | |||
) |
#define VAR_HOOK_CODE |
#define VAR_HOOK_CODE |
#define VAR_HOOK_CODE |
routine to locate all variables in a term, and its application s
#define VAR_HOOK_CODE mSET(ptd0, TermNone); |
#define VAR_HOOK_CODE |
routine to locate all variables in a term, and its application s
#define VAR_HOOK_CODE |
routine to locate all variables in a term, and its application s
int Yap_NumberVars | ( | Term | t, |
int | numbv, | ||
bool handle_singles | USES_REGS | ||
) |
Term Yap_TermVariables | ( | Term | t, |
Term t0 | USES_REGS | ||
) |
Macros | |
#define | DEB_DOOBOUT(d0) \ |
#define | DEB_DOOBIN(d0) |
#define | DEB_DOOB(S, sp) |
#define | push_sub_term(A, B, C, D, E) |
#define | pop_sub_term(A, B, C) ( DEB_DOOB("-",A) pop_sub_term__(A,B,C)) |
#define | RESET_TERM_VISITOR_0() |
#define | RESET_TERM_VISITOR_1(v, v0) |
#define | RESET_TERM_VISITOR_3(first, tail, tail0, end) |
#define | LIST_HOOK_CODE if (IS_VISIT_MARKER(ptd1[0])) { goto found;} |
#define | COMPOUND_HOOK_CODE if (IS_VISIT_MARKER(ptd1[0])) { goto found;} |
#define | COMPOUND_HOOK_CODE |
#define | VAR_HOOK_CODE |
routine to locate all variables in a term, and its application s More... | |
#define | VAR_HOOK_CODE |
routine to locate all variables in a term, and its application s More... | |
#define | VAR_HOOK_CODE |
routine to locate all variables in a term, and its application s More... | |
#define | VAR_HOOK_CODE mSET(ptd0, TermNone); |
routine to locate all variables in a term, and its application s More... | |
#define | VAR_HOOK_CODE |
routine to locate all variables in a term, and its application s More... | |
#define | VAR_HOOK_CODE |
routine to locate all variables in a term, and its application s More... | |
#define | ATOMIC_HOOK_CODE if (d0==TermNone) mSET(ptd0,(CELL)ptd0); |
#define | ATOMIC_HOOK_CODE |
Typedefs | |
typedef struct att_rec | att_rec_t |
routine to locate attributed variables | |
Functions | |
bool | Yap_IsCyclicTerm (Term t USES_REGS) |
bool | Yap_IsGroundTerm (Term t) |
Term | Yap_TermVariables (Term t, Term t0 USES_REGS) |
Extends list with all the variables in a term. More... | |
void | mksingleton (Term v, Functor FunctorNumberVars) |
int | Yap_NumberVars (Term t, int numbv, bool handle_singles USES_REGS) |
numbervariables in term t More... | |
Int | Yap_UnNumberTerm (Term t, CELL *HLow USES_REGS) |
void | Yap_InitTermCPreds (void) |