Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Process calculus
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Family of approaches for modelling concurrent systems}} In [[computer science]], the '''process calculi''' (or '''process algebras''') are a diverse family of related approaches for formally modelling [[concurrent system]]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]]ic laws that allow process descriptions to be manipulated and analyzed, and permit formal reasoning about equivalences between processes (e.g., using [[bisimulation]]). Leading examples of process calculi include [[Communicating Sequential Processes|CSP]], [[Calculus of Communicating Systems|CCS]], [[Algebra of Communicating Processes|ACP]], and [[Language Of Temporal Ordering Specification|LOTOS]].<ref name="baeten2004">{{cite journal|first=J.C.M. |last=Baeten| url = http://alexandria.tue.nl/extra1/wskrap/publichtml/200402.pdf | title = A brief history of process algebra | journal = Rapport CSR 04-02 | publisher = Vakgroep Informatica, Technische Universiteit Eindhoven | year = 2004 }}</ref> More recent additions to the family include the [[Pi-calculus|π-calculus]], the [[ambient calculus]], [[PEPA]], the [[fusion calculus]] and the [[join-calculus]]. == Essential features == While the variety of existing process calculi is very large (including variants that incorporate [[stochastic]] behaviour, timing information, and specializations for studying molecular interactions), there are several features that all process calculi have in common:<ref>{{cite book | author-link = Benjamin C. Pierce | first = Benjamin | last = Pierce | chapter = Foundational Calculi for Programming Languages | title = The Computer Science and Engineering Handbook | pages = 2190–2207 | publisher = CRC Press | isbn = 0-8493-2909-4 | date = 1996-12-21 }}</ref> * Representing interactions between independent processes as communication ([[message-passing]]), 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]]. == Mathematics of processes == To define a '''process calculus''', one starts with a set of ''names'' (or ''[[Channel (programming)|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:<ref>{{cite conference|last1=Baeten |first1=J.C.M. |first2=M. | last2=Bravetti |title=A Generic Process Algebra | book-title = Algebraic Process Calculi: The First Twenty Five Years and Beyond (BRICS Notes Series NS-05-3) | publisher=BRICS, Department of Computer Science, University of Aarhus |date=August 2005 | location = Bertinoro, Forlì, Italy| url=http://www.brics.dk/NS/05/3/ |access-date=2007-12-29}}</ref> * 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 <math>\mathit{P}</math> and <math>\mathit{Q}</math>, usually written <math>P \vert Q</math>, is the key primitive distinguishing the process calculi from sequential models of computation. Parallel composition allows computation in <math>\mathit{P}</math> and <math>\mathit{Q}</math> to proceed simultaneously and independently. But it also allows interaction, that is synchronisation and flow of information from <math>\mathit{P}</math> to <math>\mathit{Q}</math> (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.'' <math>x(v)</math>) and an output operator (''e.g.'' <math>x\langle y\rangle</math>), both of which name an interaction point (here <math>\mathit{x}</math>) 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 <math>x\langle y\rangle</math>, this data is <math>y</math>. 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 <math>x(v)</math>, <math>v</math> 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 <math>\mathit{x}</math> and then send that data on <math>\mathit{y}</math>''. ''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 <math>x(v)\cdot P</math> will wait for an input on <math>\mathit{x}</math>. Only when this input has occurred will the process <math>\mathit{P}</math> be activated, with the received data through <math>\mathit{x}</math> substituted for identifier <math>\mathit{v}</math>. === 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: :<math> x\langle y\rangle \cdot P \; \vert \; x(v)\cdot Q \longrightarrow P \; \vert \; Q[^y\!/\!_v] </math> The interpretation to this reduction rule is: # The process <math>x\langle y\rangle \cdot P</math> sends a message, here <math>\mathit{y}</math>, along the channel <math>\mathit{x}</math>. Dually, the process <math>x(v)\cdot Q</math> receives that message on channel <math>\mathit{x}</math>. # Once the message has been sent, <math>x\langle y\rangle \cdot P</math> becomes the process <math>\mathit{P}</math>, while <math>x(v)\cdot Q</math> becomes the process <math>Q[^y\!/\!_v]</math>, which is <math>\mathit{Q}</math> with the place-holder <math>\mathit{v}</math> substituted by <math>\mathit{y}</math>, the data received on <math>\mathit{x}</math>. The class of processes that <math>\mathit{P}</math> is allowed to range over as the continuation of the output operation substantially influences the properties of the calculus. === Hiding === Processes do not limit the number of connections that can be made at a given interaction point. But interaction points allow interference (i.e. interaction). For the synthesis of compact, minimal and compositional systems, the ability to restrict interference is crucial. ''Hiding'' operations allow control of the connections made between interaction points when composing agents in parallel. Hiding can be denoted in a variety of ways. For example, in the [[π-calculus]] the hiding of a name <math>\mathit{x}</math> in <math>\mathit{P}</math> can be expressed as <math>(\nu\; x)P</math>, while in [[Communicating sequential processes|CSP]] it might be written as <math>P \setminus \{x\}</math>. <!-- (Commented out because "Figure" is missing - can the Figure be added?) Figure shows the effect of going from ''P'' to (''ν'' ''x'')''P''. The process ''P'' on the left can interact with the outside world on ''x'', ''y'' and ''z''. In contrast, (''ν'' ''x'')''P'' on the right can only use ''y'' and ''z'' for this purpose. The restriction does not prevent usage of ''x'' inside ''P''. But what happens if ''x'' gets sent to a process outside of (''ν'' ''x'')''P'', as may happen in (''ν'' ''x'')(''y''<''x''> | ''Q''), provided ''x'' \neq ''y''? Whether or not it is possible to communicate a name hidden this way is another important point of divergence between different calculi. --> === Recursion and replication === The operations presented so far describe only finite interaction and are consequently insufficient for full computability, which includes non-terminating behaviour. ''[[Recursion]]'' and ''[[Replication (computing)|replication]]'' are operations that allow finite descriptions of infinite behaviour. Recursion is well known from the sequential world. Replication <math>!P</math> can be understood as abbreviating the parallel composition of a countably infinite number of <math>\mathit{P}</math> processes: :<math> !P = P \mid !P </math> === Null process === Process calculi generally also include a ''null process'' (variously denoted as <math>\mathit{nil}</math>, <math>0</math>, <math>\mathit{STOP}</math>, <math>\delta</math>, or some other appropriate symbol) which has no interaction points. It is utterly inactive and its sole purpose is to act as the inductive anchor on top of which more interesting processes can be generated. ==Discrete and continuous process algebra== Process algebra has been studied for [[Discrete time and continuous time#Discrete time|discrete time]] and [[Discrete time and continuous time#Continuous time|continuous time]] (real time or dense time).<ref>{{cite journal | title = Process algebra with timing: Real time and discrete time | citeseerx = 10.1.1.42.729 | first1 = J. C. M. | last1 = Baeten | first2 = C. A. | last2 = Middelburg | year = 2000 | pages = 627–684 }}</ref> == History == In the first half of the 20th century, various formalisms were proposed to capture the informal concept of a ''computable function'', with [[Μ-recursive function|μ-recursive functions]], [[Turing machine]]s and the [[lambda calculus]] possibly being the best-known examples today. The surprising fact that they are essentially equivalent, in the sense that they are all encodable into each other, supports the [[Church-Turing thesis]]. Another shared feature is more rarely commented on: they all are most readily understood as models of ''sequential'' computation. The subsequent consolidation of computer science required a more subtle formulation of the notion of computation, in particular explicit representations of concurrency and communication. Models of concurrency such as the process calculi, [[Petri net]]s in 1962, and the [[actor model]] in 1973 emerged from this line of inquiry. Research on process calculi began in earnest with [[Robin Milner]]'s seminal work on the [[Calculus of Communicating Systems]] (CCS) during the period from 1973 to 1980. [[C.A.R. Hoare]]'s [[Communicating Sequential Processes]] (CSP) first appeared in 1978, and was subsequently developed into a full-fledged process calculus during the early 1980s. There was much cross-fertilization of ideas between CCS and CSP as they developed. In 1982 [[Jan Bergstra]] and [[Jan Willem Klop]] began work on what came to be known as the [[Algebra of Communicating Processes]] (ACP), and introduced the term ''process algebra'' to describe their work.<ref name="baeten2004"/> CCS, CSP, and ACP constitute the three major branches of the process calculi family: the majority of the other process calculi can trace their roots to one of these three calculi. == Current research == Various process calculi have been studied and not all of them fit the paradigm sketched here. The most prominent example may be the [[ambient calculus]]. This is to be expected as process calculi are an active field of study. Currently research on process calculi focuses on the following problems. * Developing new process calculi for better modeling of computational phenomena. * Finding well-behaved subcalculi of a given process calculus. This is valuable because (1) most calculi are fairly ''wild'' in the sense that they are rather general and not much can be said about arbitrary processes; and (2) computational applications rarely exhaust the whole of a calculus. Rather they use only processes that are very constrained in form. Constraining the shape of processes is mostly studied by way of [[type system]]s. * Logics for processes that allow one to reason about (essentially) arbitrary properties of processes, following the ideas of [[Hoare logic]]. * Behavioural theory: what does it mean for two processes to be the same? How can we decide whether two processes are different or not? Can we find representatives for equivalence classes of processes? Generally, processes are considered to be the same if no context, that is other processes running in parallel, can detect a difference. Unfortunately, making this intuition precise is subtle and mostly yields unwieldy characterisations of equality (which in most cases must also be undecidable, as a consequence of the [[halting problem]]). [[Bisimulation]]s are a technical tool that aids reasoning about process equivalences. * Expressivity of calculi. Programming experience shows that certain problems are easier to solve in some languages than in others. This phenomenon calls for a more precise characterisation of the expressivity of calculi modeling computation than that afforded by the [[Church–Turing thesis]]. One way of doing this is to consider encodings between two formalisms and see what properties encodings can potentially preserve. The more properties can be preserved, the more expressive the target of the encoding is said to be. For process calculi, the celebrated results are that the synchronous [[π-calculus]] is more expressive than its asynchronous variant, has the same expressive power as the higher-order [[π-calculus]],<ref>{{Cite book|last=Sangiorgi|first=Davide|title=TAPSOFT'93: Theory and Practice of Software Development |chapter=From π-calculus to higher-order π-calculus — and back |date=1993|editor-last=Gaudel|editor-first=M. -C.|editor2-last=Jouannaud|editor2-first=J. -P.|volume=668|series=Lecture Notes in Computer Science|language=en|publisher=Springer Berlin Heidelberg|pages=151–166|doi=10.1007/3-540-56610-4_62|isbn=9783540475989|doi-access=free}}</ref> but is less than the [[ambient calculus]].{{citation needed|date=December 2011}} * Using process calculus to model biological systems (stochastic π-calculus, BioAmbients, Beta Binders, BioPEPA, Brane calculus). It is thought by some that the [[compositionality]] offered by process-theoretic tools can help biologists to organise their knowledge more formally. == Software implementations == The ideas behind process algebra have given rise to several tools including: * [[CADP]] * [http://homepages.inf.ed.ac.uk/perdita/cwb Concurrency Workbench] * [http://www.mcrl2.org mCRL2 toolset] == Relationship to other models of concurrency == The [[history monoid]] is the [[free object]] that is generically able to represent the histories of individual communicating processes. A process calculus is then a [[formal language]] imposed on a history monoid in a consistent fashion.<ref>{{cite book | first = Antoni | last = Mazurkiewicz | chapter-url = http://www.ipipan.waw.pl/~amaz/papers.htm/trbook.ps | chapter-format = PostScript | chapter = Introduction to Trace Theory | pages = 3–41 | title = The Book of Traces | editor1-first = V. | editor1-last = Diekert | editor2-first = G. | editor2-last = Rozenberg | year = 1995 | publisher = World Scientific | location = Singapore | isbn = 981-02-2058-8 | access-date = 2009-04-29 | archive-date = 2011-06-13 | archive-url = https://web.archive.org/web/20110613105701/http://www.ipipan.waw.pl/~amaz/papers.htm/trbook.ps | url-status = dead }}</ref> That is, a history monoid can only record a sequence of events, with synchronization, but does not specify the allowed state transitions. Thus, a process calculus is to a history monoid what a formal language is to a [[free monoid]] (a formal language is a subset of the set of all possible finite-length strings of an [[alphabet (computer science)|alphabet]] generated by the [[Kleene star]]). The use of channels for communication is one of the features distinguishing the process calculi from other models of [[Concurrent computing|concurrency]], such as [[Petri net]]s and the [[actor model]] (see [[Actor model and process calculi]]). One of the fundamental motivations for including channels in the process calculi was to enable certain algebraic techniques, thereby making it easier to reason about processes algebraically. ==See also== * [[Communicating sequential processes]] * [[ProVerif]] * [[Stochastic probe]] * [[Tamarin Prover]] * [[Temporal Process Language]] * [[π-calculus]] == References == {{Reflist|30em}} == Further reading == * [[Matthew Hennessy]]: ''Algebraic Theory of Processes'', [[The MIT Press]], {{ISBN|0-262-08171-7}}. * [[C. A. R. Hoare]]: ''Communicating Sequential Processes'', [[Prentice Hall]], {{ISBN|0-13-153289-8}}. ** This book has been updated by Jim Davies at the [[Oxford University Computing Laboratory]] and the new edition is available for download as a [[Portable Document Format|PDF]] file at the ''[http://www.usingcsp.com/ Using CSP]'' website. * [[Robin Milner]]: ''A Calculus of Communicating Systems'', Springer Verlag, {{ISBN|0-387-10235-3}}. * [[Robin Milner]]: ''Communicating and Mobile Systems: the Pi-Calculus'', Springer Verlag, {{ISBN|0-521-65869-1}}. * {{cite book |title=Formale Grundlagen der Informatik II: Modellierung und Analyse von Informatiksystemen |chapter=Chapter 5: Prozessalgebra - Parallele und kommunizierende Prozesse |volume=Part 2 |language=de |editor-first1=Rüdiger |editor-last1=Valk |editor-link1=Rüdiger Valk |editor-first2=Daniel |editor-last2=Moldt |editor-first3=Michael |editor-last3=Köhler-Bußmeier |date=2011 |work=Theoretische Grundlagen der Informatik |publisher=[[University of Hamburg]] |id=FGI2 |chapter-url=https://www.informatik.uni-hamburg.de/TGI/lehre/vl/WS1011/FGI2/sec/FGI2_kap5_2(pa-parallel).pdf |access-date=2019-07-13 |url-status=live |archive-url=https://web.archive.org/web/20190709144559/https://www.informatik.uni-hamburg.de/TGI/lehre/vl/WS1011/FGI2/sec/FGI2_kap5_2(pa-parallel).pdf |archive-date=2019-07-09}} {{Concurrent computing}} {{DEFAULTSORT:Process Calculus}} [[Category:Process calculi| ]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite conference
(
edit
)
Template:Cite journal
(
edit
)
Template:Concurrent computing
(
edit
)
Template:ISBN
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)