Abstract
In Milner's seminal book on communication and concurrency introducing CCS, a process algebra inherently non-deterministic, chapter 11 was completely devoted to introduce the notion of determinacy and confluence in order to identify a subcalculus of CCS in which all definable agents are confluent. At the same time, or shortly later, determinate semantics were given for programming languages that reconcile concurrency and determinacy, such as Esterel by Berry and Gonthier, or SL by Boussinot and de Simone. These dedicated semantics do not easily map to Milner's confluence theory for CCS, which is unable to express causality and shared memory multi-threading with reaction to absence in a compositional way. This working paper presents an extension of CCS with priority-guarded actions and clocks. We exploit the added expressiveness to enrich Milner's original notion of confluence by the new concept of coherence which permits us to encode, in a compositional fashion, synchronous programming languages such as Esterel. Determinacy with Weak Priorities and Clocks However, all components R 1 , S , and R 2 of P are strongly confluent. Hence, like determinacy, strong confluence is not closed under parallel composition. On the other hand, P is weakly confluent (i.e., modulo ≈) and converges weakly to the normal form (a.0 | S | b.0) \ r. Milner [13] (Prop. 17, Chap 11.4) shows that weak confluence is preserved by confluent composition P | L Q def = (P | Q) \ L, combining the parallel and restriction operator, where L is a set of restricted labels, subject to the Separation Condition that L(P) ∩ L(Q) = {} and L(P) ∩ L(Q) = L ∪ L, where L(_) is the function calculating the sort of a process. The former condition says that P and Q operate on disjoint actions and the latter says that every possible communication between P and Q is restricted by L. This is a form of sort separation, ensuring that every action has at most one synchronisation partner either inside or outside of (P | Q) \ L. It may be the case that many practical examples of determinate systems can be understood as sortseparated compositions of confluent processes, for the right choice of coding scheme. For application to synchronous programming, however, stronger compositionality arguments are needed. For instance, replace the process S in our example by S = r.S + w.0 which models a simple write-once memory with read and write actions r and w, respectively. It permits multiple readers to synchronise on r, not changing its state, and a single writer on w, leading to termination. The process P = (R 1 | S | R 2 ) \ {r, w} is weakly confluent but falls outside of Milner's confluence class: Firstly, it violates the Separation Condition and secondly the subprocess S is not confluent. Milner's result [13] (Prop. 17, Chap. 11.4) does not help us to verify that shared memory multi-threading without data races, like P, is confluent. Memory processes that permit destructive update are firstly not confluent and, secondly, Milner's confluent composition forbids direct multi-cast communication, because labels such as r in S could not be shared by two readers R 1 , R 2 due to sort-separation. This means that concurrent programming languages that support shared memory and yet have determinate reduction semantics, cannot be handled. In a companion paper [10], we define CCS spt , a process algebra extending Milner's CCS with clocks and priorities on actions up-to clocks. This process algebra is able to capture multi-clock synchronous processes in a compositional way, defining the scheduling of the processes through priorities. As any process algebra, CCS spt is nondeterministic, but deterministic programs, like e.g., Esterel's ABRO [2] can be expressed in a compositionally elegant way. In this working paper, starting from a fragment of CCS spt with priority-guarded actions and a single clock, we define a new notion, coherence, that addresses the issues with the classical notions of determinacy and confluence mentioned above. It has the quite nice property that deterministic shared memory and reaction to absence, as used in synchronous programming, can be modelled. In short: CCS spt coherent expressions can set up a minimal, telescopic foundation for semantic of synchronous programming languages. We only consider a single clock in this paper for illustration and to set the scene for application in synchronous programming. Yet, even in the absence of clocks, the notion of coherence is a non-trivial extension of Milner's confluence theory.