Using the finite domain constraint solver of GNU Prolog version 1.2.16
on a Mac OS X 10.4.4 PPC machine the behaviour of fd_labeling/1
seems to be not correct with respect to constraints set up prior
using fd_labeling/1.

At least the behaviour is different if the sequence of goals is different
with respect to fd_labeling.

The following sequence of goals generates the expected answer:

| ?- fd_domain([X,Y],1,3),fd_labeling([X,Y]),fd_all_different([X,Y]).
X = 1
Y = 2 ? a

X = 1
Y = 3

X = 2
Y = 1

X = 2
Y = 3

X = 3
Y = 1

X = 3
Y = 2

(1 ms) no
| ?-

Changing the sequence of the two last goals not all
possible combinations of values for X and Y are generated.
Even more fatal: one combination is generated which
is forbidden by the constraint.

| ?- fd_domain([X,Y],1,3),fd_all_different([X,Y]),fd_labeling([X,Y]).

X = 1
Y = 2 ? a

X = 1
Y = 3

X = 2
Y = 3

X = 3
Y = 3

(1 ms) yes
| ?-

Markus Morawitz
[EMAIL PROTECTED]




_______________________________________________
Bug-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-prolog

Reply via email to