From Ready Simulation Semantics to Completed ... - Semantic Scholar

1 downloads 0 Views 504KB Size Report
ceto et al.: A. M en agerie of. N on. -F in itely. B ased. P rocess. S em an tics over. B. P. A. BRICS. Basic Research in Computer Science. A Menagerie of ...
BRICS

BRICS RS-96-23

Basic Research in Computer Science

Aceto et al.: A Menagerie of Non-Finitely Based Process Semantics over BPA

A Menagerie of Non-Finitely Based Process Semantics over BPA: From Ready Simulation Semantics to Completed Tracs

Luca Aceto Wan J. Fokkink Anna Ing´olfsd´ottir

BRICS Report Series

RS-96-23

ISSN 0909-0878

July 1996



Copyright c 1996, BRICS, Department of Computer Science University of Aarhus. All rights reserved. Reproduction of all or part of this work is permitted for educational or research use on condition that this copyright notice is included in any copy.

See back inner page for a list of recent publications in the BRICS Report Series. Copies may be obtained by contacting: BRICS Department of Computer Science University of Aarhus Ny Munkegade, building 540 DK - 8000 Aarhus C Denmark Telephone: +45 8942 3360 Telefax: +45 8942 3255 Internet: [email protected] BRICS publications are in general accessible through WWW and anonymous FTP: http://www.brics.dk/ ftp ftp.brics.dk (cd pub/BRICS)

A Menagerie of Non-Finitely Based Process Semantics over BPA From Ready Simulation to Completed Traces

Luca Aceto

Wan Fokkinky

Anna Ingolfsdottirz

Abstract

Fokkink and Zantema ((1994) Computer Journal 37:259{267) have shown that bisimulation equivalence has a nite equational axiomatization over the language of Basic Process Algebra with the binary Kleene star operation (BPA ). In light of this positive result on the mathematical tractability of bisimulation equivalence over BPA , a natural question to ask is whether any other (pre)congruence relation in van Glabbeek's linear time/branching time spectrum is nitely (in)equationally axiomatizable over it. In this paper, we prove that, unlike bisimulation equivalence, none of the preorders and equivalences in van Glabbeek's linear time/branching time spectrum, whose discriminating power lies in between that of ready simulation and that of completed traces, has a nite equational axiomatization. This we achieve by exhibiting a family of (in)equivalences that holds in ready simulation semantics, the nest semantics that we consider, whose instances cannot all be proven by means of any nite set of (in)equations that is sound in completed trace semantics, which is the coarsest semantics that is appropriate for the language BPA . To this end, for every nite collection of (in)equations that are sound in completed trace semantics, we build a model in which some of the (in)equivalences of the family under consideration fail. The construction of the model mimics the one used by Conway ((1971) Regular Algebra and Finite Machines, page 105) in his proof of a result, originally due to Redko, to the e ect that in nitely many equations are needed to axiomatize equality of regular expressions. Our non- nite axiomatizability results apply to the language BPA over an arbitrary non-empty set of actions. In particular, we show that completed trace equivalence is not nitely based over BPA even when the set of actions is a singleton. Our proof of this result may be easily adapted to the standard language of regular  BRICS (Basic Research in Computer Science), Centre of the Danish National Research Foundation,

Department of Computer Science, Aalborg University, Fr. Bajersvej 7E, 9220 Aalborg , Denmark. On leave from the School of Cognitive and Computing Sciences, University of Sussex, Brighton BN1 9QH, UK. Partially supported by the Human Capital and Mobility project Express. Email: [email protected]. Fax: +45 9815 9889. y Utrecht University, Department of Philosophy, Heidelberglaan 8, 3584 CS Utrecht, The Netherlands. Email: [email protected]. Fax: +31 30 253 2816. z BRICS (Basic Research in Computer Science), Centre of the Danish National Research Foundation, Department of Computer Science, Aalborg University, Fr. Bajersvej 7E, 9220 Aalborg , Denmark. Email: [email protected]. Fax: +45 9815 9889.

1

expressions to yield a solution to an open problem posed by Salomaa ((1969) Theory of Automata, page 143). Another semantics that is usually considered in process theory is trace semantics. Trace semantics is, in general, not preserved by sequential composition, and is therefore inappropriate for the language BPA . We show that, if the set of actions is a singleton, trace equivalence and preorder are preserved by all the operators in the signature of BPA , and coincide with simulation equivalence and preorder, respectively. In that case, unlike all the other semantics considered in this paper, trace semantics have nite, complete equational axiomatizations over closed terms. AMS Subject Classification (1991): 08A70, 03C05, 68Q10, 68Q40, 68Q45, 68Q55, 68Q68, 68Q70. CR Subject Classification (1991): D.3.1, F.1.1, F.1.2, F.3.2, F.3.4, F.4.1. Keywords and Phrases: Concurrency, process algebra, Basic Process Algebra (BPA), Kleene star, bisimulation, ready simulation, simulation, completed trace semantics, ready trace semantics, failure trace semantics, readiness semantics, failures semantics, trace semantics, equational logic, complete axiomatizations.

1 Introduction Process theory aims at providing a framework for the description and analysis of reactive systems, i.e., systems that compute by reacting to stimuli from their environment. As such systems tend to be non-terminating, all process algebraic speci cation formalisms (cf., e.g., [5, 41, 52, 8]) include facilities for the speci cation and analysis of in nite behaviours. The description of such behaviours has been traditionally achieved in process theory by means of systems of recursion equations or of variations on Milner's -expressions [51, 53]. For example, the recursion equation (1)

X def = (send  receive  X ) + fail

describes a system that is willing to perform alternatively the acts of sending and receiving ad in nitum, but may fail after iterating the sequence send  receive any nite number of times. In order to extend axiomatic veri cation methods to reason about processes speci ed by means of recursion equations, several inference rules for proving equalities involving in nite processes have been studied in the literature. (Cf., e.g., rules like unique xed-point induction in its various avours [52, 8], the approximation induction principle [11] and ! -induction [39].) An alternative, purely algebraic, way of introducing in nite behaviours in process algebras is to augment them with variations on the Kleene star operation familiar from the theory of regular algebra|cf., e.g., the papers [32, 9, 10, 29, 24, 22]. Some of these studies, notably [10], have investigated the expressive power of variations on standard process description languages in which in nite behaviours are de ned by means of Kleene's star operation [44, 21] rather than by means of systems of recursion equations. For example, using the original, binary version of the Kleene star operation from [44] studied in [10], the system described by the recursion equation (1) can alternatively be denoted by the term (send  receive) fail, and, as shown in [10], any regular process can be speci ed in the axiom system ACP [12] with Kleene star using handshake communication. (Interestingly, 2

as already noted by Milner in [51, Sect. 6], not every process de ned using nite-state systems of recursion equations can be described, up to bisimulation equivalence, using only regular expressions.) The possibility of describing in nite behaviours in a purely algebraic syntax has been the motivation for intense research on the use of equational logic to ( nitely) axiomatize behavioural equivalences over languages incorporating variations on the Kleene star operation. (Examples of contributions along this line of research may be found in, e.g., [32, 64, 29, 3, 4, 30, 31, 33, 1].) A notable positive result in this direction was obtained by Fokkink and Zantema, who showed in [32] that the nite equational axiom system for the language BPA proposed in [10] is indeed complete for bisimulation equivalence. This result is in sharp contrast with a negative one later obtained by Sewell in [64]. Sewell shows that bisimulation equivalence has no nite equational axiomatization over the language BPA obtained by adding the stopped process  to the signature of BPA . (A discussion of the completeness result by Fokkink and Zantema vis-a-vis Sewell's non nite axiomatizability result may be found in [2].) In light of Fokkink and Zantema's positive result on the mathematical tractability of bisimulation equivalence over BPA , a natural question to ask is whether any other (pre)congruence relation in van Glabbeek's linear time/branching time spectrum (cf. [35], where pointers to the original literature may also be found) has a nite (in)equational axiomatization over it. In this paper, we begin to address this question by showing that, unlike bisimulation equivalence, none of the process semantics in the linear time/branching time spectrum lying in between ready simulation and completed traces is nitely based. More precisely, we show that there is a family of (in)equivalences that holds in ready simulation semantics, and a fortiori with respect to any behavioural relation that is coarser than it, whose instances cannot all be proven by means of any nite set of (in)equations that is sound in completed trace semantics, which is the coarsest semantics in the linear time/branching time spectrum that is appropriate for the language BPA . The family of (in)equivalences that we use in our proof is an adaptation of an axiom schema familiar from the theory of regular algebra (cf., e.g., the equation schema C14:n in [20, page 25]). Consider the equation schema E:n a (an ) + (an) (a +   + an ) = (an ) (a +   + an) and the inequation schema I:n a (an)  (an) (a +   + an ) where a is an action, n is a positive integer, and we write ai for a sequence of a actions of length i. Each of the instances of I:n and E:n is valid in ready simulation semantics. The crux of the proof of our main result is the construction, for every nite set of (in)equations that is sound in completed trace semantics, of a model in which some of the inequivalences I:n, and some of the equivalences E:n, fail. The model we use for this purpose is based on an adaptation of a beautiful construction due to Conway (cf. [20, Thm. 2, page 105]), who used it to obtain a new proof of a theorem, originally due to Redko [58] (see also [62, Chapter 3 x6] and the references therein), to the e ect that equality of regular expressions cannot be axiomatized using a nite number of equations. 3

The construction of our model relies heavily on the use of prime numbers, as do related arguments presented in, e.g., [20, 26, 47, 64]. Conway's proof of the non- nite axiomatizability of equality of regular expressions is based upon an argument showing that no nite set of regular tautologies can prove all the instances of the aforementioned equality C14:p, for p a prime number. (A generalization of Conway's proof that applies to regular expressions with multiplicities over an arbitrary positive semiring|cf. [25, Chapter 6]|may be found in [47].) In [26], E sik shows that iteration theories, that are a general framework that aims at formalizing the equational logic of iterative processes (cf. the encyclopedic [17] for details), have no nite equational axiomatization. His proof of this result uses the following form of Conway's equation C14:p, for every prime number p: (f p )y = f y (f : n ! n + p) where y denotes the iteration operation used in iteration theories. The above identities bear striking resemblance to those employed by Sewell in his proof of the non-existence of nite equational axiomatizations for bisimulation equivalence over regular CCS [52] and over BPA [64]. Again, his argument rests on the idea that no nite collection of equations can prove all the equivalences of the form (ap )  = a  where p is a prime number. The similarity amongst these results appears to be more than coincidental. Indeed, E sik [27] has recently proven that regular languages do have a nite equational axiomatization over iteration theories, i.e., relative to the general set of identities for xed-point operations. This result, together with the completeness theorems presented in [16, 18], seems to indicate that the deep reason underlying all the aforementioned non- nite axiomatizability results, as well as those presented in this paper, is that the general equational theory of xed-points is not nitely based. The analysis provided in op. cit. also suggests that all the aforementioned negative results have their roots in the original work by Conway and Redko for regular algebra. A related result, whose proof is based on an explicit reduction to the non-existence of a nite equational axiomatization for regular languages, is presented in [23]. In op. cit. the authors show that the variety of inversion-free Kleene algebras is not nitely based, thus settling a problem posed by Jonsson in [42]. Our non- nite axiomatizability results apply to the language BPA over an arbitrary non-empty set of actions. In particular, we prove that completed trace equivalence over (closed) BPA terms is not nitely based even when the set of actions is a singleton. In [62, page 143] Salomaa asked whether the equational theory of (closed) regular expressions over a singleton alphabet is nitely based. Our proof of the non-existence of a nite equational axiomatization of completed traced trace equivalence over (closed) BPA terms may be easily adapted to the standard language of regular expressions to yield a solution to this question posed by Salomaa. As communicated to us by Salomaa [63], this problem has been open since 1969, the year of publication of [62]. Another semantics that is usually considered in process theory is trace semantics. Trace semantics is, in general, not preserved by sequential composition, and is therefore 4

inappropriate for languages that, like BPA , include such an operator. However, if the set of actions is a singleton, trace equivalence and preorder are preserved by all the operators in the signature of BPA , and coincide with simulation equivalence and preorder, respectively. In that rather peculiar case, we show that, unlike all the semantics lying in between ready simulation and completed traces, trace equivalence and preorder do have nite, complete equational axiomatizations over closed terms in the language BPA . The reason underlying the existence of these nite axiomatizations is that trace semantics considers all the sequences of actions that a process may perform|not only the completed ones. Therefore, if a is the only action, every term containing occurrences of the binary Kleene star operation has the set of all nite sequences of a actions as its set of traces. This means, in particular, that any two terms involving occurrences of the binary Kleene star operation are equivalent in trace semantics. Such terms must have the same denotation in every model for trace equivalence. We conclude this introduction by providing a brief road-map to the contents of this paper. We begin by introducing the basic notions from process theory that will be needed in the remainder of this study (Sect. 2). The language of Basic Process Algebra with binary Kleene star and its operational semantics are discussed in Sect. 3. We then present the proof of our main result, which is articulated as follows. In Sect. 4 we introduce the family of (in)equivalences on which our argument rests, and reduce the proof of our main result to that of a theorem to the e ect that no nite set of (in)equations, that are sound in completed trace semantics, can suce to prove all of their instances (Thm. 4.5). A proof of Thm. 4.5 is then presented in Sect. 4.1. We begin by studying a normal form for the terms in the language BPA modulo completed trace equivalence (Sect. 4.1.1). Finally, for every nite set of inequations sound in completed trace semantics, we show how to build a model in which the inequation I:p fails for some prime number p (Sect. 4.1.2). This is sucient to ensure that the inequality I:p cannot be proven from the inequations under consideration. We then go on to present an analysis of some axiomatic questions on trace semantics over the language BPA , when the set of actions is a singleton (Sect. 5). More precisely, we show that, unlike all the other process semantics considered in the paper, trace equivalence and preorder do have nite, complete equational axiomatizations over closed terms. We also present evidence that the nite axiom systems that completely characterize trace semantics over closed terms are not powerful enough to prove all valid equations between open terms (Propn. 5.5). The paper concludes with a discussion of our results vis-a-vis the completeness theorem by Fokkink and Zantema for bisimulation equivalence|cf. Sect. 6, where the reader will also nd more pointers to related literature, and suggestions for further research.

2 Preliminaries In this section we present the basic notions from process theory that will be needed in the remainder of this study.

5

2.1 Labelled Transitions Systems

We begin by reviewing the model of labelled transition systems [43, 57] that abstracts from the operational semantics of many concurrent calculi.

De nition 2.1 (Labelled Transition Systems) A labelled transition system (lts) is o n

a a 2 Act ), where: a triple (Proc; Act; !j

 Proc is a set of states, ranged over by s, possibly subscripted or superscripted;  Act is a set of actions, ranged over by a, possibly subscripted; a  ! Proc  Proc is a transition relation, for every a 2 Act. As usual, we shall use a the more suggestive notation p ! q in lieu of (p; q) 2!a , and write s 9a i s !a s0 for no state s0 .

For n  0 and & =a a1 : : : an 2a Act, we write s !& s0 i there exist states s0; : : : ; sn such a1 that s = s0 ! s1 !2  sn?1 ! sn = s0 . In that case, we say that & is a trace (of length n) of the state s. For a state s 2 Proc we de ne: n

initials(s) =

n

o

a 2 Act j 9s0 : s !a s0 :

We say that s is deadlocked i initials(s) is empty. An action a will be called a termination action of a state s i s !a s0 for some deadlocked state s0 .

2.2 From Ready Simulation to Completed Traces

Labelled transition systems describe the operational behaviour of processes in great detail. In order to abstract from irrelevant information on the way processes compute, a wealth of notions of behavioural equivalence or approximation have been studied in the literature on process theory. A systematic investigation of these notions is presented in [35, 37] (see also [34, Chapter I]), where van Glabbeek presents the so-called linear time/branching time spectrum, i.e., the lattice of all the known behavioural equivalences over labelled transition systems ordered by inclusion. In this study, we shall investigate a fragment of the notions of equivalence and preorder from [35]. These we now proceed to present for the sake of completeness.

De nition 2.2 (Simulation, Ready Simulation and Bisimulation)

 A binary relation R on states is a simulation i whenever s1 R s2 and a is an action:

a 0 - if s1 ! s1, then there is a transition s2 !a s02 such that s01 R s02 .

 A binary relation R on states is a ready simulation i it is a simulation with the property that, whenever s1 R s2 and a is an action: - if s1 9a , then s2 9a .

6

 A bisimulation is a symmetric simulation. Two states s and s0 are bisimilar, written s $ s0 , i there is a bisimulation that relates them. Henceforth the relation $ will be referred to as bisimulation equivalence. We write s @ S s0 (resp. s @ RS s0 ) i there is a simulation (resp. a ready simulation) R with s R s0 . Bisimulation equivalence [56, 50] relates two states in a labelled transition system precisely when they have the same branching structure. Simulation (see, e.g., [56]) and ready simulation [14, 48] relax this requirement to di erent degrees. The following notions, which are all based on decorated versions of traces, are induced by yet further ways of abstracting from the full branching structure of processes.

De nition 2.3 (Decorated Trace Semantics)

 We say that a sequence of actions & is a completed trace of a state s i s !& s0 for some deadlocked state s0 . The set of completed traces of a state s will be denoted by completed-traces(s). For states s; s0 we write s @ CT s0 i the set of completed traces of s is included in that of s0 .  We say that a sequence X0a1X1 : : : anXn, where n  0, the Xi are subsets of Act and the ai are actions, is a ready trace of a state s i there exist states s0 ; : : : ; sn a a2 a1 sn = s0 , and initials(si) = Xi for every i. The   sn?1 ! s1 ! such that s = s0 ! set of ready traces of a state s will be denoted by ready-traces(s). For states s; s0 we write s @ RT s0 i the set of ready traces of s is included in that of s0 . n

X 0 - Let X be a subset of Act. For states s; s0 , we write s ! s i s = s0 and initials(s) \ X X = ?. The relations ! willbe   called the refusal relations. The failure trace rela& Act , are de ned as the re exive and transitive closures tions !, for & 2 Act [ 2   of the refusal and transition relations. We say that a sequence & 2 Act [ 2Act , is a failure trace of a state s i s !& s0 for some state s0 . The set of failure traces of a state s will be denoted by failure-traces(s). For states s; s0 we write s @ FT s0 i the set of failure traces of s is included in that of s0 .  For a state s we de ne:

readies(s) = failures(s) =

n

o

(&; X ) j & 2 Act ; X  Act and 9s0 : s !& s0 and initials(s0 ) = X n o (&; X ) j & 2 Act ; X  Act and 9s0 : s !& s0 and initials(s0 ) \ X = ?

For states s; s0 we write s @ F s0 i failures(s) is included in failures(s0 ), and s @ R s0 i readies(s) is included in readies(s0 ).

For @ 2 fS; RS; CT; RT;FT; F; Rg, the relation @ @ is a preorder over states of an arbitrary labelled transition system; its kernel will be denoted by '@ . The following result is a standard one in process theory (cf., e.g., [35] where a very informative discussion of the equivalences and preorders in the linear time/branching time spectrum may be found). 7

Proposition 2.4 In any transition system, $ !

@ RS

% !

@ S @ RT

% &

@ FT

@ R

& %

@ F

!

@ CT

where a directed edge from one relation to another means that the source of the edge is included in the target. The same inclusions hold for the kernels of the preorders. Remark: All the inclusions presented in the previous proposition are proper if the labelled transition system under consideration includes, modulo bisimulation equivalence, the synchronization trees [49] used in the examples presented in [35].

3 BPA with Binary Kleene Star We begin by presenting the language of Basic Process Algebra (BPA) [11] with binary Kleene star [44] and its operational semantics.

3.1 The Syntax

We assume a non-empty alphabet Act of atomic actions, with typical elements a; b; c, and a countably in nite set Var of process variables, disjoint from Act, with typical elements x; y; z. We shall use to range over Act [ Var. The language (BPA (Act)) of Basic Process Algebra with binary Kleene star is given by the following BNF grammar:

P ::= j P + P j P  P j P  P : The set of closed terms, i.e., terms that do not contain occurrences of process variables, is denoted by T(BPA (Act)). We shall use P; Q; R; S; T to range over (BPA (Act)). In writing terms over the above syntax, we shall always assume that the operator  binds stronger than +, and occurrences of  will often be omitted. With these conventions, the term PQ + R stands for (P  Q) + R. We shall use the symbol  to stand for syntactic equality of terms. The set of process variables occurring in a term P will be written Var(P ), and we shall use StarVar(P ) to stand for the set of process variables occurring on the left-hand side of a star in P . Intuitively, closed terms stand for agents whose behaviour is completely speci ed, whereas terms containing occurrences of process variables denote agents with partially speci ed behaviour. For example, an atomic action a stands for a process that can only perform itself in one computational step and terminate in doing so; on the other hand, the term a + x denotes a partially speci ed process, whose behaviour depends in part on that of the process term that is substituted for the variable x. Apart from actions and variables, the signature of the language (BPA (Act)) includes the binary operators of alternative composition + and sequential composition  familiar 8

from the theory of Basic Process Algebra [11, 8], and the original binary version of the Kleene star operator introduced in [44]. The term P  Q stands for a process whose behaviour is speci ed by the following de ning equation:

P  Q = P (P  Q) + Q : A (closed) substitution is a mapping from process variables to (closed) terms in the language (BPA (Act)). For every term P and (closed) substitution  , the (closed) term obtained by replacing every occurrence of a variable x in P with the (closed) term  (x) will be written P . We shall use the notation [P=x] to denote the substitution mapping the variable x to P , and acting like the identity on all the other variables. Notation 3.1 For I = fi1; : : : ; ing a nite, non-empty index set, we write Pi2I Pi for Pi1 +  + Pi . For a term P and a positive integer n, we write n

P n = P|  P{z P} n-times and use P n as a short-hand for P + P 2 +  + P n .

3.2 Operational Semantics

The operational semantics for the language of closed terms T(BPA (Act)) is given by the labelled transition system 

n

a a 2 Act T(BPA (Act)) [ fXg; Act; !j

o

where the transition relations !a are the least binary relations over T(BPA (Act)) [ fXg satisfying the rules in Table 1. Intuitively, a transition P !a Q means that the system represented by the term P can perform the action a, thereby evolving into Q. The special symbol X represents (successful) termination; therefore the interpretation of the statement P !a X is that the process term P can terminate by performing the atomic action a. Note that X is the only deadlocked state in the labelled transition system for T(BPA (Act)). With the above de nitions, the language T(BPA (Act)) inherits all the notions of equivalence and preorder over processes de ned in Sect. 2.2. The following result is standard. Proposition 3.2 For @ 2 fRS; CT;RT; FT; F; Rg, the relations @@ and '@ are preserved by the operators in the signature of (BPA (Act)). The same holds for bisimulation equivalence.

Proof: The congruence result for bisimulation@equivalence is well-known (cf., e.g., [32]).

The congruence property for the relations  RS and 'RS is easily established using the fact that, as X is the only deadlocked state in the labelled transition system for T(BPA (Act)), a X, then Q ! a X. if P @ RS Q and P !

9

a !a X P !a X P + Q !a X P !a X P  Q !a P Q

Q !a X P !a P 0 a P + Q !X P + Q !a P 0 P !a P 0 P !a X a P Q ! Q P  Q !a P 0  Q P !a P 0 Q !a X a P Q ! P 0 (P  Q) P Q !a X

Q !a Q0 P + Q !a Q0 Q !a Q0 P  Q !a Q0

Table 1: Transition Rules For each of the relations introduced in Def. 2.3, the set of relevant traces of a composite process can be de ned uniformly from those of its components. For example, the set of ready traces of a term P 2 T(BPA (Act)) can be inductively de ned thus:  The set of ready traces of a 2 Act is ffag; faga?g.  The sequence X0 a1 X1 : : :an Xn is contained in ready-traces(P + Q) i X0 = initials(P) [ initials(Q) and 1. n = 0, or 2. n > 0, and initials(P)a1 X1 : : :an Xn is a ready trace of P or initials(Q)a1X1 : : :an Xn is a ready trace of Q.  The sequence X0 a1X1 : : :anXn is contained in ready-traces(PQ) i one of the following conditions hold: 1. X0 a1X1 : : :anXn is contained in ready-traces(P) and Xn is non-empty, or 2. there exists 0 < i  n such that (a) X0 a1X1 : : :ai? is a ready trace of P, and (b) Xi ai+1 Xi+1 : : :an Xn is a ready trace of Q.  The sequence X0 a1 X1 : : :anXn is contained in ready-traces(P  Q) i there exist 1. a non-negative integer k, 2. ready traces of P of the form Xi;0 ai;1Xi;1 : : :ai;n ? (0 < i  k; ni  0) i

and 3. a ready trace of P or Q Xk+1;0ak+1;1Xk+1;1 : : :ak+1;n +1 Xk+1;n +1 (nk+1  0) k

k

with the property that Xk+1;n +1 is non-empty if the above is a ready trace of P, k

10

such that X0 a1X1 : : :an Xn = Xa1;1X1;1 : : :a1;n1 X : : :Xak;1Xk;1 : : :ak;n Xak+1;1Xk+1;1 : : :ak+1;n +1 Xk+1;n +1 k

k

k

where X = initials(P) [ initials(Q). The result follows immediately from this observation. 2 Remark: In [36], van Glabbeek has presented a format of operational rules in Plotkin's SOS style [57] with the property that every operation speci ed using rules in that format is guaranteed to preserve ready trace equivalence. One of the requirements that such rules have to satisfy is related to the notion of connectedness. Connectedness is the smallest equivalence relation over bound variables in a rule, in the sense of [38], such that x and y are connected i the rule has an antecedent of the form x !a y. One of the requirements for van Glabbeek's ready trace format is that no two occurrences of variables in the target of a rule are connected in that rule. This requirement is not met by the rule P !a P 0 a P 0(P  Q) P Q ! because the variables P and P 0 are connected in the above rule, and both occur in the term P 0(P  Q). On the other hand, as shown above, the binary Kleene star operation preserves @ RT and, a fortiori, ready trace equivalence.

Unlike all the semantics considered in Propn. 3.2, the simulation preorder @ S and its kernel are not preserved by the operators of sequential composition and binary Kleene star, at least if the set of actions contains two distinct elements. For example, as X is the least element with respect to the simulation preorder, it follows that a @ S aa. However, the reader will nd it easy to check that neither ab @ S (aa)b nor a b @ S (aa)b holds.

Remark: As we shall see in Sect. 5 (cf. Propn. 5.3), if the set of actions is a singleton, then the 

simulation preorder is preserved by the operators in the signature of the language T(BPA (Act)), and coincides with the preorder induced by trace inclusion [41]. This semantics will have a rather peculiar place in the technical developments of this paper. We refer the impatient reader to Sect. 5 for details. Following Milner [49], we consider the largest precongruence over T(BPA (Act)) that is

included in the simulation preorder. De nition 3.3 Ac context is a term R 2 (BPA(Act)) containing at most the variable x. The relation @ S over T(BPA (Act)) is de ned thus:

P

@ cS

Q = R[P=x] @ S R[Q=x]; for every context R :

It is easy to see that the relation @ cS is indeed the largest precongruence over the language T(BPA (Act)) which is included in @ S . We now proceed to characterize this precongruence explicitly, in the case that the set of actions Act is in nite. De nition 3.4 The relation @SC is the largest one over T(BPA(Act)) such that P @SC Q i for every action a, 11

a 0 - if P ! P , then there is a transition Q !a Q0 such that P 0 @ SC Q0; a - if P ! X, then Q !a X.

T(BPA (Act)). Proposition 3.5 The relation @SC is a precongruence over the language c 

Moreover, if the set of actions Act is in nite, @ SC coincides with @ S .

Proof: It is easy to check that @SC is a precongruence over the language T(BPA (Act)) which c @ @ @ 

is included in  S . It follows that  SC is included in  S because the latter is the largest relation with these properties. We now show that the converse inclusion also holds, under the assumption that Act is in nite. To this end, assume that P @ cS Q. Choose an action b not occurring in P and Q. (Note that, as Act is in nite, such an action may always be found.) By the de nition of @ cS it follows that Pb @ S Qb. Note now that the relation 

R = (R; S) j Rb @ S Sb; b not occurring in R and S



satis es the de ning clauses of @ SC . This is easily checked, using the fact that, as b does not occur in R and S, if Rb @ S Sb then the termination actions of R are included in those of S. Hence, R is included in @ SC . Since the pair (P; Q) is contained in R, it follows that P @ SC Q. 2

Remark: If the set of actions is nite, then the preorder @SC is strictly included in @cS .

To   see that this is indeed the case, let us assume that Act = fa1; : : :; ang for some positive integer a P for every i 2 f1; : : :; ng, the n. Consider the term P  (a1 + : : : + an ) (a1 a1). As P ! term P dominates every other term in the language T(BPA (Act)) with respect to the simulation preorder, i.e., Q @ S P holds for every Q 2 T(BPA (Act)). We shall now argue that the following inequality holds: (2) a1 @ cS P : To this end, we begin by studying the e ect of substituting the term P for the variable x in a context R. Let  = denote the least congruence over (BPA (Act)) that satis es the following axioms: x+y = y+x (x + y) + z = x + (y + z) (x + y)z = xz + yz (xy)z = x(yz)  x(x y) + y = xy P 0 00 We say that a context R is initially closed i R  = i2I Ri Ri , for some nite index set I, and   0 00 terms Ri 2 T(BPA (Act)) and Ri 2 (BPA (Act)). Intuitively, if R is initially closed, then, for every substitution [Q=x], the initial transitions of the term R[Q=x] do not depend upon those of Q. Lemma 3.6 Suppose that Act = fa1; : : :; ang. Let P  (a1 + : : : + an ) (a1 a1). Then, for every  context R 2 (BPA (Act)),  either R[P=x] 'S P ,  or R is initially closed. Proof: First of all, note that, for every closed term Q 2 T(BPA (Act)), i

12

- Q + P 'S P + Q 'S P, - PQ 'S P and - Q P 'S P  Q 'S P. The claim now follows by a straightforward induction on the structure of the context R. 2 Using the above lemma, we are now in a position to prove that (2) holds. Proposition 3.7 Suppose that Act = fa1; : : :; ang. Let P  (a1 + : : : + an)(a1 a1). Then c @ a1  S P . Proof: Consider the relation R de ned thus: ?

 $  f(R[a1 =x]; R[P=x]) j R an initially closed contextg  $  [ (Q; P 0) j Q; P 0 2 T(BPA (Act)); P @ S P 0 : Note, rst of all, that the pair of terms (R[a1=x]; R[P=x]) is contained in R for every context R (Lem. 3.6). To prove the claim, it is therefore sucient to show that R is a simulation. To this end, assume that S R T and that S !a S 0 . We shall now prove that there exists a term T 0 such a 0 that T ! T and S 0 R T 0 . As S R T, the de nition of R yields that 1. either S $ R[a1=x] and T $ R[P=x] for some initially closed context R,

R =

2. or P @ S T. We proceed with the proof by considering these cases in turn. 1. Assume that S $ R[a1=x] and T $PR[P=x] for some initially closed context R. As R is initially closed, it follows that R  = i2I R0iR00i , for some terms R0i 2 T(BPA (Act)) and  00 Ri 2 (BPA (Act)). Moreover, since the de ning axioms of  = are sound P with respect to bisimulation equivalence (cf. Thm. 4.1Pbelow), the terms R[a1=x] and i2I R0i(R00i [a1=x]) are bisimilar, and so are R[P=x] and i2I R0i (R00i [P=x]). P As S !a S 0 and S $ R[a1=x] $ i2I R0i (R00i [a1=x]), there exists a term R0 such that X

i2I

R0i (R00i [a1=x]) !a R0 and S 0 $ R0 :

Since each R0i is closed, the term R0 can only have one of the following two forms: a X, or - R0  R00i [a1=x] for some index i 2 I such that R0i ! - R0  R^ 0i(R00i [a1=x]) for some index i 2 I and closed term R^ 0i such that R0i !a R^ 0i. We continue with the proof by examining the forms R0 may take. a a X. As R0 ! - Assume that R0  R00i [a1=x] for some index i 2 I such that R0i ! i X, it follows that X R0i (R00i [P=x]) !a R00i [P=x] : i2I

P

Moreover, as T $ R[P=x] $ i2I R0i(R00i [P=x]), there exists a term T 0 such that T !a T 0 and T 0 $ R00i [P=x]. Using Lem. 3.6, we infer that either R00i is initially closed, or T 0 $ R00i [P=x] 'S P. In both cases, it follows that S 0 R T 0 .

13

- Assume that R0  R^ 0i(R00i [a1=x]) for some index i 2 I and closed term R^ 0i such that a 0 a R^ 0 . As R0 ! R0i ! i i R^ i , it follows that X R0i(R00i [P=x]) !a R^ 0i (R00i [P=x]) : i2I

P

Moreover, as T $ R[P=x] $ i2I R0i(R00i [P=x]), there exists a term T 0 such that T !a T 0 and T 0 $ R^ 0i(R00i [P=x]). The fact that S 0 R T 0 now follows immediately because the context R^ 0i R00i is initially closed. a S 0 and a 2 fa ; : : :; a g, it follows that P ! a P. Therefore 2. Assume that P @ S T. As S ! 1 n T !a T 0 for some term T 0 such that P @ S T 0 . By the de nition of R, it follows immediately that S 0 R T 0 . We have therefore shown that R is indeed a simulation relation. We previously noted that the pair of terms (R[a1=x]; R[P=x]) is contained in R for every context R. Hence a1 @ cS P follows. 2 However, a1 @6  SC P, because a1 can terminate in one step whereas P cannot.

The example discussed in the previous remark is, to our mind, rather peculiar, and reinforces our belief that @ SC is the variation on the simulation preorder that is appropriate for the language T(BPA (Act)). The reader familiar with [10, 32] will also realize that standard bisimulation equivalence over T(BPA (Act)) is the largest symmetric relation included in @ SC . For these reasons, in the technical developments to follow we shall only consider the preorder @ SC . For later use, we now proceed to study its relationships with the other semantics considered in this paper. Proposition 3.8 Over the language T(BPA(Act)), the preorder @SC is included in @CT , and includes @ RS . Moreover, @ SC coincides with @ RS i Act is a singleton.

Proof: The fact that @ SC is included in @CT , and includes @RS , follows immediately from the de nitions of these relations. We now argue that @ SC coincides with @ RS i Act is a singleton. To this end, note that the constraint on the set of actions is certainly necessary. In fact, if a 6= b, then a @ SC a + b, but a 6@ RS a + b. To see that it is also sucient, note that, if the set of actions is a singleton, then @ SC is a ready simulation. 2

In light of Propns. 3.2 and 3.5, for @ 2 fRS; SC;CT;RT; FT; F; Rg, we can construct the algebra T(BPA (Act))= '@ of closed (BPA (Act))-terms modulo '@ . That is, for P; Q 2 (BPA(Act)), T(BPA (Act))= '@ j= P = Q , (for all closed substitutions  : P '@ Q ) : Each of these algebras has, in fact, the structure of an ordered algebra, in the sense of [15, 39], and, for P; Q 2 (BPA (Act)), T(BPA (Act))= '@ j= P  Q , (for all closed substitutions  : P @ @ Q ) : In both cases, we say that the relevant equation (resp. inequation) is valid, or sound, with respect to '@ (resp. @ @ ). We shall now proceed to show that none of these (ordered) algebras has a nite (in)equational axiomatization. 14

Remark: A@ precongruence@relation @ over the algebra

(BPA (Act)) is fully invariant, or substitutive, if P  Q implies P  Q, for every substitution . For @ 2 fRS; SC; CT; RT; FT; F; Rg, we extend the preorder @ @ to the whole of (BPA (Act)) thus: 

P @ @ Q = T(BPA (Act))= '@ j= P  Q : It is easy to see that the precongruence @ @ so de ned is fully invariant. Similar remarks apply to the congruence relation '@ .

4 Non-Finitely Based Process Semantics

In the setting of bisimulation equivalence over the language (BPA (Act)), the following result was rst obtained by Fokkink and Zantema [32] for closed terms only, and has later been extended to open terms in [31], where an alternative proof of the original completeness theorem of Fokkink and Zantema is also given. Theorem 4.1 (Fokkink and Zantema) The axiom system in Table 2 completely axiomatizes bisimulation equivalence over (BPA (Act)). Thus bisimulation equivalence has a nite equational axiomatization over the language (BPA (Act)). In light of this positive result on the mathematical tractability of bisimulation equivalence over the language of Basic Process Algebra with binary Kleene star, a natural question to ask is whether any other (pre)congruence relation in the linear time/branching time spectrum is nitely (in)equationally axiomatizable over it. We shall now show that, unlike bisimulation equivalence, none of the other preorders and equivalences presented in Sect. 2.2 are nitely based|the one peculiar exception being simulation semantics over closed terms when the set of actions is a singleton (cf. Sect. 5). A1 A2 A3 A4 A5

x+y (x + y ) + z x+x (x + y )z (xy )z

= = = = =

y+x x + (y + z) x xz + yz x(yz)

BKS1 x(x y) + y = x y BKS2 (x y )z = x (yz ) BKS3 x (y ((x + y ) z ) + z ) = (x + y ) z Table 2: The axiom system for bisimulation equivalence Our main aim in the remainder of the paper will be to prove the following negative result. Theorem 4.2 None of the preorders @@ with @ 2 fRS; SC;CT; RT;FT; F; Rg has a nite inequational axiomatization over (BPA (Act)). Similarly, none of the equivalence 15

relations they induce has a nite equational axiomatization over (BPA (Act)). These results also hold if we restrict ourselves to axiomatizations of these relations over closed terms only. In order to prove this theorem, we shall show that there is a family of (in)equivalences that holds in ready simulation semantics, and a fortiori with respect to any behavioural relation that is coarser than it, whose instances cannot all be proven by means of any nite set of (in)equations that are sound in completed trace semantics. The remainder of this paper will be devoted to a formalization of this proof strategy. Notation 4.3 For an axiom system T , we write T ` P = Q (resp. T ` P  Q) i the equation P = Q (resp. the inequation P  Q) is provable from the axiom system T using the rules of equational (resp. inequational) logic. In the sequel, an equation P = Q will sometimes be considered as a short-hand for the pair of inequations P  Q and Q  P . We write P =AC Q whenever P and Q are equal modulo commutativity and associativity of +, i.e., whenever A1,A2 ` P = Q. We say that a term Q is a summand of P i P  Q or A1,A2 ` P = Q + R for some term R. The family of (in)equivalences that we are going to use in our proof of Thm. 4.2 is an adaptation of an axiom schema familiar from the theory of regular algebra (cf., e.g., the equation schema C14:n in [20, page 25]). Consider the equation schema

E:n a (an) + (an ) an = (an ) an

and the inequation schema

I:n a (an )  (an) an

where a is an action and n is a positive integer. Note, rst of all, that, for n greater than 1, none of the equivalences E:n is sound with respect to bisimulation equivalence. In fact, as n > 1, the term a (an ) + (an) an has a sequence of two transitions a(an) + (an) an !a a(an) !a an?1 leading to a term whose only behaviour is to reach a deadlocked state after having performed n ? 1 a-actions. As n > 1, this behaviour cannot be matched by (an ) an . On the other hand, we have that: Fact 4.4 For @ 2 fRS; SC;CT; RT;FT; F; Rg, the inequations I:n are sound with respect to @ @, and the equations E:n are sound with respect to '@ .

Proof: In light of Propns. 2.4 and 3.8, it is sucient to show that each instance of E:n and I:n is sound with respect to 'RS . To this end, check that the relation

R =

n



o

a (an ); ai(an ) an j n  1; 0  i < n [

n?

?

o

n

?

[ (an ) an ; a(an ) + (an) an j n  1 n? o  [ a (an ) + (an ) an; (an) an j n  1 [ IT(BPA (Act))[fXg 

16



ai ; aj (an ) an j 0  j < i < n

o

where IT(BPA (Act))[fXg denotes the identity relation over the set T(BPA (Act)) [ fXg, is a ready simulation. 2

Thm. 4.2 will follow if we can show that no nite set of equations (resp. inequations) that is sound with respect to 'CT (resp. @ CT ) can prove all the equalities E:n (resp. all the inequalities I:n). This is the import of the following theorem.

Theorem 4.5

1. For every nite set of inequations that is sound with respect to @ CT , there is a prime number p such that the inequality I:p is not provable from the inequations in that set. Moreover, this holds even if we add to the inequations in that set all the axioms of the form I:n and E:n with n not divisible by p. 2. For every nite set of equations that is sound with respect to 'CT , there is a prime number p such that the equality E:p is not provable from the equations in that set. Moreover, this holds even if we add to the equations in that set all the axioms of the form E:n with n not divisible by p.

Using the above result on the power of nite (in)equational axiom systems that are sound in completed trace semantics, we can obtain the following corollary. Corollary 4.6 No precongruence (resp. congruence) relation over T(BPA(Act)) that is included in @ CT (resp. 'CT ) and satis es I:n (resp. E:n) for all n  1 has a nite inequational (resp. equational) axiomatization.

Proof:

Let @ be a precongruence relation over T(BPA (Act)) that is included in @ CT , and satis es I:n for all n  1. Assume, for the sake of contradiction, that there is a nite set of inequations E that completely axiomatizes @ over the language T(BPA (Act)). As @ is included in @ CT , E is sound with respect to @ CT . Since @ satis es the closed inequalities I:n for all n  1, and E is complete for @ over T(BPA (Act)), it follows that E ` I:n for all n  1. This contradicts Thm. 4.5(1). A similar reasoning shows that no congruence relation over T(BPA (Act)), that satis es the proviso of the statement, has a nite equational axiomatization. 2

Using Corollary 4.6, it is now a simple matter to show Thm. 4.2. To this end, it is sucient to note that every preorder in the linear time/branching time spectrum which includes @ RS , and is included in @ CT , is a precongruence over the language (BPA (Act)) (Propns. 3.2 and 3.5) satisfying all the inequalities I:n for n  1 (Fact. 4.4). Therefore every such preorder cannot be nitely inequationally axiomatized (Corollary 4.6). A similar reasoning shows that no congruence relation that lies in between 'RT and 'CT is nitely equationally axiomatizable over T(BPA (Act)). As (in)equality of closed terms cannot be nitely (in)equationally axiomatized, a fortiori neither can (in)equality over open terms in the language (BPA (Act)), that is, none of the (ordered) algebras T(BPA (Act))= '@ (@ 2 fRS; SC;CT;RT; FT; F; Rg) is nitely based. In light of the above discussion, all that we are left to do to prove Thm. 4.2 is to show Thm. 4.5, and the remainder of this section will be devoted to a presentation of a proof of that result. 17

4.1 A proof of Thm. 4.5

The proof of Thm. 4.5 we now proceed to present is based on an adaptation of a beautiful argument due to Conway (cf. [20, Thm. 2, page 105]). In op. cit., Conway o ers two proofs of a theorem, originally due to Redko [58], to the e ect that equality of regular expressions cannot be axiomatized using a nite number of equations. The argument we present below is inspired by the second of those proofs (cf. [20, Pages 105{107]), and is model-theoretic in nature. In order to show Thm. 4.5, for every nite set of (in)equations that are valid in completed trace semantics we shall build a model that does not satisfy all of the instances of I:n and E:n. The construction of the model relies heavily on the use of prime numbers, as do related arguments presented in, e.g., [20, 26, 47, 64]. The proof of Thm. 4.5 will be delivered in two steps. We begin by studying a normal form for the terms in the language (BPA (Act)) modulo completed trace equivalence that will be useful in the proof of this result (Sect. 4.1.1). Finally, for every nite set of inequations sound in completed trace semantics, we show how to build a model in which the inequation I:p fails for some prime number p (Sect. 4.1.2). This is sucient to ensure that the inequality I:p cannot be proven from the inequations under consideration.

4.1.1 Normal Forms

In what follows, it will be convenient to consider a notion of normal form for terms in completed trace semantics. De nition 4.7 A term P 2 (BPA(Act)) is +-free i it does Pnot contain occurrences of the +-operation. A term P is in normal form i P =AC i2I Pi for some nite, non-empty index set I and +-free terms Pi . The length of a term P is inductively de ned thus: length( ) length(P + Q) length(PQ) length(P  Q)

= = = =

1 length(P ) + length(Q) length(P )length(Q) length(Q) :

We shall now show that each (BPA (Act)) term is completed trace equivalent to a normal form with the same length. (Note that, as the length of every +-free term is 1, the length of a normal form is the number of summands occurring in it.) To obtain this normalization result, it will be convenient to use the equations in Table 3, which are easily seen to be sound with respect to completed trace equivalence. (x + y )z x(y + z) x (y + z) (x + y ) z

= = = =

xz + yz xy + xz x  y + x z (x y ) (xz )

Table 3: Normalization Equations 18

Lemma 4.8 Every P 2 (BPA(Act)) may be proven equal to a normal form, which has the same length and the same variables as P , using the equations in Table 3 as rewrite rules from left to right.

Proof: A simple induction on the sum of the lengths of Q and R shows that, for normal forms

Q and R, - QR is provably equal to a normal form whose length is length(Q)length(R), and - Q R is provably equal to a normal form whose length is length(R). The fact that every term P is provably equal to a normal form, whose length is that of P, then follows by a straightforward structural induction on terms. The normalization process preserves the variables in terms because exactly the same variables occur on both sides of each equation in Table 3. 2

Notation 4.9 For a term P , we use vars(P ) to denote the total number of occurrences of variables in P , and weight(P ) (the weight of the term P ) to stand for 2vars(P ) length(P ). Example: For every positive integer n, the normal form associated with the term P

(an) an is ni=1 (an )(ai ) which has length, and weight, n. 2 The crux of our proof of Thm. 4.5 is the construction, for every prime number p, of an ordered algebra Ap over the signature of the language (BPA (Act)) with the following properties: P1 For every positive integer n, the inequation I:n and the equation E:n fail in Ap i p divides n. P2 Every inequation P  Q, that is sound in the algebra T(BPA (Act))= 'CT , where Q is a term whose weight is smaller than p, is valid in Ap . In fact, if we can construct the algebras Ap satisfying the above properties, then Thm. 4.5 follows thus:

Proof of Thm. 4.5: We prove the two statements separately.

1. Let E = fPi  Qi j i 2 I g be a nite set of inequations that is valid in completed trace semantics. Let m be the supremum of the weights of the terms Qi . Choose p as the least prime number greater than m. Then the inequations in E and all the instances of I:n and E:n for n not divisible by p are valid in the algebra Ap (properties P1 and P2). Moreover, the inequation I:p and the equation E:p fail in Ap (property P1). As Ap is a model of the axiom system E [ fI:n; E:n j n mod p 6= 0g in which I:p and E:p fail, it follows that I:p and E:p are not provable from E [ fI:n; E:n j n mod p 6= 0g. 2. Let E = fPi = Qi j i 2 I g be a nite set of equations that is valid in completed trace semantics. Note that any ordered algebra is a model of E i it is a model of the nite collection of inequations E de ned thus:

E = fPi  Qi; Qi  Pi j i 2 I g : The claim now follows immediately by mimicking the proof of statement 1.

19

2

The proof of the theorem is now complete.

In light of the previous discussion, in order to complete the proof of Thm. 4.5, we are left to construct, for every prime number p, an ordered algebra Ap having the properties P1 and P2 stated above.

4.1.2 The Algebra Ap

We shall now proceed to build, for every prime number p, an ordered algebra Ap with the aforementioned properties. The construction we present mimics the one used by Conway in his proof of the non- nite axiomatizability of the theory of regular languages (cf. [20, pp. 105{107]). Let a be an arbitrary action. The cyclic group of rank p generated by a can be depicted thus: 1 = a0 ! a1 ! a2 !  ! ap?1 ! ap = 1 : The carrier Ap of the algebra Ap consists of non-empty formal sums of powers of a, together with the formal symbol a , i.e.,

Ap =

P

i i2I a

j ?  I  f0; : : : ; p ? 1g [ fag :

In order to give the set Ap enough structure to serve as a suitable semantic domain for the language (BPA (Act)), we need to de ne the semantic counterparts of the operations in its signature over it. To this end, we map every action in Act to the symbol a, and stipulate that the semantic counterparts of the binary operations are given by the equations in Table 4, where we use the meta-variables e and e0 to range over the set Ap . In order to avoid confusion between syntactic and semantic operations, we shall use circled symbols to denote the operations in the algebra Ap . For example,  stands for the semantic counterpart of the + operation of (BPA (Act)). Note that the operations  and are commutative, but ~ is not. For example,

a~1 = a 6= a = 1~a : An Ap -environment is a mapping  from process variables to the set Ap . For a term P and an Ap -environment , we shall use Ap [ P ]  to denote the element of Ap that is associated with the term P by the unique homomorphic extension of  to (BPA (Act)). If P is a closed term, then Ap [ P ]  is independent of the environment . In that case, we shall simply write Ap [ P ] for the denotation of P in the algebra Ap . We now de ne a partial ordering on the set Ap thus:

e vp e0 = e  e0 = e0 : It is not hard to see that e vp e0 holds i  e0 = a, or  e = Pi2I ai, e0 = Pj2J aj and I is included in J . 20

j i P i2I a  j 2J a

P

j i P i2I a j 2J a

P

SUM1 SUM2 SUM3

P

COMP1 COMP2 COMP3

P

STAR

= h2I [J ah  a  e = a e  a  = a = h2f(i+j )mod pj(i;j )2I J g ah a e = a  e a  = a

e~ e0

=

(

e0 if e = 1 a otherwise

Table 4: The operation of the algebra Ap Note, moreover, that the operations in the algebra Ap are monotonic with respect to the above de ned partial ordering. Therefore we have given Ap the structure of an ordered algebra over the signature of the language (BPA (Act)), in the sense of [15, 39]. It is not hard to see that the equations in Table 3 are sound in the algebra Ap . Hence, if P is a term, and Pnf is a normal form for it, then, for every Ap -environment ,

Ap[ P ]  = Ap[ Pnf]  : We now proceed to show that the algebra Ap meets the requirements P1 and P2 that we set out to achieve. To this end, note, rst of all, that the inequations I:n fail in Ap if n is a multiple of p. In fact, in that case,

Ap[ a(an)]] = a 6vp

p?1 X i=0





ai = Ap (an) an :

A fortiori, the equations E:n fail in Ap if n is a multiple of p. On the other hand, if p does not divide n then the equation E:n is valid in Ap , and, a fortiori, so is the inequation I:n. This follows because

Ap[ a(an)]] = a = (anmodp)~Ap an = Ap[ an] ~Ap an = Ap (an)an where the second equality from the left holds because of the assumption that n is not divisible by p. In light of the above discussion, it follows that the ordered algebra Ap satis es the requirement P1 set out on page 19. Note that the aforementioned examples entail that Ap does not satisfy all the inequations that are valid in the algebra T(BPA (Act))= 'CT . In particular, the inequation I:p, which is valid in T(BPA (Act))= 'CT , fails in it. As remarked in the example on page 19, the weight of (the normal form for) the term (ap ) ap is p. We shall now proceed to show that requirement P2 is met by Ap , i.e., that every inequation P  Q, with Q a term of weight smaller than p, which is sound in the algebra T(BPA (Act))= 'CT , is valid in Ap . 21

As a stepping stone towards the proof of the fact that Ap meets requirement P2, we shall now argue that the failure of the inequation I:p in the algebra Ap is paradigmatic. In fact, if P  Q is an inequation that is sound in completed trace semantics, and  is an Ap -environment Psuch that Ap [ P ]  6vp Ap [ Q] , then it must be the case that Ap [ P ]  = a ?1 ai (cf. Lem. 4.15(2)). This implies that the algebra A is indeed and Ap [ Q]  = pi=0 p very close to being a model for completed trace semantics. All that we should need to do Pp?1 i  to turn Ap into such a model is to identify the elements a and i=0 a . In the proof of a subsequent lemma (Lem. 4.14), we shall make use of some basic notions from number theory. These we now proceed to recall, for the sake of clarity. The interested reader is referred to, e.g., [54] for more details. De nition 4.10 Let p and q be integers. If a positive integer m divides the di erence p ? q, we say that p is congruent to q modulo m and write p  q (mod m). The following classic result pertaining to the solution of congruence equations (cf., e.g., [54, Corollary 2.9]) will nd application in the proof of Lem. 4.14(1). Theorem 4.11 Let p; q; r be integers with p and q relatively prime, i.e. with gcd(p;q) = 1, and with q 6= 0. Then the equation

px  r (mod q) has an integer solution x1. All solutions are given by x = x1 + jq , where j = 0; 1; 2; : : :.

Notation 4.12 Let P be a term and a an action. We shall use Pa to denote the term obtained from P by replacing every occurrence of an action in P with a.

Notation 4.13 Let [0 7! p] : f0; : : : ; p ? 1g ! f1; : : : ; pg be the function that maps 0 to

p and acts like the identify on every other integer in its domain. For an Ap-environment , let  : Var ! T(BPA (Act)) denote the closed substitution which is de ned by (x) = Pi2I a[07!p](i) if (x) = Pi2I ai (x) = a a if (x) = a :

Lemma 4.14

1. Let Q; R 2 T(BPA (Act)) be terms containing only occurrences of the action a 2 Act. Suppose that p is a prime number p and i 2 f0; : : : ; p ? 1g. Then anp+i is a completed trace of Q R for some n  0 i there exists a non-negative integer m such that - either amp+i is a completed trace of R, - or there exists j 2 f1; : : : ; p ? 1g such that amp+j is a completed trace of Q.

2. Let P 2 (BPA (Act)) and let  be an Ap -environment. Suppose that p is a prime number. Then, for every i 2 f0; :::;p ? 1g, ai vp Ap [ P ]  i anp+i is a completed trace of Pa  for some non-negative integer n.

22

Proof: We prove the two statements separately.

1. Let Q; R 2 T(BPA (Act)) and a 2 Act. Assume that p is a prime number, and that i 2 f0; : : :; p ? 1g. We establish the two implications separately.  `Only If Implication'. Suppose that anp+i is a completed trace of QR for some n  0. We shall prove that, for some m  0, amp+i is a completed trace of R or there exists j 2 f1; : : :; p ? 1g such that amp+j is a completed trace of Q. To this end, note that it is sucient to show that if every completed trace of Q has length that is a multiple of p, then amp+i is a completed trace of R for some m  0. The simple proof of this fact is left to the reader.  `If Implication'. Suppose that, for some m  0, A amp+i is a completed trace of R, or B there exists j 2 f1; : : :; p ? 1g such that amp+j is a completed trace of Q. We shall prove that anp+i is a completed trace of Q R for some n  0. The only non-trivial case to consider is when condition B above holds. In this case, we proceed as follows. As the set of completed traces of R is non-empty, and R contains only occurrences of action a, we can choose a completed trace ah of R, for some positive integer h. Then, for every k  0, the term Q R has a completed trace ak(mp+j )+h . We shall now argue that it is possible to choose k such that, for some n  0, k(mp + j) + h = np + i : To this end, note that such a k can be found i the congruence equation in the unknown k jk  i ? h (mod p) has a non-negative solution. This is an immediate consequence of Thm. 4.11, because j and p are relatively prime. This completes the proof of statement 1. 2. Let P 2 (BPA (Act)), and let p be a prime number. Assume that i 2 f0; : : :; p ? 1g. We prove the statement by induction on the structure of P, and proceed by a case analysis on the form P may take. - Case: P  b. In this case, ai vp Ap [ P]] holds only for i = 1, because Ap [ P]] = a. Moreover, Pa  a, so a is the only completed trace of Pa . - Case: P  x. In this case, Ap [ P]] = (x) and Pa  = (x). It follows easily from the de nition of  that ai vp (x) i (x) has a completed trace anp+i for some n 2 f0; 1g. - Case: P  Q + R. In this case, Ap [ P]] = Ap [ Q]]  Ap [ R]]. So ai vp Ap [ P]] i either ai vp Ap [ Q]] or ai vp Ap [ R]]. By induction, this is the case i either Qa  or Ra has a completed trace of the form anp+i for some non-negative integer n. Finally, this holds i Pa  Qa  + Ra has a completed trace of the form anp+i . - Case: P  QR. As Ap [ P]] = Ap [ Q]] Ap [ R]], using the de nition of it is not hard to see that ai vp Ap [ P]] i aj vp Ap [ Q]] and ak vp Ap [ R]], for some j; k 2 f0; : : :; p ? 1g with (j + k) mod p = i. By induction, this holds i Qa  and Ra  have completed

23

traces alp+j and amp+k for non-negative integers l and m, respectively. Finally, as (j + k) mod p = i, this is the case i Pa   (Qa )(Ra ) has a completed trace anp+i for some non-negative integer n. - Case: P  Q R. As Ap [ P]] = Ap [ Q]]~ Ap [ R]], using the de nition of ~ it is not hard to see that ai vp Ap [ P]] i either aj vp Ap [ Q]] for some j 2 f1; :::; p ? 1g or ai vp Ap [ R]]. By induction, this is the case i either Qa  has a completed trace alp+j for some non-negative integer l or Ra  has a completed trace amp+i for non-negative integer m. Finally, as Qa  and Ra  are closed terms containing only occurrences of action a, by statement 1 of the lemma this holds i Pa   (Qa ) (Ra ) has a completed trace anp+i for some non-negative integer n. This completes the proof of statement 2. 2

The main use of the above technical result will be in the proof of the following lemma, which will be used repeatedly in the proof of Thm. 4.18 to follow. Lemma 4.15 Let P; Q 2 (BPA(Act)) and let  be an Ap-environment. Suppose that T(BPA (Act))= 'CT j= P  Q. Then: P ?1 i 1. If Ap [ P ]  = a , then either Ap [ Q]  = a or Ap [ Q]  = pi=0 a. P ?1 i 2. If Ap [ P ]  6vp Ap [ Q] , then Ap [ P ]  = a and Ap [ Q]  = pi=0 a. Proof: Suppose that T(BPA(Act))= 'CT j= P  Q. First of all, note that as the inequation P  Q is sound in the algebra T(BPA (Act))= 'CT , then so is Pa  Qa . Using this observation,

we now prove the two statements of the lemma separately. 1. As Ap [ P]] = a , it follows that Pa  has completed traces of the form an p+i for each i 2 f0; : : :; p ? 1g (Lem. 4.14(2)). Since T(BPA (Act))= 'CT j= Pa  Qa, the set of completed traces of Pa  is included in that of Qa . Therefore Qa  has each of the completed traces an p+i (i 2 f0; : : :; p ? 1g). Again using Lem. 4.14(2), we obtainPthat ai vp Ap [ Q]] for ?1 ai . every i 2 f0; :::; p ? 1g. Hence, either Ap [ Q]] = a or Ap [ Q]] = pi=0 2. Suppose that the Ap -environment  is such that Ap [ P]] 6vp Ap [ Q]]. We shall show that ?1 ai . Ap [ P]] = a and Ap [ Q]] = Ppi=0 We begin by proving that Ap [ P]] = a . To this end, assume, towards a contradiction, P that Ap [ P]] = i2I ai for some non-empty I  f0; :::; p ? 1g. According to Lem. 4.14(2), Pa has a completed trace of the form an p+i for each i 2 I. Since T(BPA (Act))= 'CT j= Pa  Qa , the term Qa  also has a completed trace of the form an p+i for each i 2 I. By Lem. 4.14(2) it follows that ai vp Ap [ Q]] for each i 2 I. Hence, Ap [ P]] vp Ap [ Q]], which contradicts one of the assumptions of the lemma. Thus Ap [ P]] = a must hold. Since Ap [ P]] 6vp P Ap [ Q]], it follows that Ap [ Q]] 6= a . ?1 ai . Hence, statement 1 of the lemma yields Ap [ Q]] = pi=0 The proof of the lemma is now complete. 2 i

i

i

i

In the proof of the fact that the algebra Ap satis es requirement P2 on page 19, we shall make use of some properties of the semantic mapping Ap [ ] . For ease of reference, these are collected in the following lemma. 24

Lemma 4.16 For every P 2 (BPA(Act)) and Ap-environment , the following state-

ments hold: 1. If Ap [ P ]  6= a , then (x) 6= a for every variable x contained in Var(P ).

2. If Ap [ P ]  = ai for some 0  i  p ? 1, then (x) is a power of a for every variable x contained in Var(P ).

3. Assume that P is +-free, Ap [ P ]  6= a , and  maps every variable occurring in P to a power of a. Then Ap [ P ]  is a power of a. 4. If Ap [ P ]  6= a , then (x) is a power of a for every variable x contained in StarVar(P ). 5. Assume that Ap [ P ]  = a , that 0 coincides with  over StarVar(P ), and that if (x) = a for an x 2 Var(P ), then 0(x) = a. Then Ap [ P ] 0 = a .

6. Assume that Ap [ P ]  6= a , that 0 coincides with  over StarVar(P ), and that 0(x) 6= a for x 2 Var(P ). Then Ap [ P ] 0 6= a . Proof: All the statements can be shown by induction on the structure of the term P. The details are left to the reader. Here we only remark that the proof for statement 4 uses statement 2 to deal with the case in which P has the form Q R for some terms Q and R. In fact, if P has that form and Ap [ P]] 6= a , then it must be the case that Ap [ Q]] = 1. Statement 2 then yields that (x) maps each variable in Q to a power of a. 2

Lemma 4.17 Let N denote the number of occurrences of the process variable x in the term Q. Let [(a + a2 )=x] denote the substitution mapping x to a + a2 , and acting like the identity on all the other variables. Then the length of Q[(a + a2 )=x] is at most 2N times the length of Q. Proof: Straightforward, by induction on the size of Q.

2 We are nally in a position to prove that the algebra Ap satis es all the inequations P  Q, with Q a term of weight smaller than p, that are sound in completed trace semantics. This implies that the algebra Ap does indeed meet requirement P2. Theorem 4.18 If T(BPA(Act))= 'CT j= P  Q and weight(Q) is smaller than p, then Ap j= P  Q. Proof: We shall show that if the inequation P  Q is sound in the algebra T(BPA(Act))= 'CT , but fails in Ap , then Q must have weight at least p. Assume that P  Q is sound in T(BPA (Act))= 'CT , but not in Ap . Then there exists an Ap -environment  such that Ap [ P]] 6vp Ap [ Q]] : By Lem. 4.15(2), it must be the case that

Ap [ P]] = a 6vp

pX ?1 i=0

25

ai = Ap [ Q]] :

As Ap [ Q]] 6= a , it follows that  maps no variable in Q to a (Lem. 4.16(1)), and that  maps every variable in StarVar(Q) to a power of a (Lem. 4.16(4)). We now proceed with the proof by distinguishing two cases, depending on whether StarVar(P) is included in StarVar(Q) or not.  Case: StarVar(P)  StarVar(Q). Consider the Ap -environment 0 that is de ned as follows: 0 (x) = (x) if x 2 StarVar(Q) 0 (x) = (x) if (x) = a 0 (x) = 1 otherwise : Since  maps no variable in Q to a , the same holds for 0 . Hence, Lem. 4.16(6) gives that Ap [ Q]]0 6= a . Furthermore, since StarVar(P) is included in StarVar(Q), 0 coincides with  over StarVar(P). By construction, if (x) = a then 0 (x) = a . So, by Lem. 4.16(5), we may infer that Ap [ P]]0 = a . As the inequation P  Q fails in Ap for the Ap -environment 0 , Lem. 4.15(2) yields that

Ap [ P]]0 = a 6vp

pX ?1 i=0

ai = Ap [ Q]]0 :

P Let Q have normal form k=1 Qk , where each Qk is +-free. Since Ap j= Q = mk=1 Qk , we infer that: pX ?1 ai = Ap [ Q]]0 = Ap [ Q1] 0      Ap [ Qm ] 0 : Pm

i=0

P

By Lem. 4.8, Q and mk=1 Qk have the same variables, and the length of Q is m. As 0 maps each variable in Q to a power of a, Lem. 4.16(3) now gives that, for every index k, Ap [ Qk ] 0 = aj for some 0  j  p ? 1. It follows that m  p. Thus, p  length(Q)  weight(Q), which was to be shown.  Case: StarVar(P) 6 StarVar(Q). Fix a process variable x0 2 StarVar(P) n StarVar(Q). Consider the Ap -environment 0 that is de ned as follows: 0 (x) = (x) if x 2 StarVar(Q) 0 (x0) = a + a2 0 (x) = 1 otherwise :  Since  maps no variable in Q to a , the same holds for 0 . Hence, an application of Lem. 4.16(6) gives that Ap [ Q]]0 6= a . Furthermore, since 0 (x0 ) is not a power of a, Lem. 4.16(4) gives that Ap [ P]]0 = a . As the inequation P  Q fails in Ap for the Ap -environment 0 , Lem. 4.15(2) yields that

Ap [ P]]0 = a 6vp

pX ?1 i=0

ai = Ap [ Q]]0 :

Let [(a + a2 )=x0] stand for the substitution mapping x0 to the term a + a2 , and acting like the identity on all the other variables. Suppose that the term Q[(a + a2 )=x0] has normal Pm form k=1 Qk , where each Qk is +-free. By Lem. 4.17, it follows that the length m of Q[(a + a2)=x0 ] is at most 2vars(Q) length(Q), that is the weight of Q. Consider now the Ap -environment 00 that is de ned as follows: 00(x0 ) = 1 00 (x) = 0 (x) otherwise :

26

By the standard interplay between substitutions and the interpretation mapping Ap [ ] , and P using the fact that Ap j= Q[(a + a2 )=x0] = mk=1 Qk , we infer that: p?1 X i=0

  ai = Ap [ Q]]0 = Ap Q[(a + a2)=x0] 00 = Ap [ Q1] 00      Ap [ Qm ] 00 :

By construction, 00 maps P each variable in Q to a power of a. As the set of variables occurring in the term mk=1 Qk is Var(Q)nfx0g (Lem. 4.8), an application of Lem. 4.16(3) now gives that, for every index k, Ap [ Qk ] 00 = aj for some 0  j  p ? 1. It follows that m is greater than, or equal to, p. Thus, p  2vars(Q) length(Q), which was to be shown. This completes the proof of the theorem. 2

As an immediate corollary of the above theorem, we obtain the following result. Corollary 4.19 Let P; Q 2 (BPA (Act)) be terms of weight smaller than p. Suppose that T(BPA (Act))= 'CT j= P = Q. Then Ap j= P = Q.

Proof: Let P = Q be an equation consisting of terms of weight smaller than p. Suppose that

T(BPA (Act))= 'CT j= P = Q. Then T(BPA (Act))= 'CT j= P  Q  P. By the previous theorem, Ap j= P  Q  P. Therefore Ap j= P = Q. 2

In light of the above discussion, we have nally completed the proof of Thm. 4.5, and therefore of Thm. 4.2.

Remark: As pointed out to us by E sik [28], the proof that we have just completed does in fact

yield a stronger statement than that of Thm. 4.2. To see that this is indeed the case, let us de ne the preorder @ TL over T(BPA (Act)) as follows: P @ TL Q i the set of the lengths of the completed traces of P is included in that of Q. It is easy to see that, for every P; Q 2 T(BPA (Act)) and action a,

P @ TL Q i Pa @ CT Qa : It follows that @ TL (resp. 'TL ) is a fully invariant precongruence (resp. congruence) for the language (BPA (Act)). Using the above observations, it is not hard to see that the proof of Thm. 4.2 that we have presented above can in fact be used to show the following result: Theorem 4.20 No precongruence (resp. congruence) relation over T(BPA (Act)) that is included in @ TL (resp. 'TL ) and satis es I:n (resp. E:n) for all n  1 has a nite inequational (resp. equa-

tional) axiomatization. This also holds if we restrict ourselves to axiomatizations of these relations for closed terms only.

An example of a preorder over (BPA (Act)), which, under the assumption that Act contains at least two elements, lies strictly in between @ CT and @ TL , is the one considered in commutative regular algebra (cf., e.g., [59, 62, 20]). This we now proceed to de ne, for the sake of completeness. Let L be a set of sequences over the alphabet Act. We write c(L) to denote the set consisting of all those sequences that can be obtained by permuting the actions in some sequence contained in L. We de ne P @ CCT Q = c(completed-traces(P))  c(completed-traces(Q)) :

27

If Act contains two distinct actions, then @ CCT strictly includes @ CT , and is strictly included in @ TL . As @ CCT is easily seen to be a precongruence, Thm. 4.20 yields the non-existence of a nite inequational axiomatization for it over the language T(BPA (Act)). The reader familiar with [40, 55] may have noticed the similarities between the notion of commutative regular algebra and the counter model for CSP [41] de ned ibidem. The main di erence between the two notions being that the counter model is based upon, not necessarily completed, traces.

Remark: In [62, page 143] Salomaa pointed out that it was an open problem whether the equa-

tional theory of (closed) regular expressions over a singleton alphabet is nitely based. Our results show that completed trace equivalence over T(BPA (Act)), and a fortiori over (BPA (Act)), is not nitely based, even when the set of actions is a singleton. Indeed our proof can be easily adapted, along the lines of the one given by Conway in [20, Thm. 2], to yield the non-existence of a nite equational axiomatization of equality of (closed) regular expressions over a singleton alphabet, thus answering the aforementioned question of Salomaa's. As communicated to us by Salomaa [63], this problem has been open since 1969, the year of publication of [62].

5 The Peculiar Case of Trace Semantics The reader familiar with van Glabbeek's linear time/branching time spectrum might have noticed the absence of trace semantics [41] from the developments presented in the previous section. We shall now proceed to ll this gap by studying some axiomatic questions concerning trace semantics over (BPA (Act)). As we shall see, this leads to some rather peculiar results, at least when compared with those that we obtained for the other semantics considered in this paper.

De nition 5.1 For states s; s0 in any labelled transition system, we write s @T s0 i the 

set of traces of s is included in that of s0 . The kernel of the preorder @ T will be denoted by 'T .

Note that the set of traces of a state s in any labelled transition system is pre x closed, unlike that of its completed traces. In general, completed trace semantics and trace semantics are incomparable. For example, the T(BPA (Act)) terms a and aa have disjoint sets of completed traces, but the set of traces of a is included in that of aa. On the other hand, the processes a! and b! speci ed by the following recursion equations

a! def = a  a! b! def = b  b! have no completed trace, but disjoint sets of non-empty traces. However, if the labelled transition system under consideration is normed, in the sense of [6], then the set of traces of every state s is obtained as the pre x closure of its set of completed traces. This is because every state in a normed transition system has at least one completed trace, and therefore each of its traces is the pre x of a completed one. As the labelled transition 28

system giving the operational semantics to the language T(BPA (Act)) is normed (cf., e.g., [32]), by the above discussion we obtain that: @ CT (resp. 'CT ) is strictly included in @ T (resp. 'T ) over the Fact 5.2 The relation  language T(BPA (Act)). In general, trace semantics is not appropriate for languages that, like T(BPA (Act)), include a sequential composition operator. In fact, if the set of actions Act contains at least two distinct actions, then neither @ T nor 'T are preserved by sequential composition. As an example, consider the T(BPA (Act)) terms a and aa. We have already remarked that a @ T aa. However, if b is an action that is di erent from a, then ab 6@ T aab. For this reason, in the previous sections we con ned our attention to semantics that are included in completed trace semantics. In contrast to the general situation depicted above, in the, admittedly rather uninteresting, case in which the set of actions Act is a singleton, we observe the following fact. Proposition 5.3 Assume that the set of actions Act is a singleton. Then: 1. The relations @ T and 'T are preserved by all the operations in the signature of the language (BPA (Act)). 2. The simulation preorder @ S coincides with @ T .

Proof: Assume that a is the only action contained in Act. We prove the two statements separately. 1. As the set of traces of a term of the form P + Q is the union of those of P and Q, it follows immediately that @ T is preserved by summation. (Indeed, this holds regardless of the cardinality of the set of actions.) We shall now prove that @ T is preserved by sequential composition and binary Kleene star. Suppose that P; Q; R; S are terms such that P @ T Q and R @ T S. We shall show that PR @ T QS and that P  R 'T Q S.  We prove, rst of all, that PR @ T QS. Assume that an is a trace of the term PR, for some non-negative integer n. We now proceed to argue that an is also a trace of the term QS. If an is a trace of Q, then it is also a trace of QS, in which case we are done. Thus we may assume that an is not a trace of Q. Note that, since P @ T Q, an is not a trace of P either. As a consequence of these assumptions, we infer that: (a) n = h + k for two positive integers h and k such that ah is a completed trace of P, and ak is a trace of R; and (b) every trace aj of Q has length smaller than n. In this case, we argue as follows. As the length of the traces of Q is bounded from above by n, we can choose the longest such trace aj . This trace is a completed trace of Q. As ah is a trace of Q (P @ T Q), and aj is the longest such trace, it follows that h  j. Since aj is a completed trace of Q, and ak is a trace of S (R @ T S), aj +k is a trace of QS. Finally, j + k  h + k = n, so then an is a trace of QS. 29

 To prove that P  R 'T Q S, it is sucient to note that every process containing

occurrences of the binary Kleene star operator has the set of all nite sequences of a actions as its set of traces. 2. The fact that @ S is included in @ T is a simple consequence of the de nitions of these relations. To see that the converse also holds, under the assumption that the only action is a, it is sucient to check that the relation:  R = (P; Q) j P @ T Q [ f(X; P) j P 2 T(BPA (Act))g is a simulation. This is an easy consequence of the fact that, for terms P; Q over action a, P @ T Q i - either Q has an in nite a-computation, i.e., for some terms Q1; Q2; : : :, Q !a Q1 !a Q2 !a   

- or the length of the longest completed trace of P is less than, or equal to, that of the longest completed trace of Q. The proof is now complete. 2

In light of the above congruence result, and of the non- nite axiomatizability results presented in the main body of the paper, it is natural to wonder whether the trace (pre)congruence has a nite (in)equational axiomatization over the language of closed terms T(BPA (Act)) over a singleton set of actions. We recall that our previous negative results pertaining to the non- nite axiomatizability of several process semantics over T(BPA (Act)) apply for every non-empty set of actions. We shall now proceed to show that, in contrast to the situation summarized in Thm. 4.2, trace (pre)congruence can be nitely (in)equationally axiomatized over the set of closed terms over a singleton action set. TE1 x + (y  z ) = a a TE2 x + xy = xy TE3 xy = yx Table 5: Characteristic equations for trace equivalence (Act = fag)

Consider the axiom system ET consisting of the equations A1{A5 in Table 2 together with the axioms in Table 5. It is not hard to see that the equations in ET are sound with respect to trace equivalence over T(BPA (Act)). The only non-standard equations in ET are TE1 and TE3, whose soundness depends crucially upon the assumption that the only action is a. Theorem 5.4 Let Act = fag and P; Q 2 T(BPA(Act)). Then P 'T Q i ET ` P = Q. Moreover P @ T Q i P  Q can be proven from the equations in ET together with the inequation (3) x  x+y : 30

Proof: (Sketch.) The soundness of the equations in ET and of inequation (3) is easy to check. We shall now argue for the completeness, over closed terms, P of the proposed axiomatizations. A trace normal form is either a a or a term of the form ni=1 ai for some positive integer n. A simple structural induction on terms gives that every term in the language T(BPA (Act)) can be proven equal to a trace normal form. The proof of this fact makes use of all of the equations in ET , together with the following derived laws: x(y + z) = xy + xz (a a)x = a a : The completeness of the axiomatization for trace equivalence now follows immediately because two trace normal forms are equal i they are identical, modulo commutativity and associativity of summation. To establish the completeness of the axiomatization for the trace precongruence, note that P @ T Q i P + Q 'T Q. As ET is complete for trace equivalence, it follows that, if P @ T Q, then ET ` P + Q = Q. Now, the inequality P  Q can be proven using (3) and transitivity. 2

It is interesting to note that the above axiomatizations are not complete for open terms in the language (BPA (Act)). For example, when the set of actions is a singleton, the equations (4) a+x = x (5) xx + yy = xx + yy + xy are sound with respect to trace semantics over (BPA (Act)). However, we shall now show that (4) and (5) are not provable from the axiom system ET [ f(3)g. Proposition 5.5 Equations (4) and (5) are not deducible from the axiom systems ET [ f(3)g. Proof: We build a model for the axiom system ET [ f(3)g in which (4) and (5) fail. The carrier of the model M is the poset depicted below: 2

%

" 2

-

1 1 The operators in the signature of the language T(BPA (Act)) are de ned over M as follows (e; e0 2 f1; 2; 1; 2g): aM = 1 e +M e0 = sup(e; e0 ) eM e0 = 28 < 1 if e = e0 = 1  0 e M e = : 1 if e = e0 = 1 2 otherwise (Note that the operations so de ned are monotonic.) The reader will have no diculty in verifying that the resulting ordered algebra is a model of ET [f(3)g. However (4) and (5) fail in M. Indeed (4) fails in M because, letting  denote an environment mapping x to 1, M[ x]] = 1 6= 2 = M[ a + x]] :

31

To see that (5) also fails, let 0 be an M-environment mapping x to 1, and y to 1. Then,

M[ xx + yy]]0 = 2 6= 2 = M[ xx + yy + xy]]0 : 2 We leave it as an open question whether there exists a nite (in)equational axiomatization of the (ordered) algebra T(BPA (Act))= 'T . This problem is closely related to that of nding a nite ! -complete axiomatization of the algebra of the positive integers with operations of summation and maximum. To the best of our knowledge, this problem is, surprisingly, still awaiting a solution.

The proof is now complete.

6 Concluding Remarks In this paper we have shown that none of the process semantics that lie in between ready simulation and completed traces are nitely based over the language BPA . This result is in sharp contrast with a theorem by Fokkink and Zantema [32] to the e ect that bisimulation equivalence has a nite equational axiomatization over BPA , and the reader might wonder why bisimulation equivalence is nitely based whereas none of the process semantics considered in this paper is. (The only peculiar exception being trace semantics over closed terms when the set of actions is a singleton.) We shall now present our interpretation of the dichotomy between bisimulation and the process semantics considered in this paper. For every process term P 2 T(BPA (Act)), let Loops(P ) denote the collection of the completed traces of the sub-terms of P that occur on the left-hand side of a star. Intuitively, Loops(P ) is the set of the sequences of actions labelling the loops in the nite automaton that is associated with P by the operational semantics for T(BPA (Act)). We shall now prove a result to the e ect that two BPA terms can only be bisimilar if they have loops of the same length. Proposition 6.1 Let P; Q 2 T(BPA(Act)). If P $ Q, then Loops(P ) = Loops(Q).

Proof:

As the equations in Table 2 are complete with respect to bisimulation equivalence, it is sucient to show that if the equation P = Q is deducible from those in Table 2, then Loops(P) = Loops(Q). This is easily veri ed because the statement holds for the equations in the aforementioned table, and is preserved by the rules of equational deduction. 2

As witnessed by the family of equivalences E:n, Propn. 6.1 does not hold for any of the semantics considered in this paper, and its loss entails that any complete equational axiom system for any of these semantics should be powerful enough to equate terms with loops of di erent lengths. Indeed, the import of Thm. 4.5 is that no nite set of (in)equations can prove all the equivalences between terms whose loops have prime length. This is the same reason that leads to the non-existence of a nite equational axiom system for bisimulation equivalence over BPA [64], and that underlies the negative results in, e.g., [58, 62, 20, 26, 47]. The results of this paper have shown that all the semantics considered in [35] are not nitely based over the language BPA , with the exception of 2-nested simulation 32

equivalence [38] and possible-futures equivalence [60]. Establishing whether these equivalences are nitely based or not is a possible avenue for further research along the lines of this paper. Let us just remark here that, at least to the best of our knowledge, no complete axiomatization for 2-nested simulation equivalence is known even over the basic syntax for synchronization trees. Moreover, possible-futures equivalence is not preserved by sequential composition and binary Kleene star, and therefore this semantics cannot be readily used for a language like BPA . Having established that none of the process semantics considered in this paper has a nite equational axiomatization over BPA , a natural topic for further study is the search for e ectively presented, in nite equational axiomatizations for them. This is most likely to be a dicult problem, as witnessed by the corresponding developments in the theory of regular expressions. These we now brie y recall for the sake of historical completeness. A theorem of Redko's, whose proof was simpli ed and corrected by Pilling [20, Chapter 11], gives an in nite, complete system of identities for commutative regular expressions [59]. An in nite equational axiomatization of the theory of regular expressions over a singleton alphabet was given by Redko in [58] (cf. also [20, Chapter 4]). (Variations on the aforementioned results of Redko's that apply to regular expressions over a singleton alphabet with multiplicities over the tropical semiring may be found in [19].) The construction of a complete equational axiomatization for regular expressions over an arbitrary alphabet was addressed by Conway in his seminal monograph [20]. Ibidem Conway proposed three conjectures, whose solution would yield the desired complete set of equations. It took many years, and Krob's landmark paper [46], to settle two of these conjectures of Conway's, and to obtain the rst complete equational axiom system for the theory of regular expressions. An alternative equational axiomatization for regular expressions, developed within the framework of iteration theories [17], may be found in [16]. Finite implicational proof systems for regular expressions have been developed by, e.g., Salomaa [61, 62] and Kozen [45]. (The interested reader is invited to consult [46, Sect. 15] for a thorough discussion of implicational proof systems for regular languages.) Modi cations of these proof systems to yield complete axiom systems based on conditional equations for the process semantics considered in this paper over BPA are an interesting topic for future research. Acknowledgements: We should like to thank Zoltan E sik for his encouragement to pursue the research reported in this paper, and for many insightful comments and pointers to related literature. We are also indebted to Gheorghe Stefanescu for alerting us to the relevance of E sik's work on axiomatizations of iteration theories, and to Daniel Krob for providing us with information on his work on axiomatic questions for regular expressions.

References [1] L. Aceto and W. J. Fokkink, An equational axiomatization for multi-exit iteration, Research Report RS-96-22, BRICS (Basic Research in Computer Science, Centre of the Danish National Research Foundation), Department of Computer Sci33

[2]

[3] [4] [5] [6] [7] [8] [9]

[10] [11] [12] [13] [14]

ence, Aalborg University, June 1996. Available by anonymous ftp at the address ftp.brics.aau.dk in the directory pub/BRICS/RS/96/22. L. Aceto and J. F. Groote, A complete equational axiomatization for MPA with string iteration, Research Report RS{95{28, BRICS (Basic Research in Computer Science, Centre of the Danish National Research Foundation), Department of Mathematics and Computer Science, Aalborg University, May 1995. Available by anonymous ftp at the address ftp.brics.aau.dk in the directory pub/BRICS/RS/95/28. L. Aceto and A. Ingo lfsdo ttir, An equational axiomatization of observation congruence for pre x iteration, in Wirsing and Nivat [65], pp. 195{209. Full version available as BRICS Report RS-95-5, January 1995. L. Aceto, R. van Glabbeek, W. J. Fokkink, and A. Ingo lfsdo ttir, Axiomatizing pre x iteration with silent steps, Information and Computation, 127 (1996), pp. 26{40. D. Austry and G. Boudol, Algebre de processus et synchronisations, Theoretical Comput. Sci., 30 (1984), pp. 91{131. J. Baeten, J. Bergstra, and J. Klop, Decidability of bisimulation equivalence for processes generating context-free languages, J. Assoc. Comput. Mach., 40 (1993), pp. 653{682. J. Baeten and J. Klop, eds., Proceedings CONCUR 90, Amsterdam, vol. 458 of Lecture Notes in Computer Science, Springer-Verlag, 1990. J. Baeten and W. Weijland, Process Algebra, Cambridge Tracts in Theoretical Computer Science 18, Cambridge University Press, 1990. J. Bergstra, I. Bethke, and A. Ponse, Process algebra with iteration, Report CS-R9314, Programming Research Group, University of Amsterdam, 1993. Available by anonymous ftp at the address fwi.uva.nl as le pub/programming-research/reports/1993/P9314.ps.Z. , Process algebra with iteration and nesting, Computer Journal, 37 (1994), pp. 243{258. J. Bergstra and J. Klop, Fixed point semantics in process algebras, Report IW 206, Mathematisch Centrum, Amsterdam, 1982. , Algebra of communicating processes with abstraction, Theoretical Comput. Sci., 37 (1985), pp. 77{121. E. Best, ed., Proceedings CONCUR 93, Hildesheim, Germany, vol. 715 of Lecture Notes in Computer Science, Springer-Verlag, 1993. B. Bloom, S. Istrail, and A. R. Meyer, Bisimulation can't be traced, J. Assoc. Comput. Mach., 42 (1995), pp. 232{268. 34

[15] S. L. Bloom, Varieties of ordered algebras, J. Comput. System Sci., 13 (1976), pp. 200{212. [16] S. L. Bloom and Z. E sik, Equational axioms for regular sets, Mathematical Structures in Computer Science, 3 (1993), pp. 1{24. [17] , Iteration Theories: The Equational Logic of Iterative Processes, EATCS Monographs on Theoretical Computer Science (W. Brauer, G. Rozenberg and A. Salomaa eds.), Springer-Verlag, 1993. , Iteration algebras of nite state process behaviours, Jan. 1994. Unpublished [18] manuscript. Available by anonymous ftp from menger.eecs.stevens-tech.edu in the directory /pub/bloom/papers/processes. [19] A. Bonnier-Rigny and D. Krob, A complete system of identities for one-letter rational expressions with multiplicities in the tropical semiring, Theoretical Comput. Sci., 134 (1994), pp. 27{50. [20] J. H. Conway, Regular algebra and nite machines, Mathematics Series (R. Brown and J. De Wet eds.), Chapman and Hall, London, United Kingdom, 1971. [21] I. Copi, C. Elgot, and J. Wright, Realization of events by logical nets, J. Assoc. Comput. Mach., 5 (1958), pp. 181{196. [22] F. Corradini, R. De Nicola, and A. Labella, Fully abstract models for nondeterministic Kleene algebras (extended abstract), in Proceedings CONCUR 94, Philadelphia, PA, USA, I. Lee and S. Smolka, eds., vol. 962 of Lecture Notes in Computer Science, Springer-Verlag, 1995, pp. 130{144. [23] S. Crvenkovic and R. Madara sz, On Kleene algebras, Theoretical Comput. Sci., 108 (1993), pp. 17{24. [24] R. De Nicola and A. Labella, A completeness theorem for nondeterministic Kleene algebras, in Proceedings of MFCS '94, vol. 841 of Lecture Notes in Computer Science, Springer-Verlag, 1994, pp. 536{545. [25] S. Eilenberg, Automata, Languages, and Machines, vol. 59{A of Pure and Applied Mathematics, Academic Press, New York and London, 1974.  , Independence of the equational axioms for iteration theories, J. Comput. [26] Z. Esik System Sci., 36 (1988), pp. 66{76. , Group axioms for iteration, 1995. Unpublished manuscript. [27] [28] , Personal communication, May 1996. [29] W. J. Fokkink, A complete equational axiomatization for pre x iteration, Inf. Process. Lett., 52 (1994), pp. 333{337. 35

[30] [31] [32] [33] [34] [35] [36]

[37] [38] [39] [40] [41] [42] [43]

, A complete axiomatization for pre x iteration in branching bisimulation, Fundamenta Informaticae, 26 (1996), pp. 103{113. , On the completeness of the equations for the Kleene star in bisimulation, in Wirsing and Nivat [65], pp. 180{194. A full version of the paper is available by anonymous ftp from phil.ruu.nl as logic/PREPRINTS/preprint141.ps. W. J. Fokkink and H. Zantema, Basic process algebra with iteration: Completeness of its equational axioms, Computer Journal, 37 (1994), pp. 259{267. , Pre x iteration in basic process algebra: applying termination techniques, in Proceedings ACP 95, Eindhoven, A. Ponse, C. Verhoef, and B. v. Vlijmen, eds., vol. Report CS-95-14, Eindhoven University of Technology, 1995, pp. 139{156. R. J. v. Glabbeek, Comparative Concurrency Semantics and Re nement of Actions, PhD thesis, Free University, Amsterdam, 1990. , The linear time { branching time spectrum, in Baeten and Klop [7], pp. 278{ 297. , Full abstraction in structural operational semantics (extended abstract), in Proceedings of the Third International Conference on Algebraic Methodology and Software Technology (AMAST '93), Twente, The Netherlands, M. Nivat, C. Rattray, T. Rus, and G. Scollo, eds., Workshops in Computing, Springer-Verlag, June 1993, pp. 77{84. , The linear time { branching time spectrum II: the semantics of sequential processes with silent moves, in Best [13], pp. 66{81. J. F. Groote and F. Vaandrager, Structured operational semantics and bisimulation as a congruence, Information and Computation, 100 (1992), pp. 202{260. M. Hennessy, Algebraic Theory of Processes, MIT Press, Cambridge, Massachusetts, 1988. C. Hoare, Speci cations, programs and implementations, Technical Monograph PRG{29, Programming Research Group, Oxford University, 1982. , Communicating Sequential Processes, Prentice-Hall International, Englewood Cli s, 1985. B. Jo nsson, The theory of binary relations, in Algebraic Logic, Colloquia Mathematica Societatis Janos Bolyai, vol. 54, North-Holland, Amsterdam, 1988, pp. 245{ 292. R. Keller, Formal veri cation of parallel programs, Comm. ACM, 19 (1976), pp. 371{384. 36

[44] S. Kleene, Representation of events in nerve nets and nite automata, in Automata Studies, C. Shannon and J. McCarthy, eds., Princeton University Press, 1956, pp. 3{ 41. [45] D. Kozen, A completeness theorem for Kleene algebras and the algebra of regular events, Information and Computation, 110 (1994), pp. 366{390. [46] D. Krob, Complete systems of B -rational identities, Theoretical Comput. Sci., 89 (1991), pp. 207{343. , Models of a K -rational identity system, J. Comput. System Sci., 45 (1992), [47] pp. 396{434. [48] K. G. Larsen and A. Skou, Bisimulation through probabilistic testing, Information and Computation, 94 (1991), pp. 1{28. [49] R. Milner, A Calculus of Communicating Systems, vol. 92 of Lecture Notes in Computer Science, Springer-Verlag, 1980. [50] , Calculi for synchrony and asynchrony, Theoretical Comput. Sci., 25 (1983), pp. 267{310. [51] , A complete inference system for a class of regular behaviours, J. Comput. System Sci., 28 (1984), pp. 439{466. , Communication and Concurrency, Prentice-Hall International, Englewood [52] Cli s, 1989. [53] , A complete axiomatisation for observational congruence of nite-state behaviors, Information and Computation, 81 (1989), pp. 227{247. [54] I. Niven and H. Zuckerman, An introduction to the theory of numbers (2nd edition), John Wiley & Sons, 1960. [55] E.-R. Olderog and C. Hoare, Speci cation-oriented semantics for communicating processes, Acta Inf., 23 (1986), pp. 9{66. [56] D. Park, Concurrency and automata on in nite sequences, in 5th GI Conference, Karlsruhe, Germany, P. Deussen, ed., vol. 104 of Lecture Notes in Computer Science, Springer-Verlag, 1981, pp. 167{183. [57] G. Plotkin, A structural approach to operational semantics, Report DAIMI FN-19, Computer Science Department, Aarhus University, 1981. [58] V. Redko, On de ning relations for the algebra of regular events, Ukrainskii Matematicheskii Zhurnal, 16 (1964), pp. 120{126. In Russian. [59] , On the algebra of commutative events, Ukrainskii Matematicheskii Zhurnal, 16 (1964), pp. 185{195. In Russian. 37

[60] W. Rounds and S. Brookes, Possible futures, acceptances, refusals and communicating processes, in 22th Annual Symposium on Foundations of Computer Science, Nashville, Tennessee, New York, 1981, IEEE, pp. 140{149. [61] A. Salomaa, Two complete axiom systems for the algebra of regular events, J. Assoc. Comput. Mach., 13 (1966), pp. 158{169. , Theory of Automata, vol. 100 of International Series of Monographs in Pure [62] and Applied Mathematics (I.N. Sneddon and M. Stark eds.), Pergamon Press, Oxford, 1969. , Personal communication, June 1996. [63] [64] P. Sewell, Bisimulation is not nitely ( rst order) equationally axiomatisable, in Proceedings 9th Annual Symposium on Logic in Computer Science, Paris, France, IEEE Computer Society Press, 1994, pp. 62{70. [65] M. Wirsing and M. Nivat, eds., Algebraic Methodology and Software Technology: 5th International Conference, AMAST '96, Munich, Germany, vol. 1101 of Lecture Notes in Computer Science, Springer-Verlag, July 1996.

38

Recent Publications in the BRICS Report Series RS-96-23 Luca Aceto, Wan J. Fokkink, and Anna Ing´olfsd´ottir. A Menagerie of Non-Finitely Based Process Semantics over BPA: From Ready Simulation Semantics to Completed Tracs. July 1996. 38 pp. RS-96-22 Luca Aceto and Wan J. Fokkink. An Equational Axiomatization for Multi-Exit Iteration. June 1996. 30 pp. RS-96-21 Dany Breslauer, Tao Jiang, and Zhigen Jiang. Rotation of Periodic Strings and Short Superstrings. June 1996. 14 pp. RS-96-20 Olivier Danvy and Julia L. Lawall. Back to Direct Style II: First-Class Continuations. June 1996. 36 pp. A preliminary version of this paper appeared in the proceedings of the 1992 ACM Conference on Lisp and Functional Programming, William Clinger, editor, LISP Pointers, Vol. V, No. 1, pages 299–310, San Francisco, California, June 1992. ACM Press. RS-96-19 John Hatcliff and Olivier Danvy. Thunks and the Calculus. June 1996. 22 pp. To appear in Journal of Functional Programming. RS-96-18 Thomas Troels Hildebrandt and Vladimiro Sassone. Comparing Transition Systems with Independence and Asynchronous Transition Systems. June 1996. 14 pp. To appear in Montanari and Sassone, editors, Concurrency Theory: 7th International Conference, CONCUR ’96 Proceedings, LNCS 1119, 1996. RS-96-17 Olivier Danvy, Karoline Malmkjær, and Jens Palsberg. Eta-Expansion Does The Trick (Revised Version). May 1996. 29 pp. To appear in ACM Transactions on Programming Languages and Systems (TOPLAS). RS-96-16 Lisbeth Fajstrup and Martin Raußen. Detecting Deadlocks in Concurrent Systems. May 1996. 10 pp. RS-96-15 Olivier Danvy. Pragmatic Aspects of Type-Directed Partial Evaluation. May 1996. 27 pp.