Review of Control Flow Semantics

I have to admit, I was looking forward to reviewing this book. It answered what was for me a 6-year old question. Six years ago, I was pursuing a Master’s degree at McGill Univ ersity. working on programming language semantics. My training in semantics was rather traditional: lambda cal culus, functional programming languages, denotational semantics based on complete partial orders, etc. At the time , Franck van Breugel was visiting McGill, and I came across the fact that Franck was also working on semantics of p rogramming languages, but on semantics based on metric spaces. For someone with an undergraduate background in mat he ics, this was seriously intriguing. Unfortunately, I never got around to asking Franck about his work. This book i s an answer to that question that never was. The purpose of the book is to describe an approach to provide s emantics to imperative languages with various types of control flow models, including concurrency. The approach handles both operational semantics and denotational semantics, all in a topological setting. (We will come back t o this later.) The issue of relating the two semantics for any given language is a central theme of the approach. I will p rovide in the next section an introduction to topological semantics. For now, let me say a word on the applicability of t he approach. As stated, the main interest is in providing semantics toimperative languages. Imperative programs can be thought of, for our pu rposes, as sequences of actions performed on a state. Typically, states are sets of variable s, and actions include modifying the value of a variable in a state. An important characteristic of imperative program s is that they embody the notion of a computation step: a program being a sequence of actions, it forces a sequence of i ntermediates states. Typically, the intermediate states areobservable, meaning that one can observe something about that intermed iate state, either by looking up the value of a variable, by witnessing an output operation, etc. When t intermediate states of a computation are observable, it becomes reasonable to talk about infinite (nonterminating) computations. (The classical example of this is of course an operating system, which at least theoretically is an infinit e process; the main motivation for the topological approach , as we shall see, is to make sense of such infinite computations .) Contrast this with functional languages, which are often used as motivating examples for the study of semantics . In a pure functional language, all infinite programs are equivalent, and in a traditional denotational semantic s based on partial orders (à la Scott and Strachey [6]), ever y nonterminating program is mapped to ? , the least element of the appropriate partial order. This is not helpful in a setting where we want to discuss observably different infini te behaviors. We distinguish two kinds of imperative languages. The disti nction between them is akin to the distinction between propositional and first-order logic. 1 Uniform languages are based on a primitive, abstract notion of action, combine d with appropriate operators. For instance, a program may hav e the forma; b; ; (d + a) where; represents sequential composition and+ a nondeterministic choice operator. The primitive actions a,b, ,d are uninterpreted. The state is implicitly defined by the actions that have been performed . On the other hand, nonuniform languages have an interpretation associated with the actions; typically, as we mentioned, the state is a set of variables, and actions inc lude modifying the value of a variable in a state. To showcase the versatility of their approach, the authors s tudy different languages. The main difference between the various languages, aside from the question of uniformit y, is theprogram composition operators considered. The following groups of related operators are studied: