Re: Language change proposal

From: Michael Hanus <hanus_at_margaux.informatik.rwth-aachen.de>
Date: Mon, 13 Jan 1997 16:22:48 +0100

Sergio Antoy wrote:
> How do we ensure "that only one solution exists"? Is this related
> to the "choice" operator? For instance, consider the example at
> page 14 of the December 5 draft. What is the value of, say
>
> merge [1,2] [3,4]
>
> and could the expression
>
> merge [1,2] [3,4] == merge [1,2] [3,4]
>
> fail (evalute to false)?

Yes, this could fail since the result of a concurrent computation
depends on the execution order. I would consider this as bad
programming style if the overall result depends in such a way
on the choice operator. I was thinking on a general technique
to select a solution out of a set of solutions (similar to
the encapsulated search operator proposed by Smolka in his
Oz system). The details for Curry are not yet worked out,
but this should be done in the near future. For instance,
if the best solution is selected or it is ensured that
a goal has only one solution, then choosing this solution
is a well-defined function. Of course, this cannot be
ensured by pure syntactic criteria. In general, you can loose
the completeness property of the operational semantics
by applying the choice operator. Therefore, this operator
should only be carefully used.

Best regards,

Michael
Received on Mon Jan 13 1997 - 16:41:39 CET

This archive was generated by hypermail 2.3.0 : Mon Nov 11 2019 - 07:15:05 CET