Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Communicating sequential processes

From Wikipedia, the free encyclopedia
Formal model in concurrency theory

Incomputer science,communicating sequential processes (CSP) is aformal language for describingpatterns of interaction inconcurrent systems.[1] It is a member of the family of mathematical theories of concurrency known as process algebras, orprocess calculi, based onmessage passing viachannels. CSP was highly influential in the design of theoccam programming language[1][2] and also influenced the design of programming languages such asLimbo,[3]RaftLib,Erlang,[4]Go,[5][3]Crystal, andClojure's core.async.[6]

CSP was first described byTony Hoare in a 1978 article,[7] and has since evolved substantially.[8] CSP has been practically applied in industry as a tool forspecifying and verifying the concurrent aspects of a variety of different systems, such as the T9000Transputer,[9] as well as a securee-commerce system.[10] The theory of CSP itself is also still the subject of active research, including work to increase its range of practical applicability (e.g., increasing the scale of the systems that can be tractably analyzed).[11]

History

[edit]

Original version

[edit]

The version of CSP presented in Hoare's original 1978 article was essentially a concurrent programming language rather than aprocess calculus. It had a substantially differentsyntax than later versions of CSP, did not possess mathematically defined semantics,[12] and was unable to representunbounded nondeterminism.[13] Programs in the original CSP were written as a parallel composition of a fixed number of sequential processes communicating with each other strictly through synchronous message-passing. In contrast to later versions of CSP, each process was assigned an explicit name, and the source or destination of a message was defined by specifying the name of the intended sending or receiving process. For example, the process

COPY = *[c:character; west?c → east!c]

repeatedly receives a character from the process namedwest and sends that character to process namedeast. The parallel composition

[west::DISASSEMBLE || X::COPY || east::ASSEMBLE]

assigns the nameswest to theDISASSEMBLE process,X to theCOPY process, andeast to theASSEMBLE process, and executes these three processes concurrently.[7]

Development into process algebra

[edit]

Following the publication of the original version of CSP, Hoare, Stephen Brookes, andA. W. Roscoe developed and refined thetheory of CSP into its modern, process algebraic form. The approach taken in developing CSP into a process algebra was influenced byRobin Milner's work on theCalculus of Communicating Systems (CCS) and conversely. The theoretical version of CSP was initially presented in a 1984 article by Brookes, Hoare, and Roscoe,[14] and later in Hoare's bookCommunicating Sequential Processes,[12] which was published in 1985. In September 2006, that book was still thethird-most citedcomputer science reference of all time according toCiteseer[citation needed] (albeit an unreliable source due to the nature of its sampling). The theory of CSP has undergone a few minor changes since the publication of Hoare's book. Most of these changes were motivated by the advent of automated tools for CSP process analysis and verification. Roscoe'sThe Theory and Practice of Concurrency[1] describes this newer version of CSP.

Applications

[edit]

An early and important application of CSP was its use for specification and verification of elements of the INMOS T9000Transputer, a complex superscalar pipelined processor designed to support large-scale multiprocessing. CSP was employed in verifying the correctness of both the processor pipeline and the Virtual Channel Processor, which managed off-chip communications for the processor.[9]

Industrial application of CSP to software design has usually focused on dependable and safety-critical systems. For example, the Bremen Institute for Safe Systems andDaimler-Benz Aerospace modeled a fault-management system and avionics interface (consisting of about 23,000 lines of code) intended for use on the International Space Station in CSP, and analyzed the model to confirm that their design was free ofdeadlock andlivelock.[15][16] The modeling and analysis process was able to uncover a number of errors that would have been difficult to detect using testing alone. Similarly,Praxis High Integrity Systems applied CSP modeling and analysis during the development of software (approximately 100,000 lines of code) for a secure smart-card certification authority to verify that their design was secure and free of deadlock. Praxis claims that the system has a much lower defect rate than comparable systems.[10]

Since CSP is well-suited to modeling and analyzing systems that incorporate complex message exchanges, it has also been applied to the verification of communications and security protocols. A prominent example of this sort of application is Lowe's use of CSP and theFDR refinement-checker to discover a previously unknown attack on theNeedham–Schroeder public-key authentication protocol, and then to develop a corrected protocol able to defeat the attack.[17]

Informal description

[edit]

As its name suggests, CSP allows the description of systems in terms of component processes that operate independently, and interact with each other solely throughmessage-passing communication. However, the"Sequential" part of the CSP name is now something of a misnomer, since modern CSP allows component processes to be defined both as sequential processes, and as the parallel composition of more primitive processes. The relationships between different processes, and the way each process communicates with its environment, are described using variousprocess algebraic operators. Using this algebraic approach, quite complex process descriptions can be easily constructed from a few primitive elements.

Primitives

[edit]

CSP provides two classes of primitives in its process algebra: events and primitive processes.

Events

Events represent communications or interactions. They are assumed to be instantaneous, and their communication is all that an external ‘environment’ can know about processes. An event is communicated only if the environment allows it. If a process does offer an event and the environment allows it, then that eventmust be communicated. Events may be atomic names (e.g.on,off), compound names (e.g.valve.open,valve.close), or input/output events (e.g.mouse?xy,screen!bitmap). The set of all events is denotedΣ{\displaystyle \Sigma }.[18]

Primitive processes

Primitive processes represent fundamental behaviors: examples includeSTOP{\displaystyle \mathrm {STOP} } (the process that immediately deadlocks), andSKIP{\displaystyle \mathrm {SKIP} } (the process that immediately terminates successfully).[18]

Algebraic operators

[edit]

CSP has a wide range of algebraic operators. The principal ones are informally given as follows.

Prefix

The prefix operator combines an event and a process to produce a new process. For example,aP{\displaystyle a\to P} is the process that is willing to communicate eventa{\displaystyle a} with its environment and, aftera{\displaystyle a}, behaves like the processP{\displaystyle P}.[18]

Recursion

Processes can be defined using recursion. WhereF(P){\displaystyle F(P)} is any CSP term involvingP{\displaystyle P}, the processμP.F(P){\displaystyle \mu P.F(P)} defines a recursive process given by the equationP=F(P){\displaystyle P=F(P)}.Recursions can also be defined mutually, such asPu=upPdPd=downPu{\displaystyle {\begin{aligned}&P_{u}=up\to P_{d}\\&P_{d}=down\to P_{u}\\\end{aligned}}}which defines a pair of mutually recursive processes that alternate between communicatingup{\displaystyle up} anddown{\displaystyle down}.[18]

Deterministic choice

The deterministic (or external) choice operator allows the future evolution of a process to be defined as a choice between two component processes and allows the environment to resolve the choice by communicating an initial event for one of the processes. For example,(aP)  (bQ){\displaystyle (a\to P)\ \Box \ (b\to Q)} is the process that is willing to communicate the initial eventsa{\displaystyle a} andb{\displaystyle b} and subsequently behaves as eitherP{\displaystyle P} orQ{\displaystyle Q}, depending on which initial event the environment chooses to communicate.[18]

Nondeterministic choice

The nondeterministic (or internal) choice operator allows the future evolution of a process to be defined as a choice between two component processes, but does not allow the environment any control over which one of the component processes will be selected. For example,(aP)(bQ){\displaystyle (a\to P)\sqcap (b\to Q)} can behave like eitheraP{\displaystyle a\to P} orbQ{\displaystyle b\to Q}. It can refuse to accepta{\displaystyle a} orb{\displaystyle b} and is only obliged to communicate if the environment offers botha{\displaystyle a} andb{\displaystyle b}.

Nondeterminism can be inadvertently introduced into an ostensibly deterministic choice if the initial events of both sides of the choice are identical. So, for example,(aaSTOP)  (abSTOP){\displaystyle (a\to a\to \mathrm {STOP} )\ \Box \ (a\to b\to \mathrm {STOP} )} anda((aSTOP)(bSTOP)){\displaystyle a\to {\big (}(a\to \mathrm {STOP} )\sqcap (b\to \mathrm {STOP} ){\big )}}are equivalent.[18]

Interleaving

The interleaving operator represents completely independent concurrent activity. The processP|||Q{\displaystyle P\;|||\;Q} behaves as bothP{\displaystyle P} andQ{\displaystyle Q} simultaneously. The events from both processes are arbitrarily interleaved in time. Interleaving can introduce nondeterminism even ifP{\displaystyle P} andQ{\displaystyle Q} are both deterministic: ifP{\displaystyle P} andQ{\displaystyle Q} can both communicate the same event, thenP|||Q{\displaystyle P\;|||\;Q} nondeterministically chooses which of the two processes communicated that event.[18]

Interface parallel

The interface parallel (or generalized parallel) operator represents concurrent activity that requires synchronization between the component processes: forP|[X]|Q{\displaystyle P\;|[X]|\;Q}, any event in the interface setXΣ{\displaystyle X\subseteq \Sigma } can only occur when bothP{\displaystyle P} andQ{\displaystyle Q} are able to engage in that event.[18]

For example, the processP|[{a}]|Q{\displaystyle P\;|[\{a\}]|\;Q} requires thatP{\displaystyle P} andQ{\displaystyle Q} must both be able to perform eventa{\displaystyle a} before that event can occur. So, the process(aP)|[{a}]|(aQ){\displaystyle (a\to P)\;|[\{a\}]|\;(a\to Q)} is equivalent toa(P|[{a}]|Q){\displaystyle a\to (P\;|[\{a\}]|\;Q)}, while(aP)|[{a,b}]|(bQ){\displaystyle (a\to P)\;|[\{a,b\}]|\;(b\to Q)} is equivalent toSTOP{\displaystyle \mathrm {STOP} } (i.e. the process deadlocks).

Hiding

The hiding operator provides a way to abstract processes by making some events unobservable by the environment.PX{\displaystyle P\setminus X} is the processP{\displaystyle P} with the event setX{\displaystyle X} hidden.

A trivial example of hiding is(aP){a}{\displaystyle (a\to P)\setminus \{a\}} which, assuming that the eventa{\displaystyle a} doesn't appear inP{\displaystyle P}, simply reduces toP{\displaystyle P}. Hidden events are internalized asτ actions, which are invisible to and uncontrollable by the environment. The existence of hiding introduces an additional behaviour calleddivergence, where an infinite sequence of τ actions is performed. This is captured by the processdiv{\displaystyle \mathbf {div} }, whose behaviour is solely to perform τ actions forever.[18] For example,(μP.aP){a}{\displaystyle (\mu P.a\to P)\setminus \{a\}} is equivalent todiv{\displaystyle \mathbf {div} }.

Examples

[edit]
This sectiondoes notcite anysources. Please helpimprove this section byadding citations to reliable sources. Unsourced material may be challenged andremoved.(November 2024) (Learn how and when to remove this message)

One of the archetypal CSP examples is an abstract representation of a chocolate vending machine and its interactions with a person wishing to buy some chocolate. This vending machine might be able to carry out two different events, “coin” and “choc” which represent the insertion of payment and the delivery of a chocolate respectively. A machine which demands payment (only in cash) before offering a chocolate can be written as:

VendingMachine=coinchocSTOP{\displaystyle \mathrm {VendingMachine} =\mathrm {coin} \rightarrow \mathrm {choc} \rightarrow \mathrm {STOP} }

A person who might choose to use a coin or card to make payments could be modelled as:

Person=(coinSTOP)(cardSTOP){\displaystyle \mathrm {Person} =(\mathrm {coin} \rightarrow \mathrm {STOP} )\;\Box \;(\mathrm {card} \rightarrow \mathrm {STOP} )}

These two processes can be put in parallel, so that they can interact with each other. The behaviour of the composite process depends on the events that the two component processes must synchronise on. Thus,

VendingMachine|[{coin,card}]|PersoncoinchocSTOP{\displaystyle \mathrm {VendingMachine} \left\vert \left[\left\{\mathrm {coin} ,\mathrm {card} \right\}\right]\right\vert \mathrm {Person} \equiv \mathrm {coin} \rightarrow \mathrm {choc} \rightarrow \mathrm {STOP} }

whereas if synchronization was only required on “coin”, we would obtain

VendingMachine|[{coin}]|Person(coinchocSTOP)(cardSTOP){\displaystyle \mathrm {VendingMachine} \left\vert \left[\left\{\mathrm {coin} \right\}\right]\right\vert \mathrm {Person} \equiv \left(\mathrm {coin} \rightarrow \mathrm {choc} \rightarrow \mathrm {STOP} \right)\Box \left(\mathrm {card} \rightarrow \mathrm {STOP} \right)}

If we abstract this latter composite process by hiding the “coin” and “card” events, i.e.

((coinchocSTOP)(cardSTOP)){coin,card}{\displaystyle \left(\left(\mathrm {coin} \rightarrow \mathrm {choc} \rightarrow \mathrm {STOP} \right)\Box \left(\mathrm {card} \rightarrow \mathrm {STOP} \right)\right)\setminus \left\{\mathrm {coin,card} \right\}}

we get the nondeterministic process

(chocSTOP)STOP{\displaystyle \left(\mathrm {choc} \rightarrow \mathrm {STOP} \right)\sqcap \mathrm {STOP} }

This is a process which either offers a “choc” event and then stops, or just stops. In other words, if we treat the abstraction as an external view of the system (e.g., someone who does not see the decision reached by the person),nondeterminism has been introduced.

Formal definition

[edit]

Syntax

[edit]
This sectiondoes notcite anysources. Please helpimprove this section byadding citations to reliable sources. Unsourced material may be challenged andremoved.(November 2024) (Learn how and when to remove this message)

The syntax of CSP defines the “legal” ways in which processes and events may be combined. Lete be an event,b be a boolean andX be a set of events. Then the basicsyntax of CSP can be defined as:

Proc::=STOP|SKIP|eProc(prefixing)|ProcProc(externalchoice)|ProcProc(nondeterministicchoice)|Proc|||Proc(interleaving)|Proc|[{X}]|Proc(interfaceparallel)|ProcX(hiding)|Proc;Proc(sequentialcomposition)|ifbthenProcelseProc(booleanconditional)|ProcProc(timeout)|ProcProc(interrupt){\displaystyle {\begin{array}{lcll}{Proc}&::=&\mathrm {STOP} &\;\\&|&\mathrm {SKIP} &\;\\&|&e\rightarrow {Proc}&({\text{prefixing}})\\&|&{Proc}\;\Box \;{Proc}&({\text{external}}\;{\text{choice}})\\&|&{Proc}\;\sqcap \;{Proc}&({\text{nondeterministic}}\;{\text{choice}})\\&|&{Proc}\;\vert \vert \vert \;{Proc}&({\text{interleaving}})\\&|&{Proc}\;|[\{X\}]|\;{Proc}&({\text{interface}}\;{\text{parallel}})\\&|&{Proc}\setminus X&({\text{hiding}})\\&|&{Proc};{Proc}&({\text{sequential}}\;{\text{composition}})\\&|&\mathrm {if} \;b\;\mathrm {then} \;{Proc}\;\mathrm {else} \;Proc&({\text{boolean}}\;{\text{conditional}})\\&|&{Proc}\;\triangleright \;{Proc}&({\text{timeout}})\\&|&{Proc}\;\triangle \;{Proc}&({\text{interrupt}})\end{array}}}

Note that, in the interests of brevity, the syntax presented above omits thediv{\displaystyle \mathbf {div} } process, which representsdivergence, as well as various operators such as alphabetized parallel, piping, and indexed choices.

Formal semantics

[edit]
[icon]
This sectionneeds expansion. You can help byadding to it.(June 2008)

CSP has been imbued with several differentformal semantics, which define themeaning of syntactically correct CSP expressions. The theory of CSP includes mutually consistentdenotational semantics,algebraic semantics, andoperational semantics.

Denotational semantics

[edit]

The three major denotational models of CSP are thetraces model, thestable failures model, and thefailures/divergences model. Semantic mappings from process expressions to each of these three models provide the denotational semantics for CSP.[1]

Denotational semantics allows several definitions of apartial order ofrefinement on processes, which in turn can be used to elegantly represent several properties on processes. Generally,PQ{\displaystyle P\sqsubseteq Q} denotesQ{\displaystyle Q}refinesP{\displaystyle P}.

Traces model

[edit]

Thetraces model defines the meaning of a process expression as the set of sequences of events (traces) that the process can be observed to perform. For example,

More formally, the traces modelT{\displaystyle {\mathcal {T}}} is defined as the set of non-empty prefix-closed subsets ofΣ{\displaystyle \Sigma ^{\ast }}. The meaning of a processP in the traces model is defined astraces(P)Σ{\displaystyle \mathrm {traces} \left(P\right)\subseteq \Sigma ^{\ast }} such that:

  1. traces(P){\displaystyle \langle \rangle \in \mathrm {traces} \left(P\right)} (i.e.traces(P){\displaystyle \mathrm {traces} \left(P\right)} contains the empty sequence)
  2. s1s2traces(P)s1traces(P){\displaystyle s_{1}\smallfrown s_{2}\in \mathrm {traces} \left(P\right)\implies s_{1}\in \mathrm {traces} \left(P\right)} (i.e.traces(P){\displaystyle \mathrm {traces} \left(P\right)} is prefix-closed)

whereΣ{\displaystyle \Sigma ^{\ast }} is the set of all possible finite sequences of events.

A processP{\displaystyle P} is said totrace-refine anotherQ{\displaystyle Q} if and only iftraces(P)traces(Q){\displaystyle \mathrm {traces} (P)\supseteq \mathrm {traces} (Q)}.P{\displaystyle P}trace-refinesQ{\displaystyle Q} is denotedQTP{\displaystyle Q\sqsubseteq _{\mathrm {T} }P}.[18]

Stable failures model

[edit]

Thestable failures modelF{\displaystyle {\mathcal {F}}} extends the traces model with refusal sets, which are sets of eventsXΣ{\displaystyle X\subseteq \Sigma } that a process can refuse to perform. Afailure is a pair(s,X){\displaystyle \left(s,X\right)}, consisting of a traces, and a refusal setX which identifies the events that a process may refuse once it has executed the traces. The observed behavior of a process in the stable failures model is described by the pair(traces(P),failures(P)){\displaystyle \left(\mathrm {traces} \left(P\right),\mathrm {failures} \left(P\right)\right)}. For example,

failures((aSTOP)(bSTOP))={(,),(a,{a,b}),(b,{a,b})}{\displaystyle \mathrm {failures} \left(\left(a\rightarrow \mathrm {STOP} \right)\Box \left(b\rightarrow \mathrm {STOP} \right)\right)=\left\{\left(\langle \rangle ,\emptyset \right),\left(\langle a\rangle ,\left\{a,b\right\}\right),\left(\langle b\rangle ,\left\{a,b\right\}\right)\right\}}failures((aSTOP)(bSTOP))={(,{a}),(,{b}),(a,{a,b}),(b,{a,b})}{\displaystyle \mathrm {failures} \left(\left(a\rightarrow \mathrm {STOP} \right)\sqcap \left(b\rightarrow \mathrm {STOP} \right)\right)=\left\{\left(\langle \rangle ,\left\{a\right\}\right),\left(\langle \rangle ,\left\{b\right\}\right),\left(\langle a\rangle ,\left\{a,b\right\}\right),\left(\langle b\rangle ,\left\{a,b\right\}\right)\right\}}

A processP{\displaystyle P}stable-failures-refinesQ{\displaystyle Q} if and only iftraces(P)traces(Q)failures(P)failures(Q){\displaystyle \mathrm {traces} (P)\supseteq \mathrm {traces} (Q)\land \mathrm {failures} (P)\supseteq \mathrm {failures} (Q)}.P{\displaystyle P}stable-failures-refinesQ{\displaystyle Q} is denotedQFP{\displaystyle Q\sqsubseteq _{\mathrm {F} }P}.[18]

Failures/divergences model

[edit]

Thefailures/divergence modelN{\displaystyle {\mathcal {N}}} further extends the failures model to handledivergence. The semantics of a process in the failures/divergences model is a pair(failures(P),divergences(P)){\displaystyle \left(\mathrm {failures} _{\perp }\left(P\right),\mathrm {divergences} \left(P\right)\right)} wheredivergences(P){\displaystyle \mathrm {divergences} \left(P\right)} is defined as the extension-closure of the set of all traces after which the process can immediately diverge, andfailures(P)=failures(P){(s,X)sdivergences(P),XΣ}{\displaystyle \mathrm {failures} _{\perp }\left(P\right)=\mathrm {failures} \left(P\right)\cup \left\{\left(s,X\right)\mid s\in \mathrm {divergences} \left(P\right),X\subseteq \Sigma ^{*}\right\}}, which is the extension offailures(P){\displaystyle \mathrm {failures} (P)} with all divergent traces.

A processP{\displaystyle P}failures-divergences-refinesQ{\displaystyle Q} if and only iffailures(P)failures(Q)divergences(P)divergences(Q){\displaystyle \mathrm {failures} _{\bot }(P)\supseteq \mathrm {failures} _{\bot }(Q)\land \mathrm {divergences} (P)\supseteq \mathrm {divergences} (Q)}.P{\displaystyle P}failures-divergences refinesQ{\displaystyle Q} is denotedQFDP{\displaystyle Q\sqsubseteq _{\mathrm {FD} }P}.[18]

Unique fixed points

[edit]

One of the most important principles in CSP is theunique fixed points (UFP) rule. Generally, it states that a process which satisfies certain nice properties has a single semantic interpretation. It can be used to conclude algebraic proofs that two processes are equal in a model of CSP. A version for single recursions in the traces model is outlined here.

Consider processes as their trace sets. The operator{\displaystyle \downarrow } is defined for all processesP{\displaystyle P}, allnN{\displaystyle n\in \mathbb {N} } so thatPn={sP:#sn}{\displaystyle P\downarrow n=\{s\in P:\#s\leq n\}}, where#s{\displaystyle \#s} denotes the length of strings{\displaystyle s}: the set of traces inP{\displaystyle P} of length at mostn{\displaystyle n}. This allows ametric to be defined onT{\displaystyle {\mathcal {T}}}. For eachP{\displaystyle P},Q{\displaystyle Q}, letd(P,Q)=inf{2n:Pn=Qn}{\displaystyle d(P,Q)=\mathrm {inf} \{2^{-n}:P\downarrow n=Q\downarrow n\}}. Informally, a process which agrees on traces with another up to some length is ‘more distant’ from it than one which agrees with it up to a greater length. It can be shown that this forms acomplete metric space.

A function on trace setsF:TT{\displaystyle F:{\mathcal {T}}\rightarrow {\mathcal {T}}} is calledconstructive if and only if for all processesP{\displaystyle P},Q{\displaystyle Q}, allnN{\displaystyle n\in \mathbb {N} }, ifPn=Qn{\displaystyle P\downarrow n=Q\downarrow n} thenF(P)(n+1)=F(Q)(n+1){\displaystyle F(P)\downarrow (n+1)=F(Q)\downarrow (n+1)}. This means that a function is constructive if and only if it is acontraction mapping with respect to the metric on trace sets.

By theBanach fixed-point theorem, ifF{\displaystyle F} is a constructive function, it has a uniquefixed point. This means that ifX{\displaystyle X} andY{\displaystyle Y} are processes defined recursively asX=F(X){\displaystyle X=F(X)} andY=F(Y){\displaystyle Y=F(Y)}, then they are equivalent in the traces model. UFP can also be extended to mutual recursions (by using vectors of processes) and other models of CSP (e.g. inF{\displaystyle {\mathcal {F}}} by defining the metric as inT{\displaystyle {\mathcal {T}}}, with respect to the trace parts of a process's trace-failure pair).

It can be derived using UFP (andTarski's fixed point theorem), that formonotonicF{\displaystyle F}, a recursive term defined asX=F(X){\displaystyle X=F(X)} has the semantic interpretationn=0Fn(){\displaystyle \sqcap _{n=0}^{\infty }F^{n}(\bot )}, where{\displaystyle \bot } is the least element of the model. In the traces, stable failures and failures/divergences models,=div{\displaystyle \bot =\mathbf {div} } (equivalent toSTOP{\displaystyle \mathrm {STOP} } in the traces model).[1][18]

Tools

[edit]

Over the years, a number of tools for analyzing and understanding systems described using CSP have been produced. Early tool implementations used a variety of machine-readable syntaxes for CSP, making input files written for different tools incompatible. However, most CSP tools have now standardized on the machine-readable dialect of CSP devised by Bryan Scattergood, sometimes referred to as CSPM.[19] The CSPM dialect of CSP possesses a formally definedoperational semantics, which includes an embeddedfunctional programming language.

FDR

[edit]

The most well-known CSP tool is probablyFailures-Divergences Refinement, which is a commercial product originally developed by Formal Systems (Europe) Ltd. FDR is often described as amodel checker, but is technically arefinement checker, in that it converts two CSP process expressions intolabelled transition systems (LTSs), and then determines whether one of the processes is a refinement of the other within some specified semantic model (traces, failures, or failures/divergence).[20] FDR applies various state-space compression algorithms to the process LTSs in order to reduce the size of the state-space that must be explored during a refinement check. FDR was succeeded by FDR2, FDR3 and FDR4.[21]

ARC

[edit]

TheAdelaide Refinement Checker (ARC)[22] is a CSP refinement checker developed by the Formal Modelling and Verification Group atThe University of Adelaide. ARC differs from FDR2 in that it internally represents CSP processes as orderedbinary decision diagrams (OBDDs), which alleviates the state explosion problem of explicit LTS representations without requiring the use of state-space compression algorithms such as those used in FDR2.

ProB

[edit]

TheProB project,[23] which is hosted by the Institut für Informatik, Heinrich-Heine-Universität Düsseldorf, was originally created to support analysis of specifications constructed in theB method. However, it also includes support for analysis of CSP processes both through refinement checking, andLTL model-checking. ProB can also be used to verify properties of combined CSP and B specifications. A ProBE CSP Animator is integrated in FDR3.

PAT

[edit]

TheProcess Analysis Toolkit (PAT)[24][25] is a CSP analysis tool developed in the School of Computing at theNational University of Singapore. PAT is able to perform refinement checking, LTL model-checking, and simulation of CSP and Timed CSP processes. The PAT process language extends CSP with support for mutable shared variables, asynchronous message passing, and a variety of fairness and quantitative time related process constructs such asdeadline andwaituntil. The underlying design principle of the PAT process language is to combine a high-level specification language with procedural programs (e.g. an event in PAT may be a sequential program or even an external C# library call) for greater expressiveness. Mutable shared variables and asynchronous channels provide a convenientsyntactic sugar for well-known process modelling patterns used in standard CSP. The PAT syntax is similar, but not identical, to CSPM.[26] The principal differences between the PAT syntax and standard CSPM are the use of semicolons to terminate process expressions, the inclusion of syntactic sugar for variables and assignments, and the use of slightly different syntax for internal choice and parallel composition.

Others

[edit]

VisualNets[27] produces animated visualisations of CSP systems from specifications, and supports timed CSP.

CSPsim[28] is a lazy simulator. It does not model check CSP, but is useful for exploring very large (potentially infinite) systems.

SyncStitch is a CSP refinement checker with interactive modeling and analyzing environment. It has a graphical state-transition diagram editor. The user can model the behavior of processes as not only CSP expressions but also state-transition diagrams. The result of checking are also reported graphically as computation-trees and can be analyzed interactively with peripheral inspecting tools. In addition to refinement checks, It can perform deadlock check and livelock check.

Related formalisms

[edit]

Several other specification languages and formalisms have been derived from, or inspired by, the classic untimed CSP, including:

Comparison with the actor model

[edit]
This sectiondoes notcite anysources. Please helpimprove this section byadding citations to reliable sources. Unsourced material may be challenged andremoved.(November 2024) (Learn how and when to remove this message)

In as much as it is concerned with concurrent processes that exchange messages, theactor model is broadly similar to CSP. However, the two models make some fundamentally different choices with regard to the primitives they provide:

  • CSP processes are anonymous, while actors have identities.
  • CSP uses explicit channels for message passing, whereas actor systems transmit messages to named destination actors. These approaches may be considered duals of each other, in the sense that processes receiving through a single channel effectively have an identity corresponding to that channel, while the name-based coupling between actors may be broken by constructing actors that behave as channels.
  • CSP message-passing fundamentally involves a rendezvous between the processes involved in sending and receiving the message, i.e. the sender cannot transmit a message until the receiver is ready to accept it. In contrast, message-passing in actor systems is fundamentally asynchronous, i.e. message transmission and reception do not have to happen at the same time, and senders may transmit messages before receivers are ready to accept them. These approaches may also be considered duals of each other, in the sense that rendezvous-based systems can be used to construct buffered communications that behave as asynchronous messaging systems, while asynchronous systems can be used to construct rendezvous-style communications by using a message/acknowledgement protocol to synchronize senders and receivers.

Note that the aforementioned properties do not necessarily refer to the original CSP paper by Hoare, but rather the modern incarnation of the idea as seen in implementations such as Go and Clojure's core.async. In the original paper, channels were not a central part of the specification, and the sender and receiver processes actually identify each other by name.

Award

[edit]

In 1990, “AQueen’s Award for Technological Achievement [was] conferred ... on[Oxford University] Computing Laboratory. The award recognises a successful collaboration between the laboratory andInmos Ltd. … Inmos’ flagship product is the ‘transputer’, amicroprocessor with many of the parts that would normally be needed in addition built into the same singlecomponent.”[30] According to Tony Hoare,[31]“The INMOS Transputer was as embodiment of the ideas … of building microprocessors that could communicate with each other along wires that would stretch between their terminals. The founder had the vision that theCSP ideas were ripe for industrial exploitation, and he made that the basis of the language for programming Transputers, which was calledOccam. … The company estimated it enabled them to deliver the hardware one year earlier than would otherwise have happened. They applied for and won a Queen’s award for technological achievement, in conjunction with Oxford University Computing Laboratory.”

See also

[edit]

References

[edit]
  1. ^abcdeRoscoe, A. W. (1997).The Theory and Practice of Concurrency(PDF).Prentice Hall.ISBN 978-0-13-674409-2.
  2. ^Inmos (1995-05-12).occam 2.1 Reference Manual(PDF). SGS-Thomson Microelectronics Ltd., INMOS document 72 occ 45 03.
  3. ^abCox, Russ."Bell Labs and CSP Threads". Retrieved2010-04-15.
  4. ^"10 Academic and Historical Questions". Retrieved2021-11-15.
  5. ^"FAQ: Why build concurrency on the ideas of CSP?".The Go Programming Language. Retrieved2021-10-15.
  6. ^Hickey, Rich (2013-06-28)."Clojure core.async Channels". Retrieved2021-10-15.
  7. ^abHoare, C. A. R. (1978)."Communicating sequential processes".Communications of the ACM.21 (8):666–677.doi:10.1145/359576.359585.S2CID 849342.
  8. ^Abdallah, Ali E.; Jones, Cliff B.; Sanders, Jeff W. (2005).Communicating Sequential Processes: The First 25 Years.LNCS. Vol. 3525. Springer.ISBN 9783540258131.
  9. ^abBarrett, G. (1995). "Model checking in practice: The T9000 Virtual Channel Processor".IEEE Transactions on Software Engineering.21 (2):69–78.doi:10.1109/32.345823.
  10. ^abHall, A; Chapman, R. (2002)."Correctness by construction: Developing a commercial secure system"(PDF).IEEE Software.19 (1):18–25.CiteSeerX 10.1.1.16.1811.doi:10.1109/52.976937.
  11. ^Creese, S. (2001).Data Independent Induction: CSP Model Checking of Arbitrary Sized Networks (D. Phil.).Oxford University.CiteSeerX 10.1.1.13.7185.
  12. ^abHoare, C. A. R. (1985).Communicating Sequential Processes. Prentice Hall.ISBN 978-0-13-153289-2.
  13. ^Clinger, William (June 1981).Foundations of Actor Semantics (Mathematics Doctoral Dissertation). MIT.hdl:1721.1/6935.
  14. ^Brookes, Stephen;Hoare, C. A. R.;Roscoe, A. W. (1984)."A Theory of Communicating Sequential Processes".Journal of the ACM.31 (3):560–599.doi:10.1145/828.833.S2CID 488666.
  15. ^Buth, B.; M. Kouvaras; J. Peleska; H. Shi (December 1997). "Deadlock analysis for a fault-tolerant system".Proceedings of the 6th International Conference on Algebraic Methodology and Software Technology (AMAST’97). pp. 60–75.
  16. ^Buth, B.; J. Peleska; H. Shi (January 1999). "Combining methods for the livelock analysis of a fault-tolerant system".Proceedings of the 7th International Conference on Algebraic Methodology and Software Technology (AMAST’98). pp. 124–139.
  17. ^Lowe, G. (1996)."Breaking and fixing the Needham–Schroeder public-key protocol using FDR".Tools and Algorithms for the Construction and Analysis of Systems (TACAS). Springer-Verlag. pp. 147–166.
  18. ^abcdefghijklmRoscoe, A.W. (2010).Understanding Concurrent Systems. Texts in Computer Science.doi:10.1007/978-1-84882-258-0.ISBN 978-1-84882-257-3.
  19. ^Scattergood, J. B. (1998).The Semantics and Implementation of Machine-Readable CSP (D.Phil.).Oxford University Computing Laboratory.
  20. ^Roscoe, A. W. (1994). "Model-checking CSP".A Classical Mind: Essays in Honour of C. A. R. Hoare. Prentice Hall.
  21. ^"Introduction — FDR 4.2.4 documentation".www.cs.ox.ac.uk.
  22. ^Parashkevov, Atanas N.; Yantchev, Jay (1996). "ARC – a tool for efficient refinement and equivalence checking for CSP".IEEE Int. Conf. on Algorithms and Architectures for Parallel Processing ICA3PP '96. pp. 68–75.CiteSeerX 10.1.1.45.3212.
  23. ^Leuschel, Michael; Fontaine, Marc (2008)."Probing the Depths of CSP-M: A new FDR-compliant Validation Tool"(PDF).ICFEM 2008. Springer-Verlag. Archived fromthe original(PDF) on 2011-07-19. Retrieved2008-11-26.
  24. ^Sun, Jun; Liu, Yang; Dong, Jin Song (2009)."PAT: Towards Flexible Verification under Fairness"(PDF).Proceedings of the 20th International Conference on Computer-Aided Verification (CAV 2009). Lecture Notes in Computer Science. Vol. 5643. Springer. Archived fromthe original(PDF) on 2011-06-11. Retrieved2009-06-16.
  25. ^Sun, Jun; Liu, Yang; Dong, Jin Song (2008)."Model Checking CSP Revisited: Introducing a Process Analysis Toolkit"(PDF).Proceedings of the Third International Symposium on Leveraging Applications of Formal Methods, Verification and Validation (ISoLA 2008). Communications in Computer and Information Science. Vol. 17. Springer. pp. 307–322. Archived fromthe original(PDF) on 2009-01-08. Retrieved2009-01-15.
  26. ^Sun, Jun; Liu, Yang; Dong, Jin Song; Chen, Chunqing (2009)."Integrating Specifications and Programs for System Specification and Verification"(PDF).IEEE Int. Conf. on Theoretical Aspects of Software Engineering TASE '09. Archived fromthe original(PDF) on 2011-06-11. Retrieved2009-04-13.
  27. ^Green, Mark; Abdallah, Ali (2002)."Performance Analysis and Behaviour Tuning for Optimisation of Communicating Systems".Communicating Process Architectures 2002.
  28. ^Brooke, Phillip; Paige, Richard (2007). "Lazy Exploration and Checking of CSP Models with CSPsim".Communicating Process Architectures 2007.
  29. ^ISO 8807, Language of Temporal Ordering Specification
  30. ^Geraint Jones (1990)."Sharp as a Razor: A Queen's Award for the Computing Laboratory".The Oxford Magazine (59, Fourth Week, Trinity Term).
  31. ^Len Shustek (March 2009)."An interview with C.A.R. Hoare".Communications of the ACM.52 (3):38–41.doi:10.1145/1467247.1467261.S2CID 1868477.

Further reading

[edit]

External links

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

[8]ページ先頭

©2009-2025 Movatter.jp