Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!wuarchive!rice!titan.rice.edu!rama From: rama@titan.rice.edu (Ramarao Kanneganti) Newsgroups: comp.lang.functional Subject: Re: Intermediate Codes for Functional Languages Message-ID: <1990Dec20.190014.20982@rice.edu> Date: 20 Dec 90 19:00:14 GMT References: <5477@rex.cs.tulane.edu> <1990Dec18.174225.27885@rice.edu> <5487@rex.cs.tulane.edu> Sender: news@rice.edu (News) Organization: Rice University, Houston Lines: 45 In article <5487@rex.cs.tulane.edu> fs@caesar.cs.tulane.edu (Frank Silbermann) writes: > >Aside from a desire to avoid unnecessary complexity, >what are some of the advantages of using a domain >that contains only those elements which can be denoted from the language? >(I ask this because sometimes adding extra elements >can make some aspects simpler -- just as judicious use >of "don't cares" can simplify manufacture of a logic gate.) The disadvantage I am aware of is: The equalities that hold in the operational world do not hold in the denotational model. That is, if you are using the denotational model to prove equalities between two terms, even if they are unequal, you may not be able to conclude that they are operationally unequal. Ex: In the standard continuous model for functions in a sequential language: F_i = \f. if (f bot true) if (f true bot) if (not (f false false)) then i else bot Operationally F_1 and F_2 are equal. They always diverge. However, denotations of F_1 and F_2 are not equal. One of the "extra" elements in the domain, i.e. parallel-or make F_i converge to i. A similar example can be manufactured in case of "strict" cons also. > >Will the advantages still hold, even when other constructors >(i.e function abstraction) _do_ result in extra domain elements? > > Frank Silbermann fs@cs.tulane.edu > Tulane University New Orleans, Louisianna USA By this, I assume that through some other constructor, you are able to create the "extra" domain elements that have been left out in the domain. In this case, unless you use types to identify the exact subdomain you are working with, I do not see the same disadvantage. Eg: Introducing parallel-or as a a member of function type. If you do not prohibit parallel-or being used as a function, the above example would not create any problem. Regards, Rama