Hemantha Ponnuru wrote: > Hi, > I have a problem understanding why the following piece of code doesn't > work. I am using eclipse 5.6 #42. > > use_module(library(conjunto)) . > Var::[1, 2, 3, 4], Tmp `:: {} .. {one, two, three}, > #(Tmp, 2), ((Var #= > 2) #=> (two in Tmp)), Var #= 2 . (fails) This is because lib(fd)'s logical constraint combinators (like #=>) understand only a fixed set of fd-constraints as arguments, and conjunto's in/2 constraint is not one of them (in fact, conjunto does not even implement any reified constraints). Both libraries, fd and conjunto, are no longer maintained because they are superseded by lib(ic) and lib(ic_sets) respectively. Using those new libraries, you can do what you want: ?- lib(ic), lib(ic_sets). Yes (1.26s cpu) ?- ic:(Var::[1, 2, 3, 4]), ic_sets:(Tmp::[]..[1, 2, 3]), #(Tmp, 2), Var #= 2 => 2 in Tmp, Var #= 2. Tmp = Tmp{[2] \/ ([] .. [1, 3]) : 2} Var = 2 Yes (0.00s cpu) -- Joachim Schimpf / phone: +44 20 7594 8187 IC-Parc / mailto:J.Schimpf@imperial.ac.uk Imperial College London / http://www.icparc.ic.ac.uk/eclipseReceived on Thu Aug 28 22:26:35 2003
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:25 PM GMT GMT