Sets of variables in terms

Author(s): The CLIP Group.

This module implements predicates to handle sets of variables in terms.

Usage and interface

Documentation on exports

PREDICATE
varset(Term,Xs)

Xs is the sorted list of all the variables in Term.

PREDICATE
No further documentation available for this predicate.

PREDICATE
No further documentation available for this predicate.

PREDICATE
No further documentation available for this predicate.

PREDICATE
varsbag(Term,Vs,Xs)

Vs is the list of all the variables in Term ordered as they appear in Term right-to-left depth-first (including duplicates) plus Xs.

PREDICATE

Usage:varset_in_args(T,LL)

Each list of LL contains the variables of an argument of T, for each argument, and in left to right order.

  • The following properties should hold at call time:
    (term_typing:nonvar/1)T is currently a term which is not a free variable.
  • The following properties should hold upon exit:
    (basic_props:list/2)LL is a list of list(var)s.

PREDICATE

Usage:ISOterm_variables(Term,Vars)

Vars is the list of all the variables in Term, ordered as they appear in Term right-to-left depth-first (without duplicates).

    PREDICATE
    term_variables(Term,Vars,Tail)

    Vars-Tail is the difference list of all the variables in Term, ordered as they appear in Term right-to-left depth-first (without duplicates).