The intention of this chapter is to present a notation for specifying programs to be written later in imperative programming languages such as PASCAL, C, MODULA, ADA, BASIC, or even in assembly code. Put together, the elements of this notation form a very simple pseudo-programming language.
The pseudo-programs that we shall write using this notation will not be executed on a computer nor, a fortiori, be submitted to any kind of tests. Rather, and more importantly, they will be able to be submitted to a mathematical analysis and this will be made possible because each construct of the notation receives a precise axiomatic definition. For doing so, we shall use the technique of the weakest pre-condition as introduced by Dijkstra.
The notation contains a number of constructs that look like the ones encountered in every imperative programming language, namely assignment and conditionals. But it also contains unusual features such as pre-condition, multiple assignment, bounded choice, guard, and even unbounded choice, which are very important for specifying and designing programs although, and probably because, they are not always executable or even implementable.
Although it might seem strange at first glance, the notation does not contain any form of sequencing or loop. Yet the use of such features forms the basis of any decent imperative program. The reason for not having these constructs here is that our problem is not, for the moment, that of writing programs, rather it is that of specifying them: sequencing and loop certainly pertain to the how domain which characterizes programs, but not to the what domain which characterizes specifications.