Suppose we have the following program:
:- table p/0, q/0. p :- tnot(q). q :- tnot(p).
Notice that the following query prints
16 ?- p,write(hello). hello % WFS residual program p :- tnot(q). q :- tnot(p). p.
In other words, the predicate
p --even though it returns a
conditional answer-- is treated as if it
succeded. Is there any way to execute
write(hello) only if