The pi-calculus is a model of concurrency in terms of communication over channels. It allows channel names to be exchanged over channel and thus permits changing network configurations.
The $\pi$-calculus (or pi-calculus) is a model of concurrency in terms of communication over channels. It allows channel names to be exchanged over channel and thus permits changing network configurations. It is one of the most important models of concurrency and has inspired many variants. It is in some ways a successor of ccs with which it shares an inventor (Robin Milner).
Syntax
The pi-calculus models uses channels as primitive elements and describes process states, which are simply called processes.
$$\begin{align*} P ::= &&&\hspace{-1em} \text{process} \\ & 0 && \text{empty process} \\ & P_1 \mid P_2 && \text{parallel composition: \(P_1\) in parallel with \(P_2\)} \\ & !P && \text{replication} \\ & x(y).P && \text{read input on channel \(x\) then run \(P\) with \(y\) bound to the value read} \\ & \bar x\langle y\rangle && \text{write \(y\) on channel \(x\) then run \(P\)} \\ & (\nu x) P && \text{run \(P\) in which \(x\) is a new (fresh) channel name} \\ \end{align*}$$
Processes are defined up to alpha equivalence of channel names.
Semantics
The primary semantics of the $\pi$-calculus uses unlabeled reductions. It is built around the rule that matches an input with an output: $$ \bar x\langle y\rangle.P \mid x(z).Q \longrightarrow P \mid Q[z \leftarrow y] $$ In addition, two processes are considered structurally equivalent if they are expressed in essentially equivalent ways, e.g. $(P \mid Q) \mid R \equiv P \mid (Q \mid R)$.
Another semantics uses a labeled transition system. The labels are actions: an action $\alpha$ is either an input $a(x)$ (read $x$ from channel $a$), an output $\bar a\langle x\rangle$ (write $x$ to channel $a$), or a $\tau$ transition signifying an action with no externally observable effect.
Many notions of bisimilarity exist.
Derivatives
Many calculi have been defined that extend or modify the pi-calculus to model features related to concurrency, such as distribution, mobility, failures, …
References
- Robin Milner: Communicating and Mobile Systems: The π-calculus; 1999.
- Davide Sangiorgi and David Walker: The π-calculus: A Theory of Mobile Processes; 2001.