
Process Algebra with a Zero Object J.C.M. Baeten Department of Software Technology, Centre for Mathematics and Computer Science P.O.Box 4079, 1009 AB Amsterdam, The Netherlands J.A. Bergstra Programming Research Group, University of Amsterdam P. O.Box 41882, 1009 DB Amsterdam, The Netherlands Department of Philosophy, State University of Utrecht Heidelberglaan 2, 3584 CS Utrecht, The Netherlands The object 0 acts as a zero for both sum and multiplication in process algebra. The constant 8, representing deadlock or inaction, is only a left zero for multiplication. We will call 0 predictable failure. 1980 Mathematics Subject Classification (1985 revision): 68Q45, 68Q55, 68Q65, 68Q50. 1987 CR Categories: F.4.3, D.2.10, D.3.1, D.3.3. Key words & Phrases: process algebra, zero, deadlock, inaction, failure. Note: Partial support received by ESPRIT basic research action 3006, CONCUR, and by RACE contract 1046, SPECS. This document does not necessarily reflect the views of the SPECS consortium. Note: this article is a revision of BAETEN & BERGSTRA [90], but leaving out the material in section 6. 1. INTRODUCTION The object 0 acts as a 0 for both sum and multiplication in process algebra. The constant 8 representing deadlock or inaction is only a left zero for multiplication. The purpose of this paper is to indtroduce a constant 0 in process algebra and discuss its properties. We will call Opredictable failure. A predictable failure differs from deadlock (inaction) in the sense that a system will actively try to avoid it. The axioms for 0 incorporate the intention of a system to avoid failure whenever possible. The axioms for 8 (in particular x ~ 0 =~ x + 8 = x) incorporate the intention of a process to make progress if it can. In fact 0 stands for a truly empty process, its execution is simply inconceivable. The process 0 also occurs in PONSE & DE VRIES [89] (but is called 8 there!). A process specification involving 0 or renaming into 0 is not executable. It must be implemented, which means that one has to provide an equivalent (or better) specification not involving 0 or renaming into 0. Due to this observation 0 is a high level feature that plays a role in system design and specification, rather than in implementation. 84 2. AXIOMATIZATION 2.1. BASIC PROCESS ALGEBRA WITH ZERO We start out from the theory of Basic Process Algebra as described in BERGSTRA & KLOP [84a, 85, 86]. For a recent survey article see BERGSTRA & KLOP [89]. We have a set of atomic actions, A. Each atomic action is a constant of the sort P, the sort of processes that the theory is about. Then, we have two binary operators on P: + is alternative composition or sum, and • is sequential composition or product. For this signature, we have the first five axioms in table 1 below (A1-5), constituting BPA. In table 1, x,y,z are arbitrary elements of P. Then we add the zero constant, obeying the next three axioms (Z1-3). Usually, we also have the constant 8 in the theory, called deadlock or inaction. The two axioms for inaction need conditions, in order to avoid clashes with the zero axioms (A60, A70). The conditions use a predicate on processes ~ 0, that determines whether or not a term can be proved equal to the zero process. This predicate is axiomatized in the last four axioms of table 1. There, we have a ~ A. We put A~ = A u {~}, A08 = A u {0,8}, BPA0 = BPA + Z1-3, BPA0~ = BPA0 + A60, A70 + NZ1-4. Of all operators, + will bind the weakest, and • the strongest. We often leave out the • sign. x+y=y+x A1 x + (y +z) = (x + y) + z X+X=X A3 (x+y)'z=x'z+y'z A4 (x'y)'z = x'(y'z) x'O=O Z1 X+0=X 0"X=0 x~0 ~ x+8=x A6 0 x~0 ~ 5.x=8 A7 0 8 ~ 0 NZ1 a ~ 0 NZ2 x~0, y~0 =~ x.y,0 NZ3 x,0 =~ x+y,0 NZ4 TABLE 1. BPA08 The difference between 0 and 8 requires further comments: i. 8 is an inactive process, if a system reduces to 8 it deadlocks. Of course the mere occurrence of 8 in a process expression (like a + b(8 + e)) need not indicate a deadlock. 85 Compare this to the expression e = 2 + 0.(5 + 8); in no way the occurrence of 0 in e implies that e vanishes. ii. x + 8 = x is a progress rule: the system eventually discovers that 8 is no option and proceeds with x (if possible). iii. x'0 = 0 is a liveness rule: the system must, after completion of x, eventually execute 0, i.e. assert false. This form of liveness is not required for 8. iv. 0 + 8 --- 8 because 8 is 'better than' 0. v. 0"x = 0 and 8-x = 8 are explained by the non-executability of 0, resp. 8. Note that we have in particular 8"0 = 0. Unfortunately, the explanation of this in philosophical terms is shallow. 2.2. PROJECTION We can extend the signature given above with the projection operators Xn (for n>l ). The axioms are straightforward adaptations of the usual ones (see BERGSTRA & KLOP [84a]). In table 2, a ~ A. n(O) = 0 Zn(8) = 8 ~:n(a) = a x ~ 0 =, ~1 (ax) = a ~n+l (ax) = a'xn(X) TABLE 2. Projection 2.3 INFINITARY RULES The axioms given above constitute a complete theory for finite processes, processes represented by closed terms, i.e. equality on finite processes (in a graph model to be presented further on) coincides with derivability from the axioms. When we are dealing with infinite processes however, processes specified by means of recursive equations, we need additional proof principles. In this paper, we will discuss 4 such principles. First, we consider: the Approximation Induction Principle (AIP). AIP can be maintained in the present setting as in BERGSTRA & KLOP [86]. Roughly, this proof rule states that two processes should be identified if all their projections are equal. More explicitly: for all n /l:n(X) = xn(Y) =~ x = y. This rule is valid for finitely branching processes only (a process is finitely branching if it has a representation as a finitely branching graph or tree, see further on). Next, we consider two principles that deal with solutions of recursive equations. The Recursive Definition Principle (RDP) states that every recursive specification has at least one solution, and the Recursive Specification Principle (RSP) states that every guarded recursive specification has at most one solution. Here, guarded roughly means that every variable occurring in the right-hand side of an equation must be preceded by an atomic action. For more details and formal definitions, see BERGSTRA & KLOP [86]. 86 Now let us consider these rules in the present setting. Notice that the guarded equation x = a'x has two solutions: 0 and a c° (the process that indefinitely performs a). It follows that the principle RSP has to be relaxed: every guarded system of recursion equations not containing an occurrence of 0 has at most one solution different from 0. Thus more formally, RSP 0 states: Let E be a guarded recursive specification with k process names such that none of the equations of E involves either 0 or a renaming into 0 (see below). Such E is called 0- free. Let X = (Xl ..... Xk) and Y = (Yl ..... Yk) be process vectors of length k. Then Xl ~=O& ... & Xk¢=O & yl ~=0 & ... &yk~O & X = E(X), Y = E(Y) implies X = Y. Besides RSP 0 there is also RDP 0 which states that: every 0-free guarded system of recursion equations possesses at least one solution vector consisting of processes different from 0. The last infinitary proof rule that we will consider is the Limit Rule. We describe this rule in 4.4. 2.4 RENAMING INTO ZERO 08 is an operator that substitutes 0 for 8. We will call this operator deadlock prevention. Leta~ A. oa(o) = o oa(a): o oa(a) : a Oa(ax) = a'Oa(x) oa(x + y) : Oa(x) + oa(y) TABLE 3. Deadlock prevention An example: 05(ab + e(do8 + aS)) = ab. Note that the equation 0~(x'y) = 08(x)'08(y) leads to a problem as follows: Let x = a ~ (i.e. the unique solution different from 0 of the equation z -- a.z) and y -- 8, then x'y --- x because of A/P, hence x = 08(x) = 08(x'y) = 0~(x)'08(y) = 0~(x}-0 = 0, which contradicts the assumptions on x. Also note that it is incorrect to rename an atomic action a into 0 by an operator 0a, for that leads to 0 = 0a(a) = 0a(a + 8) = 0a(a) + 0a(8) = 0 + 8 = 8. 3. SEMANTICS 3.1 TRANSITION RULES We define a structured operational semantics as in VAN GLABBEEK [87], on congruence classes of process expressions, i.e. a ~ relation holds between two terms iff they are provably equal to the format in the rules in table 4 below. Likewise, a term satisfies 87 x/ iff it can be written in the form a + x. For closed terms, the rules now determine an action graph. On action graphs, we will then define a notion of bisimulation as in BERGSTRA & KLOP [86]. In this definition, we have to pay special attention to the separate status of the process 0. Note that we have to define the rules on congruence classes of process expressions, since we need the predicate # 0 in the definition.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages16 Page
-
File Size-