users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FD solver confusion (on my part)


From: Conrad Scott
Subject: FD solver confusion (on my part)
Date: Sun, 18 Jul 2004 14:14:09 +0100

Dear users-prolog list,

I've just started using GNU Prolog, in particular its FD solver sub-system, so I'm not an expert at either and this is my first post to the list. I'm a bit confused about the way the constraints solver works. For example, if I make the following query I get what I expect:

        | ?- A#=B,fd_domain([A,B],0,1),fd_labeling([A,B]).

        A = 0
        B = 0 ? a

        A = 1
        B = 1

        yes

But if I re-order the query as follows I'm a little surprised at the result:

        | ?- fd_domain([A,B],0,1),A#=B,fd_labeling([A,B]).

        A = 0
        B = 0 ? a

        A = 1
        B = 0

        yes

I assume that this is a problem of my understanding (rather than a bug), so can someone point out why the results differ (or point me to some applicable documentation, by preference in English, but in French if that's the best information).

Thanks in advance,

Conrad





reply via email to

[Prev in Thread] Current Thread [Next in Thread]