A general conservative extension theorem in process algebras with inequalities Pedro R. D'Argenio1 and Chris Verhoef 2 1Dept. of Computer Science. University of Twente. P.O.Box 217. 7500 AE Enschede.The Netherlands. dargenio@cs.utwente.nl 2Dept. of Mathematics, Computer Science, Physics and Astronomy. Universityof Amsterdam. Kruislaan 403. 1098 SJ Amsterdam. The Netherlan* *ds. chris@fwi.uva.nl Abstract We prove a general conservative extension theorem for transition system* * based process theories with easy-to-check and reasonable conditions. The core o* *f this result is another general theorem which gives sufficient conditions for a * *system of operational rules and an extension of it in order to ensure conservativity* *, that is, provable transitions from an original term inthe extension are the same as* * in the original system. As a simple corollary of the conservative extension theor* *em we prove a completeness theorem. We also prove a general theorem giving suffi* *cient conditions to reduce the question of ground confluence modulo some equatio* *ns for a large term rewriting system associated with an equationalprocess the* *ory to a small term rewriting system under the condition that thelarge system is * *a con- servative extension of the small one.We provide many applications to show * *that our results are useful. The applications include (but are not limited to) * *various real and discrete time settings in ACP, ATP, and CCS and the notions proje* *ction, renaming, state operator, priority, recursion,the silent step, autonomous * *actions, the empty process, divergence, etc. 1991 Mathematics Subject Classification: 68Q05, 68Q10, 68Q42, 68Q55, 03C05. 1991 CR Categories: D.3.1, F.1.1, F.3.2, F.4.3. Keywords: structured operational semantics, term deduction system, transi* *tion system specification, semantic equivalence, semantic preorder, algebraic s* *ystem, process algebra, conservative extension. ________________________________ Supported by the NWO/SION project 612-33-006. 1 1 Introduction In the past few years people workingin the area of process algebra have started* * to extend process theories such as CCS, CSP, and ACP with, for instance, real-time* * or probabilistics. A natural question is whether ornot such an extension is someho* *w re- lated with its subtheory, for instance, whether or not the extension is conserv* *ative in some sense. If we add new operatorsor rules to a particular transition system i* *t would be nice to know whether or not provable transitions of a term in the original s* *ystem are the same as those in the extended system for that term; we will call this p* *roperty operationalconservativity (cf. [GV92 ]). Or, if we extend an axiomatical framew* *ork with new operators, equations, or inequalities itwould be interesting to know whethe* *r or not a theorem (for instance,an equality or an inequality) in the extended frame* *work over original closed terms canalso be derived in the original framework. When * *no new theorems over closed termsin the original framework are provable from the e* *xten- sion, we call the extensionan algebraic conservative extension. This is a well-* *known property under the name of conservativity; we just added the adjective `algebra* *ic' to prevent possible confusion with theop erational variant. In particular we say * *equa- tional or inequational conservative extension when the involved algebraic frame* *works are, respectively, equational or inequational specifications. A frequently used method to prove that analgebraic theory is a conservative * *ex- tension of a subtheory is term rewritinganalysis. In pro cess algebra such an * *analysis is often very complex because the rewriting system associated with a process al* *gebra seems to need term rewriting techniques modulo the equations without a clear di* *rec- tion (such as commutativityof the choice). Moreover,these term rewriting syste* *ms generally have undesirable properties making a term rewriting analysis a comple* *x tool for conservativity. Such term rewriting systems are not regular, which implies* * that confluence (modulo some equations) is not straightforward and we note that the * *term rewriting relation induced by the rewrite rules does not necessarily commute wi* *th the equality induced by the algebraic system, which means that termination modulo t* *hese equations is not at all easy to prove. Let us briefly mention two examples to m* *ake the problems a bit more concrete. Bergstra and Klop [BK84 ]claim that for the conf* *luence modulo some equations of their term rewritingsystem, they need to check 400 cas* *es (which they left to the reader as anexercise). Jouannaud communicated to us th* *at, in general, it is very hard (and unreliable) to make such exercises by hand but* * they can possibly be checked by computer. Our second example originates from Akkerman and Baeten [AB90 ]. They show that a fragment of ACP with the branching | is bo* *th terminating and confluent modulo associativity and commutativity of the alterna* *tive composition. Akkerman told us that it is not clear to him how this result could* * also be established for the whole system and thus yielding a conservativity result. * *However, according to Baeten it is not a problemto establish these results; needless to * *say that their term rewriting analysis is rathercomplicated. To bypass the abovementioned problems involving term rewriting, we propose an alternative method to prove conservativity. We provide ageneral theorem with re* *ason- 2 able and easy-to-check conditions giving us immediately the operational and alg* *ebraic conservativity in manycases. For instance, with our results, the conservativit* *y of the abovementioned systems with problematic term rewriting properties is peanuts. T* *he idea is that we transfer the question of algebraic conservativity to that of op* *erational conservativity rather thanto perform a term rewriting analysis. The only thing * *that remains to be done in order to provethe operational conservativity is to check * *our simple conditions for the operational rules. For the algebraic conservativity w* *e more- over demand completeness of thesubtheory and soundness of its extension. These conditions are in our opinion reasonable, because relations between algebraic t* *heories only become important if the theories themselves satisfy such well-established * *basic requirements. Moreover, our result works for a large class of theories, which i* *s certainly not the case with a term rewriting analysis. All this implies that we give a s* *emanti- cal proof of conservativity, which might be seen as a drawback since a term rew* *riting analysis often is model independent (but seeBergstra and Klop [BK85 ], Fokkink * *and Zantema [FZ94 ],Zantema [Zan95 ] for semantical termrewriting analyses). Howev* *er, since the paper of Plotkin [Plo81], the use of labelled transition systems as a* * model for operational semantics of process theoriesis widespread; so virtually every * *process theory has an operational semantics of this kind. Moreover, our algebraic conse* *rvativ- ity result holds for all semantical preorders -thus, also equivalences- that ar* *e definable exclusively in terms of transition relations. We recall some examples of seman* *tical preorders and equivalences which are definable in terms of relation and predica* *te sym- bols only to show that our conditions are quite general. Examples of equivalen* *ces are trace equivalence,failure equivalence, simulation equivalence,strong bisimu* *lation equivalence, weak bisimulationequivalence, branching bisimulation equivalence, * *the rooted variants of the last two equivalences, etc. We refer to van Glabbeek's * *linear time - branching time spectra [Gla90 ] and [Gla93 ] for more information on the* *se equiv- alences. In [Gla90 ] and [Gla93 ], references to the origins (and use) of these* * semantics can be found. Equivalences for true concurrency were also defined in that way,* * for instance, step bisimulation [NT84 , BB93] and pomset bisimulation [BC88 ]. Exa* *mples of preorders are simulation, n-nested simulations [GV92 ],ready simulation [BI* *M95 ], the preorder for the degree of parallelism based on pomset bisimulation of [Ace* *91 ],the "more distributed than" preorders of [Cas93] and [Yan93 ], the preorder for uns* *table nondeterminism of [VB96 ] and the preorders of bisimulation with divergence of * *[Abr87 ] and [Wal90]. As a result we now can prove conservativity without using the confluence pro* *p- erty. However,it is widely recognised that confluence itself is an important pr* *operty, for instance, for computational or implementational purposes. So, at this poin* *t the question arises: "Why bother about such a general conservative extension theore* *m if we still have to prove confluence for each particular system and get the conser* *vativity as a by-product?" The answer is that once we have the conservativity we can con* *sid- erably reduce the complexity of theground confluence as a by-product. We prove a general reduction theorem stating that in many cases a conservative extension i* *s ground Church-Rosser modulo some equationsif the basic system already has this propert* *y. 3 For instance, the 400cases of Bergstra and Klop [BK84 ] reduce to a term rewrit* *ing analysis with only five rewrite rules and two equations. We should note, howeve* *r, that they prove (modulo 400 cases!) the confluence for open terms (although they only need the closed case), whereas our reduction theorem gives the closed case only* *. In fact, we show that conservativity and ground Church-Rosser are, in some sense, * *equally expressive prop erties. Another advantage of our approachis that it also works for process algebras * *with really bad term rewriting properties,such as process algebras containing the th* *ree| laws of Milner, where the term rewriting approach breaks down; see,e.g., [BK85 ]. W* *e will treat these examples in this paper. Now that we have given somemotivation for this paper we discuss its organisa* *tion. In section 2 we recall some generalSOS definitions of Verhoef [Ver95] and in se* *ction 3 we recall some concepts of algebraicsystems. We provide a running example to el* *uci- date the abstract notions. In section 4 we formally define the notions of opera* *tional and algebraic conservativity. Then we prove a general operational conservativit* *y the- orem, a general inequational conservativity theorem and a simple corollary conc* *erning completeness. Also here we provide our running example. In the next section we * *recall some basic term rewriting terminology toprove the abovementioned reduction theo* *rem on the ground Church-Rosser prop erty modulo some equations. Insection 6 we gi* *ve the reader an idea of the applicability of our general theorems. Surprisingly, * *wecould not find any conservativity result in the literature for which our conservativi* *tytheorem could not be applied, as well. The last section contains concluding remarks. 1.1 Related work In this subsection we briefly mention related work. Nicollin and Sifakis [NS91 * *] prove conservativity_in some particular cases_using the same general approach as we p* *ro- pose in this paper, namelya semantical approach. We will discuss their conserva* *tivity results (and new results) in section 6.The notion that we call in this paper op* *erational conservativity originates from Groote and Vaandrager [GV92 ] under the name con* *ser- vativity. In Groote[Gro93 ], Bol and Groote [BG91 ], and Fokkink and Verhoef [F* *V95 ] this notion also appears. In all these papers this notion is used for a differe* *nt pur- pose than ours. Aceto, Bloom and Vaandrager [ABV92 ] introduce a so-called dis* *joint extension, which is a more restricted form of an operational conservative exten* *sion; they need this restriction for technical reasons. They present an algorithm gen* *erating a sound and complete axiomatisation if the operational rules satisfy certain cr* *iteria. Bosscher [Bos94] studied term rewriting properties of such axiomatisations by l* *ooking at the form of the operational rules. 4 2 Some general SOS definitions In this section we briefly recall some notions concerning general SOS theory th* *at we will need later on in Section 4. We followVerhoef [Ver95] since this paper gives the* * most general setting. To elucidate the formal notions we intersperse them with a run* *ning example. We assume that we have an infinite set V of variables with typical elements * *x;y ; z; : :.: A (single sorted) signature is a set of function symbols together with their a* *rity. If the arity of a function symbol f2 is zero we say that f is a constantsymbol. * *The notion of a term (over ) is defined as usual: x 2 V is a term; if t1; : :;:tn a* *re terms and if f 2 is n-ary then f(t1; : :;:tn) is a term. Aterm is also called an open* * term; if it contains no variableswe call it closed. We denote the set of closed terms* * by C() and the set of (open) terms by O(). We also want to speak about variables occur* *ring in terms: let t 2 O() then var(t) V is the set of variables occurring in t. A substitution oeis a map from the set of variables into the setof terms ove* *r a given signature. This map can easily be extended to the set of all terms by substitut* *ing for each variable occurring in an op enterm its oe-image. Definition 2.1 A term deductionsystem is a structure (;D) with a signature and* * D a set of deductionrules. The set D = D(Tp;Tr) is parameterised with two sets, w* *hich are called (following usual process algebra terminology) respectively the set o* *f predicate symbols and the set of relation symbols. Let s; t; u 2 O(), P 2 Tp, and R2 Tr. * *We call expressions P s;:P s, tRu, and t:R formulas. We call the formulas P s and * *tRu positive and :Ps and t:R negative1. If S is a set of formulas we write PF(S) fo* *r the subset of positive formulas of Sand NF (S) for the subset of negative formulas * *of S. A deduction rule d 2 D has the form H_ C with H a set of formulasand C a positive formula; we willalso use the notation * *H=C. We call the elements of H the hypotheses of d and we call the formula C the con* *clusion of d. If the set of hypotheses of adeduction rule is empty we call such a rule * *an axiom. We denote an axiom simply by its conclusion provided that no confusion can aris* *e. The notions "substitution", "var", and "closed"extend to formulas and deduction rul* *es as expected. Note that the overload of the symbol C in C() and H=C is harmless. LetSd = H=C a deduction rule with C= P s or C= sRs0. Let X = var(s) and let Y = fvar(t0)j tRt02 Hg. Ifvar(d) = X [Y we call d pure. A term deduction system is called pure if allits rules are pure. * * 2 Note that arbitrary many premises are allowed in the set of hypotheses of a * *deduction rule. This generality is useful, for instance, in real-time process algebras wh* *ere it is very natural to have continuously many premises (see [MT90 , Yi90, Klu93].) ________________________________ 1The idea behind t:R is that there is no term s such that tRs. We chose this * *notation among others like :tR, :Rt, or :(tR) since itseems to be the most accurate one. 5 Example 2.2 As a running example,we present the operational semantics of the * *pro- cess algebra with parallel composition PA [BK84 , BW90 ] and the basic process* * algebra with relative discrete time: BPAdt [BB92 ]. We will consider separately BPA (ba* *sic pro- cess algebra), MRG, a mo dule that defines parallel processes without communica* *tion and DT, which is an extension to discrete timed processes. The signature of BPA contains constants a of a set A of atomic actions,alter* *native composition, denoted +, and sequential composition (). The signature of MRG (for merge) contains paral lelcomposition ormerge (jj) and the leftmerge (jj_). The * *signature of DT contains +, and the discrete time unit delay (oed). It is easy to see that the signatures of BPA, MRG, and DT with their operati* *onal rules in Table 1 form termdeduction systems. These term deduction systems havep relations _ a! _for all a 2 A,a relation _ oe!_with oe =2A and predicates _ a! * * for all a 2 A. The intended interpretation of x a! x0ispthat a process x mayexecut* *e an action a and evolve into x0. The meaning of x a! is that x terminates succes* *sfully after the execution of a. With x oe!x0 we mean that apro cess x evolves into x* *0by letting a time unit pass. We write x 6 oe!instead of x: oe!. Our running examples are the combination of BPA with either MRG or DT. The s* *ig- nature of the term deduction system PA is the union of signature of BPA and MRG* *. The operational rules are those of BPA and MRG combined. Similarly,the term deducti* *on system BPAdt is obtained by combining BPA and DT. It is easy to check that PA a* *nd BPAdt are indeed term deduction systems. We will later on use them to demonstr* *ate our results. 2 _________________________________________________________________________ _ (i) p _ p ___x_a!_x0___ _x_a!____ a a! a a _ x y ! x0 y x y ! y _ _ p _ ___x_a!_x0___ __x__a!_____ p x + y a! x0 x+ y a! a! x0 y+ x a!p _ y+ x _ __________________________________________________________________________ _ (ii) _ (iii) _ ___x__a!x0____ ___x_a!_x0___ x__oe!x0__y_oe!y0_ oed(x) oe!x xjjy a!x0jjy xjj_y a!x0jjy x + y oe!x0+ y0 a!yjjx0 _ yjjx _ _ _ p p _ _ _x__a!____ _x_a!_____ ___x_oe!x0___ x__oe!x0__y_6oe!_ xjjy a!y xjj_y a! y x y oe!x0 y x + y oe!x0 a!y y+ x oe!x0 _ yjjx _ _ __________________________________________________________________________ Table 1: Operational rules for BPA, MRG and DT 6 Definition 2.3 Let T be a term deduction system. Let F (T ) be the set of all c* *losed formulas over T. We denote the set of all positive formulas over T by PF (T) an* *d the negative formulas by NF(T ). Let X PF (T ). We define when a formula ' 2 F (T ) holds in X; notation X` '. X ` sRt if sRt 2 X; X ` Ps if P s 2 X; X ` s:R if 8t 2 C (): sRt =2X; X ` :Ps if P s2=X: 2 The purpose of a term deduction system is to define a set of positive formul* *as that can be deduced using the deduction rules. For instance, if the term deduction s* *ystem is a transition system specification then a transition relation is such a set. * *For term deduction systems without negative formulas this set comprises all the formulas* * that can be proved by a well-founded proof tree. If we allow negative formulas in th* *epremises of a deduction rule it is no longer obvious which set of positive formulas can * *be deduced using the deduction rules. Bloom, Istrail, and Meyer [BIM88 , BIM95 ] formulate* * that a transition relation must agree witha transition system specification. We will u* *se their notion; it is only adapted to incorporate predicates. Definition 2.4 Let T = (;D) be a term deduction system and let X PF (T) be a set of positive closed formulas.We say that X agreeswith T if for every formula* * ' 2 X we have that there is a deduction rule instantiated with a closed substitution * *such that the instantiated conclusion equals 'and all the instantiated hypotheses hold in* * X, and vice versa. More formally: Xagrees with T if ' 2 X () 9 H=C 2 D; oe : V ! C() : oe(C) = ';8h 2 H : X ` oe(h): 2 There are several ways to give meaning to a set of formulas that agree with a given term deduction system.In [Gla95 ] an elaborate study on the meaning of ne* *gative premises is given reviewing known interpretations and discussing new ones. We m* *ention the uniqueness approach of [BIM95 ],the stratification techniques described in * *[Gro93 ], the reduction techniques of [BG91 ],and the complete models of [Gla95 ].In this* * paper we focus on applications instead of theory so we choose to work with a techniqu* *e that is easily applicable: the stratification technique described in [Gro93 ]. We no* *te that our results are also valid for moregeneral models such as stable ones [Gla95]. We r* *efer the interested reader to [FV95 ] for details. Definition 2.5 Let T = (;D) be a term deduction system. Amapping S :PF (T )! ff for an ordinal ff is called a stratification for T if for all deduction rule* *sH =C 2 Dand closed substitutions oethe following conditions hold: 7 1.for all h 2 PF (H),S (oe(h)) S(oe(C)); 2.for all s:R 2NF (H )and for all t 2 C(), S(oe(sRt)) < S(oe(C)); 3.for all :P s 2 NF (H), S(oe(P s)) < S(oe(C)). We call a term deduction system stratifiable if there exists a stratification f* *or it. 2 Example 2.6 When dealing with GSOSlanguages [BIM95 ], a stratification is obt* *ained just by measuring the complexity of a positive formula in terms of counting a p* *articular symbol occurring in the conclusion of a rulewith negative antecedents. This doe* *s not hold in general for any term deduction system but can be adopted as a rule of t* *humb. In our case,for BPA and PAthe stratifications are trivial since they have no negat* *ive rule. We can see in Table 1 that BPAdt has only one rule with a negative antecedent.* * In its conclusion we find the function symbol +. Let t be a closed term with n occurre* *nces of this symbol. Then the map S(t oe!t0) = n is a stratification (t0is a closed ter* *m). This means that the term deduction system BPAdt makes sense. Informally speaking this means that the transition relations andthe predicates are defined by the operat* *ional rules. 2 Next, we assign to a term deduction system a(regular) ordinal that expresses* * a uniform upper bound of the number of premisesin the deduction rules. We use th* *is upper bound for proof-technical reasons. Definition 2.7 Let V be a set. If 0 jV j < @0we define the degree ofV , denot* *ed d(V ), to be !0. If jV j = @fffor an ordinal ff 0, we define d(V ) = !ff+1. Let T = (;D) be a term deduction system. The degree d(H=C) of a deduction rule H=C 2 D is the degree of its set of positive premises: d(H=C) = d(PF (H)). Let !ff= supfd(H=C)j H=C 2 Dg. The degree d(T) of a term deduction system T is !0if ff = 0 and !ff+1otherwise. * * 2 Example 2.8 The reader can see that for every ruleH =Cin Table 1, jPF (H)j 2. Thus, d(H=C) = !0, which implies that the degree of every term deduction system* * in our example is !0. In particular, d(BPA ) = d(PA ) =d(BPAdt ) = !0. * * 2 Next, we will define a set of positive formulas from which we will show that* *it agrees with a given term deduction system. Definition 2.9 Let T = (;D) be a term deduction system and let S : PF (T) ! ff be a stratification for an ordinal number ff. We define a set TS PF (T) as foll* *ows. [ [ TS = Ti; Ti= Ti;j: i