Re: Narrowing: yes or no? [was Re: Narrowing vs. rewriting]
Michael wrote
> I agree that main parts of applications (like the one cited by
> John Lloyd) do not use logical variables everywhere, but, if they occur,
> we have to give an answer how to deal with them. Narrowing is
> one possibility, explicit rewrite rules for Booleans another.
> However, narrowing is better understood and easy to implement
> (note that the rewrite rules of Escher are not function definitions
> like in the Haskell). Moreover, the non-determinism in narrowing
> is equally present in the rewrite rules for Booleans, as I showed
> in my initial "narrowing vs. rewriting" email. Thus, narrowing
> is not more complicated than rewriting.
> > So, what is the purpose of Curry? Initially, I remember, it was meant
> > to provide a common language for the people working on integration: to
> > compare implementations, avoid long introduction of syntax in talks,
> > support cross-fertilization, share code etc. Do we still agree that
> > this is the purpose of the language?
>
> I still agree on this motivation. I would like to add that
> Curry should be also a common basis to teach FP and LP
> in a single course. Thus, if we abandon narrowing at this stage
> (even if some people will not use it in their applications),
> we loose this goal since people working on narrowing will
> still work on their own languages.
Yes, this is a good point. As I think that especially the outer frame
of a typical application does not make any use of nondeterminism (but
usually mainly consists of IO-monad expressions etc.) it is too be
expected that nondeterminism will only occur in some inner
computations -- probably strongly localized.
It should be as easy as possible to control the determinism of
function definitions. To be honest, I am not yet convinced that the
evaluation annotations are optimal in this respect. Like the
definitional trees, they may be nice to define a semantics or as an
intermediate representation in a compiler, but are probably to verbose
for a programmer. Maybe it would be interesting to see whether
something like the determinism declarations of Mercury are feasible
for Curry.
Manuel
Received on Fr Jul 11 1997 - 08:32:00 CEST
This archive was generated by hypermail 2.3.0
: Do Jun 20 2024 - 07:15:05 CEST