test :- a, fail. test :- ( a -> writeln('a is true') ; writeln('a is false') ), ( b -> writeln('b is true') ; writeln('b is false') ), ( c -> writeln('c is true') ; writeln('c is false') ), ( d -> writeln('d is true') ; writeln('d is false') ), ( e -> writeln('e is true') ; writeln('e is false') ), ( f -> writeln('f is true') ; writeln('f is false') ). %-------------------------------------------------------------- :- table a/0, b/0, c/0, d/0, e/0, f/0. a :- b, d. b :- c. b. c :- b, f, c. d :- tnot(e). d :- c. d :- tnot(c). e :- c. f :- b.