Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Process calculus

From Wikipedia, the free encyclopedia
Family of approaches for modelling concurrent systems

Incomputer science, theprocess calculi (orprocess algebras) are a diverse family of related approaches for formally modellingconcurrent systems. Process calculi provides a tool for high-level descriptions of interactions, communications, and synchronizations between a collection of independent agents or processes. They providealgebraic laws that allow process descriptions to be manipulated and analyzed, and they also permit formal reasoning about equivalences between processes (e.g., usingbisimulation). Leading examples of process calculi includeCSP,CCS,ACP, andLOTOS.[1] More recent additions to the family include theπ-calculus, theambient calculus,PEPA, thefusion calculus and thejoin-calculus.

Essential features

[edit]

While the variety of existing process calculi is very large (including variants that incorporatestochastic behaviour, timing information, and specializations for studying molecular interactions), there are several features that all process calculi have in common:[2]

  • 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 usingequational reasoning.

Mathematics of processes

[edit]

To define aprocess calculus, one starts with a set ofnames (orchannels) 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:[3]

  • 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

[edit]

Parallel composition of two processesP{\displaystyle {\mathit {P}}} andQ{\displaystyle {\mathit {Q}}}, usually writtenP|Q{\displaystyle P\vert Q}, is the key primitive distinguishing the process calculi from sequential models of computation. Parallel composition allows computation inP{\displaystyle {\mathit {P}}} andQ{\displaystyle {\mathit {Q}}} to proceed simultaneously and independently. But it also allows interaction, that is synchronisation and flow of information fromP{\displaystyle {\mathit {P}}} toQ{\displaystyle {\mathit {Q}}} (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 becreated during the execution of a computation.

Communication

[edit]

Interaction can be (but isn't always) adirected 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.x(v){\displaystyle x(v)}) and an output operator (e.g.xy{\displaystyle x\langle y\rangle }), both of which name an interaction point (herex{\displaystyle {\mathit {x}}}) 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. Inxy{\displaystyle x\langle y\rangle }, this data isy{\displaystyle y}. Similarly, if an input expects to receive data, one or morebound variables will act as place-holders to be substituted by data, when it arrives. Inx(v){\displaystyle x(v)},v{\displaystyle v} 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

[edit]

Sometimes interactions must be temporally ordered. For example, it might be desirable to specify algorithms such as:first receive some data onx{\displaystyle {\mathit {x}}} and then send that data ony{\displaystyle {\mathit {y}}}.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 processx(v)P{\displaystyle x(v)\cdot P} will wait for an input onx{\displaystyle {\mathit {x}}}. Only when this input has occurred will the processP{\displaystyle {\mathit {P}}} be activated, with the received data throughx{\displaystyle {\mathit {x}}} substituted for identifierv{\displaystyle {\mathit {v}}}.

Reduction semantics

[edit]

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:

xyP|x(v)QP|Q[y/v]{\displaystyle x\langle y\rangle \cdot P\;\vert \;x(v)\cdot Q\longrightarrow P\;\vert \;Q[^{y}\!/\!_{v}]}

The interpretation to this reduction rule is:

  1. The processxyP{\displaystyle x\langle y\rangle \cdot P} sends a message, herey{\displaystyle {\mathit {y}}}, along the channelx{\displaystyle {\mathit {x}}}. Dually, the processx(v)Q{\displaystyle x(v)\cdot Q} receives that message on channelx{\displaystyle {\mathit {x}}}.
  2. Once the message has been sent,xyP{\displaystyle x\langle y\rangle \cdot P} becomes the processP{\displaystyle {\mathit {P}}}, whilex(v)Q{\displaystyle x(v)\cdot Q} becomes the processQ[y/v]{\displaystyle Q[^{y}\!/\!_{v}]}, which isQ{\displaystyle {\mathit {Q}}} with the place-holderv{\displaystyle {\mathit {v}}} substituted byy{\displaystyle {\mathit {y}}}, the data received onx{\displaystyle {\mathit {x}}}.

The class of processes thatP{\displaystyle {\mathit {P}}} is allowed to range over as the continuation of the output operation substantially influences the properties of the calculus.

Hiding

[edit]

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 thesynthesis 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 composingagents in parallel. Hiding can be denoted in a variety of ways. For example, in theπ-calculus the hiding of a namex{\displaystyle {\mathit {x}}} inP{\displaystyle {\mathit {P}}} can be expressed as(νx)P{\displaystyle (\nu \;x)P}, while inCSP it might be written asP{x}{\displaystyle P\setminus \{x\}}.

Recursion and replication

[edit]

The operations presented so far describe only finite interaction and are consequently insufficient for full computability, which includes non-terminating behaviour.Recursion andreplication are operations that allow finite descriptions of infinite behaviour. Recursion is well known from the sequential world. Replication!P{\displaystyle !P} can be understood as abbreviating the parallel composition of a countably infinite number ofP{\displaystyle {\mathit {P}}} processes:

!P=P!P{\displaystyle !P=P\mid !P}

Null process

[edit]

Process calculi generally also include anull process (variously denoted asnil{\displaystyle {\mathit {nil}}},0{\displaystyle 0},STOP{\displaystyle {\mathit {STOP}}},δ{\displaystyle \delta }, 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

[edit]

Process algebra has been studied fordiscrete time andcontinuous time (real time or dense time).[4]

History

[edit]

In the first half of the 20th century, various formalisms were proposed to capture the informal concept of acomputable function, withμ-recursive functions,Turing machines and thelambda 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 theChurch-Turing thesis. Another shared feature is more rarely commented on: they all are most readily understood as models ofsequential 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 nets in 1962, and theactor model in 1973 emerged from this line of inquiry.

Research on process calculi began in earnest withRobin Milner's seminal work on theCalculus of Communicating Systems (CCS) during the period from 1973 to 1980.C.A.R. Hoare'sCommunicating 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 1982Jan Bergstra andJan Willem Klop began work on what came to be known as theAlgebra of Communicating Processes (ACP), and introduced the termprocess algebra to describe their work.[1] 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

[edit]

Various process calculi have been studied and not all of them fit the paradigm sketched here. The most prominent example may be theambient 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 fairlywild 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 oftype systems.
  • Logics for processes that allow one to reason about (essentially) arbitrary properties of processes, following the ideas ofHoare 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 thehalting problem).Bisimulations 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 theChurch–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,[5] but is less than theambient calculus.[citation needed]
  • Using process calculus to model biological systems (stochastic π-calculus, BioAmbients, Beta Binders, BioPEPA, Brane calculus). It is thought by some that thecompositionality offered by process-theoretic tools can help biologists to organise their knowledge more formally.

Software implementations

[edit]

The ideas behind process algebra have given rise to several tools including:

Relationship to other models of concurrency

[edit]

Thehistory monoid is thefree object that is generically able to represent the histories of individual communicating processes. A process calculus is then aformal language imposed on a history monoid in a consistent fashion.[6] 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 afree monoid (a formal language is a subset of the set of all possible finite-length strings of analphabet generated by theKleene star).

The use of channels for communication is one of the features distinguishing the process calculi from other models ofconcurrency, such asPetri nets and theactor model (seeActor 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

[edit]

References

[edit]
  1. ^abBaeten, J.C.M. (2004)."A brief history of process algebra"(PDF).Rapport CSR 04-02. Vakgroep Informatica, Technische Universiteit Eindhoven.
  2. ^Pierce, Benjamin (1996-12-21). "Foundational Calculi for Programming Languages".The Computer Science and Engineering Handbook. CRC Press. pp. 2190–2207.ISBN 0-8493-2909-4.
  3. ^Baeten, J.C.M.; Bravetti, M. (August 2005)."A Generic Process Algebra".Algebraic Process Calculi: The First Twenty Five Years and Beyond (BRICS Notes Series NS-05-3). Bertinoro, Forlì, Italy: BRICS, Department of Computer Science, University of Aarhus. Retrieved2007-12-29.
  4. ^Baeten, J. C. M.; Middelburg, C. A. (2000). "Process algebra with timing: Real time and discrete time".Handbook of Process Algebra:627–684.CiteSeerX 10.1.1.42.729.
  5. ^Sangiorgi, Davide (1993). "From π-calculus to higher-order π-calculus — and back". In Gaudel, M. -C.; Jouannaud, J. -P. (eds.).TAPSOFT'93: Theory and Practice of Software Development. Lecture Notes in Computer Science. Vol. 668. Springer Berlin Heidelberg. pp. 151–166.doi:10.1007/3-540-56610-4_62.ISBN 9783540475989.
  6. ^Mazurkiewicz, Antoni (1995)."Introduction to Trace Theory". In Diekert, V.; Rozenberg, G. (eds.).The Book of Traces. Singapore: World Scientific. pp. 3–41.ISBN 981-02-2058-8. Archived fromthe original(PostScript) on 2011-06-13. Retrieved2009-04-29.

Further reading

[edit]
General
Process calculi
Classic problems
Retrieved from "https://en.wikipedia.org/w/index.php?title=Process_calculus&oldid=1318214564"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp