Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Business Industries Finance Tax

Home > Pi-calculus


First Prev [ 1 2 ] Next Last

In theoretical computer science, the π-calculus is a notation originally developed by Robin Milner, Joachim Parrow and David Walker to model concurrency (just as the λ-calculus is a simple model of sequential programming languages).

1 Definition

1.1 Syntax

Let Χ = {x, y, z, ...} be a set of objects called names which can be seen as names of channels of communication. The processes of π-calculus are built from names by the syntax

P ::= x(y).P | x<y>.P | P|Q | νx.P | !P | 0
which have the following meaning:

1.2 Reduction rules

The main reduction rule which captures the ability of processes to communicate through channels is the following:

x<y>.P | x(z).QP | Q[y/z]
where Q[y/z] is the process Q where the name y has been substituted to the name z. There are 3 more rules, one of which is
If PQ then also P|EQ|E.
It says that parallel composition does not inhibit computation. Similarly, the rule
If PQ then also νx.P → νx.Q
ensures that computation can proceed underneath a restriction. Finally we have the structural rule
If PP' Q' Q, then also PQ.
Here is the structural congruence, which equates processes that should be regarded as essentially the same. It is the least congruence such that

The concept of free names is of fundamental importance in Pi-Calculi. It can be defined inductively as follows.

1.3 Variants

A sum (P + Q) can be added to the syntax. It behaves like a nondeterministic choice between P and Q.

A test for name equality (if x=y then P else Q) can be added to the syntax. Similarly, one may add name inequality.

The asynchronous π-calculus allows only x<y>.0, not x<y>.P.

The polyadic π-calculus allows communicating more than one name in a single action: x<y1,y2,...,yn>.P and x(y1,y2,...,yn).P. It can be simulated in the monadic calculus by passing the name of a private channel through which the multiple arguments are then passed in sequence:

x<y1,y2,...,yn>.P denotes νw.x<w>.w<y1>.w<y2>...w<yn>.P
x(y1,y2,...,yn).P denotes x(w).w(y1).w(y2)...w(yn).P

Replication !P is not usually needed for arbitrary processes P. One can replace !P with replicated or lazy input !x(y).P without loss of expressive power. The corresponding reduction rule is

x<y>.P | !x(z).Q → P | !x(z).Q | Q[y/z].

Processes like !x(y).P can be understood as servers, waiting on channel x to be invoked by clients. Invocation of a server spawns a new copy of the process P[a/y], where a is the name passed by the client to the server, during the latter's invocation.

A higher order π-calculus can be defined where not names but processes are sent through channels. The key reduction rule for the higher order case is

x<R>.P | x(v).QP | Q[R/v].

In this case, the process x<R>.P sends the process R to x(v).Q. Sangiorgi established the surprising result that the ability to pass processes does not increase the expressivity of the π-calculus: passing a process P can be simulated by just passing a name that points to P instead.





Non User