Lecture 12
Both natural and structural operational semantics are defined using a collection of syntax directed rules that allow us to deduce the behaviour of a composite program from that of its component subprograms. This type of semantic description has been pioneered by Gordon Plotkin, and is widely used in the semantics of programming and specification languages. For this reason, we shall spend some time on the analysis of the general form of these two semantics, and on pinpointing the proof techniques that they naturally support. To highlight the use of these proof techniques, we shall see how using operational semantics we can formally argue about equivalence, and about desired properties of a programming language, e.g., that its programs are deterministic. A program is deterministic if the final result of its execution (if one exists) is completely determined by the initial state.
First the initialization statement S1 is executed in the start state. The truth value of the boolean condition b is then checked in the state resulting from the execution of S1. If b evaluates to true, then the execution terminates. Otherwise, the body S2 of the loop is executed. The truth value of the boolean condition b is then checked in the state resulting from the execution of S2. If b evaluates to true, then the execution terminates. Otherwise.....