Sets of variables in terms

Author(s): The Ciao Development Team.

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

Usage and interface

Documentation on exports

PREDICATEvarset/2
varset(Term,Xs)

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

No further documentation available for this predicate.

PREDICATEmember_var/2
No further documentation available for this predicate.

PREDICATEdiff_vars/3
No further documentation available for this predicate.

PREDICATEvarsbag/3
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.

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.

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).

    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).

    Documentation on imports

    This module has the following direct dependencies: