Hi Jan,
thanks for your reply. If that can help, I’ve found another example of the same kind:
Program:
:- table p/1 as incremental.
p(X) :- tnot(qs(X)), tnot(p(X)).
p(X) :- tnot(rs(X)), tnot(p(X)).
:- table qs/1 as incremental.
qs(X) :- q(X).
:- table rs/1 as incremental.
rs(X) :- q(X).
:- dynamic q/1 as incremental.
q(1).
and execution:
?- p(1).
false.
?- retract(q(1)).
true.
?- p(1).
% WFS residual program
p(1) :-
tnot(p(1)).
p(1).
?- assert(q(1)).
true.
?- p(1).
% WFS residual program
p(1) :-
tnot(p(1)).
p(1).
The last answer should be false I think.
By the way, the previous example works fine in XSB, but this new example (above) works the same in XSB as in SWI.
Hope it can help.
Christophe