Re: Bug detected in buggy GNU-Prolog



Advait wrote:
Hi,
Here is a bug


gprolog 1.2.16

Knowledege Base
p(X) :- a(X).
p(X) :- b(X),c(X),d(X),e(X).
p(X) :- f(X).
a(1).
b(1).
c(1).
b(2).
c(2).
d(2).
e(2).
f(3).
END Knowledge Base

For query
| ?- p(X).
responce should be
X = 1 ;
X = 2 ;
X = 3 ;
no

but gprolog-1.2.16 gives
X = 1 ? ;

X = 3



----------------
yours
Advait


It is not a bug, it is a feature :-)
The reason of this behaviour is that your clauses (gor b/1) are not grouped together.
It is not nice of GNU-Prolog not to warn you about that.

Cheers

Bart Demoen
.