Thread View: comp.lang.functional
2 messages
2 total messages
Started by David Gudeman
Fri, 27 Jul 1990 17:59
Re: BOTTOM !== NONTERMINATION
Author: David Gudeman
Date: Fri, 27 Jul 1990 17:59
Date: Fri, 27 Jul 1990 17:59
51 lines
3093 bytes
3093 bytes
In article <3943@rex.cs.tulane.edu> fs@rex.cs.tulane.edu (Frank Silbermann) writes: > >If you incorporate the effects of the optimizations >into your denotational semantics, you might as well >just give an operational semantics instead. >Denotational semantics is a _functional_ notation >for _declaratively_ describing a language's constructs. I don't think you understand what I'm saying. I suggesting that (1) the denotational semantics are intended to give a rigorous mathematical meaning to a program. (2) it would be nice if the interpreter for the language was --in some sense-- an implementation of the semantics. (3) if you identify all error results together in the semantics, then the interpreter is _not_ an implementation of the semantics, because the interpreter (hopefully) produces informative messages on errors. So (4) the semantics should specify the information content of error messages. This is all fine a good, but there are a lot of optimizations that make it impossible to give informative error messages because information is lost during the course of the optimization. So are we to be left with an optimizing compiler that no longer implements the semantics? Well if you think formal semantics are important for the developement environment (the interpreter) then presumably you think it is good for the production code (the compiler). So, you either need a different semantics or you need to specify the semantic effect of an optimization. In general the _semantic_ effects of optimization involves no more than making some error results into less-defined error results. Some error results may be changed into "undefined". I'm not suggesting that you somehow specify the optimizations in the semantics, only that you specify the semantics of optimized programs. >If the words `declarative' and `functional' >don't ring a bell for you, I wonder why you are interested >in functional programming in the first place! I know what "declarative" and "functional" mean (as well as anyone). I don't think they are synonyms for "good". It is not possible to make a pure declarative language that is adequate for general-purpose programming. However, many of the notations and optimizations that come out of the functional language research are useful in their own right. I'm not religious about functional programming but I'm interested in it; so I guess the answer is that I'm not a member of the church, but I attend services on the off chance that it might be good for my soul. -- David Gudeman Department of Computer Science The University of Arizona gudeman@cs.arizona.edu Tucson, AZ 85721 noao!arizona!gudeman
Re: BOTTOM !== NONTERMINATION
Author: Frank Silbermann
Date: Fri, 27 Jul 1990 18:50
Date: Fri, 27 Jul 1990 18:50
35 lines
1816 bytes
1816 bytes
<23593@megaron.cs.arizona.edu> gudeman@cs.arizona.edu (David Gudeman): > I don't think you understand what I'm saying. > I suggesting that (1) the denotational semantics > are intended to give a rigorous mathematical meaning to a program. And, in the case of "functional" languages, to show just in what sense the language is functional (i.e. do the "function definitions" actually denote functions). > (2) it would be nice if the interpreter for the language was > --in some sense-- an implementation of the semantics. > (3) if you identify all error results together in the semantics, > then the interpreter is _not_ an implementation of the semantics, > because the interpreter (hopefully) produces informative > messages on errors. Depends on whether you consider these messages to be metalogical comments _about_ the interpretation, or whether error messages are considered to be _part of_ the interpretation, i.e. data that other parts of the program can use. > I know what "declarative" and "functional" mean (as well as anyone). > I don't think they are synonyms for "good". >... I'm not religious about functional programming > but I'm interested in it; so I guess the answer is that > I'm not a member of the church, but I attend services > on the off chance that it might be good for my soul. Well said! Frank Silbermann fs@rex.cs.tulane.edu Tulane University New Orleans, Louisianna USA
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads