Book contents
- Frontmatter
- Contents
- To the Reader
- 1 The Basics of Interpretation
- 2 Lisp, 1, 2, … ω
- 3 Escape & Return: Continuations
- 4 Assignment and Side Effects
- 5 Denotational Semantics
- 6 Fast Interpretation
- 7 Compilation
- 8 Evaluation & Reflection
- 9 Macros: Their Use & Abuse
- 10 Compiling into C
- 11 Essence of an Object System
- Answers to Exercises
- Bibliography
- Index
5 - Denotational Semantics
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- To the Reader
- 1 The Basics of Interpretation
- 2 Lisp, 1, 2, … ω
- 3 Escape & Return: Continuations
- 4 Assignment and Side Effects
- 5 Denotational Semantics
- 6 Fast Interpretation
- 7 Compilation
- 8 Evaluation & Reflection
- 9 Macros: Their Use & Abuse
- 10 Compiling into C
- 11 Essence of an Object System
- Answers to Exercises
- Bibliography
- Index
Summary
After a brief review of λ-calculus, this chapter unveils denotational semantics in much of its glory. It introduces a new definition of Lisp—this time a denotational one—differing little from that of the preceding interpreter but this time associating each program with its meaning in the form of a respectable mathematical object: a term from λ-calculus.
What exactly is a program? A program is the description of a computing procedure that aims at a particular result or effect.
We often confuse a program with its executable incarnations on this or that machine; likewise, we sometimes treat the file containing the physical form of a program as its definition, though strictly speaking, we should keep these distinct.
A program is expressed in a language; the definition of a language gives a meaning to every program that can be expressed by means of that language. The meaning of a program is not merely the value that the program produces during execution since execution may entail reading or interacting with the exterior world in ways that we cannot know in advance. In fact, the meaning of a program is a much more fundamental property, its very essence.
The meaning of a program should be a mathematical object that can be manipulated. We'll judge as sound any transformation of a program, such as, for example, the transformation by boxes that we looked at earlier [see p. 115], if such a transformation is based on a demonstration that it preserves the meaning of every program to which it is applied.
- Type
- Chapter
- Information
- Lisp in Small Pieces , pp. 147 - 182Publisher: Cambridge University PressPrint publication year: 1996