Re: FD solver confusion (on my part)
Mayuresh <[email protected]>
| Newsgroups | gmane.comp.gnu.prolog.general |
|---|---|
| Message-ID | <1090241109.2002.19.camel@TCS023077> |
I'm using gprolog 1.2.16 and got the same (correct) results both ways. On Sun, 2004-07-18 at 18:44, Conrad Scott wrote: > 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 > > > > _______________________________________________ > Users-prolog mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/users-prolog