protocol
Prolog term utility predicates protocol.
Paulo Moura
1.1
2007/4/3
static
(no dependencies on other files)
True if the depth of Term is Depth. The depth of atomic terms is zero; the depth of a compound term is one plus the maximium depth of its sub-terms.
static
depth(Term, Depth)
depth(@term, ?integer) – zero_or_one
True if the argument is ground.
static
ground(Term)
ground(@term) – zero_or_one
Creates a new term instance (if meaningful).
static
new(Term)
new(-nonvar) – zero_or_one
True if the variable occurs in the term.
static
occurs(Variable, Term)
occurs(@var, @term) – zero_or_one
The first term subsumes the second term.
static
subsumes(General, Specific)
subsumes(@term, @term) – zero_or_one
The first term is a subterm of the second term.
static
subterm(Subterm, Term)
subterm(?term, +term) – zero_or_more
Term is valid.
static
valid(Term)
valid(@nonvar) – zero_or_one
Each term is a variant of the other (i.e. they are structurally equivalent).
static
variant(Term1, Term2)
variant(@term, @term) – zero_or_one
Returns a list of all term variables.
static
vars(Term, List)
vars(@term, -list) – one
(none)
(none)