Book contents
- Frontmatter
- Contents
- Preface
- 1 A modern approach to computing
- 2 Specifications I
- 3 Diagrams
- 4 Specifications II
- 5 PDL
- 6 Code generation
- 7 Verification
- 8 Examination of templates and target code
- 9 Abstract data types
- 10 The mathematical basis of abstract data types
- 11 Utilisation of existing programs
- 12 A small scale study – topological sorting
- Appendices
- References
- Index
8 - Examination of templates and target code
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Preface
- 1 A modern approach to computing
- 2 Specifications I
- 3 Diagrams
- 4 Specifications II
- 5 PDL
- 6 Code generation
- 7 Verification
- 8 Examination of templates and target code
- 9 Abstract data types
- 10 The mathematical basis of abstract data types
- 11 Utilisation of existing programs
- 12 A small scale study – topological sorting
- Appendices
- References
- Index
Summary
The purpose of this chapter is to caution the reader about straying from the templates given in Chapter 6; to explicitly state the semantic assumptions inherent in our basic PDL, and to highlight factors which must be checked when extending PDL or devising templates for target languages not mentioned in this text.
PDL is a very small language, having relatively few fundamental operations and processes. Moreover the semantics, the meanings, of these components relate directly and simply to corresponding features in implemented languages. Proper definition of programming language semantics is a non-trivial task and definitely far too involved to be adequately discussed here. However, since we want our programs to actually carry out computations, and not be purely static objects represented by symbols on paper or on a screen, we cannot totally avoid semantics; so what do we do?
Recall that an implementation of an operation is correct if all its required external characteristics are described by its specification. It would therefore be true to say that the semantics of the operation can be fully described/ defined by the inter-relationship between input/state and output/state of an appropriate specification. So what is the problem? The problem is that very few implementations of programming languages are defined adequately enough to enable us to use the definition in a formal way.
- Type
- Chapter
- Information
- Program Construction , pp. 217 - 226Publisher: Cambridge University PressPrint publication year: 1987