9
9
Axiomatic semantics
.1 OVERVIEW
As introduced in chapter 4, the axiomatic method expresses the semantics of a r p programming language by associating with the language a mathematical theory fo roving properties of programs written in that language. s s The contrast with denotational semantics is interesting. The denotational method, a tudied in previous chapters, associates a denotation with every programming language
- construct. In other words, it provides a model for the language.
This model, a collection of mathematical objects, is very abstract; but it is a model.
- As with all explicit specifications, there is a risk of overspecification: when you choose
ne among several possible models of a system, you risk including irrelevant details. y a Some of the specifications of chapters 6 and 7 indeed appear as just one possibilit mong others. For example, the technique used to model block structure (chapter 7) looks s w very much like the corresponding implementation techniques (stack-based allocation). Thi as intended to make the model clear and realistic; but we may suspect that other, m equally acceptable models could have been selected, and that the denotational model is
- re an abstract implementation than a pure specification.
e a The axiomatic method is immune from such criticism. It does not attempt to provid n explicit model of a programming language by attaching an explicit meaning to every e p construct. Instead, it defines proof rules which make it possible to reason about th roperties of programs.