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') ), ( g -> writeln('g is true') ; writeln('g is false') ), ( h -> writeln('h is true') ; writeln('h is false') ), ( i -> writeln('i is true') ; writeln('i is false') ), ( j -> writeln('j is true') ; writeln('j is false') ). %-------------------------------------------------------------- :- table a/0, b/0, c/0, d/0, e/0, g/0, h/0, i/0, j/0, f/0. a :- b, c, d. b :- e. b :- g. c :- h. c :- i. e :- b, f. h :- j. g. j :- tnot(e). d :- tnot(h). i. f :- fail.