Unexplained behaviour wrt the well founded semantics - Part 2

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

Thanks. Also fixed. The two problems were independent. I’ll explain to Teri and David what I think is wrong :slight_smile:

Please keep the discussion on the public forum. The “it will take some time” was not relevant to anyone except you. Could you validate the fix and update the status at the public forum?

Thank you very very much Jan. Your fixes have solved my problems.
Cheers !