Re: Formal semantics of language semantics

"Lex Spoon" <lex@cc.gatech.edu>
29 Sep 2002 16:58:09 -0400

          From comp.compilers

Related articles
Formal semantics of language semantics j*lstnme*@uiuc.edu (Joe Hendrix) (2002-09-25)
Re: Formal semantics of language semantics loewis@informatik.hu-berlin.de (Martin v. =?iso-8859-1?q?L=F6wis?=) (2002-09-29)
Re: Formal semantics of language semantics nmm1@cus.cam.ac.uk (Nick Maclaren) (2002-09-29)
Re: Formal semantics of language semantics i.dittmer@fh-osnabrueck.de (Ingo Dittmer) (2002-09-29)
Re: Formal semantics of language semantics joachim_d@gmx.de (Joachim Durchholz) (2002-09-29)
Re: Formal semantics of language semantics stephen@dino.dnsalias.com (Stephen J. Bevan) (2002-09-29)
Re: Formal semantics of language semantics lex@cc.gatech.edu (Lex Spoon) (2002-09-29)
Re: Formal semantics of language semantics whopkins@alpha2.csd.uwm.edu (Mark) (2002-09-29)
Re: Formal semantics of language semantics nmm1@cus.cam.ac.uk (Nick Maclaren) (2002-10-13)
Re: Formal semantics of language semantics haberg@matematik.su.se (Hans Aberg) (2002-10-13)
Re: Formal semantics of language semantics scgupta@solomons.cs.uwm.edu (Satish C. Gupta) (2002-10-13)
Re: Formal semantics of language semantics lex@cc.gatech.edu (Lex Spoon) (2002-10-13)
Re: Formal semantics of language semantics anw@merlot.uucp (Dr A. N. Walker) (2002-10-18)
[10 later articles]
| List of all articles for this month |
From: "Lex Spoon" <lex@cc.gatech.edu>
Newsgroups: comp.compilers
Date: 29 Sep 2002 16:58:09 -0400
Organization: Georgia Institute of Technology
References: 02-09-149
Keywords: semantics
Posted-Date: 29 Sep 2002 16:58:09 EDT

"Joe Hendrix" <j*lstnme*@uiuc.edu> writes:


> Are there any notations commonly used to define the semantics of a
> programming language? (Similar to how BNF defines the syntax).
>
> Has there been much work on figuring out what the requirements for
> such a notation? This seems like it would be a relatively active area
> due to the current industry focus on common language runtimes, but I
> haven't found any good links in my brief google searches.




I found Benjamin Pierce's new book "Types and Programming Languages"
be an excellent introduction to specifying and using semantics, as
well as on types. It's aimed at a fairly low reading level, so that
you don't need a math degree to understand it.


I have no idea how well the methods in the book scale to larger, more
complicated programming languages. In industry, everyone seems to use
natural language most of the time. Then, if they really want a formal
sematics, then they may write one up in a theorem prover such as HOL.
These after-the-fact semantics are almost certainly horrendous to
read, though I admit I haven't even bothered to try. It's interesting
to consider what it wold be like if languages were formally specified
from the beginning.


On the other hand, it is common that formalizing an existing spec will
point out ambiguities or unintentional "features" of the language.
Someone (I forget who) formalized SML--a relatively clean
language!--and found several problems with it. It was the same fellow
who wrote an SML interpreter that didn't require static typing.




Lex Spoon


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.