# Cyclic terms handling

**Author(s):**Daniel Cabeza.

This module implements predicates related to cyclic terms. Cyclic (or infinite) terms are produced when unifying a variable with a term which contains that variable.

## Usage and interface

**Library usage:**`:- use_module(library(cyclic_terms)).`**Exports:***Predicates:*`cyclic_term/1`,`acyclic_term/1`,`uncycle_term/2`,`recycle_term/2`.

**Other modules used:***System library modules:*`lists`.

## Documentation on exports

PREDICATE

**Usage:** `uncycle_term(T,U)`

*Description:*Given a term T, U is a finite representation of T as an acyclic term. This representation can be converted back to T using`recycle_term/2`.

PREDICATE

**Usage:** `recycle_term(U,T)`

*Description:*Given U, a finite representation of a term as an acyclic term as`uncycle_term/2`produces, T is the represented term. U is modified by the predicate, thus to maintain it untouched`copy_term/2`should be used.