Semantics for finite delay -

0 downloads 0 Views 2MB Size Report
particularly the Section of Algebra and Geometry, for providing me with the .... them, is defined by making clause 3 in the definition of fortification symmetric. ... Allowing E in the signature, define a term P as finite if it has no subterm of the ..... out by an appropriate equivalence relation M. The only critical point in the choice of.

Theoretical Computer Science Theoretical



176 (1997) 205-234

Semantics for finite delay’ Chrysafis COGS, University of’ Sussex,



Falmer, Brighton BNI 9QH, UK

Received August 1995; revised April 1996 Communicated by M. Nivat

Abstract We produce a fully abstract model for a notion of process equivalence taking into account issues of fairness, called by Milner fair bisimilurity. The model uses Aczel’s anti-foundation axiom and it is constructed along the lines of the anti-founded model for SCCS given by Aczel. We revisit Aczel’s semantics for SCCS where we prove a unique fixpoint theorem under the assumption of guarded recursion. Then we consider Milner’s extension of SCCS to include a finite delay operator E. Working with fair bisimilarity we construct a fully abstract model, which is also fully abstract for fortification. We discuss the solution of recursive equations in the model. The paper is concluded with an investigation of the algebraic theory of fair bisimilarity.

1. Fairness and finite delay A typical fairness notion ensures that a process that is infinitely be taken infinitely operations,

often. Fairness

when the semantic

see for example


is a DCPO (directed

[ 151, and hence to the need for transfinite

time, certain properties

often enabled must

often leads to the failure of continuity

of programs,

complete induction.

of semantic partial order), At the same

such as Ziueness, cannot be proven unless fairness

is assumed. In addition, fairness is a significant issue in hardware and software systems such as communication protocols, distributed databases and asynchronous circuits [71.

In this report we assume a simple notion of fairness: unbounded but finite delay of subprocesses in concurrent computation. Consider a programming language with

’ This paper was composed while I was unemployed and an unofficial visitor at the Department of Mathematics, University of Ioannina, Greece. My thanks and gratitude go the faculty of the department, particularly the Section of Algebra and Geometry, for providing me with the facilities to continue my research. A minor revision of the original paper was made during my honorary fellowship (Spring 1996) at the Department of Computer Science, University of Manchester. * E-mail: [email protected] [email protected],uk. 0304-3975/97/$17.00 @ 1997 Published PIZ SO304-3975(96)00095-3

by Elsevier Science B.V. All rights reserved


C. Hartonas I Theoretical Computer Science 176 (1997) 205-234




A synchronous


proceed at the same speed with lock-step clock.


then the speed of the system

1 as an asynchronous



forces both components





at the ticking of a universal

is that of the slowest issues

of fairness.


A move

of the

process P/Q is either a move of P or one of Q. We may then say that

compound P moves

while Q delays (or vice versa).


a special action

of time is then regarded

1 to indicate

This can be expressed the passage

as an idle transition

more succintly

of time. Delaying

Q & Q. In a language


for one unit

with recursion,

nondeterministic choice and prefixing, such as SCCS, delay 6 is a derived operator definable by the pointwise recursion 6P = ,UX(1 .x + P) (x not free in P). Intuitively, 6P may either perform

the actions of P or idle for one unit of time and then get to

a state where it may either perform the actions of P or else idle for another unit of time, and so on. Given a synchronous parallel operator ]I, asynchrony is captured by defining PlQ = PljbQ + SPllQ, as discussed in Milner [20]. However 6 allows for perpetual delay and so PlQ can exhibit unfair behaviour. For example, if P = px(a.x) and Q = px(b.x), then PlQ can perform either of aw or b”, which is unfair as it precludes

the other process from proceeding.

This creates the need for a delay operator

that only allows for arbitrarily long but finite delay. Adding asynchrony can be defined as P/l&Q+ &PllQ.

such an operator

E, fair

A finite delay operator E was first introduced in Milner’s technical report [19] and subsequently studied by Hennessy in [12, 131. We first review the basics from Milner’s report. 1.1. SCCS

with jinite delay (SCCS

The language

+ E)

_Y of SCCS + E is that of the synchronous


of [20] with the

addition of an operation symbol E (the finite delay operator). Process terms are defined by the following schema, where A is a fixed abelian group of basic actions. P ::= 0 I x,x E Var I a.P, aEA The operational


1 CiGIPi


is the usual for SCCS with the addition

) 6P I p$F.

of the wait and

fulfill rules for a




EE -& EE

Since the actions of EP are exactly those of 6P the two processes will be identified by bisimilarity: EP N 6P. To make the distinction the operational semantics needs to be extended to include information about the infinite behaviour of processes. Certain infinite strings of actions must be deemed inadmissible for a process as they may involve infinite delay. Where u = ala2 . . ’ E A+ is a (finite or infinite) of P is a sequence


of actions a u-computation

C. Hartonasl Theoretical Computer Science 176 (1997) 205-234

where we leave implicit

the proof information

the computation.

A computation

in which




by rules of the individual

with Pi, for some ia

actions ai). The part of it which begins


is called a sequel of

of the form

of the silent


is justified

by the wait rule is called

a waiting. A context (with n “holes”)

is an expression

of the form %‘[Xi,. . . ,X,] built from

product and restriction, for example Xi ]J(&\L). If P is the agent P E V[P,,. . .,P,J, for some agents PI, . . . , P,, then each agent Pi is a subagent of P. Given the rules of action, every u-computation P = %[PI,. . . ,P,] % is inferred

of P W,[Pll,. . .) P,l] a2

from ui-computations,

1 q+lU4lldd. This implies Up'lldp) =p+l Up'lldd. P’ = P~]L: Similar. P’ s PI IIP2: Similar. p’. Since by Proposition 3.9 [cPl]o(p) = [r~P,]~(p) 5 the u-move to p’ may be either a wait move a = 1 or one of [Pllj,(p). In the first case use the fact that [cPl&(p) ZT~ [&PI&,(q). In the latter case and since the guard depth of P1 is strictly below that of EP~ we have, by induction, P’

= &PI: Suppose

E([Pl]cg( p))

UPlIMp) q+lUWM~).We maythen conclude that I[EPlb(P)=~+l P’ = py.Q:



by considering


which has strictly

Uf'dldq). smaller



C. Hartonas I Theoretical Computer Science 176 (1997) 205-234

% [P’]@(q) for any guarded one-hole conan d since p and q are fixpoints it fol-

that [P’&,(p)

We have then shown

text P’. In particular, BP]@(p) M lP]Q(q) lows that p z q. By strong extensionality Theorem Theorem

3.10, 3.18

the conclusion

p =

of 9

q follows

with respect and this

to fair bisimilarity,


the proof



Proof of Theorem 3.20. The proof of this theorem follows from the following sition. Recall that 0 is the class functor Pow(A x -)


and that J is a fixpoint

for 0

and a final O-coalgebra. 3.30. Let ! : 9 -+ J be the unique O-coalgebra morphism. Then ! is


a C-homomorphism, where C is the SCCS + E signature. In other words !(a.p) a.!p, !(p + q)=!p+!q, Proof. For prefixing,

!(p(~) = (!p)l~, summation


and restriction

the claim is immediate

from definitions

given also that for any abstract process p E 9 we have ! p = {(a, !q)( p 3 q}. For delay, the operator F on J is defined as in [l] by sj = j U {( 1,j)}, j E J. We show !(ep) mations for bisimilarity successor


and !(EP) = I.

for all

N% E(!p) for all ordinals IX. By definition of the approxi(see [20]) the cases a = 0 or a limit are trivial. For the

case x = /I + 1 suppose

!(EP) 5

k. Then k =!q for some q E 9


that up 5 q. If q is EP and a = 1, then we have E(!P) -!+ E(!P) and by induction !(EP) rup E(!P). Otherwise, p 5 q and thereby !p :!q. Since E(!P) =!p U {( 1, !p)} it follows that E(!P) $!q. thereby the two processes bisimilarity).

Hence !(EP) ?~+1 I. By induction !(ep) 2 (!p) and are equal (by strong extensionally of J with respect to

For the case of the parallel operator ;=


if r = pllq for some p,q,



We first need to verify that this map is well-defined. if Pdl% = pzllqz, then !pll[!q1 =!p2II!qz.

first that !pl )l!q, 5


= p&2

we must



but !pl ll!ql


k, some k E J. Then there exist a, b, pll,qll

and pl 5

that c = ab, k =!p11d!qll

We claim that for all p,, p2, q,,q2

If this fails, let x be the least ordinal

which we can find pi’s and qi’s such that pll\q1= will derive a contradiction. Suppose

(:) : 9 + J by

I( we define the map



p2(lq2 -% r. Hence

for We


411. If we set r = pI1llqI1, then by there exist a’, b’, ~22, q22 such that

a’ h’ c = a’b’, r = p22llq22 and p2 + ~22, q2 --t q22. Given p11llq11 = r = p22llq22 we get by induction !PII~(!~II rvn !p22jj!q22. Setting k’=!p221\!q22 we have then obtained !p2j]!q2 5 k’ and k N, k’. Next suppose

!p2 II!42 5


By a symmetric

!pi )I!ql -1; k’ and k G k’. By definition X+I !p2 II!q2, contrary to hypothesis.


we can find k’ such that

of the approximations

it follows that !pl l)!q,

C. Hartonasl Theoretical Computer Science 176 (1997) 205-234


Therefore, coalgebra

(:) : W + J is well-defined.

the map

Next we verify that it is a O-

from which it follows that for any p E 9, j3 =!p, by uniqueness


k for some k E J and p is not of the form q((r then there is nothing

of !. If I; $

to prove since j? =!p and ! is a O-coalgebra morphism. Suppose now p = q[(r and then we assume !qll!r -% k. Then there exists a, b,i, j such that k = i[Jj, c = ab and

!q 3 i, !r 5 j. Hence for some q’,r’ we have q 5 q’, r 5 r’ and !q’ = i, !r’ = j. Then k =!q’II!r’, where 411 r 5 O-coalgebra


the case of parallel, Corollary


it must coincide

too, we have !(p((q)=!p(I!q.

with the final map !. Hence for 0

3.31. Let Fu(P) = {x}. Then the square below commutes

other words,for any p~9


q’llr’. This shows that the map (:) : 9 ---) J is a

and thereby

we must have !([Plja(p))

The proof is by structural

The proof of Theorem


= 8PBo(!p>.

on P using the previous



3.20 now easily follows. If n is guarded in P, where Fv(P) =

{x) and IU%(P> = P, UUldq) = q, then !P =Wll~(p)) = lNld!p) and sim!q = !([P]o(q)) = [P]e(!q). Since the functional rP]le on J must have a unique fixpoint, by Theorem 2.4, it follows that !p = !q. Hence any two fixpoints are ilarly


on grounds

of finitary behavior.


3.3. On the algebraic theory of fair bisimilarity In Section 1 we described the language basic (in)equational theory E for SCCS +

LZ of the SCCS + E process algebra. The E is the extension of the first-order calculus

of (in)equality generated by the axioms of Table 1. All (in)equations been considered in [ 191 as the basic algebraic theory of fortification

in Table 1 have equivalence. Our

soundness theorem implies that these (in)equations hold for fair bisimilarity, which is a refinement of both bisimilarity and fortification equivalence. By an _Y-structure we mean a pre-ordered set JY = (M, =,. Use of AFA is essential

here since if the transition

system is presented

as the oper-

ational semantics of a process language with recursion the sets above may well fail to be well-founded. Once again, consider the term p(a.x). Its interpretation yields axiom implies that there is a the singleton set [Pl] = {(u, [PI)}. Th e anti-foundation unique

set satisfying

set. The assumptions

the equation

x = {(a,~)},

hinted at above are described

Definition A.2. A class functor

which of course is a non-wellfounded in the following

0 : C -+ C is standard


if it is set-continuous


preserves inclusion maps: if ix,r :X--t Y is the inclusion map (for any x EX, ix,yx = x~ Y), then Oi,r,;:OX -+ OY is also the inclusion map i~x,~y:OX-+ OY. For the next definition

we need to first recall (from [l]) the following:

Lemma A.3 (Substitution

lemma, AFA). Fix u class X of atoms. For each function IT:X + V, assigning a pure set 7tx to each atom x E X, there exists a unique function

2: V[X] + V that assigns a pure set i?u to each X-set a such that (3) We also recall Lemma A.4 (Solution lemma, AFA). Fix a class X of atoms. Zf u, is an X-set for each x E X, then the system of equations (soe) x = u,


u, E V[X])

has a unique solution in V (the class of all pure sets): There is a map 71: X -+ V such that 7~x= i?u,. The following


special final coalgebra

describes the final condition


needed for the statement

of the

C. Hartonasl Theoretical Computer Science 176 (1997) 205-234


Definition A.5. A standard class functor Qi : C --+ C is uniform on maps iff for every class A C V there is a map $A : @A + V[A’] (assigning an A’-set to each pure set in @A) with the following universal property: Given any assignment of pure sets rc’ : A’ + V to the class A’ of atoms and where it is the substitution map and rt : A + V the obvious map, for any u E @A we have (bi7c)u = jl(C$,&). In a diagram,

@A -


the equation

above means that the square below commutes:


It is then shown in [l] that

Theorem A.6 (Special final coalgebra theorem, AFA). If @ is a standard class functor that is uniform on maps then (Jcp,Zd) is a jinal coalgebra for @, where JQ is the largest jixed point of @. We give below details of the promised

proof of Proposition

Proof of Proposition 3.6. Set-continuity

and preservation




@K is a standard

that the functor Pow is (standard

and) uniform


of inclusion

For the uniformity

maps is rather part, notice first

on maps, where for a class B we define

4~ on u E Pow(B) by 4s~ = {x6 / b E u C B}. Also, the functor Pow(A x -)

is uniform

on maps where we now define Ba on u 2 A x B by

e,U={(a,xb)I(a,b)EuCAxB} For the functor Pow(A x -) x K we simply define a map 4~ = 0, x K. To be explicit, given w E (Pow(A x B) x K), w = (u, k) with u E Pow(A x B) and k E K = Pow(AW). Then

ddu,~) = ({(a,-%)I (a,b)EuCA x B},k). The rest follows by the observation that if 0 is (standard and) uniform on maps then so is @K = 0 x K, where K is a constant fimctor with value some fixed class K. If 0, is the map satisfying the condition of Definition AS, we let 4~ = OA x K. Assume a standard representation of pairing: (x, v) = {{x}, {x, v}}. Let now rc’ : A’ --+ V be any map. Then observe that since K is a pure class 2 is identity on members of K, that is

C. Hartonasi Theoretical Computer Science 176 (1997) 205-234

iik = k

for all k E K. By the following


x K)(u,k))

= fi({{~~u),


= {{(@n)u},


= ((On)

x K)(u,k)


small computation

= S(dAu,k) = {{fiO,u}, k}) = (0

= ((@n)u,

{%/ak}J k)

x K)n(u,k)

= cIvc(zt,k) the proof that @K is uniform

on maps is complete.


References [l] P. Aczel, Non-well-founded Sets, CSLI Lecture Notes Series, number 14 (CSLI, Stanford, 1988). [2] P. Aczel, Final Universes of Processes, Lecture Notes in Computer Science, Vol. 802 (Springer, Berlin, 1994) l-28. [3] P. Aczel and N. Mendler, A Final Coalgebra Theorem, Lecture Notes in Computer Science, Vol. 389 (Springer, Berlin, 1989) 357-366. [4] M. Barr, Terminal coalgebras for endofunctors on sets, Theoret. Comput. Sci. 114 (1993) 2999315. [5] J. Barwise, Admissible Sets and Structures (Springer, Berlin, 1975). [6] J. Barwise and L. Moss, Vicious Circles: On the Mathematics of Non-Well-Founded Phenomena CSLI Lecture Notes Series (CSLI, Stanford, 1996). [7] E. Clarke and 0. Grumberg, Research on automatic verification of finite-state concurrent systems, Ann. Rev. Comp. Sci. 2 (1987) 269-290. [8] R. DeNicola and M. Hennessy, Testing equivalences for processes, Theoret. Comput. Sri. 34 (1984) 833133. [9] N. Francez, Fuirness (Springer, Berlin, 1986). [lo] C. Hartonas and M. Kwiatkowska, Synchronization trees and fairness: a case study, in: C.L. Hankin, I. Mackie and R. Nagarajan, eds., Proc. 2nd Imperial College, Department of Computing, Workshop on Theory and Formal Methods (World Scientific, Singapore, 1995). [11] M. Hennessy, A term model for synchronous processes, Inform. and Control 51 (1981) 58-75. [12] M. Hennessy, Modeling finite delay operators, Tech. Report CSR-153-83. University of Edinburgh, 1983. [13] M. Hennessy, Axiomatizing finite delay operators, Acta Ifbrm. 21 (1984) 61-88. [ 141 M. Hennessy, Acceptance trees, J. Assoc. Comput. Mach. 32 (1985) 897-928. [15] M. Hennessy, An algebraic theory of fair asynchronous communicating processes, Theoret. Comput. Sci. 49 (1987) 121-143. [16] M. Hennessy, Algebraic Theory of Processes (MIT Press, Cambridge, MA, 1988). [17] M. Hennessy and R. Milner, Algebraic laws for nondeterminisim and concurrency, J. Assoc. Comput. Much. 32 (1985) 137-161. [IS] R. Milner, Calculi for synchrony and asynchrony, Tech. Report CSR-104-82, University of Edinburgh, 1982. [19] R. Milner, A finite delay operator in synchronous CCS, Tech. Report CSR-116-82, University of Edinburgh, 1982. [20] R. Milner, Communication and Concurrency (Prentice-Hall, Englewood Cliffs, NJ, 1989). [21] D. Park, On the Semantics of Fair Parallelism, Lecture Notes in Computer Science, Vol. 86 (Springer, Berlin, 1980). [22] J.J.M.M. Rutten, Nonwelijounded Sets and Programming Language Semantics, Lecture Notes in Computer Science, Vol. 598 (Springer, Berlin, 1992) 193-206. [23] J.J.M.M. Rutten, A structural co-induction theorem, Tech. Report, CWI, CS-R9346 1993, Amsterdam.


C. Hartonas I Theoretical Computer Science 176 (1997) 205-234

[24] J.J.M.M. Rutten and D. Turi, On the Foundations of Final Semantics: Non-Standard Sets, Metric Spaces, Partial Orders, Lecture Notes in Computer Science, Vol. 666 (Springer, Berlin, 1993). [25] J.J.M.M. Rutten and D. Turi, Initial algebra and final coalgebra semantics for concurrency, in: J. de Bakker et al. eds., Proc. REX Workshop, A Decade of Concurrency - Reflections and Perspectiues, Lecture Notes in Computer Science, Vol. 803 (Springer, Berlin, 1994) 530-582. [26] G. Winskel, Synchronization trees, Theoret. Comput. Sci. 34 (1984) 33-82. [27] G. Winskel, Generalized trees to give denotational semantics to finite delay, unpublished manuscript.

Suggest Documents