Re: prelude extension proposal

From: Bernd Brassel <bbr_at_informatik.uni-kiel.de>
Date: Tue, 11 Oct 2005 11:52:30 +0200

There is a subtle problem with your proposal, Sergio. With the definition

> allValuesOf e = findall (\x -> x=:=e)

There is a difference between

e1 = allValuesOf coin

and

e2 = findall (\x -> x=:=coin)

which depends on the implementation of encapsulated search as discussed
in [1]. The Münster Curry Compiler implements what was called in [1]
"weak encapsulation" which results in a non-deterministic branching for
the evaluation for e1 and a deterministic evaluation for e2:
e1 ~*~> 0 | 1
e2 ~*~> [0,1]
In PAKCS ("strong encapsulation") in contrast, allValuesOf will behave
like you expect, but resulting in different strangenesses for other
examples.

I think because of the implementation dependence, the definition should
not be in the prelude and we should rather think about introducing a
better approach to encapsulated search like the one proposed in [1].


[1] Huch, Hanus, Braßel - Encapsulating Non-Determinism in Functional
Logic Computations - WFLP 2004




_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mi Okt 12 2005 - 09:57:10 CEST

This archive was generated by hypermail 2.3.0 : Do Feb 01 2024 - 07:15:06 CET