[eclipse-clp-users] Unexpected behaviour, may this be a bug ?

From: \ luke2k4_at_gmail.com <luke2k4_at_gmail.com>
Date: Sun, 9 May 2010 15:20:12 +0200
Hi  All,
I've recently spent a lot of time to understand why my solver failed to
instatniate the cost function during minimization, and finally I got to the
bottom of the problem which I've broken down to a simple example ( see code
below ). Can somebody please explain why this is happening ? I think that
this may be a bug in the eclipse engine.

I am using Eclipse 6.0 #90

Best regards

%------------CODE EXAMPLE BEGINNING------------%
:- lib(ic).

%this does tot work as I assume it should
    ic:(C =:= B * 2),
    B = 3,

    %after the execution of the above lines C should be instatntiated to 6
but it is NOT! the constraint does not wake after the instatntiation of B to
3, can somebody explain why ? this seems to be the fault of the arithmetic
test after the unification
    writeln(ic:(C =:= B * 2)).

%if I comment out the arithmetic test everything is ok , C is 6 at the end
    ic:(C =:= B * 2),
    B = 3,
    writeln(ic:(C =:= B * 2)).

%or if I use a constraint to instantiate B instead of unification , C is 6
at the end
    ic:(C =:= B * 2),
    B #= 3,
    writeln(ic:(C =:= B * 2)).
%------------CODE EXAMPLE END------------%
Received on Sun May 09 2010 - 13:20:19 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET