tests on infinite terms.

This commit is contained in:
Vítor Santos Costa 2019-01-24 19:08:10 +00:00
parent 93bb39d5f7
commit bfe5fc2f49

7
regression/cyclics.yap Normal file
View File

@ -0,0 +1,7 @@
:- X = [X], copy_term(X,Y), writeln(X), writeln(Y), fail.
:- X = [_|X], copy_term(X,Y), writeln(X), writeln(Y), fail.
:- X= f(X), copy_term(X,Y), writeln(X), writeln(Y), fail.
:- X= f(X,X), copy_term(X,Y), writeln(X), writeln(Y), fail.
:- X= f(_,X), copy_term(X,Y), writeln(X), writeln(Y), fail.
:- X= f(X,[X,X]), copy_term(X,Y), writeln(X), writeln(Y), fail.
:- X= f(X,[X,g(X)]), copy_term(X,Y), writeln(X), writeln(Y), fail.