In
computer science
Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includin ...
, the process calculi (or process algebras) are a diverse family of related approaches for formally modelling
concurrent system
In computer science, concurrency is the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, without affecting the outcome. This allows for parallel execution of the concur ...
s. Process calculi provide a tool for the high-level description of interactions, communications, and synchronizations between a collection of independent agents or processes. They also provide
algebra
Algebra () is one of the areas of mathematics, broad areas of mathematics. Roughly speaking, algebra is the study of mathematical symbols and the rules for manipulating these symbols in formulas; it is a unifying thread of almost all of mathem ...
ic laws that allow process descriptions to be manipulated and analyzed, and permit formal reasoning about equivalences between processes (e.g., using
bisimulation
In theoretical computer science a bisimulation is a binary relation between state transition systems, associating systems that behave in the same way in that one system simulates the other and vice versa.
Intuitively two systems are bisimilar if ...
). Leading examples of process calculi include
CSP
CSP may refer to:
Education
* College Student Personnel, an academic discipline
* Commonwealth Supported Place, a category in Australian education
* Concordia University (Saint Paul, Minnesota), US
Organizations
* Caledonian Steam Packet Compa ...
,
CCS,
ACP, and
LOTOS.
More recent additions to the family include the
Ï€-calculus, the
ambient calculus
In computer science, the ambient calculus is a process calculus devised by Luca Cardelli and Andrew D. Gordon in 1998, and used to describe and theorise about concurrent systems that include ''mobility''. Here ''mobility'' means both computation ca ...
,
PEPA, the
fusion calculus
Fusion, or synthesis, is the process of combining two or more distinct entities into a new whole.
Fusion may also refer to:
Science and technology Physics
*Nuclear fusion, multiple atomic nuclei combining to form one or more different atomic nucl ...
and the
join-calculus
The join-calculus is a process calculus developed at INRIA. The join-calculus was developed to provide a formal basis for the design of distributed programming languages, and therefore intentionally avoids communications constructs found in othe ...
.
Essential features
While the variety of existing process calculi is very large (including variants that incorporate
stochastic
Stochastic (, ) refers to the property of being well described by a random probability distribution. Although stochasticity and randomness are distinct in that the former refers to a modeling approach and the latter refers to phenomena themselve ...
behaviour, timing information, and specializations for studying molecular interactions), there are several features that all process calculi have in common:
* Representing interactions between independent processes as communication (
message-passing
In computer science, message passing is a technique for invoking behavior (i.e., running a program) on a computer. The invoking program sends a message to a process (which may be an actor or object) and relies on that process and its supporting i ...
), rather than as modification of shared variables.
* Describing processes and systems using a small collection of primitives, and operators for combining those primitives.
* Defining algebraic laws for the process operators, which allow process expressions to be manipulated using
equational reasoning
Universal algebra (sometimes called general algebra) is the field of mathematics that studies algebraic structures themselves, not examples ("models") of algebraic structures.
For instance, rather than take particular groups as the object of study ...
.
Mathematics of processes
To define a process calculus, one starts with a set of ''names'' (or ''
channels'') whose purpose is to provide means of communication. In many implementations, channels have rich internal structure to improve efficiency, but this is abstracted away in most theoretic models. In addition to names, one needs a means to form new processes from old ones. The basic operators, always present in some form or other, allow:
* parallel composition of processes
* specification of which channels to use for sending and receiving data
* sequentialization of interactions
* hiding of interaction points
* recursion or process replication
Parallel composition
Parallel composition of two processes
and
, usually written
, is the key primitive distinguishing the process calculi from sequential models of computation. Parallel composition allows computation in
and
to proceed simultaneously and independently. But it also allows interaction, that is synchronisation and flow of information from
to
(or vice versa) on a channel shared by both. Crucially, an agent or process can be connected to more than one channel at a time.
Channels may be synchronous or asynchronous. In the case of a synchronous channel, the agent sending a message waits until another agent has received the message. Asynchronous channels do not require any such synchronization. In some process calculi (notably the
Ï€-calculus) channels themselves can be sent in messages through (other) channels, allowing the topology of process interconnections to change. Some process calculi also allow channels to be ''created'' during the execution of a computation.
Communication
Interaction can be (but isn't always) a ''directed'' flow of information. That is, input and output can be distinguished as dual interaction primitives. Process calculi that make such distinctions typically define an input operator (''e.g.''
) and an output operator (''e.g.''
), both of which name an interaction point (here
) that is used to synchronise with a dual interaction primitive.
Should information be exchanged, it will flow from the outputting to the inputting process. The output primitive will specify the data to be sent. In
, this data is
. Similarly, if an input expects to receive data, one or more
bound variables will act as place-holders to be substituted by data, when it arrives. In
,
plays that role. The choice of the kind of data that can be exchanged in an interaction is one of the key features that distinguishes different process calculi.
Sequential composition
Sometimes interactions must be temporally ordered. For example, it might be desirable to specify algorithms such as: ''first receive some data on
and then send that data on
''. ''Sequential composition'' can be used for such purposes. It is well known from other models of computation. In process calculi, the sequentialisation operator is usually integrated with input or output, or both. For example, the process
will wait for an input on
. Only when this input has occurred will the process
be activated, with the received data through
substituted for identifier
.
Reduction semantics
The key operational reduction rule, containing the computational essence of process calculi, can be given solely in terms of parallel composition, sequentialization, input, and output. The details of this reduction vary among the calculi, but the essence remains roughly the same. The reduction rule is:
:
The interpretation to this reduction rule is:
# The process
sends a message, here
, along the channel
. Dually, the process
receives that message on channel
.
# Once the message has been sent,
becomes the process
, while
becomes the process