Neither PAKCS nor MCC transform right sections according to the Curry report.

From: Sebastian Fischer <sebf_at_informatik.uni-kiel.de>
Date: Sat, 19 Feb 2011 13:02:03 +0900

Hello,

I thought that the difference between the expressions (=:= e) and (\x ->
x =:= e) is only observable in the context of encapsulated search but just
noticed that it is observable in ordinary Curry programs too (using both
PAKCS and MCC).

"Each right section (op expr) is transformed into the lambda abstraction
(\x->(op) x expr) where x is a new variable." [Report on Curry, page 82]

Therefore, a difference between the following two predicates should not be
observable:

    partial = (=:= coin)
    lambda = (\x -> x =:= coin)

The following function computes two solutions to a given predicate:

    twoSols p | p x & p y = (x,y)
     where x,y free

It can be used to observe a difference between 'partial' and 'lambda':

    cyi> twoSols partial
    (0,0)
    More solutions? [Y(es)/n(o)/a(ll)]
    (1,1)
    cyi> twoSols lambda
    (0,0)
    More solutions? [Y(es)/n(o)/a(ll)]
    (0,1)
    More solutions? [Y(es)/n(o)/a(ll)]
    (1,0)
    More solutions? [Y(es)/n(o)/a(ll)]
    (1,1)

It seems related to the 'fcoin' example of the Toy community [1] which lead
to removing the mention of eta-expansion from the Curry report. Is it a
known issue that neither PAKCS nor MCC conform to the Curry report regarding
right sections?

[1]: http://www.informatik.uni-kiel.de/~curry/listarchive/0499.html



_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Sa Feb 19 2011 - 18:57:53 CET

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