Re: Bug detected in buggy GNU-Prolog
- From: Bart Demoen <bmd@xxxxxxxxxxxxxxxxx>
- Date: Thu, 18 May 2006 11:56:32 +0200
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
.
- Follow-Ups:
- Re: Bug detected in buggy GNU-Prolog
- From: Advait
- Re: Bug detected in buggy GNU-Prolog
- References:
- Bug detected in buggy GNU-Prolog
- From: Advait
- Bug detected in buggy GNU-Prolog
- Prev by Date: Bug detected in buggy GNU-Prolog
- Next by Date: Re: Meaning of ':' and '{}'
- Previous by thread: Bug detected in buggy GNU-Prolog
- Next by thread: Re: Bug detected in buggy GNU-Prolog
- Index(es):