# Calculus of communicating systems

{{ safesubst:#invoke:Unsubst||$N=Refimprove |date=__DATE__ |$B= {{#invoke:Message box|ambox}} }} The Calculus of Communicating Systems (CCS) is a process calculus introduced by Robin Milner around 1980 and the title of a book describing the calculus. Its actions model indivisible communications between exactly two participants. The formal language includes primitives for describing parallel composition, choice between actions and scope restriction. CCS is useful for evaluating the qualitative correctness of properties of a system such as deadlock or livelock.[1]

According to Milner, "There is nothing canonical about the choice of the basic combinators, even though they were chosen with great attention to economy. What characterises our calculus is not the exact choice of combinators, but rather the choice of interpretation and of mathematical framework".

The expressions of the language are interpreted as a labelled transition system. Between these models, bisimilarity is used as a semantic equivalence.

## Syntax

Given a set of action names, the set of CCS processes is defined by the following BNF grammar:

${\displaystyle P::=\emptyset \,\,\,|\,\,\,a.P_{1}\,\,\,|\,\,\,A\,\,\,|\,\,\,P_{1}+P_{2}\,\,\,|\,\,\,P_{1}|P_{2}\,\,\,|\,\,\,P_{1}[b/a]\,\,\,|\,\,\,P_{1}{\backslash }a\,\,\,}$

The parts of the syntax are, in the order given above

empty process
the empty process ${\displaystyle \emptyset }$ is a valid CCS process
action
the process ${\displaystyle a.P_{1}}$ can perform an action ${\displaystyle a}$ and continue as the process ${\displaystyle P_{1}}$
process identifier
write ${\displaystyle A{\overset {\underset {\mathrm {def} }{}}{=}}P_{1}}$ to use the identifier ${\displaystyle A}$ to refer to the process ${\displaystyle P_{1}}$ (which may contain the identifier ${\displaystyle A}$ itself, i.e., recursive definitions are allowed)
choice
the process ${\displaystyle P_{1}+P_{2}}$ can proceed either as the process ${\displaystyle P_{1}}$ or the process ${\displaystyle P_{2}}$
parallel composition
${\displaystyle P_{1}|P_{2}}$ tells that processes ${\displaystyle P_{1}}$ and ${\displaystyle P_{2}}$ exist simultaneously
renaming
${\displaystyle P_{1}[b/a]}$ is the process ${\displaystyle P_{1}}$ with all actions named ${\displaystyle a}$ renamed as ${\displaystyle b}$
restriction
${\displaystyle P_{1}{\backslash }a}$ is the process ${\displaystyle P_{1}}$ without action ${\displaystyle a}$

## Related calculi and models

• Communicating Sequential Processes (CSP), developed by Tony Hoare, is a language that arose at a similar time to CCS.
• The pi-calculus, developed by Milner in the late 80's, provides mobility of communication links by allowing processes to communicate the names of communication channels themselves.
• PEPA, developed by Jane Hillston introduces activity timing in terms of exponentially distributed rates and probabilistic choice, allowing performance metrics to be evaluated.

Some other languages based on CCS:

Models that have been used in the study of CCS-like systems:

## References

• Robin Milner: A Calculus of Communicating Systems, Springer Verlag, ISBN 0-387-10235-3. 1980.
• Robin Milner, Communication and Concurrency, Prentice Hall, International Series in Computer Science, ISBN 0-13-115007-3. 1989
1. {{#invoke:citation/CS1|citation |CitationClass=book }}