test :- a, fail.
test :- b, fail.
test :- c, fail.
test :-
	( a ->
	    ( tnot(a) -> writeln('a is undefined (OK)') ; writeln('a is true') )
	; writeln('a is false') ),
	( b ->
	    ( tnot(b) -> writeln('b is undefined (OK)') ; writeln('b is true') )
	; writeln('b is false') ),
	( c ->
	    ( tnot(c) -> writeln('c is undefined (OK)') ; writeln('c is true') )
	; writeln('c is false') ).

%--------------------------------------------------------------
% Example of a program that is non-stratified.
% Its well-founded model makes everything undefined.
% It has two stable models {a,b} and {c}
%--------------------------------------------------------------

:- table a/0, b/0, c/0.

a :- tnot(c).

b :- a.

c :- tnot(b).