On convergence-sensitive bisimulation and the embedding of CCS in timed CCS
We propose a notion of convergence-sensitive bisimulation that is built just over the notions of (internal) reduction and of (static) context. In the framework of timed CCS, we characterise this notion of `contextual' bisimulation via the usual label…
Authors: Roberto Amadio (PPS)
On con v ergence-sensitiv e bisim ulati on and the em b edding of CCS in timed CCS Rob erto M. Amadio ∗ Univ ersit ´ e P a r is Diderot † No v ember 16, 2021 Abstract W e prop ose a notion of conv erg ence-sensitive bisimulation tha t is built just ov er the notions of (in terna l) reduction and of (static) con text. In the framework o f timed CCS, we c har acterise this notion of ‘co ntextual’ bisimulation via the us ual lab elled tra nsition system. W e also remark that it provides a suitable semant ic framework for a fully abstr act embedding of untimed pro c esses into timed ones. Finally , we show t ha t the notion ca n be refined to include sensitivit y to div ergence . 1 In tro d uction The main motiv atio n for th is w ork is to build a notion of conv ergence-sensitiv e bisimulati on from fir st principles, namely fr om the n otions of internal r e duction and of (static) c ontext . A secondary motiv ation is to understand ho w asynchronous/un timed b ehavio u rs can b e em- b edd ed fu lly abstractly int o synchronous/timed ones. Because the notion of con vergence is v ery m u c h conn ected to the notion of time, it seems that a con vergence- s ensitiv e bisim ulation should fin d a natural application in a s ync hr onous/timed con text. Th u s, in a nutshell, we are lo oking for an ‘intuitiv e’ se m an tic fr amew ork that spans b oth u n timed/asynchronous and timed/sync hr on ou s mo d els. F or the sak e of simplicit y w e will place our discussion in the w ell-known framew ork of (timed) CC S. W e assum e the r eader is familiar with CC S [10]. Timed CCS (TCCS) is a ‘timed’ version of CCS w h ose basic p rinciple is th at time p asses exactly when no internal c omputa tion is p ossible . This notion of ‘time’ is insp ired by early w ork on the Esterel sync h r onous language [3], and it has b een formalised in v arious d ialects of CCS [14, 12, 6]. Here we shall follo w the formalisation in [6]. As in CC S, one mo dels the in ternal computation with an action τ w hile the passage of (discrete) time is r epresen ted b y an action tick that implicitly s ync hr onizes all the pr o cesses and mov es the computation to the n ext instant. 1 In this framework, the basic prin ciple w e mentio n ed is formalised as follo ws: P tick − − → · iff P 6 τ − → · ∗ W ork partially supp orted b y ANR-06-SETI-010-02 . † PPS, UMR-7126. 1 There seems to b e no standard terminology for th is action. It is called ǫ in [14], χ in [12], σ in [6 ], and sometimes ‘next’ in ‘synchronous’ languages ` a la Estere l [2]. 1 a.P a − → P P a − → P ′ Q a − → Q ′ ( P | Q ) τ − → ( P ′ | Q ′ ) P α − → P ′ ( P | Q ) α − → ( P ′ | Q ) P α − → P ′ P + Q α − → P ′ A ( a ) = P A ( b ) τ − → [ b / a ] P P α − → P ′ P ⊲ Q α − → P ′ 0 tick − − → 0 a.P tick − − → a.P P 6 τ − → · P ⊲ Q tick − − → Q ( P 1 | P 2 ) 6 τ − → · P i tick − − → Q i i = 1 , 2 ( P 1 | P 2 ) tick − − → ( Q 1 | Q 2 ) P i tick − − → Q i i = 1 , 2 P 1 + P 2 tick − − → Q 1 + Q 2 P µ − → Q a, a 6 = µ ν a P µ − → ν a Q T able 1: Lab elled transition system where w e write P µ − → · if P can p erform an action µ . TCC S is d esigned so that if P is a pro cess b uilt with the usual CCS op erators and P cann ot p erform τ actions th en P tick − − → P . In other terms, CCS pro cesses are time insensitive . T o comp ensate for this p r op erty , on e in tro d uces a new binary op erator P ⊲ Q , called else next , that tries to ru n P in the current instan t and, if it fails, runs Q in the f ollo wing instant. W e assume coun tably many n ames a, b, . . . F or eac h name a th ere is a communicatio n action a and a co-action a . W e denote w ith α, β , . . . the usu al CCS actions w hic h are comp osed of either an internal action τ or of a communication action a, a, . . . . W e denote with µ , µ ′ , . . . either an action α or the distinct action ti ck . The TC CS pro cesses P , Q, . . . are sp ecified by the follo wing grammar P ::= 0 | | a.P | | P + P | | P | P | | ν a P | | A ( a ) | | P ⊲ P . W e denote with fn ( P ) the names fr ee in P . W e adopt the usual con ve ntion that for eac h thread iden tifier A there is a un ique defining equation A ( b ) = P where the p arameters b include the names in fn ( P ). The r elated lab elled transition sy s tem is sp ecified in table 1. Sa y that a pro cess is a C CS pro cess if it d o es not con tain the e lse next op erator. The reader can easily verify that: (1) P tick − − → · if and only if P 6 τ − → · . (2) If P tick − − → Q i for i = 1 , 2 th en Q 1 = Q 2 . One says that the passage of time is deterministic . (3) If P is a CCS pro cess and P tick − − → Q then P = Q . Hence CCS pro cesses are closed un d er lab elled transitions. It will b e con venien t to wr ite τ .P for ν a ( a.P | a. 0) where a / ∈ fn ( P ), tick .P f or 0 ⊲ P , and Ω for the diverging pro cess τ .τ . . . . . 2 Remark 1 (1) In the lab el le d tr ansition system in table 1 , the definition of the tick action r e lie s on the τ action and the latter r elies on the c ommunic ation actions a, a ′ , . . . . Ther e is a wel l known metho d to give a dir e ct definition of the τ action that do es not r efer to the c ommunic ation actions. Namely, one defines (internal) r e duction rules suc h as ( a.P + Q | a.P ′ + Q ′ ) → ( P | P ′ ) which ar e applie d mo dulo a suitable structur al e quivalenc e. (2) The lab el le d tr ansition system in table 1 r elies on n egativ e c ondition s of the shap e P 6 τ − → . These c onditions c an b e r eplac e d by a c ondition ∃ L P ↓ L , wher e L is a finite se t of c ommu- nic ation actions. The pr e dic ate ‘ ↓ ’ c an b e define d as fol lows: 0 ↓ ∅ a.P ↓ { a } P i ↓ L i , i = 1 , 2 ( P 1 + P 2 ) ↓ L 1 ∪ L 2 P ↓ L P ⊲ Q ↓ L P ↓ L ( ν a P ) ↓ L \{ a, a } P i ↓ L i , i = 1 , 2 L 1 ∩ L 2 = ∅ ( P 1 | P 2 ) ↓ L 1 ∪ L 2 1.1 Signals and a deterministic fragmen t As already ment ioned, the TCC S mo del has b een insp ired by the notion of time av ailable in the Estere l mo del [4] and its relativ es such as SL [5]. These m o dels rely on signals as the basic comm un ication mec h anism. Unlik e a channel, a signal p ersists with in the instant and disapp ears at the en d of it. It tur ns out that a signal can b e d efined recursive ly in TCC S as: emit ( a ) = a. emit ( a ) ⊲ 0 The ‘present’ statemen t of SL that either reads a signal and con tinues the computation in the curren t instan t or reacts to the absence of the signal in the follo wing in stan t can b e co ded as follo w s: p resent a do P else Q = a.P ⊲ Q Mo dulo these enco din gs, the resulting fragmen t of TCCS is sp ecified as follo ws : P ::= 0 | | emit ( a ) | | present a do P else P | | ( P | P ) | | ν a P | | A ( a ) . Notice that, u nlik e in (T)CCS, comm unication actions h a v e an in put or output p olarit y . The most imp ortan t p rop erty of this fragmen t is that its pr o cesses are deterministic [5 , 1]. 1.2 The usual lab elled bisim ulation As usu al, one can d efi ne a n otion of we ak tr ansition as follo w s: µ ⇒ = ( ( τ − → ) ∗ if µ = τ ( τ − → ) ∗ ◦ µ − → ◦ ( τ − → ) ∗ otherwise where the notation X ∗ stands for th e reflexiv e an d transitive closur e of a bin ary relation X . When fo cusin g ju st on in ternal reduction, we sh all write → for τ − → and ⇒ for τ ⇒ . W e write P → · if ∃ P ′ ( P → P ′ ), otherwise we sa y that P h as conv erged an d write P ↓ . W e write P ⇓ if ∃ Q ( P ⇒ Q and Q ↓ ). Th us P ⇓ m eans that P may con verge , i.e. , there is a red u ction sequence to a pro cess that h as conv erged. Because P ↓ iff P tick − − → · , we ha ve that P ⇓ iff P tick ⇒ · . 3 With r esp ect to the notion of weak transition, one can define th e usual notion of bisimu- lation as the largest s y m metric relation R suc h that if ( P , Q ) ∈ R and P µ ⇒ P ′ then for some Q ′ , Q µ ⇒ Q ′ and ( P ′ , Q ′ ) ∈ R . W e denote with ≈ u the largest lab elled bisim ulation ( u for usual ). When lo oking at CC S pro cesses, one ma y fo cus on CCS actions (thus exclud ing th e tick action). W e denote with ≈ u ccs the resulting lab elled bisimulatio n . 1.3 CCS vs. TCCS As we already noticed, TCCS has b een designed so that C CS can b e regarded as a transition closed sub set of TCC S. A natural qu estion is wh ether t wo CCS p ro cesses wh ich are equiv alen t with resp ect to an untimed environmen t are still equ iv alen t in a timed one. F or instance, Milner [9] discuss es a similar question when comparin g C C S to S CCS. 2 1.3.1 T esting semantic s In the con text of TC CS and of a testing semanti cs, the question has b een answered negativ ely b y Hennessy and Regan [6 ]. F or instance, they notice th at the pro cesses P = a. ( b + c.b ) + a. ( d + c.d ) and Q = a. ( b + c. d ) + a. ( d + c.b ) are ‘untimed’ testing equiv alen t but ‘time d ’ testing inequiv alen t. The relev an t test is the one that c hec ks th at if an action b cannot follo w an action a in the cur ren t in stan t then an action b w ill happ en in the follo w ing instan t just after an action c (pro cess P will not p ass this test wh ile pr o cess Q do es). Th is remark motiv ated the auth ors to dev elop a notion of ‘timed’ testing seman tics. 1.3.2 Bisim ulation seman tics What is the situation w ith the u sual lab elled bisim u lation seman tics recalled in section 1.2? Things are fine for r e active pr o cesses whic h are d efi ned as follo ws. Definition 2 A pr o c ess P is r e active if whenever P µ 1 ⇒ · · · µ n ⇒ Q , for n ≥ 0 , we have the pr op erty that al l se quenc es of τ r e ductions starting fr om Q terminate. Prop osition 3 Supp ose P , Q ar e CCS r e active pr o c esses. Then P ≈ u Q if and only if P ≈ u ccs Q . Pr o of . Clearly , ≈ u is a CCS b isimulation, h ence P ≈ u Q implies P ≈ u ccs Q . T o sho w the con ve r s e, we pro ve that ≈ u ccs is a timed bisimulation. So su pp ose P ≈ u ccs Q and P tick ⇒ P ′ . This means P τ ⇒ P 1 tick − − → P 1 τ ⇒ P ′ . Then for some Q 1 , Q τ ⇒ Q 1 and P 1 ≈ u ccs Q 1 . F urther, b ecause Q 1 is r eactiv e there is a Q 2 suc h th at Q 1 τ ⇒ Q 2 and Q 2 ↓ . By definition of bisimulation and the f act th at P 1 ↓ , w e hav e that P 1 ≈ u ccs Q 2 . S o f or s ome Q ′ , Q 2 τ ⇒ Q ′ and P ′ ≈ u ccs Q ′ . Thus w e hav e shown that there is a Q ′ suc h that Q tick ⇒ Q ′ and P ′ ≈ u ccs Q ′ . ✷ Prop osition 3 fails when we lo ok at non-r e active pro cesses. F or in stance, 0 and Ω are regarded as un timed equ iv alen t but they are ob viously timed inequiv alen t since the second 2 The n otion of instant in SCCS is quite different from the one considered in TCCS/ Esterel . In the former one declares explicitly what each thread does at each instan t while in the latter the duration of an instant is the result of an arbitrarily complex interaction amo n g the differen t threads. 4 pro cess do es n ot allo w time to pass. T h is example suggests that if we wan t to extend p rop o- sition 3 to non-reactiv e p ro cesses, then the notion of bisimulati on has to b e c onver genc e sensitive . One p ossibility could b e to adopt the u sual bisim ulation ≈ u on CCS pro cesses. W e already noticed that if P is a CCS pro cess and P tick − − → Q then P = Q . Thus in the bisim ulation game b et ween CCS p ro cesses, th e condition ‘ P tick ⇒ P ′ implies Q tick ⇒ Q ′ ’ can b e replaced by ‘ P ⇓ implies Q ⇓ ’. T h e resulting equiv alence on CCS p r o cesses is not new, for instance it app ears in [8] as the so called stable wea k b isim ulation. O ne ma y notice that this equiv alence has reasonably go o d congruence prop erties. Prop osition 4 Supp ose P 1 ≈ u P 2 and Q 1 ≈ u Q 2 . Then (1) ( P 1 | R ) ≈ u ( P 2 | R ) . (2) If P 1 , P 2 ↓ then P 1 ⊲ Q 1 ≈ u P 2 ⊲ Q 2 . Pr o of . Firs t note that we can work w ith an asymm etric definition of bisim u lation wher e a strong tr an s ition is matc hed by a weak one. (1) W e just chec k th e condition for th e tick action. Supp ose ( P 1 | R ) tick − − → ( P ′ 1 | R ′ ). This en tails P 1 tick − − → P ′ 1 and R tick − − → R ′ . Then P 2 τ ⇒ P ′′ 2 , P ′′ 2 ↓ , and P 1 ≈ u P ′′ 1 . Also P ′′ 2 tick ⇒ P ′ 2 and P ′ 1 ≈ u P ′′ 2 . Finally , we h a ve that ( P ′′ 2 | R ) ↓ b ecause if th ey could synchronise on a name a then so could ( P 1 | R ). (2) Th ere are t wo cases to consider. If P 1 ⊲ Q 1 tick − − → Q 1 then P 2 ⊲ Q 2 tick − − → Q 2 . If P 1 ⊲ Q 1 a − → P ′ 1 b ecause P 1 a − → P ′ 1 then P 2 a ⇒ P ′ 2 and P ′ 1 ≈ u P ′ 2 . ✷ Remark 5 The else next op er ator suffers fr om the same c omp ositiona lity pr oblems as the sum op er ator. F or instanc e, 0 ≈ u τ . 0 but 0 ⊲ Q = tick .Q while τ . 0 ⊲ Q ≈ u 0 . As for the sum op er ator, one may r emark that in pr actic e we ar e inter este d in a guarded form of the else next op er ator. Namely, the e lse next op er ator is only intr o duc e d as an alternative to a c ommuni- c ation action (the pr esen t op er ator discusse d in se ction 1.1 is such an example). Pr op osition 4(2) entails that in this form, the else next op er ator pr eserves bi simulation e quivalenc e. 1.3.3 An alte rna tiv e path The r eader might hav e noticed that on CCS p ro cesses ≈ u r e fines ≈ u ccs b y add ing ma y con- v ergence as an observ able along w ith the u sual lab elled transitions. This is actually th e case of all con verge n ce/div ergence sensitive b isim ulations we are aw are of (see, e.g. , [15, 8]). T he question we wish to in vesti gate is: what happ ens if we just take m ay con verge n ce as an ob- serv able without assumin g the observ abilit y of the lab elled transitions? The qu estion can b e motiv ated by b oth pr agmatic and mathematical considerations. On the p r agmatic side, one ma y argue th at the normal op eration of a timed/sync hr onous p rogram is to r eceiv e inpu ts at the b eginning of eac h instant and to pro d uce ou tp uts at the en d of eac h instan t. Thus, unless the in stan t termin ates, no observ ation is p ossible. F or instance, the pr o cess ( a | Ω) could b e regarded as equiv alent to Ω, while they are distinguished b y the usual bisimulat ion ≈ u on the ground that the lab elled transition a is supp osed to b e d irectly observ able. On the mathematical side, it has b een remark ed b y man y authors that the notion of lab elled transition system is not n ecessarily comp elling. Sp ecifically , one w ould lik e to define a notion of bisimulati on without an a priori commitmen t to a notion of lab el. T o cop e with 5 this problem, a w ell-kno wn appr oac h started in [11] and elab orated in [7] is to lo ok at ‘in ternal’ reductions and at a basic n otion of ‘barb’ and then to close under con texts th us pro ducing a notion of ‘con textual’ b isim ulation. Ho w ever, ev en the notion ‘barb’ is not alwa ys easy to define and justify (an attempt based on the concept of bi-ortho gonality is describ ed in [13]). It seems to us that a natural approac h whic h applies to a wide v ariet y of formalisms is to regard con ve r gence (ma y-termination) as the ‘intrinsic’ b asic observ able automaticall y p ro vided by the internal redu ction relation. 1.3.4 Con tribut ion F ollo win g these p r eliminary considerations, we are no w in a p osition to d escrib e our con tri- bution. 1. W e in tro duce a notion of con textual b isim ulation for CC S whose basic observ able (or barb) is the ma y-termination p redicate (section 2). 2. W e provide v arious c h aracterisatio n s of this equ iv alence culminating in one based on a suitable ‘conv ergence-sensitiv e’ lab elled bisimulat ion (section 3). 3. W e derive from this c h aracterisatio n that (section 4): (a) the embed d ing of CCS in TCCS is fully abstract (even for non-reactiv e pro cesses). (b) the prop osed equ iv alence coincides with the usu al one on reactiv e p ro cesses. (c) on non-reactiv e p ro cesses it iden tifies more pro cesses than the u sual timed lab elled bisim u lation ≈ u . (d) on non-reactiv e C CS pro cesses it is incomparable with the u s ual lab elled CCS bisim u lation ≈ u ccs . 4. W e refine the prop osed n otion of con textual bisimulatio n by making it sensitiv e to diver g enc e and show that th e c haracterisation results men tioned ab ov e can b e extended to this case (section 5). The develo p men t will tak e place in the con text of so called we ak bisim u lation [10] which is more int eresting and c hallenging than str ong bisimulat ion. 2 Con v ergence sensitiv e bisim ulation W e d enote with C, D , . . . one h ole static c ontexts sp ecified by the follo wing grammar: C ::= [ ] | | C | P | | ν aC W e r equire that the notion of b isim u lation we consider is p reserve d by the static contexts in the sen se of [7]. Definition 6 (bisim ulation) A symmetric r elation R on pr o c esses is a bisimulation if P R Q implies: cxt for any static c ontext C , C [ P ] R C [ Q ] . red P µ ⇒ P ′ , µ ∈ { τ , tick } implies ∃ Q ′ ( Q µ ⇒ Q ′ and P ′ R Q ′ ) . 6 We denote with ≈ the lar gest bi si mulation. Remark 7 (1) In view of r emark 1(1), the definition 6 of bisimulation do es not assume the lab els a, a ′ , . . . which c orr esp ond to the c ommunic ation action. Not only the lab els ar e not c onsider e d in the bisimulation game, but they ar e not even r e quir e d in the definition of the τ action. This me ans that the definition c an b e dir e ctly tr ansferr e d to mor e c omplex pr o c ess c alculi wher e the definition of c ommunic ation action i s at b est uncle ar. (2) F or CCS pr o c esses, if P tick − − → Q then P = Q . It fol lows that in the definition ab ove, the c ondition [red] when µ = tick c an b e r eplac e d by P ⇓ implies Q ⇓ . This is obviously false for pr o c esses including the else next op er ator ; in this c ase one ne e ds the tick action to observe the b ehaviour of pr o c esses after the first instant, e.g. , to distinguish tick .a fr om tick .b . In view of the previous remark, the defi n ition of b isim u lation is sp ecialised to CCS pro- cesses by simply restricting the condition [cxt] to C CS static con texts. W e den ote w ith ≈ ccs the r esulting largest bisimulati on. Next w e remark that the ob s erv abilit y of a ‘stable commitmen t (or b arb)’ is entai led b y the obs er v ation of con vergence. Definition 8 We say that P (stably) c ommits on a , and write P ⇓ a , if P ⇒ P ′ , P ′ ↓ , and P ′ a − → · . 3 Prop osition 9 If P ≈ Q and P ⇓ a then Q ⇓ a . Pr o of . S upp ose P ⇓ a and P ≈ Q . Then P ⇒ P ′ , P ′ ↓ , and P ′ a − → · . By d efinition of bisim u lation, Q ⇒ Q ′′ and P ′ ≈ Q ′′ . Moreo ve r , Q ′′ ⇒ Q ′ , Q ′ ↓ , Q ′ ≈ P ′ ≈ Q ′′ . T o s ho w that Q ′ a − → · , consider the con text C = ([ ] | a. Ω). Then w e hav e C [ P ′ ] 6⇓ , w hile C [ Q ′ ] ⇓ if and only if Q ′ 6 a − → · . ✷ Another interesti n g notion is that of c ontextual c onver genc e . Definition 10 We say that a pr o c ess P is c ontextual c onver gent, and write P ⇓ C , i f ∃ C ( C [ P ] ⇓ ) . Clearly , P ⇓ implies P ⇓ C but the con v erse fails taking, for instance, ( a + b ) | a. Ω. Con textual conv ergence, can b e characte r ised as follo ws. Prop osition 11 The fol lowing c onditions ar e e quivalent: (1) P α 1 − → · · · α n − − → P ′ and P ′ ↓ . (2) Ther e is a CCS pr o c ess Q such that ( P | Q ) ⇓ . (3) P ⇓ C . Pr o of . (1 ⇒ 2) Sup p ose P 0 α 1 − → P 1 · · · α n − − → P n and P n ↓ . W e build the p ro cess Q in (2) b y ind uction on n . If n = 0 w e can tak e Q = 0. Otherwise, s upp ose n > 0. By inductiv e h yp othesis, there is Q 1 suc h that ( P 1 | Q 1 ) ⇓ . W e pro ceed by case analysis on the fi rst action α 1 . If α 1 = τ tak e Q = Q 1 and if α 1 = a take Q = a.Q 1 . 3 Note that in this definition the pro cess ‘commits’ on action a only when it has con verged. 7 (2 ⇒ 3) T aking the static cont ext C = [ ] | Q . (3 ⇒ 1) First, chec k by induction on a static con text C that P τ − → · imp lies C [ P ] τ − → · . Hence C [ P ] ↓ implies P ↓ . Second, sho w that C [ P ] α − → Q imp lies that Q = C ′ [ P ′ ] where C ′ is a static conte xt and either P = P ′ or P α ′ − → P ′ . Th ird, supp ose C [ P ] τ − → Q 1 · · · τ − → Q n with Q n ↓ . Sh o w by induction on n that P can mak e a series of lab elled tr an s itions and r eac h a pro cess w hic h has conv erged. ✷ Remark 12 As shown by the char acterisation ab ove, the notion of c ontextual c onver g e nc e is unchange d i f we r estrict our attention to c ontexts c omp ose d of CCS pr o c esses. W e notice th at a b isim ulation nev er identi fi es a pro cess whic h is conte xtu al con verge nt with one which is not while id entifying all pro cesses w hic h are not con textual con ve r gen t. Prop osition 13 (1) If P ≈ Q and P ⇓ C then Q ⇓ C . (2) If P 6⇓ C and Q 6⇓ C then P ≈ Q . Pr o of . (1) If P ⇓ C then for some con text C , C [ P ] ⇓ . By condition [cxt] , we h a ve that C [ P ] ≈ C [ Q ], and by condition [red] we derive that C [ Q ] ⇓ . Hence Q ⇓ C . (2) W e notice that the relation S = { ( P , Q ) | P, Q 6⇓ C } is a bisim u lation. Ind eed: (i) if P 6⇓ C then C [ P ] 6⇓ C , (ii) if P ⇒ P ′ and P 6⇓ C then P ′ 6⇓ C , and (iii) if P 6⇓ C then P 6 tick ⇒ · . ✷ 3 Characterisation W e c h aracterise the (conte xtu al and con ve r gence sensitiv e) bisimulation introduced in defini- tion 6 by means of a lab elled bisim ulation. The latter is obtained from the f ormer b y r eplacing condition [cxt] with a suitable condition [lab] on lab elled transitions as defin ed in table 1. Definition 14 (lab elled bisim ulation) A symmetric r elation R on pr o c esses is a lab el le d bisimulation if P R Q implies: lab if P ⇓ C and P a ⇒ P ′ then Q α ⇒ Q ′ and P ′ R Q ′ wher e α ∈ { a, τ } and α = a if P ′ ⇓ C . red if P µ ⇒ P ′ , µ ∈ { τ , t ick } then ∃ Q ′ ( Q µ ⇒ Q ′ and P ′ R Q ′ ) . We denote with ≈ ℓ the lar gest lab e l le d bisimulation. Remark 15 (1) By r e mark 7, on CCS pr o c esses the c ondition [red] when µ = tick is e quiv- alent to: ‘ P ⇓ implies Q ⇓ ’. By r e mark 12, the notion of c ontextual c onver genc e is unaffe cte d if we r estrict our attention to CCS pr o c esses. This me ans that, by definition, the (time d) lab el le d b i simulation r estricte d to CCS pr o c esses is the same as the lab el le d bisimulation on (untime d) CCS pr o c esses. (2) The pr e dic ate of c ontextual c onver genc e ⇓ C plays an imp ortant r ole in the c ondition [la b] . T o se e why, supp ose we r e plac e it with the pr e dic ate ⇓ and assume we denote with ≈ ℓ ⇓ the r e su lting lar gest lab el le d bisimulation. The fol lowing example shows that ≈ ℓ ⇓ is not pr eserve d by p ar al lel c omp osition. Consider: P 1 = a. ( b + c ) , P 2 = a.b + a.c, Q = a. ( d + Ω) . 8 Then ( P 1 | Q ) ≈ ℓ ⇓ ( P 2 | Q ) b e c ause b oth pr o c esses fail to c onver ge. On the other hand, ( P 1 | Q ) | d 6≈ ℓ ⇓ ( P 2 | Q ) | d b e c ause the first may c onver ge to ( b + c ) which c annot b e matche d by the se c ond pr o c ess. (3) One may c onsider an asymmetric and e quivalent definition of lab el le d bisimulation wher e str ong tr ansitions ar e matche d by we ak tr ansitions . T o che ck the e quivalenc e, it is useful to note that P 6⇓ C and P α − → P ′ implies P ′ 6⇓ C . W e p ro vide a rather standard pro of that bisimulati on and lab elle d bisim u lation coincide. Prop osition 16 If P ≈ Q then P ≈ ℓ Q . Pr o of . W e show that the bisim u lation ≈ is a lab elled bisimulati on. W e denote with P ⊕ Q the internal c h oice b et w een P and Q which is defin able, e. g. , as τ .P + τ .Q . Supp ose P ⇓ C and P a ⇒ P ′ . W e consider a cont ext C = [ ] | T wh ere T = a. (( b ⊕ 0) ⊕ c ) and b, c are ‘fresh names’ (not o ccur ring in P , Q ). W e kno w C [ P ] ≈ C [ Q ] and C [ P ] ⇒ ( P ′ | ( b ⊕ 0)). Th u s C [ Q ] ⇒ ( Q ′ | T ′ ) where either Q a ⇒ Q ′ and T a ⇒ T ′ or Q ⇒ Q ′ and T = T ′ . • Supp ose P ′ 6⇓ C . Then ( P ′ | ( b ⊕ 0)) 6⇓ C and, b y prop osition 13 , ( Q ′ | T ′ ) 6⇓ C . The latter implies that Q ′ 6⇓ C . By con tradiction, supp ose Q ′ ⇓ C , that is ( Q ′ | R ) ⇓ . Then ( Q ′ | T ′ ) | R | T ′ ⇓ (con tradiction!), where w e tak e T ′ = a if T ′ = T and T ′ = 0 otherwise. Hence, P ′ ≈ Q ′ as r equ ired. • S upp ose P ′ ⇓ C . If Q a ⇒ Q ′ and T a ⇒ T ′ then w e show th at it m u st b e that T ′ = ( b ⊕ 0). T his is b ecause if P ′ ⇓ C then P ′ | ( b ⊕ 0) ⇓ C whic h in tu r n implies that for some R (not con taining the names b or c ), ( P ′ | ( b ⊕ 0) | R ) ⇓ b . By prop osition 9, we must ha v e Q ′′ = ( Q ′ | T ′ ) | R ⇓ b . Th u s T ′ cannot b e 0 and it cannot b e ( b ⊕ 0) ⊕ c , for otherwise Q ′′ ⇓ c whic h cann ot b e matc hed b y ( P ′ | ( b ⊕ 0) | R ). F u rther, we h a ve P ′ | ( b ⊕ 0) τ − → P ′ | 0 (= P ′ ). So ( Q ′ | ( b ⊕ 0)) τ ⇒ ( Q ′ | T ′′ ) and P ′ ≈ ( Q ′ | T ′′ ). T h e latter entails that T ′′ = 0. On the other h and, w e sho w that Q τ ⇒ Q ′ and T = T ′ is imp ossible. Reasoning as ab o ve, w e ha ve ( P ′ | ( b ⊕ 0) | R ) ⇓ b . Bu t then if ( Q ′ | T ) | R ⇓ b w e shall also hav e ( Q ′ | T ) | R ⇓ c . ✷ The follo wing lemma relates con textual con vergence to lab elled b isimulation (cf. the similar p rop osition 13). Lemma 17 (1) If P ≈ ℓ Q and P ⇓ C then Q ⇓ C . (2) If P 6⇓ C and Q 6⇓ C then P ≈ ℓ Q . Pr o of . (1) By pr op osition 11, if P ⇓ C then P α 1 − → · · · α n − − → P ′ and P ′ ↓ . By definition of lab elled bisimulat ion we should hav e Q α 1 ⇒ · · · α n ⇒ Q ′ and P ′ ≈ ℓ Q ′ . Then P ′ tick ⇒ · enta ils Q ′ tick ⇒ , and therefore Q ⇓ C . (2) By prop ositio n 13, P , Q 6⇓ C implies P ≈ Q , and by prop osition 16 w e conclude that P ≈ ℓ Q . ✷ Prop osition 18 If P ≈ ℓ Q then P ≈ Q . 9 Pr o of . W e sh o w that lab elled bisim u lation is p reserv ed b y static con texts. I n view of remark 15(3), w e sh all work w ith an asymmetric defin ition of bisimulatio n . With resp ect to this defin ition, we sh o w that the follo w in g relations are lab elle d bisim u lations: { ( ν a P , ν a Q ) | P ≈ ℓ Q }∪ ≈ ℓ , { ( P | R, Q | R ) | P ≈ ℓ Q }∪ ≈ ℓ . The case for restriction is a routine v erifi cation s o we fo cus on parallel comp ositio n . Supp ose ( P | R ) µ − → · . W e pro ceed b y case analysis. • ( P | R ) α − → ( P | R ′ ) b ecause R α − → R ′ . Then ( Q | R ) α − → ( Q | R ′ ). • ( P | R ) tick − − → ( P ′ | R ′ ) b ecause P tick − − → P ′ and R tick − − → R ′ . Then Q ⇒ Q 1 tick − − → Q 2 ⇒ Q ′ and P ′ ≈ ℓ Q ′ . Notice that P ≈ ℓ Q 1 with P , Q 1 ↓ , and th erefore ( Q 1 | R ) tick − − → ( Q 2 | R ′ ). Hence ( Q | R ) tick ⇒ ( Q ′ | R ′ ). • Sup p ose ( P | R ) ⇓ C and ( P | R ) a − → ( P ′ | R ) b ecause P a − → P ′ . Then P ⇓ C and therefore Q α ⇒ Q ′ , α ∈ { a, τ } , and P ′ ≈ ℓ Q ′ . I f ( P ′ | R ) ⇓ C then P ′ ⇓ C and this ent ails α = a . • Sup p ose ( P | R ) τ − → ( P ′ | R ) b eca u se P τ − → P ′ . T hen Q τ ⇒ Q ′ and P ′ ≈ ℓ Q ′ . • Supp ose ( P | R ) τ − → ( P ′ | R ′ ) b ecause P a − → P ′ and R a − → R ′ . If P , P ′ ⇓ C then Q a ⇒ Q ′ and P ′ ≈ ℓ Q ′ . If P ⇓ C and P ′ 6⇓ C then Q α ⇒ Q ′ , α ∈ { a, τ } , and P ′ ≈ ℓ Q ′ . But then ( P ′ | R ) , ( Q ′ | R ) 6⇓ C , and we apply lemma 17. If P 6⇓ C then Q 6⇓ C and therefore ( Q | R ) 6⇓ C , and we apply again lemma 17. ✷ As a first application of the c h aracterisation w e c hec k that bisim ulation is pr eserv ed b y the else next op erator in the sense of p rop osition 4(2). Corollary 19 Supp ose P 1 ≈ P 2 , P 1 , P 2 ↓ , and Q 1 ≈ Q 2 . Then P 1 ⊲ Q 1 ≈ P 2 ⊲ Q 2 . Pr o of . There are t wo cases to consider. If P 1 ⊲ Q 1 tick − − → Q 1 then P 2 ⊲ Q 2 tick − − → Q 2 . If P 1 ⊲ Q 1 a − → P ′ 1 b ecause P 1 a − → P ′ 1 then P 2 α ⇒ P ′ 2 , P ′ 1 ≈ ℓ P ′ 2 , and α ∈ { τ , a } . W e note that it m us t b e that α = a . Indeed, if α = τ then since P 2 ↓ w e m u st hav e P ′ 2 = P 2 and P ′ 1 ⇓ C . The latter f orces α = a wh ic h is a con tradiction. ✷ 4 Em b edd ing CCS in TCCS In this s ection we collect some easy corollaries of the charact erisation. First, w e r emark that t wo C C S pro cesses are bisimilar when observed in an untimed/async hronous environmen t if and only if they are bisimilar in a timed/sync h ronous en vironment. Prop osition 20 Supp ose P , Q ar e CCS pr o c esses. Then P ≈ Q if and only if P ≈ ccs Q . Pr o of . By prop ositions 16 and 18 w e kn ow that ≈ = ≈ ℓ . By remark 15(1), the lab elled bisim u lation on u ntimed pro cesses coincides with the restriction to C C S p ro cesses of the timed lab elled bisim u lation. ✷ Second, w e compare the notion of conv ergence-sensitiv e bisimula tion w e hav e introduced with th e usu al one w e ha ve recalled in the section 1.2. All the notions collapse on reactiv e pro cesses. 10 Prop osition 21 Supp ose P , Q ar e r e active pr o c esses. Then P ≈ Q if and only if P ≈ u Q . Pr o of . W e kno w th at ≈ = ≈ ℓ . Reactiv e p ro cesses are closed und er lab elled tr an s itions and on r eactiv e pro cesses the cond itions that define lab elled bisim ulation coincide with the ones for the usu al bisimulat ion. ✷ The situation on non-reactiv e pr o cesses is summarised as follo ws wh er e all implications are strict. Prop osition 22 Supp ose P , Q ar e pr o c esses. (1) If P ≈ u Q then P ≈ Q . (2) If mor e over P and Q ar e CCS pr o c esses then P ≈ u Q implies b oth P ≈ u ccs Q and P ≈ Q . Pr o of . (1) The clauses in the defin ition of ≈ u imply dir ectly th ose in the definition of the lab elled bisim u lation that c haracterises ≈ (definition 14). T o see that th e conv erse fails note that ( a | Ω) ≈ Ω while ( a | Ω) 6≈ u Ω. (2) Use (1) and the fact that the clauses in th e definition of ≈ u imply dir ectly those in the definition of ≈ u ccs . T o s ee that the conv erse fails use the count er-example in (1) and the fact that 0 ≈ u ccs Ω wh ile 0 6≈ u Ω. ✷ 5 Div ergence sensitiv e bisim ulation W e refine the notion of bisimulatio n to m ake it sensitiv e to diver genc e and show that the c haracterisation pr esen ted in section 3 can b e adapted to this case. W e say that a pro cess P ma y dive r ge and write P ⇑ if there is an infinite redu ction sequence of τ actions that starts f rom P . W e refin e the notion of bisim u lation by making it sensitiv e to dive r gence. Definition 23 ( ⇑ -bisimulation) A symmetric r elation R on pr o c esses is a dive r genc e sen- sitive bisimulation ( ⇑ -bisimulation, for short) if it is a bisimulation ac c or ding to definition 6 and if P R Q and P ⇑ implies Q ⇑ . We denote with ≈ ⇑ the lar gest ⇑ -bisimulation. Remark 24 Say that a pr o c ess P is str ongly normalising if al l r e duction se quenc es of τ - actions that start fr om P terminate. A pr o c ess is str ongly normalising if and only if it may not diver ge. It fol lows that one c an give an e quivalent formulation of ⇑ -bisimulation by r eplacing the may diver genc e pr e dic ate with the str ong normalisation pr e dic ate. W e n otice the follo wing p rop erties w hose pro of is direct. Prop osition 25 (1) If P ≈ ⇑ Q then P ≈ Q . (2) If P ≈ ⇑ Q and P ⇓ a then Q ⇓ a . (3) If P ≈ ⇑ Q and P ⇓ C then Q ⇓ C . (4) If P 6⇓ C then P ⇑ . (5) If P 6⇓ C and Q 6⇓ C then P ≈ ⇑ Q . 11 Pr o of . (1) A ⇑ -b isim ulation is also a bisimulatio n . (2) W e app ly (1) and prop ositio n 9. (3) W e app ly (1) and prop ositio n 13(1). (4) Immed iate, by defin ition. (5) If P 6⇓ C and Q 6⇓ C then P ⇑ and Q ⇑ . ✷ It follo ws that ⇑ -bisim u lation coincides with bisimulati on on the pro cesses that are not con textual con vergen t. On the other hand , on those that are con textual conv ergen t, it is a strictly fin er notion as, e.g . , it distinguishes 0 fr om A = τ .A + τ . 0. The charac terisation of ⇑ -bisimulatio n tur ns out to b e straigh tforwa r d : it is en ou gh to mak e the lab elled bisimula tion we ha ve in tro duced in definition 14 s ensitiv e to d iv ergence. Definition 26 ( ⇑ -lab elled bisimulation) A symmetric r e lation R on pr o c esses is a diver- genc e sensitiv e lab e l le d bisimulation (or ⇑ -lab el le d bi si mulation) if i t is a lab el le d bisimulation and if P R Q and P ⇑ implies that Q ⇑ . We denote with ≈ ℓ ⇑ the lar gest ⇑ -lab el le d bisimulation. Because of the pr op erties stated in pr op osition 25, one can rep eat the pro ofs in section 3 while addin g sp ecific arguments to tak e th e sens itivit y to div ergence int o accoun t. Prop osition 27 If P ≈ ⇑ Q then P ≈ ℓ ⇑ Q . Pr o of . W e sho w that ≈ ⇑ is a ⇑ -lab elled bisimulatio n by rep eating the p ro of sc h ema in prop osition 16. Note that the cond ition that refers to div ergence is the same f or ⇑ -bisimulation and for ⇑ -lab elled bisimulatio n . ✷ Lemma 28 (1) If P ≈ ℓ ⇑ Q and P ⇓ C then Q ⇓ C . (2) If P 6⇓ C and Q 6⇓ C then P ≈ ℓ ⇑ Q . Pr o of . (1) Note that P ≈ ℓ ⇑ Q implies P ≈ ℓ Q and apply lemma 17(1). (2) By pr op osition 25(5), P 6⇓ C and Q 6⇓ C implies P ≈ ⇑ Q and by pr op osition 27 the latter implies P ≈ ℓ ⇑ Q . ✷ Prop osition 29 If P ≈ ℓ ⇑ Q then P ≈ ⇑ Q . Pr o of . As in p r op osition 18, we ha v e to v erify that ≈ ℓ ⇑ is preserve d by n ame generation and parallel comp osition. F or the former w e note that ν a P ⇑ if and only if P ⇑ . F or the lat ter, we can rep eat the pr o of in p rop osition 18. Moreo ver, we h a v e to consider the case w here P ≈ ℓ ⇑ Q and ( P | R ) ⇑ . The p ro cess ( P | R ) diverge s b ecause: either P and R ma y engage in a fi nite n u m b er of sync hronisations after which one of the t wo div erges or P and R ma y engage in an infinite n umb er of sync hronisations. Supp ose the finite or infinite num b er of sync hr onisations b et ween P and R corresp ond to the transitions P a 1 ⇒ P 1 a 2 ⇒ · · · and R a 1 ⇒ R 1 a 2 ⇒ · · · If P , P 1 , · · · are all conte xtu ally con ve r gen t then Q a 1 ⇒ Q 1 a 2 ⇒ · · · and P i ≈ ℓ ⇑ Q i . Hence ( Q | R ) ⇑ . If P 6⇓ C then Q 6⇓ C implies ( Q | R ) 6⇓ C whic h imp lies ( Q | R ) ⇑ . Finally , sup p ose P i is the least i suc h that P i 6⇓ C . Then Q a 1 ⇒ · · · a i − 1 ⇒ Q i − 1 α i ⇒ Q i with Q i 6⇓ C and α i ∈ { a i , τ } . If α i = a i then ( Q | R ) ⇑ b ecause ( Q | R ) τ ⇒ ( Q i | R ′ ) and Q i ⇑ . If α i = τ then ( Q | R ) ⇑ b ecause ( Q | R ) τ ⇒ ( Q i | R i − 1 ) and Q i ⇑ . ✷ 12 6 Conclusion W e ha v e p resen ted a n atural n otion of con textual and con vergence sensitiv e bisim ulation and w e h a v e s ho wn that it can b e c haracterised by a v arian t of the usual notion of lab elled bisim u lation relying on the concept of con textual con v ergence. As a d irect corollary of this c haracterisation, w e h av e sho wn that (untimed) CCS p ro cesses are em b ed ded fully abstractly in to timed ones. Finally , we hav e refined the notion of bisim ulation to mak e it div ergence- sensitiv e. W e b eliev e that our main contribution, if any , is of a metho dological nature. The notion of b isim ulation we ha ve introdu ced just requires the n otions of redu ction and static context as opp osed to previous approac h es that build on th e n otion of ‘lab elled’ trans ition or on the notion of ‘barb’. It w ould b e int eresting to app ly the prop osed app roac h to other situations where the notion of equiv alence is unclear. F or instance, w e exp ect that our results can b e extended to a T C CS with ‘asynchronous’ communicat ion or with ‘signal-based’ communica- tion. References [1] R. Amadio. The SL synchronous language, revisited. Journal of L o gic and Algebr aic Pr o gr amming , 70:121-1 50, 2007 . [2] R. Amadio. A sync hronous π -calculus. Information and Computation , 205(9):1 470–1490, 2007. [3] G. Berr y , L. C osserat. Th e Esterel syn c hr on ou s p rogramming language and its mathe- matical semantic s. INRIA tec hn ical rep ort 842, Sophia-Ant ip olis, 1988. [4] G. Berry and G. Gont h ier. The Esterel synchronous p rogramming language. Sci enc e of c omputer pr o gr amming , 19(2) :87–152, 1992. [5] F. Boussinot and R. De Simone. T he SL sync hr onous language. IEEE T r ans. on Softwa r e Engine ering , 22(4):25 6–266, 1996. [6] M. Hennessy , T. Regan. A pr o cess algebra of timed systems. Informa tion and Compu- tation , 117(2):221 -239, 1995. [7] K. Honda and N. Y oshida. O n reduction-based pro cess semantic s . The or e tic al Computer Scienc e , 151(2):4 37-486, 1995. [8] M. Lohrey , P . D’Argenio, and H. Hermanns: Axiomatising dive r gence. In Pro c. ICALP , SLNCS 2380:585- 596, 2002. [9] R. Milner. Calculi for sync h ron y and asyn chron y . The or etic al Computer Scienc e , 25(3): 267–310, 1983. [10] R . Milner. Communicat ion and Concur rency . Prentic e-Hall, 1989. [11] R . Milner and D. Sangiorgi. Barb ed bisim ulation. In Pro c. ICALP , SLNCS 623:685– 695, 1992. 13 [12] X. Nicolin, J . Sifakis. The algebra of timed pro cesses (A TP): theory and application. Information and Computation , 114(1 ):131-178, 1994. [13] J . R athke, V. Sassone and P . Sob o cinski. Semantic barb s and biorthogonalit y . In Pro c. F oSS aCS 2007, SLNCS 4423:302-3 16, 2007. [14] W. Yi. A calculus of real time sys tems. Ph D thesis. C halmers Universit y , 1991. [15] D. W alk er. Bisimulat ion and diverge n ce. Information and C omputation, 85:202 -241, 1990. 14
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment