Regularity is Decidable for Normed PA Processes in ... - FI MUNI

Report 0 Downloads 32 Views
}

w A| y < 5 4 23 1 0 / -. , )+ ( %&' $ # !"        

 

    

FI MU Faculty of Informatics Masaryk University

Regularity is Decidable for Normed PA Processes in Polynomial Time by Antonín Kuˇcera

FI MU Report Series c 1996, FI MU Copyright

FIMU-RS-96-01 February 1996

Regularity is Decidable for Normed PA Processes in Polynomial Time Antonín Kučera e-mail: [email protected]

Faculty of Informatics, Masaryk University Botanická 68a, 60200 Brno Czech Republic Abstract A process ∆ is regular if it is bisimilar to a process ∆0 with finitely many states. We prove that regularity of normed PA processes is decidable and we present a practically usable polynomial-time algorithm. Moreover, if the tested normed PA process ∆ is regular then the process ∆0 can be effectively constructed. It implies decidability of bisimulation equivalence for any pair of processes such that one process of this pair is a normed PA process and the other process has finitely many states.

1

Introduction

We consider the problem of deciding regularity of normed PA processes. A process ∆ is regular if there is a process ∆0 with finitely many states such that ∆ ∼ ∆0 . Finite-state processes have been intensively studied in the last decades (see e.g. [Mil89]). Almost all interesting properties are decidable for finite-state processes. Moreover, designed algorithms are practically usable. This is no more true if one moves to process classes which contain also processes with infinitely many states (up to bisimilarity). Some problems can remain decidable—for example, bisimilarity is known to be decidable for BPA (see [BBK87, Cau88, Gro91, HS91, CHS92]) and BPP (see [CHM93]) 1

processes. The same problem becomes undecidable for labelled Petri nets (see [Jan94]). But even if a given property is decidable, the algorithm is usually not interesting from the practical point of view due to its complexity. Before running a complex algorithm, it is a good idea to ask whether the process we are dealing with can be replaced with some equivalent (bisimilar) process with finitely many states. If so, we can usually run a much more efficient algorithm. Natural questions are, whether the regularity is decidable for a given class of processes and whether the equivalent finite-state process can be effectively constructed. Mauw and Mulder showed in [MM94] that “regularity” of BPA processes is decidable. The quotes are important here because Mauw and Mulder used the word regularity in a different sense—a BPA process is “regular” if each of its variables denotes a regular process. This notion is thus strongly dependent on BPA syntax. It is not clear how to define “regularity” e.g. for Petri nets. However, with a help of this result one can easily conclude that regularity is decidable for normed BPA processes (see [Kuč95]). A similar result holds for normed BPP processes (see [Kuč95]). Both algorithms are polynomial and easy to implement. A recent result of Esparza and Jančar [EJ96] says that regularity is decidable for labelled Petri nets. The algorithm is obtained by a combination of two semi-decidability results and hence there are no complexity estimations. Furthermore, Burkart, Caucal and Steffen showed in [BCS96] that regularity is decidable for all BPA processes. An interesting related problem is decidability of various behavioural equivalences and preorders for pairs of processes such that one process of this pair is regular. For example, Jančar and Moller proved in [JM95] that bisimilarity is decidable for a pair of labelled Petri nets provided one net of this pair is bounded (regular). The same result holds for trace equivalence and simulation equivalence. In this paper we prove that regularity is decidable for normed PA processes. PA processes appeared as a natural subclass of ACP processes (see [BW90]). It is strictly greater than the union of normed BPP and normed BPA processes and it is incomparable with the class of labelled Petri nets. Our regularity test for normed PA processes is of polynomial time complexity. Moreover, if the tested normed PA process is regular then we can also construct a bisimilar finite-state process—and therefore we can also decide bisimilarity for pairs of processes such that one process of this pair is a normed PA process and the other has finitely many states. The problem of 2

decidability of bisimulation equivalence for (normed) PA processes is open, hence this result can be seen as the first small step towards the solution.

2

Basic definitions

2.1

PA processes

Let Act = {a, b, c, . . .} be a countably infinite set of atomic actions. Let Var = {X, Y, Z, . . .} be a countably infinite set of variables such that Var ∩ Act = ∅. The class of recursive PA expressions is defined by the following abstract syntax equations: EPA ::= a | X | EPA .EPA | EPAkEPA | EPATEPA | EPA + EPA Here a ranges over Act and X ranges over Var . The symbol Act∗ denotes the set of all finite strings over Act. As usual, we restrict our attention to guarded expressions. A PA expression E is guarded if every variable occurence in E is within the scope of an atomic action. A guarded PA process is defined by a finite family ∆ of recursive process equations def ∆ = {Xi = Ei | 1 ≤ i ≤ n} where Xi are distinct elements of Var and Ei are guarded PA expressions, containing variables from {X1 , . . . , Xn }. The set of variables which appear in ∆ is denoted by Var (∆). The variable X1 plays a special role (X1 is sometimes called “the leading variable”)—it is a root of a labelled transition system, defined by the process ∆ and following rules: a

E → E0 a E.F → E 0 .F

a

a→ a

E → E0 a EkF → E 0 kF

a

F → F0 a EkF → EkF 0

a

E → E0 a E + F → E0 a

E → E0 a E TF → E 0 kF

a

F → F0 a E + F → F0 a

def E → E 0 (X = E ∈ ∆) a X → E0

The symbol  denotes the empty expression with usual conventions: kE = E, Ek = E, .E = E, TE = E and E T = E. Nodes of the transition system generated by ∆ are PA expressions, which are often called states of ∆, or just “states” when ∆ is understood from the context. We also define the 3

w

a

relation →* where w ∈ Act∗ as the reflexive and transitive closure of → (we w often write E →∗ F instead of E →* F if w is irrelevant). Given two states E, F , we say that F is reachable from E, if E →∗ F . States of ∆ which are reachable from X1 are said to be reachable. 2.1.1

Bisimulation

The equivalence between process expressions (states) we are interested in here is bisimilarity [Par81], defined as follows: Definition 1. A binary relation R over process expressions is a bisimulation if whenever (E, F ) ∈ R then for each a ∈ Act a

a

a

a

• if E → E 0 , then F → F 0 for some F 0 such that (E 0 , F 0 ) ∈ R • if F → F 0 , then E → E 0 for some E 0 such that (E 0 , F 0 ) ∈ R Processes ∆ and ∆0 are bisimilar, written ∆ ∼ ∆0 , if their leading variables are related by some bisimulation. 2.1.2

Normed processes

An important subclass of PA processes can be obtained by an extra restriction of normedness. A variable X ∈ Var (∆) is normed if there is w ∈ Act∗ such w that X → * . In that case we define the norm of X, written [X], to be the w length of the shortest such w. Thus [X] = min{length(w) | X → * }. A process ∆ is normed, if all variables of Var (∆) are normed. The norm of ∆ is then defined to be the norm of X1 . 2.1.3

A normal form for PA processes

Before we present a normal form for PA processes, we need to introduce the set of VPA expressions defined inductively as follows: 1. The empty expression  is a VPA expression. 2. Each variable X ∈ Var is a VPA expression. 3. If α, β are nonempty VPA expressions, then α.β, αkβ and αTβ are VPA expressions.

4

4. Each VPA expression can be constructed using the rules 1, 2 and 3 in a finite number of steps. We use Greek letters α, β, . . . to range over VPA expressions. The set of VPA expressions which contain only variables from Var (∆), where ∆ is a PA process, is denoted VPA(∆). Finally, the set of variables which appear in a VPA expression α is denoted Var (α). Definition 2. A PA process ∆ is said to be in normal form if all its equations are of the form ni X def Xi = aij αij j=1

where 1 ≤ i ≤ n, ni ∈ N , aij ∈ Act and αij ∈ VPA(∆). Moreover, we also require that for each Xi , 1 ≤ i ≤ n there is a reachable state α ∈ VPA(∆) such that Xi ∈ Var (α). Any PA process can be effectively presented in normal form (see [BEH95]). From now on we assume that all PA processes we are working with are presented in normal form. This justifies also the assumption that all reachable states of a PA process ∆ are elements of VPA(∆).

2.2

Regular processes

The main question considered in this paper is whether regularity of normed PA processes is decidable. The next definition explains what is meant by the notion of regularity. Definition 3. A process ∆ is regular if there is a process ∆0 with finitely many states such that ∆ ∼ ∆0 . It is easy to see that a process is regular iff it can reach only finitely many states up to bisimilarity. In [Mil89] it is shown that regular processes can be represented in the following normal form: Definition 4. A regular process ∆ is said to be in normal form if all its equations are of the form ni X def Xi = aij Xij j=1

where 1 ≤ i ≤ n, ni ∈ N , aij ∈ Act and Xij ∈ Var (∆). 5

Thus a process ∆ is regular iff there is a regular process ∆0 in normal form such that ∆ ∼ ∆0 . In the next section we show that regularity of normed PA processes is decidable. Moreover, if a given normed PA process ∆ is regular then the process ∆0 can be effectively constructed. a

Lemma 1. A process ∆ is not regular iff there is an infinite path X1 = α0 →0 a a α1 →1 α2 →2 · · · such that αi 6∼ αj for i 6= j. Proof: It can be found e.g. in [Kuč95].

3 3.1

Decidability of regularity for normed PA processes The inheritance tree

Let ∆ be a normed PA process. The aim of the following definition is to describe all variables in a state α ∈ VPA(∆) which can potentially emit an action: Definition 5. Let ∆ be a normed PA process. For each α ∈ VPA(∆) we define the set FIRE (α) in the following way:  ∅ if α =     {X} if α = X FIRE (α) = FIRE (β1 ) if α = β1 .β2 or α = β1 Tβ2    FIRE (β1 ) ∪ FIRE (β2 ) if α = β1 kβ2 The following function is needed in some proofs of this section: Definition 6. The function Length : VPA → N ∪ {0} returns for each α ∈ VPA the number of variables contained in α, distinguishing multiple occurence of the same variable. Lemma 2. Let ∆ be a normed PA process, α ∈ VPA(∆). Then for each X ∈ Var (α) there is β ∈ VPA(∆) such that α →∗ β and X ∈ F IRE(β). The following concept stands behind many constructions of this paper:

6

Definition 7. For each α ∈ VPA we define the set Tail(α) ⊆ Var in the following way:  if α = X  {X} ∅ if α =  or α = βkγ where β 6=  6= γ Tail(α) =  Tail (γ) − Var (β) if α = β.γ or α = β Tγ where β 6=  6= γ Remark 1. The set Tail(α) provides two important pieces of information: 1. If X ∈ Var (α) such that X 6∈ Tail(α), then there is α0 such that α →∗ α0 , X ∈ FIRE (α0 ) and Length(α0 ) ≥ 2. 2. If X ∈ Tail (α), then the only occurence of X in α can become active (i.e. X can emit an action) after all other variables disappear. Definition 8. Let ∆ be a normed PA process. A variable X ∈ Var (∆) is growing if there is α ∈ VPA(∆) such that X →∗ α, X ∈ F IRE(α) and Length(α) ≥ 2. Lemma 3. Let ∆ be a normed PA process. The problem whether Var (∆) contains a growing variable is decidable in polynomial time. Proof: We define the binary relation GROW on Var (∆) in the following way: (X, Y ) ∈ GROW ⇐⇒ ∃β ∈ VPA(∆) such that X →∗ β where Length(β) ≥ 2 and Y ∈ FIRE (β). def

Clearly Var (∆) contains a growing variable iff there is X ∈ Var (∆) such that (X, X) ∈ GROW . We show that the relation GROW can be effectively constructed in polynomial time. We need two auxiliary binary relations on Var (∆):

;Y

⇐⇒

there is a summand aα in the defining equation for X in ∆ such that Length(α) ≥ 2, Y ∈ Var (∆) and Y 6∈ Tail(α)

X ,→ Y

⇐⇒

there is a summand aα in the defining equation for X in ∆ such that Y ∈ Var (α).

X

def

def

;

It is easy to prove that GROW =,→∗ . . ,→∗ where ,→∗ denotes the reflexive and transitive closure of ,→. Moreover, the composition ,→∗ . . ,→∗ can be constructed in polynomial time. 7

;

Let ∆ be a normed PA process. If ∆ is not regular then there is (due to a a a Lemma 1) an infinite path P of the form X1 = α0 →0 α1 →1 α2 →2 · · · such that αi 6∼ αj for i 6= j. To be able to examine properties of P in a detail, we define for P the corresponding inheritance tree, denoted ITP . The aim of this construction is to describe the relationship between variables which are located in successive states of P. The way how ITP is constructed is similar to the construction of a derivation tree for a word w ∈ L(G) where L(G) is a language generated by a context-free grammar G. We start with an example which shows how ITP looks for a given prefix of P. Example 1. Let ∆ be a normed PA process given by the following set of equations: { X = b + a(Y.(ZkY )), Y = c + b(Y.Z.X), Z = a + a((ZkY ).X) } def

def

a

c

def

a

b

Let P = X → Y.(ZkY ) → ZkY → ((ZkY ).X)kY → ((ZkY ).X)k(Y.Z.X) · · ·. If we draw a fragment of ITP , we get the following picture:

Y

X { CCCC { { C!  {} { Z 

Z 

Z



nZ nn{n{{ n n n {  nv nn }{

Y 

Y

Y Y 

Y ?PPPP

X•





X

Y

?? PPP ? PPP (

Z

X•

Nodes of ITP are labelled with variables of Var (∆). The state αi , i ∈ N ∪{0} of P corresponds to the set of nodes in ITP which have the distance i from the root of ITP (the root itself has the distance 0). This set of nodes is called a the ith Level of ITP . Each transition αi →i αi+1 is due to a single variable a A ∈ Var (αi ) and a transition A →i γ where the expression ai γ is a summand in the defining equation for A in ∆ (see Definition 2). Moreover, αi+1 can be obtained from αi by replacing one occurence of A with γ (here we must distinguish between multiple occurence of the variable A within the state αi ). a We call the variable A the active variable of αi and the transition A →i γ the step of αi . The nodes of ITP which correspond to active variables are called active. Each active node is placed within a box in the previous example. 8

Nodes and edges of ITP are defined inductively—we define all nodes in the Level i + 1 together with their labels, using the nodes from the Level i. Moreover, we also define all edges between nodes in these two levels. 1. i=0: There is just one node N in the Level 0 — the root, labelled X1 . 2. induction step: Let us suppose that nodes of Level i have been already defined. For each node U from Level i we define its immediate successors. There are two possibilities: • U is not active: Then U has just one immediate successor whose label is the same as the label of U. a

• U is active: Let A →i γ be the step of αi and let n = Length(γ). The node U (whose label is A) has n immediate successors (if n = 0 then U is a leaf). The label of the l th immediate successor of U is the lth variable from γ, reading γ from left to right. Here l ranges from 1 to n. As we cannot afford to lose the information about the structure of γ completely, we distinguish the case when Tail(γ) = {B} where B ∈ Var (∆). Then we say, that the last successor of U is a tail of U. In the example above, tails are marked with a black dot. A node of ITP which has at least two immediate successors is called a branching node. Branching nodes are especially important because their labels are potential candidates to be growing. This is the basic idea which stands behind the notion of the Allow set. Definition 9. For each node U of ITP we define the set Allow(U) ⊆ Var (∆) in the following way: • If U is the root of ITP , then Allow(U) = Var (∆). • If U is an immediate successor of a node V , then – If V is not branching, then Allow(U) = Allow(V ). – If V is branching and U is not a tail of V, then Allow(U) = Allow(V ) − {Label (V )}. – If V is branching and U is a tail of V , then Allow(U) = Allow(V ).

9

The next lemma explains what is the relationship between a node U and the set Allow(U): Lemma 4. Let U be a node of ITP . If Label(U) 6∈ Allow(U) then Label(U) is a growing variable. Now we prove the first main theorem of this paper: Theorem 1. A normed PA process ∆ is regular iff Var (∆) does not contain any growing variable. Proof: (⇒) : Let X ∈ Var (∆) be a growing variable. We show that ∆ can reach infinitely many pairwise non-bisimilar states. To do this, it suffices to show that for any k ∈ N there is a reachable state α ∈ VPA(∆) such that [α] ≥ k (bisimilar processes must have the same norm). As X is growing, there is γ ∈ VPA(∆) such that X →∗ γ, X ∈ FIRE (γ) and Length(γ) ≥ 2. Moreover, there is a reachable state β1 ∈ VPA(∆) such that X ∈ FIRE (β1 ) (it follows from the Definition 2 and Lemma 2). Thus β1 →∗ β2 where β2 is obtained from β1 by replacing one occurence of X with γ. As X ∈ FIRE (β1 ), each variable from FIRE (γ) belongs to FIRE (β2 )—hence X ∈ FIRE (β2 ). Moreover, Length(β2 ) > Length(β1 ) because Length(γ) ≥ 2. As X ∈ FIRE (β2 ), we can repeat this construction producing β3 and so on. As Length(βi ) > Length(βj ) for each i > j, the state βk has the property Length(βk ) ≥ k, thus [βk ] ≥ k. (⇐) : This part of the proof is more complicated. The basic scheme is similar to the method which was used by Mauw and Mulder in [MM94] and can be described in the following way: We need to show that if ∆ is not regular then there is a growing variable X ∈ Var (∆). As ∆ is not regular, there is a a a (due to Lemma 1) an infinite path P of the form X1 = α0 →0 α1 →1 α2 →2 · · · such that αi 6∼ αj for i 6= j. We show that if Var (∆) does not contain any growing variable, then there are i 6= j such that αi ∼ αj . It contradicts the assumption above—hence Var (∆) contains at least one growing variable. Let ITP be the inheritance tree for the path P. To complete the proof we need to divide ITP into more manageable units called blocks. Levels of ITP which contain just one node are called delimiters of ITP . A block of ITP is a subgraph S of ITP composed of: 1. all nodes and edges between two successive delimiters i and j where i < j. The only node of Level i is called the opening node of S and the 10

only node of Level j is called the closing node of S. Out-going edges of the closing node and in-going edges of the opening node are not a part of S. 2. all nodes below the delimiter i (including Level i), if there is no delimiter j with j > i. The only node of Level i is called the opening node of S. In-going edges of the opening node are not a part of S. As Level 0 is a delimiter of ITP , we can view ITP as a vertical sequence of blocks. The width of ITP is defined to be the least n ∈ N such that the cardinality th of i Level of ITP is less or equal n for each i ∈ N ∪ {0}. If there is no such n, we define the width of ITP to be ∞. Similarly, if S is a block of ITP , the width of S is the least n ∈ N such that the cardinality of each Level which is a part of S is less or equal n. If there is no such n, we define the width of S to be ∞. Furthermore, we define the branching degree of ITP to be the least n ∈ N such that each node U of ITP has at most n immediate successors. The branching degree of ITP is always finite (it actually depends only on ∆— let M be the set of all VPA expressions, which appear in defining equations of ∆ (see Definition 2). The branching degree of ITP is then at most max{Length(β) | β ∈ M}). We denote the branching degree of ITP by D in the rest of this proof. Each node U of ITP defines its associated subtree, rooted by U. This subtree is denoted Subtree(U). Although the notions of block, width, branching node, tail, etc. were originally defined for ITP , they can be used also for any Subtree(U) of ITP in an obvious way. We prove that if Var (∆) does not contain any growing variable, then for each node U of ITP the Subtree(U) has the width at most D n−1 , where n = card(Allow(U)). We proceed by induction on n = card(Allow(U)): First, if Var (∆) does not contain any growing variable, then Subtree(U) does not contain any node U with Allow(U) = ∅. This is due to Lemma 4—clearly Label(U) 6∈ ∅, thus Label(U) would be a growing variable. Hence n is at least 1. 1. n=1: Let Allow(U) = {X}. We show that Subtree(U) does not contain any branching node. Let us assume the opposite. Then there is a branching node V in Subtree(U) with Allow(V ) = {X}, thus 11

Label(V ) = X. As V is branching, at least one immediate successor V 0 of V has the property Allow(V 0 ) = Allow(V ) − {Label(V )} = ∅. Hence Label(V 0 ) is a growing variable and we have a contradiction. As Subtree(U) does not contain any branching node, the width of Subtree(U) is 1 = Dn−1 . 2. induction step: Let card(Allow(U)) = n. We prove that each block of Subtree(U) has the width at most D n−1 . Let S be a block of Subtree(U) and let V be its opening node. Clearly card(Allow(V )) ≤ n. If V has no successors then the width of S is 1. If V is not branching then the only immediate succesor of V is a closing node of S, thus the width of S equals 1. If V is branching, there are two possibilities: • V does not have a tail. Then each immediate successor V 0 of V has the property card(Allow(V 0 )) ≤ n − 1. By induction hypothesis, the width of Subtree(V 0 ) is at most D n−2 . As V can have at most D immediate successors, the width of Subtree(V ) is at most D.Dn−2 = Dn−1 . Thus the width of S is also at most D n−1 . • V has a tail T . Each immediate successor V 0 of V which is different from T has the property card(Allow(V 0 )) ≤ n − 1. Hence we can use the induction hypothesis for each such V 0 . The only problem is the node T . We show, that if T has a branching successor T 0 then the node T 0 is either the closing node of the block S or it is a successor of the closing node of the block S—hence the block S can have the width at most (D − 1).D n−2 + 1. Suppose that T has a branching successor T 0 . Branching nodes are always active—thus T has at least one active successor. Let W be the active successor of T which has the least distance from T . The node T 0 is clearly either the node W (if W is branching), or a successor of W . We show, that the node W is the closing node of the block S. But it follows directly from the definition of the tail (see Remark 1)—as W is active, there are no successors of V in the level of W except the node W itself. We have just proved that if Var (∆) does not contain any growing variable then the width of ITP is at most D card(Var (∆))−1 . Hence each element αi of P has the property Length(αi ) ≤ Dcard(Var (∆))−1 . As Var (∆) is finite, there are only finitely many VPA(∆) expressions whose Length is at most 12

Dcard(Var (∆))−1 . Therefore there are i, j ∈ N ∪ {0}, i 6= j, such that αi = αj and thus αi ∼ αj .

3.2

A construction of the process ∆0 in normal form

In this section we show that if a given normed PA process ∆ is regular, then ∆ can be effectively transformed into a regular process ∆0 in normal form such that ∆ ∼ ∆0 . In order to simplify the construction, we identify several VPA expressions: Definition 10. Let ≡ be the smallest congruence relation over VPA expressions such that the following laws hold: • associativity for sequential composition (the ‘.’ operator). • associativity and commutativity for parallel composition (the ‘k’ operator). The algorithm is based on the following fact: Lemma 5. A normed PA process ∆ is regular iff ∆ can reach only finitely many states up to ≡. The algorithm finds all reachable states α ∈ VPA(∆) of ∆ up to ≡. For each such α a new variable and a new defining equation is added to ∆0 . The relationship between variables of ∆0 and reachable states of ∆ is described by the set MEM ⊆ Var × VPA(∆). This set is initialised to MEM = {[Y1 , X1 ]} where X1 is the leading variable of ∆ and Y1 is the leading variable of ∆0 . An element [Y, α] of MEM is said to be undefined if there is no defining equation for Y in ∆0 . The algorithm chooses any undefined element of MEM and adds a new defining equation for Y to ∆0 , possibly producing new undefined elements of MEM. The algorithm stops when MEM does not contain any undefined elements. Let [Y, α] be an undefined element of MEM. The defining equation for Y in ∆0 is obtained by unfolding α. The function Unfold is defined as follows:  P def P  a α if α = X and X = aij αij ∈ ∆ ij ij j j   Distr (Unfold(β1 ), β2 ) if α = β1 .β2 Unfold(α) =  Expand1 (β1 , β2 ) if α = β1 kβ2   Expand2 ((β1 , β2 ) if α = β1 Tβ2 13

where Expand1 , Expand2 and Distr are defined as follows (functions Expand1 and Expand2 are instances of the CCS expansion law (see [Mil89]) and the function Distr is a variant of the right distributivity law (see [BW90])): P a = { a(β10 kβ2 ) : β1 → β10 , a ∈ Act} Expand1 (β1 , β2 ) P a + { a(β1 kβ20 ) : β2 → β20 , a ∈ Act} Expand2 (β1 , β2 )

=

P Distr ( aij αij , β)

=

P P

a

{ a(β10 kβ2 ) : β1 → β10 , a ∈ Act} aij (αij .β)

The function Unfold returns an expression of the form n X

ai αi

i=1

where n ∈ N , ai ∈ Act and αi ∈ VPA(∆). Now the algorithm replaces each αi with a single variable. There are two possibilities: if the set MEM contains an element [Z, β] such that αi ≡ β, then the expression αi is replaced with Z. Otherwise, the expression αi is replaced with a new variable W and the pair [W, αi] is added to MEM. After the replacement of each αi the defining equation for Y is added to ∆0 . It is easy to see that each variable of ∆0 corresponds to a reachable state of the process ∆0 . Hence the algorithm has to stop (due to Lemma 5). Example 2 Let ∆ be a normed PA process given by the following set of equations: X = b + a(Y kZ).X def

Y

def

= c + a(Zk(Z.Z)) def

Z = c The process ∆0 is constructed in the following way (the first two elements of each line constitute a member of MEM, the third element is a result of

14

Unfold and the last element is the defining equation): A B

= X = (Y kZ).X

C D E F G H I

= = = = = = =

(Zk(Z.Z)kZ).X Z.X Y.X (ZkZkZ).X (Zk(Z.Z)).X (ZkZ).X (Z.Z.X)

= b + a(Y kZ).X = b + aB = a(Zk(Z.Z)kZ).X + c(Z.X) + c(Y.X) = aC + cD + cE = c((ZkZkZ).X) + c((Zk(Z.Z)).X) = cF + cG = cX = cA = cX + a((Zk(Z.Z)).X) = cA + aG = c((ZkZ).X) = cH = c(Z.Z.X) + c((ZkZ).X) = cI + cH = c(Z.X) = cD = c(Z.X) = cD

Using this algorithm it is possible to decide bisimilarity for any pair of processes [∆1 , ∆2 ], where ∆1 is a normed PA process and ∆2 is a regular process. First, we check whether ∆1 is regular. If not, then ∆1 6∼ ∆2 . Otherwise, we construct the regular process ∆01 in normal form such that ∆1 ∼ ∆01 and check whether ∆01 ∼ ∆2 . Theorem 2. Bisimulation equivalence is decidable for any pair of processes such that one process of this pair is a normed PA process and the other process is regular.

4

Conclusions

We proved that regularity of normed PA processes is decidable in polynomial time. As our result is constructive, we obtained also decidability of bisimulation equivalence for any pair of processes such that one process of this pair is a normed PA process and the other process is regular. A natural question is whether it is possible to replace the pure merge operator (‘k’) with another form of parallel composition without the loss of decidability of regularity. It can be easily shown that presented results are still valid if we replace the merge operator with the full parallel operator of CCS (which allows synchronisations on complementary actions). However, if we use e.g. the operator ‘kA ’ of CSP (which can force synchronisations), regularity becomes undecidable—see [Kuč95] for details. An interesting open problem is whether our result can be extended to the class of all (not necessarily normed) PA processes. Another related open problem is the decidability of bisimulation equivalence in the class of (normed) PA processes. 15

5

Acknowledgement

I would like to thank Ivana Černá and Mojmír Křetínský for reading the first draft of this paper. Their comments made this article much more readable.

References [BBK87] J. C. M. Baeten, J. A. Bergstra, and J. W. Klop. Decidability of bisimulation equivalence for processes generating context-free languages. In Proceedings of PARLE 87, volume 259 of LNCS, pages 93–114. Springer-Verlag, 1987. [BCS96] O. Burkart, D. Caucal, and B. Steffen. Bisimulation collapse and the process taxonomy. In Proceedings of CONCUR 96, volume 1119 of LNCS, pages 247–262. Springer-Verlag, 1996. [BEH95] A. Bouajjani, R. Echahed, and P. Habermehl. Verifying infinite state processes with sequential and parallel composition. In Proceedings of POPL 95, pages 95–106. ACM Press, 1995. [BW90]

J. C. M. Baeten and W. P. Weijland. Process Algebra. Number 18 in Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 1990.

[Cau88]

D. Caucal. Graphes canoniques de graphes algebriques. Rapport de Recherche 872, INRIA, 1988.

[CHM93] S. Christensen, Y. Hirshfeld, and F. Moller. Bisimulation is decidable for all basic parallel processes. In Proceedings of CONCUR 93, volume 715 of LNCS, pages 143–157. Springer-Verlag, 1993. [CHS92] S. Christensen, H. Hüttel, and C. Stirling. Bisimulation equivalence is decidable for all context-free processes. In Proceedings of CONCUR 92, volume 630 of LNCS, pages 138–147. SpringerVerlag, 1992. [EJ96]

J. Esparza and P. Jančar. Deciding finiteness of Petri nets up to bisimilarity. In Proceedings of ICALP 96, volume 1099 of LNCS, pages 478–489. Springer-Verlag, 1996. 16

[Gro91]

J. F. Groote. A short proof of the decidability of bisimulation for normed BPA processes. Information Processing Letters, 42:167– 171, 1991.

[HS91]

H. Hüttel and C. Stirling. Actions speak louder than words: Proving bisimilarity for context-free processes. In Proceedings of LICS 91, pages 376–386. IEEE Computer Society Press, 1991.

[Jan94]

P. Jančar. Decidability questions for bisimilarity of Petri nets and some related problems. In Proceedings of STACS 94, volume 775 of LNCS, pages 581–592. Springer-Verlag, 1994.

[JM95]

P. Jančar and F. Moller. Checking regular properties of Petri nets. In Proceedings of CONCUR 95, volume 962 of LNCS, pages 348– 362. Springer-Verlag, 1995.

[Kuč95]

A. Kučera. Deciding regularity in process algebras. BRICS Report Series RS-95-52, Department of Computer Science, University of Aarhus, October 1995.

[Mil89]

R. Milner. Communication and Concurrency. Prentice-Hall International, 1989.

[MM94]

S. Mauw and H. Mulder. Regularity of BPA-systems is decidable. In Proceedings of CONCUR 94, volume 836 of LNCS, pages 34–47. Springer-Verlag, 1994.

[Par81]

D.M.R. Park. Concurrency and automata on infinite sequences. In Proceedings 5th GI Conference, volume 104 of LNCS, pages 167– 183. Springer-Verlag, 1981.

17

c 1996, Faculty of Informatics, Masaryk University. Copyright 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.

Publications in the FI MU Report Series are in general accessible via WWW and anonymous FTP: http://www.fi.muni.cz/informatics/reports/ ftp ftp.fi.muni.cz (cd pub/reports) Copies may be also obtained by contacting: Faculty of Informatics Masaryk University Botanická 68a 602 00 Brno Czech Republic