• No results found

On sequential composition, action prefixes and process prefix - 2632y

N/A
N/A
Protected

Academic year: 2021

Share "On sequential composition, action prefixes and process prefix - 2632y"

Copied!
20
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

UvA-DARE is a service provided by the library of the University of Amsterdam (https://dare.uva.nl)

UvA-DARE (Digital Academic Repository)

On sequential composition, action prefixes and process prefix

Baeten, J.C.M.; Bergstra, J.A.

Publication date

1994

Published in

Formal Aspects of Computing

Link to publication

Citation for published version (APA):

Baeten, J. C. M., & Bergstra, J. A. (1994). On sequential composition, action prefixes and

process prefix. Formal Aspects of Computing, 6, 250-268.

General rights

It is not permitted to download or to forward/distribute the text or part of it without the consent of the author(s) and/or copyright holder(s), other than for strictly personal, individual use, unless the work is under an open content license (like Creative Commons).

Disclaimer/Complaints regulations

If you believe that digital publication of certain material infringes any of your rights or (privacy) interests, please let the Library know, stating your reasons. In case of a legitimate complaint, the Library will make the material inaccessible and/or remove it from the website. Please Ask the Library: https://uba.uva.nl/en/contact, or a letter to: Library of the University of Amsterdam, Secretariat, Singel 425, 1012 WP Amsterdam, The Netherlands. You will be contacted as soon as possible.

(2)

Formal Aspects of Computing (1994) 6:250-268

9 1994 BCS

Formal Aspects

of Computing

O n S e q u e n t i a l C o m p o s i t i o n , A c t i o n P r e f i x e s a n d

P r o c e s s P r e f i x

J. C. M. Baeten 1 and J. A. Bergstra 2

1 Department of Mathematics and Computing Science, Eindhoven University of Technology, Eindhoven, The Netherlands; and 2 Programming Research Group, University of Amsterdam, Amsterdam, The Netherlands, and Department of Philosophy, Utrecht University, Utrecht, The Netherlands

Keywords:

Process algebra; Process calculus; Sequential composition; Action prefix; Process prefix; CCS, ACP

Abstract.

We illustrate the difference between sequential composition in process algebra axiomatisations like ACP and action prefixing in process calculi like CCS. We define both early and late input in a general framework extending ACP, and consider various subalgebras, some very close to value passing CCS, another one close to CSP.

1. Introduction

The purpose of this paper is to present a family of axiom systems that illustrate the difference between sequential composition and action prefixing. In ACP [BK84], sequential composition is taken as a basic operation whereas CCS [Mil80] is based on action prefixing. CSP [Hoa78] in turn uses sequential composition (being a programming language rather than a process algebra description).

We will survey a family of specifications starting with a parameter-free form of ACP. This specification is subsequently extended with a finite sort N o f data and PN of mappings from N to processes. The setting has been simplified by the assumption that a finite set of data is used for value matching and value passing. Two process constructors are introduced: late functional prefix and early functional prefix. Axioms are provided for these sorts and functions. Then, by a special choice of

Correspondence and offprint requests to : J. C. M. Baeten, Department of Mathematics and Computer Science, Eindhoven University of Technology, PO Box 513, 5600 MB Eindhoven, The Netherlands.

(3)

Sequential Composition, Action Prefixes and Process Prefix 25]

atomic actions, a specification is given of communication by means of value matching. This is the usual format used in ACP-based case studies, starting from [BK86]. Next, the early and late input prefixes erm(v),_ resp. Irm(v);_ are defined. These are action prefixes because of the variable binding effect. We notice that if' denotes associative sequential composition (as it is present in ACP), then

er m (V)" P" Q cannot bind v in P. Q because of the scoping ambiguity ((erm (v). P). G

vs. er m (v) " ( P ' Q ) ) . We conclude that binding actions must be prefixes.

We concentrate on finite processes, restricting attention to a single finite datatype. This allows us to provide initial algebra specifications of various process algebras. Infinite processes can be introduced in the setting of initial algebra semantics along the lines of [BT84].

Having presented an extension of ACP, we determine four algebras of reducts of its initial algebra. Of each of these, a direct specification is given. By direct specification, we mean a specification not involving additional constants, operators and sorts. Two of these specifications, V M C and VPC describe different models of a language very close to finitary CCS.

Taking the minimal subalgebra of a reduct of an initial algebra is a known specification method. It occurs as a type II initial algebra specification in [BT87] and as the subalgebra interpretation of algebraic specifications in [Kam79]. We will refer to such specifications as subalgebra of reduced model-specifications (ab- breviated as SRM specifications).

It is our view that these specifications clarify the relationship between ACP and CCS in a quite satisfactory way. Subsequently, action prefix is extended to process prefix. As a consequence, a concise formulation of so-called parallel input is found. As a second application of process prefixing, we introduce exit actions and an iteration construct that allows the explicit solution of some recursion equations.

The contribution of this paper is certainly not a semantic one. We use strong early bisimulation semantics and strong late bisimulation semantics that are well known from [Par81] and the CCS literature [MPW91], [HL93]. We notice that strong (early) bisimulation was around already before 1980 in the literature on modal logics under different names. We hope to contribute to the design of algebraic specifications of process algebras. In particular, it is shown how action and process prefixing are very useful on top of ACP, in spite of the fact that ACP is based on the seemingly more general sequential composition mechanism.

Several remarks on notation are useful. In [BB90], a constant 0 has been introduced that satisfies the axioms 0" X -- 0, X" 0 = 0 and • + 0 = 0. This constant can be identified with the constant 0 of [Mi189]. By doing so, an important difference between action prefixing a,X and a. X (sequential composition of a and • emerges:

a- 0 = 0 whereas a;O = a" d.

Thus, sequential composition is not an extension of prefixing, not even in the case of basic actions, i.e. actions without binding effect. However, we will simplify our discussion by not considering 0. The role of CCS's nil will be placed by fi of ACP. As said above, we will use ; to denote action prefixing rather than . as used in [Mil80]. Our motivation for this choice is as follows: ACP's 9 extends CCS's. in the setting of basic actions and in the absence of 0. That justifies its notation. Then, another notation is needed for action prefixing for which we choose; like in LOTOS [Bri88].

(4)

252 J.C.M. Baeten and J. A. Bergstra forward in [HI91], [HL93]. A difference is our emphasis on purely equational specification.

We have also considered CSP's communication primitives m!t and m?x (see [Hoa78]). These require the presence of a global state from which a value for t is retrieved and into which a value for x is stored (like the register operator of [Ver92]). When modelled as atomic actions, m!t and m?x have no variable binding effect and they can be used in the context of an associative sequential composition operator.

A distinction can be made between a process algebra specification and a process calculus specification. ACP is a process algebra specification, it explains the laws for algebraic manipulation of processes. VPC (value passing calculus) is the closest approximation we find of finite CCS with value passing. VPC is a process calculus, because it makes essential use of bound and free variables. Below, we will obtain a model of VPC as a subalgebra of a reduct of the initial algebra of a process algebra specification extending ACP. It is not clear to us whether or not such an approach is possible for mobile communication in the style of [EN86] and [MPW92] as well.

2. Parameter-Free ACP and Functional Prefixes

We consider two forms of functional prefix. Later on, these will be used to model early and late input. First, we give a version of ACP without parameters.

2.1. ACP Without Parameters

We describe a version of the process algebra ACP (Algebra of Communicating Processes) of [BK84] without parameters. The axioms are in Table 1, the signature follows. These axioms have the form of a first order theory. For instance, axiom C1 should be read as

Va e A V b e A ( a Ib = bl a).

The signature of ACP is as follows:

P A _ ~ P A C _ A Constant: 6 c A Functions: + : P x P-+P 9 :P x P-~ P II:Px P ---> P I I : P x P-->P I:P x P-->P a:A c x P ~ P sort of processes

subsort of atomic actions. Introduced in [BK82] (adapted from [BZ821).

subsort of core atomic actions. inaction (deadlock). From [BK84].

alternative composition, sum. From [Mil80].

sequential composition, product. From [BZ82]. The laws A4, A5 are from [BK82], [BK84].

Parallel composition, merge. Laws CM 1-9 from [BK84]. left-merge. From [BK82].

communication merge. From [BK84].

encapsulation operator. We write 8{re(X) for 8(d, X). Notation from [BK84].

(5)

Sequential Composition, Action Prefixes and Process Prefix 253 Table 1. ACP X + Y = Y + X A1 ( X + Y ) + Z = X + ( Y + Z ) A2 X + X = X A3 ( X + Y ) . Z = X . Z + Y . Z A 4 ( X . Y ) . Z = X . ( Y . Z ) A5 X+5 = X A6 5"X = 5 A7 a [ b = b ] a C1 ( a l b ) le = al ( b l c ) C2 51a = 5 C3 X[[Y = XLY+Y~X+X[Y CM1 all X = a ' X CM2 a-Xll Y = a. (X II Y) C M 3 ( X + Y ) I I Z = X I L Z + Y I I Z C M 4 a . X l b = ( a [ b ) ' X CM5 alb-X = (alb).X CM6 a ' X l b ' Y = (a l b) " (X ll Y) CM7 ( X + Y ) IZ = X l Z + Y I Z C M 8 Xl ( Y + Z ) = X l Y + X l Z C M 9 O{d}(5 ) = 5 DO d =Y= e~8{d}(e ) = e D1 a{d}(d) = 5 D2 8{d)(X+Y) = 8{d)(X) +~{d}(Y) D3 a{d}(X'Y ) = 8{d}(X)'~{d}(Y) D4 a l b e A C C A a e A C v a = 5 CAA Variables: X, Y, Z .... e P process variables a, b, c .... e A action variables d, e .... e A c core a c t i o n variables.

This p r e s e n t a t i o n o f A C P is an alternative to the p r e s e n t a t i o n in [BW90], where there are two parameters, a finite set o f c o n s t a n t s A, a n d a c o m m u n i c a t i o n f u n c t i o n 7 o n the constants. Then, an a x i o m c o n t a i n i n g an a or b c a n be considered as an a x i o m schema, a n d we are dealing with an e q u a t i o n a l specification A C P ( a , 7). I n this case, we also have f o r each subset H o f A an e n c a p s u l a t i o n o p e r a t o r a H.

In the present setting, we have a subsort o f core a t o m i c actions. This s u b s o r t prevents 5 f r o m being a first a r g u m e n t for encapsulation. C A A (Core A t o m s A x i o m ) expresses t h a t a t o m i c actions are either 5 or core. P r o p e r n o n - c o r e actions will for example emerge in the f o r m o f multi-actions w h e n step bisimulation semantics is considered (not in this p a p e r however). C C A ( C o m m u n i c a t i o n Closure A x i o m ) simply expresses t h a t the c o m m u n i c a t i o n o f two a t o m i c actions is again an a t o m i c action. Since the subsort A c m a y be infinite, we encapsulate only singleton sets. W e c a n generalize by writing ~{d ... Ok}(X) f o r a{d,}O...OO{d~}(X ), if dl ... d k e A c.

2.2. Renaming

A useful extension of ACP is obtained by the addition of renaming operators (see [BB88], notation from [Vaa90]). Let f be a unary function from A c to A c. Then we

(6)

254 J.C.M. Baeten and J. A. Bergstra

Table

2. Renaming

pf(d) = f(d)

p f ( X + Y ) = pf(X) +,of(Y) pf(X. Y) = pf(X) .,o,(Y)

add an operator pf:P -~ P to ACP, that renames each d e A c into f(d). We have the axioms in Table 2. The theory ACP plus renaming is called ACP + RN.

I:A c -~ A c renaming function

pf:

P -~ P renaming operator.

2.3. Subalgebra of Reduced Model Specifications

Since the theory ACP of 2.1 has d as only constant, the initial algebra is the one- point model. Thus, if we want to talk about subalgebras of initial ACP algebras, we

need an additional set of constants. Extend ACP by a finite set

IA~

of atomic

constants, so for each d e [ACl we have the declaration

d ~ A c

as a constant in the signature of ACP

(IAOI).

Next, if

7:IACl x IA~ § IACl U {&}

is a commutative and associative function, then first, we replace axioms C1,2, CCA, CAA by axioms

d i e = 7(d, e)

for all d, e e

IACl.

Secondly, we replace the axiom D1 by the axiom schema

~{d} (e) = e (for all d, e e

IACl

such that d ~ e).

Thirdly, the axioms CM2, 3, 5, 6, 7, D2, 3, 4 are interpreted as axiom schemas, for all d, e ~ IA~ These three steps lead to the finite equational specification ACP (IACl, 7) of [BK84], [BW90]. Let 7~ be the communication function always yielding d. In order to exemplify the SRM specification method we will first consider four subsignatures o f the signature of ACP(IAC[, 7~) :

9 E(BPA) has sorts P, A, set o f constants IA~ and functions + , 9 9 2(BPA6) has sorts P, A, set o f constants {6} U

IACl

and functions + , 9 9 2(PA) has sorts P,A, set of constants

IACl

and functions + , . ,

II, II

9 E(PA6) has sorts P, A, set o f constants {d} U

IA~

and function + , . , [I, II Let I be the initial algebra of ACP

(IA~ 76).

F o r a subsignature E, consider ( I ) z. This is the minimal subalgebra of the 2-reduct o f / , / l z . Then the following results paraphrase results that can be found e.g. in [BW90]:

9 (I)z(BPA) is axiomatised, by axioms A1-5 of Table 1 (in the sense of an initial algebra speofication). They constitute the theory BPA.

9 (I)z(BP%) is axiomatised by axioms A1-7 of Table 1. They constitute the theory BPA6.

9 (I)~(PA) is axiomatised by axioms A1-5 of Table 1 and axioms M 1 - 4 of Table 3 below. They constitute the theory PA.

9 (I>z(PA) is axiomatised by axioms A1-7 o f Table 1 and axioms M1-4 of Table

6

(7)

Sequential Composition, Action Prefixes and Process Prefix 255

Table 3. Axioms for PA, PAo X r l Y = X L Y + Y L X M1

a [ X = a . X M2

a ' X L Y = a ' ( X l l Y ) M3

( X + Y ) L Z = X ~ Z + Y ~ Z M4

2.4. Functional Prefixes

Fix a natural number n ~> 1. This number will be a parameter of the further theory.

Later on, n will be the cardinality of the message set that we consider as input or output messages. We have constants i in the language for all numbers 1 ... n (usually we do not make this difference explicitly, but in this case it makes things to follow more clear). Additional signature:

Sorts: N pN Constants: 1 ... n ~ N Functions: < . . . ) : P x ... x p_+pN _A_:A x N ~ A eN:A x pN ___> p ON:A x pN __> p Variables: p,q, r e N F e P N set o f numbers {1 ... n}

functions from N to processes, represented by a sequence of length n.

numbers 1 ... n

sequence of,processes of length n, representing element o f P"

late to early conversion (adapted from [Mi189]) late functional prefix

early functional prefix

Axioms are in Table 4 (as before, a, b e A, X, Y, X i e P). We notice that there are no

restrictions on A except for the axiom 6Ap = 6.

The last axiom in Table 4 is the Early Communication Axiom ECA. It says that two late action prefixes cannot communicate. We call this extension of ACP with functional prefixes Functional Prefix Algebra, FPAEcA(N ). O f course, at this point

Table 4. Early and late functional prefixing aON<X 1 ... Xn) = (aA1).Xl + . . , + (aAn)'X n

5 ^ p = 6 - _

6 O N F = 5

(a eN <Xl ... Xn> ) "Y = a eN <XI"Y ... Xn'Y) (a eN <X1 ... Xn) ) [_Y = a ON <XI II Y ... Xn [l Y ) a{a}(b ON <X~ . . . Xn> ) = a{a}(b) O N <a{a}(X I ) . . . ~{a}(Xn) >

(aONF) lb = (aON F) lb a l ( b e N F ) = a l ( b 9 ( a O N F ) I b ' X = ( a 9

a ' X l (beN F) = a ' X l (bON F) (aeNF) l(bON G) = ~ ECA

(8)

256 J . C . M . Baeten and J. A. Bergstra

a modification is possible by allowing late prefixes to communicate. This requires that axiom ECA is dropped, of course. It happens for instance, when we consider mobile processes (see [EN86], [MPW92]).

3. Forms of Communication

We will specialize the general theory o f the previous section to describe several forms o f communication. Our specifications will be of the form ACP (lAth, y) with LACl and ? being extended step by step.

3.1. Read-Send Communication

We give a specific instantiation of the set of atomic actions A and communication on A following the notation of [BK86]. We assume the set o f messages is given as N (perhaps after some appropriate coding), and we assume given a finite set of communication ports Jg. F o r each i e N and m e J g we have the following atomic actions;

9 rm(i) read message i at port m,

9 Sm(i ) send message i at port m,

9 Cm(i ) communicate message i at port m.

T h u s , w e h a v e

IA~

= { r m ( i ) , Sm(i ), C m ( i ) I i e N, m e,//4'},

IAI --IA~

U {5).

On this action set, communication is defined by means of the axioms in Table 5 (a e A, p e N). These axioms are actually axiom schemes, so for instance the first axiom exists for every i e N and m e J~. Adding these axioms is consistent with axioms CO, 1, 2, 3 o f ACP. These notations and axioms have been introduced in [BK86].

Table 5. Read-send communication rm(i) ISm(i ) = Cm(i )

rm(i ) I Sk(j) = 5 rm(i) Irk(j) = 5 Sin(i) ISk(j) = 5 Cm(i) [a = 5 %0) ^ P = 5 sin(i) ^ p = 6 Cm(i ) ^ p = 5 i f k # m o r i # j 3.2. Booleans

In the sequel, we need the sort of Booleans. We use the axioms in Table 6 (p e N,

d e Ac). We use t h e / f . . ,

then..,

operator (one-armed conditional) :-% see [BB92]. In

terms o f this operator, the

then...if...else..,

operator (two-armed conditional) can

be defined (notation taken from [HHJ + 87]). Sort:

B booleans

Constants:

(9)

Sequential Composition, Action Prefixes and Process Prefix 257 Functions: -~_ :B-+B _ V _ : B x B - + B _ A _ : B x B - + B ( _ = _ ) : N x N ~ B _:->_ :B x P - + P _ < _ ~ > _ : P x B x P-+ P Variables: # , y e B . negation disjunction conjunction data equality one-armed conditional,/f...then...

two-armed conditional,

then...if...else...

Table 6. Booleans ~ T = F F v f l = f l ~ F = T T A f l = f l T V f l = t F A f l = F (p = p) = T ( i = j ) = F i f i # j T : - ~ X = X F:->X = 6 # : - ~ ( X + Y ) = ( # : + X ) + ( # : ~ Y ) (fl:--> X ) . Y = f l : ~ X . Y (,8:--* X) L Y = f l : + X L Y (#:->-X) IY = f l : - ~ X l Y Xl (#:~Y) = fl:->xIY a{d~( # :-+ X) =/~ :~ a{d}(X) pf(fl :->- X) = fl : ~ p f ( X ) X < , 8 > Y = (fl:-> X) + (~fl:-> Y) 3.3. Substitution

Now we introduce in the language variables over N in Boolean expressions. These are elements of the syntax, and can be considered as constants in the signature.

Table 7. Substitution 6 [ p / v ] = 6 a e A c ~ a [ p / v ] = a ( X + Y ) [ p / v ] = X [ p / v ] + Y [ p / v ] (X. Y) [ p / v ] = X [ p / v ] . Y [ p / v ] (a ON <X1 ... Xn> ) [ p / v ] = a l p / v ] eN <Xl [ p / v ] ... X ~ [ p / v ] > ( X < f l ~ Y ) [p/v] = X[p/v] <fl[p/v] ~Y[p/v] T i p / v ] = T F [ p / v ] = F (~fl) [ p / v ] = ~ f l [ p / v ] (flA 7) [ p / v ] = f l [ p / v ] A 7 [ p / v ] ( f l y y) [ p / v ] = f l [ p / v ] V 7 [ p / v ] (q = r) [ p / v ] = ( q [ p / v ] = r i p / v ] ) i [ p / v ] = i v [ p / v ] =-p w [ p / v ] = w i f v # w

(10)

258 J . C . M . Baeten and J. A. Bergstra

Assume there is an infinite set of variables V = { v , w , v 1 .... }. As we have no functions defined on N, this makes that the only terms over N are the individual constants and the individual variables. Thus, each boolean expression (k = m) has one o f the forms (i = !), (v = _i), (i = v), (v = w). In the presence o f these variables, we can define substitution by means of the axioms in Table 7 ( a e A , p , q , r ~ N , X,Y, X i ~ P , fl, 7 ~ B ).

Functions:

_ [_/_] : P x N x V-+ P substitution on P

_ [_/_] :B x N x V-+ B substitution on B

_ [_/_] :N x N x V -+ N substitution on N

It is possible to extend this set-up, and allow functions on N, so that we can f o r m terms over N, consisting of variables, constants and function symbols. We do not do so for reasons of simplicity.

3 . 4 . E a r l y a n d L a t e A c t i o n P r e f i x i n g

N o w we add a n u m b e r of u n a r y operators on P, based on [Mil80]. We also add a new input action, and a functional abstraction operator. Let m ~ J~, i ~ N and v ~ V.

Axioms are in Table 8 ( a ~ A , X~ P). Extra signature:

erm(V);_:P-+ P early input prefix

Irm(V);_:P-:- P late input prefix

Sm(i);_:P-+ P output prefix

Cm (i) ;_: P -+ P c o m m u n i c a t i o n prefix

r m ~ A c input a c t i o n

2v._: P -> pN functional abstraction

We are not dealing with free and bound variables here because of the way we treat variables over N. This is why we do not need machinery to distinguish free and b o u n d variables and ~-conversion.

Table 8. Early and late input Sm(i);X = Sm(i ) "X Cm(i);X = Cm(i ) ' x e r m ( v ) ; X = r m o N Z v . X I r m ( v ) ; X = r m O N )~v . X rm^_i = rm(i) r m l a = 6 ,~v. X = <X[1/v] ... X[n/v] >

Notice that we can write erm(v);X = rm(1 ).X[1/v] + . . . + rm(n) .X[_n/v ], so if one focuses on early input prefixes, b o t h functional input prefixing and functional abstraction are not necessary and just serve as a notational convenience.

(11)

Sequential Composition, Action Prefixes and Process Prefix 259 3.5. Example

The following expression denotes a process that reads in a value i in late semantics and then outputs the value i + 1 (rood n) along the same port:

Irm(V); (Sm(2) <aV = 1 [ ; > ~ + . . . + S i n ( l ) <a V = n [ > ~ ) .

3.6. Restricted Input

We can define input actions that work with a restricted domain, a subset o f N. Let D ~ N .

Extra syntax: erred (v);_:P-> P I r D ( v ) ; _ : P + P r o e A c

restricted early input prefix restricted late input prefix restricted input action.

Table 9. Restricted input ermD(V);X = rDoN2V-X Irg(v); X = rDeN2V'X rg^im ----rrn(i ) i f i ~ D r g ^ i - - • rn - - ifir r~Ja = 3.8. Elimination

We can obtain an elimination theorem for the theory developed in this section, even for terms containing data variables. Thus, call a term process closed if it does not contain process variables. Then we claim that for each process closed term over this theory, there is a process closed term that is provably equal to it that does not contain the operators l, 4, [, ~{d}, ON, A, [/], ;.

3.9. Hoare's Input Action

We consider another kind o f communication which is useful to model the various features o f original CSP [Hoa78] and theoretical CSP [BHR84].

We start from the set o f atomic actions introduced above, so we have actions ~, rm(i ), sin(i), Cm(i), r m for each ie N, m e / / t . As in 3.3, we have a set o f variables V ranging over N. We do not want to mix the variable prefixes o f 3.4 with the variable constructs here, so we assume we have a different set o f variables here. Let us denote the variables here by x, y, z .... instead of v, w . . . We add the following atomic actions:

m?x e A c Hoare's input action, for x e V , m ~ J {

(x: = i) e A c assign a value to a variable, for x e V, i e N

ass(i) e A c The value has been assigned, for i t N

Furthermore, we add the functions

(12)

260

Table 10. Hoare's input action

J. C. M. Baeten and J. A. Bergstra

A~(m?x) = rm(1 ) + . . . + rm(n) Z ~ ( x : = i) = ass(i) 2~(d) = d for d n o t o f the f o r m m?x or x : = i 2~(m?x. X) = rm(1 ) "2~ (X) + . . . + rm(n). 2 x ( x ) 2 ~ ( x : = i . X ) = a s s ( i ) . Z x ( x ) Z ~ ( d ' X ) = d ' 2 ~ ( X ) f o r d not o f the f o r m m?x or x : = i Z ~ ( X + Y ) = p(X) +.,i,p(Y) A x x 2 ~ ( X < # > Y ) = ,t~,(X) < p [ p / x ] > 2 B ( Y )

We have the equations in Table 10. In the expression ~.~(X), the state operator puts process X in a context where the variable x is locally known and where it has initial value p.

The CSP output action m!i can simply be defined as sin(J), and the notation m!x can be used as an abbreviation for

s i n ( l ) < x = l ~ > 5 + . . . + S m ( n ) < x = n ~ > 5 (cf. 3.5).

4. Process Prefix

In section 3 we added a number o f prefix operators. We can generalise this to a setting where the ; operator becomes a binary operator on processes. The early input and late input become new atomic actions, satisfying the same axioms as the ones in Table 7. Further on, we also define CCS restriction and CSP synchronisation merge.

4.1. Definition

Constants: er m ( v ) e A c I r r e ( v ) e A c

early input action (for each v e V, m e ./g ) late input action (for each v e V, m e J g )

Table 11. Process prefix

er m (v) la = Ira(v) l a = er m (v) ^ p = Irm(V) ^ p = & X = rm(i);X = rm(i ) "X Sm(i);X = Sm(i ) "X Cm(J);X = Cm(J ) ' X rm;X = rrn'X erm(v);X = rrn o N .;LV" X Irm(v);X = rm ON ZV" X ( X + Y ) ; Z = X ; Z + Y ; Z (X. Y);Z = X;(Y;Z)

(13)

Sequential Composition, Action Prefixes and Process Prefix 261

Functions:

;: P x P ~ P process prefix In Table 9, a e A, X, Y, X i e P.

We now have two types of actions, basic actions that satisfy a;X = a-X, and

other actions, called non-basic. Here, we have basic actions 5, rm(i), sin(i), cm(i), r m

and non-basic actions erm(V ), Irrn(v ) and we can write IACr = IAgl U IACb], with

IAgl n IA~bl- ,~.

4.2. E x a m p l e

As an example of the use of the process prefix, we can define parallel input: (Ir 1 (v) l)Ir2(w));P(v,w)

describes a process that receives two inputs independently along ports 1 and 2, and then continues dependent upon these inputs, under late bisimulation semantics, whereas

(eq (v) t[ er2(w));P(v, w )

describes the same process under early bisimulation semantics. We can even mix early and late as in

(Ir 1 (v) II Ir2(w) II er3(x));P(v, w, x). Further, we allow the following:

(Ir 1 (v) II Irz(w) ]1 er3(v));P(v, w).

4.3. Example

In this example, we use the abbreviation sin(v) for the term sin(l) < v = l ~ > 5 + . . . + S m ( n ) < v + n ~ > J (cf. 3.9).

With this abbreviation, we can specify a one-item buffer with input port 1 and output port 2 as follows:

B = (eq (v);s2(v)). B.

A two-item buffer containing one item (initially given by v) can be specified by means of a set of two equations:

C = (eq (w) fl Sz(V));D D = (er 1 (v) II Sz(W));C.

4.4. Elimination

For the theory including process prefix, we still have an elimination theorem as in 3.8: also the extra operator process prefix can be eliminated from process closed terms.

(14)

262 J . C . M . Baeten and J. A. Bergstra Table 12. Iteration and exits

~;X = a ~ . X = ~ ~ l b = d ~ = 6 ~ a = b X~; = X;X ~;

4.5. Iteration, Exits

We obtain another application of the process prefix if we look at the prefix iteration operator, in combination with special non-basic actions. A~ is the set o f basic actions, actions satisfying a;X = a" X.

Functions:

_~o,: p_~ p prefix iteration

- : A ~ U A n b - > Anb c c exit operator

4.6. E x a m p l e s

(i) Put P = ( a + b ) ~: for basic a, b. Then P = ( a + b ) ; P = a ; P + b ; P = a . P + b , so P solves a well-known equation.

(ii) All linear systems of equations over A~ can be solved using this mechanism. As an example, we consider a system with three equations, all aij e A~. Let • = a l l "Xl + a 1 2 . X 2 + a ~ 3 . •

X 2 = a21 9 X 1 4- a22' X 2 4- a23" X 3 4- a24 X 3 = a31 9 X 1 Jr a32. X 2 4- a33. X 3 4- a24. P u t U 3 : a31 4- a32 4- a33 -b a34

U 2 : gl21 4- a22 4- a23" U3 c~ + a24

U 1 = a l l -Fa12" U2~ 9 U3C~ U2O~;q-i~14 ,

then it is an easy calculation to show that

X 1 = U l (~; X 2 = U2O);;Ul~O; X 3 = U3Co;;U2m;;UlO); '

4.7. C C S

Restriction

F o r use in the following section, we define the CCS restriction operator (with a subscript 5 to indicate that we are renaming to 5, not to 0 as in CCS) :

\~: P • J g ~ P restriction

Table 13. Restriction

(15)

Sequential Composition, Action Prefixes a n d Process Prefix 263

4.8. Synchronisation Merge

In order to define the CSP synchronisation merge, we start from a finite set of c

atomic synchronisation actions, AsCy. For each a e Asv, we add a new atomic action a 2. This gives us the set

AsC = {a z I a A y}.

On these atoms, we define a special communication function 7sv by means of the first axioms of Table 14. Next, we have the renaming operator P2-~ 1 that removes squares again; it is based on the function (2 -+ 1 ) on atoms given in the next two axioms of Table 14.

Finally, let H be a subset of AsCv. Then we define the following operators;

II.:P x P-+ P

synchronisation merge (H _c AsCy)

[IH:P x P-+ P synchronisation left merge (H _q ACy)

[H: P x P-+ P synchronisation communication merge (H _~ AsCy)

In the definition, we use the set K = {a21a eASy-H}. Table 14. Synchronisation merge

a la = a 2 for a eAsCy

a I b = 6 otherwise

( 2 + 1 ) ( a 2) = a f o r a e A ~ v ( 2 - ~ 1 ) (a) = a for aeAsCy or a = ~ X I[ H Y = P2 ~I ~ ~ (,02 ~ ~ (X) [[ ,o 2 ~ I ( Y ) )

XLL-H Y = P2~I OaK Oal"l (P2 ~ I (X) iLP2~I (Y)) x IH Y = P2~I oak oaH(p2~1 ( X ) I P 2 ~ I (Y))

5. S R M

S p e c i f i c a t i o n s

O f the theory developed in section 3, we can specify several subalgebras of reduced models 9 As a starting point we take the theory FPAEc A (N, rsc). This is FPAEcA (N) together with the additional syntax and axioms of section 3.1 through 3.5.

5.1. Basic Value Matching Algebra

Let I be the initial algebra of FPAEcA(N,

rsc).

The signature Z(BVMA) is

obtained by deleting functional prefixing, all prefix operators and the input actions r m Then (I)z(RVMA is axiomatised by ACP([AC[ 7) plus Booleans of 3.2 and 9 ) '

substitution of 3.3, where

IACl

: {r m (i), s m (i), c m (i) ] i e N, m e d//} and 7 is given by the axioms in Table 4. This is the theory B V M A (Basic Value Matching Algebra), also called A C P with read-send communication, that was used in [BK86], [Bae90].

5.2. Value Matching Calculus

Let I be the initial algebra of FPAEc A (N, rsc). The signature Z(VMC) is listed below. Then (/)Z(VMC) is axiomatised by the axioms A1, 2, 3, 6, 7, CM1, 4, 8, 9 of

(16)

264

Table l& Value m a t c h i n g calculus

J. C. M. Baeten and J. A. Bergstra

e r m ( v ) ; X + e r m ( v ) ; Y = e r m ( v ) ; X + e r m ( v ) ; Y + e r m ( V ) ; ( X ~ v = p m Y ) E I A

erm(v);X = e r m ( w ) ; X [ w / v ] if w ~ FV(X)

,~LX =,~

erm(v);Xjl Y = erm(V);(X [I Y) it" v ~ FV(Y)

Sm(i);XkY = Sm(i);(X II Y) Cm(i);Xl[ Y = Cm(i);(X II Y) 5 1 X = 6

X l 5 = 5

erm(v);XI Sm(i);Y = Cm(i);(X[i/v] LI Y)

erm(v);XlSk(i);Y = 5 if m # k

Sm(i);Xl erm(v);Y = cm(i);(X ]1Y[i/v])

Sm(i);Xl erk(V);Y = 5 if rn :/= k erm(v);X I erk(W);Y = ,5 Sm(i);X I Sk(j);Y --- 6 Cm(i);XlY = 5 XlCrn(i);Y = 5 5\,~ m = 5 errn(V);X\,~m = 5 erm(v);X\ok = erm(V);(X\,~k) if m # k Sm(i);X\am = 5 Sm(i);X\~k = Sm(i);(X\~k ) if m # k Cm(i);X\~k = Cm(i);(X\~k ) ( X + Y ) \ ~ m = X \ ~ m + Y \ a m

ACP plus the axioms in Table 5 (Booleans), the axioms in Table 7 (substitution) except for the sixth and seventh, and the axioms in Tables 15 and 16 below. This is the theory VMC (Value Matching Calculus), very similar to finitary CCS under strong early bisimulation semantics.

By axiomatisation of an algebra by a calculus, we understand that all valid closed identities are provable from the axioms and rules of the calculus.

The signature of VMC: Sorts: P B Constants: 5 s P T, F e B Functions; erm(V);_:P-+ P Sm (i);_:P--> P Cm(i);_:P--> P + : P x P - > P II:P x P ~ P ~ : P x P - + P I : P x P ~ P \,~:P x J { - > P -~_:B-+ B process booleans nil true, false

early input prefix, for med;L veVar (N) output prefix, for m e JE, i e N

communication prefix, for m e J{, i e N alternative composition, sum

parallel composition, merge left-merge

communication merge restriction

(17)

Sequential Composition, Action Prefixes and Process Prefix 265 _ V _:B x B -+ B disjunction _ A _:B x B - ~ B conjunction (_ = _):N x N -~ B data equality _ < _ ~-_: P x B x P -+ P conditional _ [_/_]: P x N x V-~ P substitution on P _ [_/_] : B x N x V-+ B substitution o n B _ [_/_] :N x N x V-+ N substitution on N.

In Table 15, the crucial axiom is early input axiom EIA taken from [MPW91]. In fact, it constitutes the difference between early and late semantics. Essentially, it is the same axiom as axiom G4 o f [GP91]. This specification is actually a calculus, since we m a k e essential use o f the notions o f free and b o u n d variables. We define these technicalities in the following Table 16.

Table 16. Free variables and extra substitution axioms

FV(5) = .~ FV(erm(v);X ) = F V ( X ) - { v } FV(sm(i);X) = FV(X) F V ( c m ( i ) ; X ) = FV(X) F V ( X + Y ) = FV(X) U FV(Y) F V ( X < fl ~>Y) = FV(X) U FV(fl) U FV(Y) FV(T) = FV(F) = FV(~#) = FV(#) FV(flA 7) = FV(fl) U FV(7) FV(fl v 7) = FV(fl) U FV(7) FV(p = q) = F V ( p ) U F V ( q ) FV(_i) = .~ FV(v) = {v} (errn(W);X) [ p / v ] = e r m ( w ) ; X [ p / v ] (Sm(i);X) [ p / v ] = sm(i);X (Cm(i);X) [ p / v ] = cm(i);X i f v 4= w and w e FV(p) 5.3. V a l u e P a s s i n g C a l c u l u s

Let I be the initial algebra o f FPAEr A (N, rsc). The signature E(VPC) is the same as Z(VMC), only with the early input prefix replaced by the late input prefix. Then

Table 17. Value passing calculus

Irm(v);X = I r m ( w ) ; X [ w / v ] Irm(v);XLY = Ir~(v);(X II Y) Irm(V);XlSm(i);Y = Cm(i);(X[i/v] Jl Y) Irm(v);X I Sk(i);Y = 6

sm(i);Xl Irm(v);Y = Cm(i);(X iJ Y [ i / v ] ) Sm(i);X j Ir~(v);Y = 5 Irm(v);Xl Irk(W);Y = 5 Irm(v);X\~m = 5 Irm(v);X\6k = Itm(V);(X\6k ) FV(Irm(v);X ) = F V ( X ) - { v } (Irm(w);X) [ p / v ] = I r m ( w ) ; X [ p / v ] if w r FV(X) if v r FV (Y) i f m # k if r o C k i f m C k i f v # w and w e FV(p)

(18)

266 J . C . M . Baeten a n d J. A. Bergstra (/)2(VPC) is axiomatised by the axioms of VMC without the axioms involving early input but with the axioms of Table 17. The crucial difference is the absence of a counterpart of the Early Input Axiom. This is the theory VPC (Value Passing Calculus), very similar to finitary CCS under strong late bisimulation semantics.

5.4. Value Passing Algebra

Let I be the initial algebra of FPAEc A (N, rsc). The signature Y,(VPA) is listed below. Then {I):c(VPA) is axiomatised by the axioms of ACP plus the axioms of Table 18 below. This is the theory VPA (Value Passing Algebra), an algebraic variant of VPC.

Table 18. Value passing algebra rm[a =

Sin(i) l a = c~ Cm(i) l a =

(rm eN (X1 ... Xn)) I sin(i) = Cm(i) "Xi

(r m O N F) I Sk(i ) = c$ if k # m

Sm(i) J (rm ON <Xl ... Xn>) = Cm(i) "Xi

sin(i) I (rke N F) = O i f k # m

(rm QN ~Xl ... Xn)) I Sm(i)" Y = Gin(i) ' (Xi II Y)

(rrnO N F)ISk(i)"X = CS i f k r m

Sin(i)' Y I (rm ON (Xl ... Xn>) = Cm(i) ' (Y I/Xi)

s m ( i ) ' X [ (r k e n F) = 5 if k # m (r m e N F) Ir k = 5 rml (rkeN F) = 5 (rmeNF) l r v X = 6 rm'XI (rkeN F ) = 6 (rmeNF) lCk(i) = 5 Cm(i) l(rkO NF) = 5 (rmO N F)I c k ( i ) ' X = 5 Crn(i) ' X l ( r k l N F) = 5 a l X = a X l a = a ~ O N F = ~ Sm(i ) O N F = 5 cm(i) eN F = 5 (a e N <Xl . . . Xn) ) "Y = a eN <Xl "Y ... X,~ " Y } (a ON <~Xl ... Xn))~_Y = a ON ( X l II Y ... Xo [I Y )

(qtal( b QN ~Xl ... Xn)) = (q',a',(b) QN <~(3',al(Xl) ... ~lal(Xn)) (a e N F) I ( b e N G) = 5 E C A Sorts: P A___P

N

pN Constants: 6 c A r m c A Srn(i ) c A Crn(i) ~ A processes

subsort of atomic actions set of numbers {1 ... n} functions from N to processes inaction

late input action, for m c output action, for m c J~, i e N

(19)

Sequential Composition, Action Prefixes and Process Prefix 267 Functions: + : P x P - > P - : P x P - + P II:Px P - + P ~:P x P--> P I : P x P ~ P 6 : A x P-> P < . . . ~>:Px ... x p__> pN I N : A x pN _> p

alternative composition, sum sequential composition, product parallel composition, merge left-merge

communication merge encapsulation operator

sequence of processes of length n late functional prefix

5.5. Synchronisation Merge

As a last SRM specification, we consider a direct axiomatisation of the

c2

synchronisation merge. Let I be the initial algebra of ACP ([AsCvl U [Asv[, 7sv) + R N plus synchronisation merge of 4.8. The signature Z(SY) contains constants lACy] U {fi} and operators + , . , HH, ~H, JR for H ~ ACv. Then <I)z(sY)is axiomatised by the axioms A1-7 of ACP plus the axioms in Table 19below.

Table 19. Synchronisation merge X IfHY = X[[_H Y+YIJ_H X+XIH Y

a[j_H X = a . X

alLHX =

a ,XILH Y = a'(X I[H Y) a.X~HY = f ( X + Y ) [L_H z = XJkH Z + Y / I H z aIHa = a a l H b = 6 a-XIH b = (aiR b ) ' X a l H b . X = ( a l H b ) . X

a'XlHb'Y= (alH b)'(XlpHY) (X+Y) FH z = XIHZ+YIH z XlH (Y+Z) =XlHY+XIHZ i f a ~ H i f a e H i f a r i f a e H i f a E H i f a C H or b r or a # b

6. Conclusion

We conclude that this paper provides a satisfactory connection between the process calculus CCS and the process algebra axiomatisation ACP. By means of extra operators on top of ACP we can define on the one hand a new operator called process prefix, and on the other hand obtain versions of value passing CCS as subalgebras of reduced model specifications. In addition, some key features of CSP have been modeled in a similar fashion.

Acknowledgement

We thank A. Ponse (University of Amsterdam), C. Verhoef (Eindhoven University of Technology) and the referee for their helpful remarks.

N o t e : Partial support received by ESPRIT basic research action 7166, CONCUR2.

The second author also received partial support from ESPRIT basic research action 6454, CONFER.

(20)

268 J . C . M . Baeten and J. A. Bergstra

References

[Bae90] [BB881 [BB90] [BB92] [BW90I [BZ82] [BK82] [BK84] [BK86] [BT84] [BT87] [Bri88] [BHR84] [EN86] [GP91] [HI91] [HL9'3] [Hoa78] [Hoa85] [H HJ + 87] [Kam79] [MilS0] [Mi189] [MPW91] [MPW92] [Par81] [Vaag0] [Vet92]

Baeten, J.C.M. : Applications of process algebra, Cambridge Tracts in TCS 17, Cambridge University Press 1990.

Baeten, J.C.M. and Bergstra, J.A. : Global renamings in concrete process algebra, Inf. and Comp. 78, 1988, pp. 205-245.

Baeten, J.C.M. and Bergstra, J.A. : Process algebra with a zero object, in: Proc. CONCUR 90, Amsterdam (J.C.M. Baeten & J.W. Klop, eds.), Springer LNCS 458, 1990, pp. 83-98. Baeten, J.C.M. and Bergstra, J.A.: Process algebra with signals and conditions, in: Programming and Mathematical Method, Marktoberdorf 1990 (M. Broy, ed.), NATO ASI Series F 88, Springer Verlag 1992, pp. 273-323.

Baeten, J.C.M. and Weijland, W.P.: Process algebra, Cambridge Tracts in TCS 18, Cambridge University Press, 1990.

de Bakker, J.W, and Zucker, J.I. : Processes and the denotational semantics o['concurreno', Inf. & Control 54 (1/2), 1982, pp. 70-120.

Bergstra, J.A. and Klop, J.W. : Fixedpoint semantics in process algebra, report IW 206, Mathematical Centre, Amsterdam 1982.

Bergstra, J.A. and Klop, J.W.: Process algebra for synchronous communication, Inf. & Control 60, 1984, pp. 109-137.

Bergstra, J.A. and Klop, J.W. : Verification of an alternating bit protocol by means of process algebra, in: Math. Methods of Spec. and Synthesis of Software Systems '85 (W: Bibel & K.P. Jantke, eds.), Springer LNCS 215, 1986, pp. 9-23.

Bergstra, J.A. and Tucker, J.V. : Top down design and the algebra of communicating processes, Sci. of Comp. Progr. 5, 1984, pp. 171-199.

Bergstra, J.A. and Tucker, J.V. : Algebraic specifications of computable andsemicomputable datao,pes, TCS 50, 1987, pp. 137-181.

Brinksma, H. : On the design of extended L O T O S - a specification language jbr open distributed O'stems, Ph.D. Thesis, University of Twente 1988.

Brookes, S.D., Hoare, C.A.R. and Roscoe, A.W. : A theory of communicating sequential processes, JACM 31 (3), 1984, pp. 560-599.

Engberg, U. and Nielsen, M. : A calculus of communicating systems with label passing, report DAIMA PB-208, Aarhus University 1986.

Groote, J.F. and Ponse, A.: Process algebra with guards (combining Hoare logic with process algebra), in: Proc. CONCUR'91, Amsterdam (J.C.M. Baeten & J. F. Groote, eds.), Springer LNCS 527, 1991, pp. 235-249.

Hennessy, M. and Ingolfsdottir, M.: A theory of communicating processes with value-passing, I&C 1991.

Hennessy, M. and Lin, H. : Proof systems for message-passing process algebras, report 5/93, University of Sussex 1993.

Hoare, C.A.R. : Communicating sequentialprocesses, CACM 21, 1978, pp. 666 677. Hoare, C.A.R. : Communicating sequential processes, Prentice Hall 1985.

Hoare, C.A.R., Hayes, I.J., He Jifeng, Morgan, C.C., Roscoe, A.W., Sanders, J.W. et al. : Laws of programming, CACM 30, 1987, pp. 672-686.

Kamin, S. : Some definitions for algebraic datatype specifications, ACM Sigplan Notices 14, 1979, pp. 28-37.

Milner, R. : A calculus for communicating systems, Springer LNCS 92, 1980. Milner, R. : Communication and concurrency, Prentice-Hall 1989.

Milner, R., Parrow, J. and Walker, D.: Modal logics for mobile processes, in: Proc. CONCUR'91, Amsterdam (J.C.M. Baeten & J,F. Groote, eds.), Springer LNCS 527, 1991, pp. 45-60.

Milner, R., Parrow, J. & Walker, D. : A calculus of mobile processes, I&C 100, 1992, pp. 1-77.

Park, D.M.R. : Concurrency and automata on infinite sequences, in: Proc. 5th GI Conf. (P. Deussen, ed.), Springer LNCS 104, 1981, pp. 167-183.

Vaandrager, F.W. : Algebraic techniques for concurrency and their application, Ph.D. Thesis, University of Amsterdam 1990.

Verhoef, C. : Linear unary operators in process algebra, Ph.D. Thesis, University of Amsterdam 1992.

Recei~,ed September 1991

Referenties

GERELATEERDE DOCUMENTEN

The Dominating Element Extraction technique investigates whether the given process model includes a dominating action and dominating business object.. Therefore, for each element

Our results correspond to both branches (A) and (B) mentioned above: in Section 2 we present results on the Laplace transform of M (t), relying on known results for L´evy

Figure 1 shows four models that could be discovered using existing process mining techniques.. If we apply the α- algorithm [3] to event log L, we obtain model N 1

De door cTWO voorgestelde nieuwe opzet van het domein statistiek binnen havo wiskunde A beoogt onder andere dat leerlingen meer overzicht hebben over de basisconcepten die in

• Snelle ademhaling, kan nauwelijks praten • Is verward, eten &amp; drinken niet aangeraakt  Wat denk je..  Wat

This paper is organized as follows: in Section II we intro- duce the signal model, along with the physical justification of the use of a sum of exponentially decaying sinusoids as

The literature about effective connectivity presents different methods to assess coupling among time series, such as directed transfer function (DTF), partial directed coherence

Voor de interviews is een vragenlijst opgesteld (bijlage 1). Deze lijst bestaat uit drie delen: een voor ANV's, een voor leden van ANV's en een voor andere agrariërs. De