Michael Kifer - 2021-07-15



<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style id="bidiui-paragraph-margins" type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>


Teri,


this looks like a bug in incremental tabling, as executing
abolish_all tables gives the right answer to p(1) in this case.








On 7/14/21 5:45 PM, Christophe Rey
wrote:




[bugs:#250] unexpected answer with well founded semantics

Status: open
Group: wrong answer
Created: Wed Jul 14, 2021 09:45 PM UTC by Christophe Rey
Last Updated: Wed Jul 14, 2021 09:45 PM UTC
Owner: nobody

Hi all,
I have some unexpected results on a test program related to well founded semantics. The program is the following:

:- 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). 

The execution is:

| ?- p(1).

no
| ?- increval:incr_retract(q(1)).

yes
| ?- p(1).

undefined
| ?- increval:incr_assert(q(1)).

yes
| ?- p(1).

undefined

It is the last answer that is unexpected for me (since I thought it would be "no" as for the first query). Do I miss something? I am using XSB 4.0 under Windows.

Best regards

Christophe


Sent from sourceforge.net because you indicated interest in <https://sourceforge.net/p/xsb/bugs/250/>

To unsubscribe from further messages, please visit <https://sourceforge.net/auth/subscriptions/>




 

Related

Bugs: #250