Re: Proposal for syntax changes in Curry

From: Sven Panne <Sven.Panne_at_informatik.uni-muenchen.de>
Date: Fri, 23 Oct 1998 15:39:18 +0200

Wolfgang Lux wrote:
> Sven Panne wrote:
> > [...]
> > foo eval flex
> > foo 1 = {}
> > foo 9 = {}
>
> But the semantics clearly indicate the sources of non-determinism. In
> your example the non-determinism stems from the overlapping rules in
> the definition of foo. [...]

Huh? foo's rules are *not* overlapping (unless 1 unifies with 9 :-).

> In my example, nothing is non-deterministic in the definition of
> g x = x =:= 1
> itself. The whole program becomes non-deterministic however, due to the
> (IMHO totally unrelated) *change of semantics* in the function h.

My point was only: It's not sufficient to look at the rules of a single
function alone to conclude if it has a single solution or not. You
can't do something similar in Prolog, neither. In Mercury the programmer
has to state such a property explicitly.

-- 
Sven Panne                                        Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik                     FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen              Oettingenstr. 67
mailto:sven.panne_at_informatik.uni-muenchen.de            D-80538 Muenchen
http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne
Received on Fr Okt 23 1998 - 16:44:00 CEST

This archive was generated by hypermail 2.3.0 : Do Mär 28 2024 - 07:15:05 CET