The most sensible definitions I can come up with are
isUndefined(Atom) :- call_delays(Atom, Delays), Delays \== true.
isTrue(Atom) :- call_delays(Atom, true).
isFalse(Atom) :- \+ isTrue(Atom).
That works fairly well, except that isFalse/1 requires a ground argument to avoid floundering. You need constructive negation. sCASP can do that. Still learning, I tried. sCASP on
q(1).
r(3).
p(X) :- r(X), not p(X).
p(X) :- q(X).
gives “no models” on every query though because our knowledge base is inconsistent. If we delete the inconsistent first clause for p/1 we get
?- not p(X).
MODEL:
{ not q(X | {X \= 1}), not p(X | {X \= 1}) }
BINDINGS:
X \= 1 ?
Trying to get my head around the advantages and disadvantages of WFS, ASP and sCASP …