Hi,
Ok, got it working with:
:- use_package(clpfd).
:- op(700, xfx, ins). [] ins R. [X|Y] ins R :- clpfd_rt:(X in R), Y ins R.
I now have:
?- [X,Y] ins 9..10, label([X,Y]).
X = 9, Y = 9 ? ;
Etc..
Great!
Bye
remy(a)clip.dia.fi.upm.es schrieb:
Dear Jan,
The module fd_term is exported by the package clpfd but should not. Then the predicate in/2 from fd_term conflicts with the one of clpfd_rt.
To correct the bug, just comment the following line (line 41) in ciao/contrib/clpfd/clpfd.pl :- use_module(library(clpfd(fd_term))).
You can also work around by explicitly qualify the in/2 predicate.
[] ins R. [X|Y] ins R :- clpfd_rt:in(X, R), Y ins R. ?- use_package(clpfd). yes ?- [X,Y] ins 9..10, label([X,Y]). X = 9, Y = 9 ? yesRegards,
Remy
Dear All,
I am consulting a Prolog text with:
:- use_package(clpfd). :- op(700, xfx, ins). [] ins R. [X|Y] ins R :- X in R, Y ins R.But it doesn't work as expected:
?- [X,Y] ins 9..10, label([X,Y]). noPossible to make it work?
Bye
Ciao-users mailing list Ciao-users(a)clip.dia.fi.upm.es http://clip.dia.fi.upm.es/cgi-bin/mailman/listinfo/ciao-users