[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
constraints order
From: |
Michel Levy |
Subject: |
constraints order |
Date: |
Fri, 18 Mar 2005 11:13:50 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 |
I do not understand why these two requests have different answers :
| ?- X #\=Y, X #=Y.
X = _#2(0..268435455)
Y = _#21(0..268435455)
| ?- X #=Y, X #\= Y.
no.
This contradicts the assumption that the order of the constraints is
unimportant.
Furthemore, in the official documentation, I read :
fd_all_different(List) constrains all variables in List to take distinct
values. This is equivalent to posting an inequality constraint for each
pair of variables.
But this equivalence is no true :
| ?- X #=Y, fd_all_different([X,Y]).
X = _#0(0..268435455)
Y = _#0(0..268435455)
yes
Can you explain me the difference ?
--
Michel Levy
Laboratoire L.S.R., Bureau C214, B.P.72 - 38042 SAINT MARTIN D'HERES CEDEX
e.mail : address@hidden tel :(33)476514022
http://www-lsr.imag.fr/users/Michel.Levy
- constraints order,
Michel Levy <=