Re: [eclipse-clp-users] CHR rule remains as delayed goal

From: Ulrich Scholz <wanderer_at_...190...>
Date: Mon, 4 Apr 2011 14:03:49 +0200
Thanks! Found the problem.

I use a findall construct to find all solutions.  It backtracks over the
creation of CHR rules, so at the end, the constraint store is empty again.

The delayd CHR rule is a base case that is set up during initialization.
Lately, I moved the initialization out of the findall, such that it was the
only rule that was "left over".

Now, the appliation "cleans up after itself" :-)

Best regards,

Ulrich
 



On Mon, Apr 04, 2011 at 12:05:08PM +0100, Kish Shen wrote:
> Hi Ulrich,
> 
> On 04/04/2011 10:25, Ulrich Scholz wrote:
> >Hi,
> >
> >I'm using the library ech as part of a larger application.  Of late, running
> >the application leaves a CHR rule as delayed goal:
> >
> >Delayed goals:
> >         types : typeCHR(0, 0, 0, 0, 0, 0, killed)
> >
> >That's the first time I see a CHR rule as delayed goal and otherwise, the
> >application seems to be correct.  Because I try to avoid leaving delayed
> >goals (or, e.g., leaving choice points behind) and I want to understand what
> >happens, I would like to know where and why this goal delays.
> >
> >But I have no clue.  Could you point me to some obvious starting points for
> >my search?
> 
> A CHR constraint that is still in the CHR constraint store at the
> end of the execution is shown as a delayed goal. This is not
> necessarily incorrect. If you don't expect any CHR constraint to be
> left in the store, then you need to look at your CHR code to see why
> the constraint was not removed by your CHR rules. Unfortunately
> lib(ech) does not currently provide much debugging facilities, so
> that when you trace the execution of the CHR code, you see the "raw"
> ECLiPSe code (generated by lib(ech) from transforming your source
> CHR code), which is not easy to follow or map back to your source
> code.
> 
> Cheers,
> 
> Kish
> 
> 
> -- 
> This e-mail may contain confidential and privileged material for the
> sole use of the intended recipient. Any review, use, distribution or
> disclosure by others is strictly prohibited. If you are not the intended
> recipient (or authorized to receive for the recipient), please contact
> the sender by reply e-mail and delete all copies of this message.
> Cisco Systems Limited (Company Number: 02558939), is registered in
> England and Wales with its registered office at 1 Callaghan Square,
> Cardiff, South Glamorgan CF10 5BT.
Received on Mon Apr 04 2011 - 12:04:02 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST