Abstract
This is an in-depth study of the operational semantics of CSP and of the transition systems these are based on. We study the difference between finitely and infinitely branching transition systems, and between ordinary LTSs and ones where there may be acceptance or divergence information in additional labels on states. We show how CSP can be given an operational semantics in either the traditional Structured Operational Semantics (SOS) style or in a less flexible Combinator style that captures the spirit of CSP. We show what any operator with a combinator operational semantics can be expressed in CSP. Combinators lead to Supercombinators, the technique that FDR uses to implement transition systems effectively. Finally we show how formal “observations” of transition systems allow us to deduce what a process’s traces, failures and divergences are.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
In Chap. 18 we will give a semantics in CSP for another language, and give many of the details of how to handle run-time errors in that.
- 3.
We can relate these two ideas either by the type of congruence theorem discussed in this book or via the idea of testing equivalences [35].
- 4.
The concept of a trace-plus model will be defined on p. 272. It includes all the CSP models we have seen to date.
- 5.
The word “environment”, as used here, has an entirely different meaning to the idea of an environment that the process communicates with, discussed elsewhere.
- 6.
The μ p.P style of recursion is the only one we will deal with in this operational semantics, since a proper treatment of the more common style of using names in a script to represent (perhaps parameterised, and perhaps mutual) recursive processes requires the introduction of environments. The rule we are introducing here extends simply to that context: it is then the act of looking up a process identifier that generates a τ.
- 7.
FDR does not introduce τ actions of this sort because the only effect they have on well-constructed definitions is to increase the size of the state space. If you are using a tool where such actions are not introduced, the result is likely to be that an attempt to use a recursion like μ p.p will make the tool diverge. Thus, if you need to create a representation of div in such a tool where it is not built in as primitive, it is necessary to use a term like (μ p.a→p)\a or \(\mu p.P\mathrel{\mathord{\sqcap}}p\).
- 8.
As with the SOS treatment of prefix, we would be able to handle general prefix much more elegantly if we were to add environments that bind free identifiers to their values in the combinator operational semantics. In fact doing so would give an even clearer distinction between on and off arguments, as an on one must already have its environment and an off one need not. There would still be the choice of whether to show the environment explicitly in the semantic term. Of course if we did so then the appearance of all the operational semantic clauses would change. However, at least for the purpose of giving a semantics to CSP, we can use an implicit notation where it is assumed that the environment given to each newly turned-on argument is the same as the “input” one unless we state a modification explicitly. In this, we might write the rule for prefixing as
$$(\raisebox{1ex}{\_},a,(\mathbf{1},\mathit{subs}(e,a,\rho)))\quad [a\in\mathit {comms}(e)]$$In other words, we now treat prefixing as a unary operator and use subs(e,a,⋅) in a modified form on a conventional name ρ for the surrounding environment. In this style we could have two different infinitary forms of \(\mathop{\vcenter{\hbox{\Large $\mathstrut\mathrel{\mathord{\sqcap}}$}}}\nolimits\): one with an infinite set of processes, and the other with an infinite set of (perhaps tuples of) values to be substituted into the environment.
- 9.
At the time of writing it is proposed to add a function to FDR by which new operators can be described to it via combinator-style operational semantics.
- 10.
Many readers will notice that this is a slightly simplified version of the CCS operator |. Those familiar with that operator are welcome to represent it in CSP instead. In this, all events x have duals \(\protect\overline{x}\) (where \(\protect\overline {\protect\overline{x}}=x\)). The CCS operator | behaves just like the one described in this exercise except that x synchronises with \(\protect\overline{x}\) and not x.
CCS is not completely CSP-like in the sense described above because its + operator, an analogue both of \(\mathrel{\mathord{\Box}}\) and \(\mathrel{\mathord {\sqcap}}\), is resolved by the occurrence of τ. We know that no CSP-like operator can react to a τ in one of its arguments. It is possible to model CCS in CSP, as shown in [131], by treating τ as a visible event until a syntactic level above all + operators, and then hiding it. It is not possible to model CSP in CCS since the latter has no way of creating many-way synchronisations.
- 11.
In later chapters we will meet some models where the proof below does not apply exactly, because they replace traces with richer structures. A modified version of the above argument always applies in these cases, giving an appropriate analogue of this result.
- 12.
Structural induction is a technique for proving properties of objects in syntactically-defined sets such as the set of all CSP terms CSP. It says that if you can prove a property R of each term T of a syntax on the assumption that R holds of all the immediate sub-terms that T is built from (e.g., assuming it holds of P and Q to prove it holds of \(P\mathrel{\mathord{\Box}}Q\)) then R holds for all members of the syntax. Over most programming languages one can justify this principle easily, because structural induction is implied by ordinary mathematical induction over the size of programs. But a careful examination of what we allow as CSP terms reveals that this argument does not work here, since we have infinite mutual recursion as well as the infinitary constructs \(\mathop{\vcenter{\hbox{\Large$\mathstrut \mathrel{\mathord{\sqcap}}$}}}\nolimits S\) and ?x:A→P, meaning that there are terms with no finite ‘size’ in the ordinary sense. Structural induction can still be justified provided we assume that the syntax is well-founded, meaning that there is no infinite sequence of terms each of which is a sub-term of its predecessor. This means we cannot have terms like
$$a_1\rightarrow a_2\rightarrow\cdots\rightarrow a_i\rightarrow\cdots $$actually in the language, though there is nothing wrong with achieving the same effect using an infinite mutual recursion P i =a i →P i+1.
Well-foundedness corresponds to the natural assumption that the language generated by a syntax is the smallest set of terms which is closed under all the constructs of the syntax. This leads to a trivial proof of the principle of structural induction: the assumptions of that rule imply that the set of terms in the language that satisfy R is itself closed under all the constructs, and therefore contains the smallest set.
Readers with the necessary mathematical background might like to note that, in order to make the infinitary syntax of CSP well defined, it is necessary to put some bound on the size of sets that can have \(\mathop{\vcenter{\hbox{\Large$\mathstrut\mathrel{\mathord {\sqcap}}$}}}\nolimits\) applied to them. This can be any infinite cardinal number κ, which can be chosen to accommodate all the nondeterministic choices required for a given theory. (The necessity of this bound is tied up with Russell’s paradox and the non-existence of a set of all sets.)
References
Bloom, B.L.: Structural operational semantics for weak bisimulations. Theor. Comput. Sci. 146, 26–68 (1995)
Bloom, B.L., Fokkink, W., van Glabbeek, R.J.: Precongruence formats for decorated trace semantics. In: ACM Transactions on Computational Logic (2004)
Brookes, S.D.: A model for communicating sequential processes. Oxford University D.Phil. thesis (1983) (published as a Carnegie-Mellon University technical report)
Brookes, S.D., Hoare, C.A.R., Roscoe, A.W.: A theory of communicating sequential processes. J. ACM 31(3), 560–599 (1984)
de Nicola, R., Hennessy, M.: Testing equivalences for processes. Theor. Comput. Sci. 34(1), 83–134 (1987)
Hughes, J.: Graph reduction with super-combinators. Oxford University Technical Monograph PRG-28 (1982)
Lazić, R.S.: A semantic study of data-independence with applications to the mechanical verification of concurrent systems. Oxford University D.Phil. Thesis (1997)
Milner, R.: Communication and Concurrency. Prentice Hall, New York (1989)
Olderog, E.R., Hoare, C.A.R.: Specification-oriented semantics for communicating processes. Acta Inform. 23, 9–66 (1986)
Plotkin, G.D.: A structured approach to operational semantics. DAIMI FN–19, Computer Science Dept., Aarhus University (1981)
Roscoe, A.W.: A mathematical theory of communicating processes. Oxford University D.Phil. Thesis (1982)
Roscoe, A.W.: The three Platonic models of divergence-strict CSP. In: Proceedings of ICTAC 2008. Springer, Berlin (2008)
Roscoe, A.W.: CSP is expressive enough for π. In: Jones, C.B., Roscoe, A.W., Wood, K.R. (eds.) Reflections on the Work of C.A.R. Hoare. Springer, Berlin (2010)
Roscoe, A.W.: On the expressive power of CSP. Available from http://www.comlab.ox.ac.uk/people/publications/personal/Bill.Roscoe.html
Scattergood, J.B.: Tools for CSP and Timed CSP. Oxford University D.Phil. Thesis (1998)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2010 Springer-Verlag London Limited
About this chapter
Cite this chapter
Roscoe, A.W. (2010). Operational Semantics. In: Understanding Concurrent Systems. Texts in Computer Science. Springer, London. https://doi.org/10.1007/978-1-84882-258-0_9
Download citation
DOI: https://doi.org/10.1007/978-1-84882-258-0_9
Publisher Name: Springer, London
Print ISBN: 978-1-84882-257-3
Online ISBN: 978-1-84882-258-0
eBook Packages: Computer ScienceComputer Science (R0)