Re: Language changes: Committed choice

From: Herbert Kuchen <kuchen_at_uni-muenster.de>
Date: Wed, 28 Oct 1998 08:58:11 +0000

Michael Hanus wrote:

> Wolfgang Lux proposed the following evaluation annotation:
> > E.g. the non-deterministic merge function could be implemented as
> >
> > merge eval choice
> > merge [] l2 = l2
> > merge l1 [] = l1
> > merge (e:r) l2 = e : merge r l2
> > merge l1 (e:r) = e : merge l1 r

> Evaluate this function call as usual (with a fair evaluation of
> alternatives) but
> - do not bind variables occurring in this call
> - ignore all alternatives if one rule matches and its guard is
> entailed (i.e., satisfiable without binding goal variables)
>
> The first restriction is similar to the rigid annotation
> but requires a rigid evaluation also for all subcalls
> (as in the current "choice"). It contains Wolfgang's proposal
> as a special case and answers the unclear topics.
> I think with this proposal we have the same power as with
> the old "choice" but avoid the special syntax and scoping
> rules in the "choice".

I discussed this proposal with Wolfgang, and we agree with
it. It is indeed nice that it subsumes the old choice from the
point of view of expressivity (in particular Frank Steiner's
"one" example could be handled) while it does not reduce laziness.

Originally, we were not not thinking of deep guards, since
the implementation would be simpler then. But after some
discussion, we have some ideas how to implement the new
committed choice. Thus, it should not introduce serious
problems.

Best,

Herbert
Received on Wed Oct 28 1998 - 09:05:00 CET

This archive was generated by hypermail 2.3.0 : Fri Sep 20 2019 - 07:15:05 CEST