SWI-Prolog has limited support for infinite trees, also known as cyclic terms. Full support requires special code in all builtin predicates that require recursive exploration of a term. The current version supports cycles terms in the pure Prolog kernel including the garbage collector and in the following predicates: =/2, ==/2, \==/2, \=/2, =@=/2, \=@=/2, @</2, @=</2, @>/2, @>=/2, compare/3, =../2, copy_term/2, duplicate_term/2, write/1, dif/2, when/2, term_variables/2, numbervars/[3,4], hash_term/2, recorda/3, recordz/3, findall/3, bagof/3, setof/3, throw/1.