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

From: Joachim Schimpf <joachim.schimpf_at_...44...>
Date: Mon, 10 May 2010 12:10:43 +1000
 luke2k4_at_...6... wrote:
> 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
> Luke
> 
> %------------CODE EXAMPLE BEGINNING------------%
> :-module(main).
> :- lib(ic).
> 
> %this does tot work as I assume it should
> test1:-   
>     ic:(C =:= B * 2),
>     B = 3,
>     (9<3->true;true),   

Hi Luke,

you are absolutely right, it's a bug in the 6.0 compiler. I'm sorry you
have lost time with this, but many thanks for tracking it down so precisely.
It should be easy to fix, I'll let you know as soon as it's done.

The problem occurs when, like in your example, an inlined built-in
(=/2, arg/3, is/2 etc) occurs just before a disjunction, and causes waking.
You can work around this by using #= as you have done, or by inserting
a call to wake/0 just after the unification.

Cheers,
Joachim
Received on Mon May 10 2010 - 02:08:59 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST