Re: [eclipse-clp-users] more doubts about sets....

From: Joachim Schimpf <jschimpf_at_coninfer.com>
Date: Wed, 09 May 2012 13:00:56 +0200
Claudio Cesar de Sá wrote:
> Dear Sirs..
> 
> The code below was working....
> At moment, a error is given by:
> 
> calling an undefined procedure fd_sets : 364 #= _1063 + _1399 in module 
> eclipse
> 
> probably a error from this line:
>     fd_sets:W3 #= W1+W2,

There are actually two problems here, one syntactic and one semantic.

The syntactic one is that : binds stronger than #=, therefore you
need parentheses and should have written

     fd_sets:(W3 #= W1+W2),

because W3 #= W1+W2 is the constraint, and you are qualifying it
with fd_sets:...


The other problem is that #= is the constraint "equality between
integer expressions", which is provided by module fd (or ic),
not fd_sets (or ic_sets).  So you should write either

     fd:(W3 #= W1+W2),

or alternatively add a

     :- lib(fd).

at the beginning, and use the constraint without solver qualification:

     W3 #= W1+W2,


Cheers,
Joachim
Received on Wed May 09 2012 - 11:01:06 CEST

This archive was generated by hypermail 2.2.0 : Fri May 11 2012 - 06:14:10 CEST