bug on OS.X

Noé Lutz <[email protected]>
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
Hi there,

We discovered a bug in gnu prolog 1.2.16 running on OS.X 10.3:

Darwin applepie 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov  7 16:06:51
PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC  Power Macintosh
powerpc

We installed gprolog from a binary distribution, but we simply can't
remember where we got it... sorry.
This code does not produce the expected result, namely add the
constraint that the difference between X and Y is bigger or equal N:

CODE:
apart(X,Y,N) :-
        Y+N #=< X.
apart(X,Y,N) :-
        X+N #=< Y.


EXECUTION:
fd_domain([X,Y],0,5), apart(X,Y,3), fd_labeling([X,Y]).

We expect the following result (obtained on a windows machine)
X = 3
Y = 0 ? a

X = 4
Y = 0

X = 4
Y = 1

X = 5
Y = 0

X = 5
Y = 1

X = 5
Y = 2

X = 0
Y = 3

X = 0
Y = 4

X = 0
Y = 5

X = 1
Y = 4

X = 1
Y = 5

X = 2
Y = 5

... but we got this instead:

X = 3
Y = 0 ? a

X = 4
Y = 0

X = 5
Y = 0

Thanks
Yerly & Noé

-- 
-lll-
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.