File "cyclic"

While the Dogelog Player Prolog system can meanwhile deal with cyclic terms in its binary predicates such as (=)/2, (==)/2, etc.. and in its unary predicates such as copy_term/2, term_variables/2, etc.. it appears nevertheless necessary to have additional predicates such as acyclic_term/1 and map_compact/2 to detect respectively produce acyclic terms.

The following cyclic predicates are provided:

unify_with_occurs_check(S, T): [ISO 8.2.2]
The built-in succeeds when the Prolog terms S and T unify with occurs check, otherwise the built-in fails.
occurs_check(S, T): [ISO 7.3.3]
The built-in succeeds when the Prolog variable S occurs in the Prolog term T, otherwise the built-in fails.
acyclic_term(T): [TC2 8.3.11]
The predicate succeeds when the Prolog term T is an acyclic term, otherwise the built-in fails.
term_minimal(X, T):
The predicate succeeds in T with a minimized identical replica of the term X. Knuth Algorithm E with (==)/2 and not showing loops.
term_decompose(X, T):
The predicate succeeds in T with an acyclic representation of the term X. Knuth Algorithm E with same_term/2 and showing loops.
map_compact(L, R):
The predicate succeeds in R with the portrayed, decomposed and compacted substitution list L. Portraying provides both minimization and user-friendly forms.