Re: New PAKCS release (Version 1.8.0)

From: Francisco Javier López Fraguas <fraguas_at_sip.ucm.es>
Date: Tue, 10 Apr 2007 23:52:40 +0200

Bernd Brassel wrote:

>

> This I do not understand. Should "the system" not try to

> correspond to

> the report rather than vice versa?



You are right if you give absolute preference to the present status of the report.

What my example shows is that under non-determinism with call-time choice, eta expansion changes the

semantics. Therefore, what the report says and the implementations do (with respect to eta expansion)

should coincide. What to choose  is a decision  to take.



>And do you think the system should



> use eta expansion or not?





Spanish people are mostly against ETA, even more against ETA expansion!-)



More seriously, I'm glad with CRWL's HO intensional semantics  which does not assume eta expansion.

TOY's implementation corresponds to that intensional semantics and accordingly does


not perform eta expansion.




Good references for HO aspects of CRWL (including polymorphic types) are



_at_inproceedings{Gonzalez-MorenoHR97,

  author = {J. C. Gonz{\'a}lez-Moreno and
               Maria Teresa Hortal{\'a}-Gonz{\'a}lez and
               Mario Rodr\'{\i}guez-Artalejo},
  title = {A Higher Order Rewriting Logic for Functional Logic Programming.},
  booktitle = {ICLP},
  year = {1997},
  pages = {153-167},
}
  (Sorry, I cannot  give link to electronic version; maybe Juan Carlos Gonzalez can)




_at_article{Gonzalez-MorenoHR01,
  author = {Juan Carlos Gonz{\'a}lez-Moreno and
               Maria Teresa Hortal{\'a}-Gonz{\'a}lez and
               Mario Rodr\'{\i}guez-Artalejo},
  title = {Polymorphic Types in Functional Logic Programming.},
  journal = {Journal of Functional and Logic Programming},
  volume = {2001},
  number = {1},
  year = {2001},
}
}


Best,



Paco


----- Mensaje original -----
De: Bernd Brassel <bbr_at_informatik.uni-kiel.de>
Fecha: Viernes, Marzo 30, 2007 12:36 pm
Asunto: Re: [curry] New PAKCS release (Version 1.8.0)
A: Francisco Javier López Fraguas <fraguas_at_sip.ucm.es>
CC: mh_at_informatik.uni-kiel.de, Wolfgang Lux <wlux_at_uni-muenster.de>, curry_at_informatik.rwth-aachen.de

> Francisco Javier López Fraguas wrote:
> > Consider the program
> >
> > g  x = 0
> > h  x = 1
> >
> > fcoin = g
> > fcoin = h   % fcoin is a 'functional coin'
> >
> > fadd f g x = (f  x) + (g  x)
> > fdouble f = fadd f f
> >
> > Now consider the evaluation of (fdouble  fcoin 0)
> >  * Without eta expansion in the definition of  fcoin
> >    (fdouble fcoin 0) returns 0 and 2
> >  * With eta expansion in the definition of  fcoin,
> it returns 0,1 y 2
>
> Very nice example!
>
> > So, I strongly recommend to eliminate in the Curry report the
> paragraph> mentioned by Wolfgang. Otherwise the report will not
> correspond to the
> > behavior
> > of the system.
>
> This I do not understand. Should "the system" not try to
> correspond to
> the report rather than vice versa? And do you think the system should
> use eta expansion or not?
>
> Now concerning the HO patterns:
> > Wrt HO patterns, I will be glad if the FLP community adopt
> > more widely the CRWL approach for HO.
>
> Wolfgang Lux wrote
> >> It seems to
> >> me that introducing such patterns makes the functional type a data
> >> structure which can be enhanced with new constructors in each
> module.>
> > Sure, but I do not see your problem with that. One would
> consider every
> > function pattern as an element of a particular, potentially infinite
> > type. W.r.t. pattern matching this looks very similar to
> matching Int
> > or Float values to me.
>
> I think the following example is at least curious (Sorry that it
> is not
> Toy Syntax):
>
> module M1 where
> data A = A
>
> f A = A
>
> isF x case x of
>         f -> True
>         _ -> False
>
> test = let x free in isF x=:=False
>
> module M2
> import M1
>
> g A = A
>
> Now, importing just M1, the expression M1.test fails. Importing
> M2 also
> makes it succeed with [x/g]. I think it is curious that you
> should be
> able to manipulate the behaviour of modules from the outside
> like this.
> So I guess that you forbid '_' as a HO-Pattern? How about the
> extensionsto negation?
>
> Greetings
> Bernd
>

********************************
Francisco J. Lopez Fraguas
Dep. Sistemas Informaticos y Computacion
Fac. Informatica U. Complutense Madrid
Prof. Jose Garcia Santesmases s/n
28040 Madrid
Spain

fraguas_at_sip.ucm.es
Tel: +34 91 3947630
Fax: +34 91 3947529
********************************




_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Wed Apr 11 2007 - 11:57:19 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 18 2019 - 07:15:06 CEST