:- module(tests_on_builtins, []). :- use_module(library(lists)). :- use_module(library(iso_ext)). test_queries_on_builtins :- \+ atom(_), atom(a), \+ atom("string"), atom([]), \+ atom(1), \+ atom(0), \+ atom(0.0), \+ atom([a,b,c]), \+ atom(atop(the_trees)), \+ atomic(_), atomic(a), atomic("string"), atomic([]), atomic(1), atomic(0), atomic(0.0), \+ atomic([a,b,c]), \+ atomic(atop(the_trees)), \+ \+ findall(X, ( var(X), X = 3, atomic(X) ), [3]), \+ ( var(X), X = 3, var(X) ), arg(1, f(a,b,c,d), a), arg(2, f(a,b,c,d), b), arg(3, f(a,b,c,d), c), arg(4, f(a,b,c,d), d), catch(arg(_, f, _), error(instantiation_error, _), true), \+ arg(1, f(arg, not_arg, not_arg), not_arg), arg(2, f(arg, not_arg, not_arg), not_arg), arg(3, f(arg, not_arg, not_arg), not_arg), functor(f(a,b,c), f, 3), catch(functor(_,"sdf",3),error(type_error(atom,[s,d,f]),_),true), f(1,2,3) =.. [f,1,2,3], length([a,b,c], 3), \+ \+ copy_term([[[[X,Y],Y],X]],[[[[Z,V],V],Z]]), \+ ( X = g(X,Y), Y = f(X), copy_term(Y,g(Z)) ), float(3.14159269), \+ float(3), \+ float("sdfsa"), \+ float(structure(functor)), \+ float([1,2,3]), \+ float([1,2,_]), \+ (X is 3 rdiv 4, float(X)), \+ \+ (X is 3 rdiv 4, rational(X)), \+ rational(3), \+ rational(f(_)), \+ rational("sdfa"), \+ rational(atom), \+ rational(structure(f)), \+ rational([1,2,3]), \+ rational([1,2,_]), compound(functor(compound)), compound(f(_)), compound([1,2,3]), \+ compound([]), \+ compound(3.14159269), \+ compound(3), \+ compound("sdfsa"), \+ compound(atom), \+ string(functor(string)), \+ string(3.14159269), \+ string(3), \+ string(f(X)), string("sdfsa"), \+ string(atom), \+ string([1,2,3]), \+ string([1,2,X]), \+ \+ ( X = nonvar, nonvar(X) ), \+ nonvar(X), \+ \+ nonvar(f(X)), nonvar(functor(nonvar)), nonvar(3.14159269), nonvar(3), nonvar("sdfsa"), nonvar(atom), nonvar([1,2,3]), \+ \+ nonvar([1,2,X]), \+ \+ (A = f(A), ground(f(f(A))),ground(f(A)),ground(A)), \+ (B = f(A),ground(B)), \+ (B = f(A),ground(A)), \+ \+ ( ground(x),ground(f(x)),X = f(x),ground(g(f(X),[a,b])) ), \+ \+ (A = f(A),g(A,B) == g(f(A),B)), \+ (A = f(A),g(A,B) == g(f(A),b)), \+ (A == B), \+ (A == 12.1), \+ \+ (X = x,f(X,x) == f(x,X)), \+ (A = f(A),g(A,B) \== g(f(A),B)), \+ \+ (A = f(A),g(A,B) \== g(f(A),b)), \+ \+ (A \== B), \+ \+ (A \== 12.1), \+ (X = x,f(X,x) \== f(x,X)), \+ \+ (X @=< Y), \+ (X @>= Y), \+ (X @> Y), \+ \+ (X @>= X), \+ (atom @=< "string"), \+ \+ (atom @=< atom), \+ (atom @=< aaa), \+ \+ (atom @>= "string"), \+ \+ (X is 3 + 3,X @>= Y), \+ \+ (f(X) @>= f(X)), \+ \+ (f(X) @>= a), \+ (f(X) @=< a), [1,2] @=< [1,2], \+ ([1,2,3] @=< [1,2]), \+ \+ ([] @=< [1,2]), \+ ([] @< 1), \+ ([] @< "string"), \+ ([] @< atom), atom @< [], 1.1 @< 1, 1.0 @=< 1, 1 @=< 1.0, \+ \+ (variant(X, Y)), \+ (variant(f(X), f(x))), \+ \+ (variant(X, X)), \+ \+ (variant(f(x), f(x))), \+ (variant([X,Y,Z], [V,W,V])), \+ \+ (variant([X,Y,Z], [V,W,Z])), \+ \+ (variant([X,Y,X], [V,W,V])), \+ \+ (g(B) = B, g(A) = A, variant(A, B)), keysort([1-1,1-1],[1-1,1-1]), \+ \+ findall(Sorted, keysort([2-99,1-a,3-f(_),1-z,1-a,2-44],Sorted), [[1-a,1-z,1-a,2-99,2-44,3-f(_)]]), \+ \+ findall(X, keysort([X-1,1-1],[2-1,1-1]), [2]). :- initialization(test_queries_on_builtins).