Eindhoven University of Technology
MASTER
Expressivity of the Kleene star in process algebras with the empty process
Muller, T.J.C.
Award date:
2009
Link to publication
Disclaimer
This document contains a student thesis (bachelor's or master's), as authored by a student at Eindhoven University of Technology. Student theses are made available in the TU/e repository upon obtaining the required degree. The grade received is not published on the document as presented in the repository. The required complexity or quality of research of student theses may vary by program, and the required minimum study period may vary in duration.
General rights
Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights.
• Users may download and print one copy of any publication from the public portal for the purpose of private study or research.
• You may not further distribute the material or use it for any profit-making activity or commercial gain
Eindhoven University of Technology Department of Mathematics and Computer Science
Master’s Thesis
Expressivity of the Kleene Star in Process Algebras with the Empty
Process
by T.J.C. Muller
Supervisor: Dr. B. Luttik
Eindhoven, August 28, 2009
Preface
In my first year of the Computer Science & Engineering Master program, I followed the ‘Process Algebra’ course. This course sparked my interest in the Process Algebra field. Therefore I participated in the ‘Formal Methods Seminar’
course, in which we had bi-weekly meetings where two people would give a 45 minute seminar. It was the first year that course was given, and regretfully there where only three participating students. The seminar course was in fact the only course I have followed that had more staffmembers participating than students, as Jos Baeten, Bas Luttik, Paul van Tilburg and Leonardo Vito have also given seminars on process algebra. At the end of the course, the three of us were asked to cooperate on a research whether the proof that BPA∗0≺ PA∗0as found in [4] can be extended with the empty process to prove that BPA∗0,1 ≺ PA∗0,1. We concluded that the answer was no, and gave a suggestion on how to prove it correctly.
Bas Luttik, Paul van Tilburg and I decided to continue the research after the Formal Methods Seminar was finished. Due to busy agendas and unexpected difficulties, little progress was made. We decided that this proof, and the proof that PA∗0,1≺ ACP∗1were interesting subjects for my thesis.
First of all I would like to thank Bas Luttik, not only for cooperating on the research that followed the seminar course which sparked this thesis, but mostly for his quick and clear feedback I received at our weekly meetings. Secondly, I thank Paul van Tilburg, for his practical tips and suggestions, and his coop- eration in the phase before my thesis. Furthermore I would like to thank Jos Baeten for giving the process algebra and formal methods seminar courses, the Formal Methods Group for exchanging information at the lunches on Tuesdays, and of course the Mathematics and Computer Science faculty, and my family and friends for their support and enthusiasm.
Summary
This thesis investigates the relative expressivity of BPA∗0,1, PA∗0,1 and ACP∗1. We will prove that there exist processes in ACP∗1such that no process in PA∗0,1 exhibits the same behavior, and there exist processes in PA∗0,1 such that no process in BPA∗0,1 exhibits the same behavior.
As a similar relation has been proven for process algebras without the empty process, namely BPA∗0 ≺ PA∗0 ≺ ACP∗, we will compare these three process algebras to the three process algebras we study.
The proofs rely heavily on the notion of strongly connected component, a well known concept in graph theory. As one would expect, these strongly connected components are structures associated to the Kleene star, the operator for repe- tition.
We will find a characteristic expressed in terms of exit transitions of strongly connected components in BPA∗0,1, and show that some strongly connected com- ponents in PA∗0,1 violate that characteristic.
We will not find such a characteristic for processes in PA∗0,1, but instead find a specific process in ACP∗1 that is unexpressible in PA∗0,1.
Contents
1 Introduction 1
2 Preliminaries 5
2.1 Syntax . . . 5
2.2 Operational rules . . . 6
2.3 Bisimulation . . . 7
2.4 Strongly connected components . . . 7
3 Expressivity of Process Algebras Without the Empty Process 9 4 Relative Expressivity of BPA∗0,1 and PA∗0,1 13 4.1 Operator counter . . . 13
4.2 Syntactic shape of strongly connected components . . . 18
4.3 BPA∗0,1 is less expressive than PA∗0,1 . . . 20
5 Relative Expressivity of PA∗0,1 and ACP∗1 23 5.1 Operator counter . . . 24
5.2 Syntactic shape of strongly connected components . . . 25
5.3 Simplification lemmas . . . 26
5.4 PA∗0,1 is less expressive than ACP∗1 . . . 28
6 Conclusion 31
Chapter 1
Introduction
To understand what process algebra is, we need to understand what a process is. A process refers to the behavior of a system [1]. A system could be anything, ranging from the execution of software systems, to human interaction, to actions of a machine. The behavior of a system consists of the actions, the moments of choice for the actions, and the order thereof. Process algebra is the algebraic approach to abstract processes. That means that there is a set of abstract processes and operators, and axioms for these abstract processes and operators.
For a process algebra, there is a set of operators. For instance alternative composition, which is defined for P + Q to execute either P or Q, and sequential composition, which is defined for P · Q to execute first P then Q. There is also a set of operational rules. These define when a transition from a certain state to another state may be performed, and thus assign an operational semantics to the operators. There is also a set of axioms, which defines behavioral equality between different processes. An example of a common axiom is: (x + y)z = xz + yz, this represents right distributivity.
We want to be able to use process algebra to specify infinite behavior. Recursion is an intuitive way to specify infinite structures, such as infinite behavior in a process. However, using recursion gives rise to some problems, as the expres- sivity of recursion is very strong. With recursion, one could specify a system with an infinite number of different states, for example with X = aXb. One could even specify an infinite number of choices at one state, for example with X = Xa + a. The root node of the process specified by X = Xa + a has a choice to do an a-action to a state with a tail of length 0, 1, 2, etc. Another way to specify infinite behavior is by using iteration.
Kleene star
The operator associated with iteration is derived from an operator in automata theory and formal languages, namely the Kleene star, as introduced by Kleene in [7]. A good resource on automata theory, including the Kleene star, is [6]. The process algebras discussed in this thesis contain the (unary) Kleene star. The Kleene star in process algebras is closely associated to the Kleene star used in automata theory and formal languages. One of the process algebras considered in this thesis, BPA∗0,1, has in fact the same set of operators as regular expressions in automata theory.
2 1 Introduction
The Kleene star as an operator in process algebra is introduced by Robin Milner in [9], denoted by P∗, meaning the repetition of P . This repetition gives rise to the ’empty word property’, a property that is considered counterintuitive by some. The reason is that we can express the process a∗, that process can be considered successfully terminated, but may also perform an action and repeat itself.
The repetition was reintroduced as a binary operation in [3], denoted P∗Q. In P∗Q, P is iterated, and an action from Q is the well-defined terminator of the repetition, since no process represents a terminated process. In this case a∗Q is a not yet terminated process, as we still have to do Q. The process algebras we study contain the empty process, therefore the unary version of the Kleene star suffices.
Empty process
The empty process represents a successfully terminated process. The empty process was introduced in 1997 by Vranken, with different semantics than we will use in this thesis [8].
The empty process, denoted 1, is counterintuitive when used in conjunction with an alternative composition: P = Q + 1, which means “P is either Q or success- fully terminated”. This is a similar problem as arises for the unary Kleene star.
Some technical difficulties also arise when considering sequential composition.
Without the empty process, the term P Q may only perform actions from P , so either P Q−→ Pα 0Q or P Q−→ Q. With the empty process, P Q may possiblyα do an action from Q, so for some Q−→ Qα 0, P Q−→ Qα 0.
The addition of the empty process to a process algebra does increase the ex- pressivity of the process algebra. A notable class of processes that requires the empty process, is the class of process that can directly terminate, containing for example P + 1.
Expressivity
There is research on the Kleene star in process algebra in two fields: axiomati- zation and expressivity. One could describe the expressivity of a certain process algebra in an absolute fashion, thus characterizing the class of processes that can be expressed by that process algebra, as is done in [2].
We are, however, interested in finding a relation between the expressivity of certain process algebras. We say that a process algebra A is less expressive than a process algebra B if:
• There is a process P in B such that there is no process Q in A with the same behavior. In other words, there is no Q in A such that P and Q are bisimilar.
• If there is a process Q in A, then there is also a process P in B with the same behavior. In other words, there is a P in B such that P and Q are bisimilar.
Research on relative expressivity is done in [3], [4]. In these papers, one can find proofs that BPA∗0 is less expressive than PA∗0, and that PA∗0 is less expressive than ACP∗. These papers motivated us to write this thesis. While writing this thesis, we found two omissions in the proofs in [4], and we will propose a
1 Introduction 3
fix. Furthermore, we add the empty process to the aforementioned algebras, and prove that BPA∗0,1is less expressive than PA∗0,1and that PA∗0,1is less expressive than ACP∗1.+
Organization
We first introduce the standard preliminaries for the considered process alge- bras, the syntax, the semantics, in the form of the operational rules, and a notion of behavioral equivalence, in the form of bisimulation. An extra section is devoted to the notion of strongly connected components, a standard notion in other fields of computer science, adapted for usage in process algebra. As we initially relied heavily on the proofs of relative expressivity on BPA∗0, PA∗0, and ACP∗ in [4] when writing this thesis, we compare that to our problem, the relative expressivity of BPA∗0,1, PA∗0,1, and ACP∗1, in the following chapter.
There we explain that their proofs cannot be easily reused for our problem.
Then we prove that BPA∗0,1 is less expressive than PA∗0,1. We describe a class of processes that cannot be expressed in BPA∗0,1. In order to do this, we intro- duce a function on terms in BPA∗0,1, and use this in conjunction with strongly connected components. Then we present a PA∗0,1 term that is contained in the class of processes that cannot be expressed in BPA∗0,1. The approach we use to prove that PA∗0,1 is less expressive than ACP∗1 goes the other way around. We introduce an ACP∗1 term first, and will then deduce that there is no bisimilar term in PA∗0,1, also using strongly connected components and a function on syntactic terms in PA∗0,1. Furthermore, we will discuss the results, point out possible improvements, and propose future work.
Chapter 2
Preliminaries
We first define the syntax of terms in the relevant process algebras, BPA∗0,1, PA∗0,1 and ACP∗1. Then we assign an operational meaning to these terms by introducing the operational rules. As expressivity is a property modulo bisim- ulation, we also give a definition of bisimulation.
Furthermore, we define strongly connected components as used in our proofs.
Strongly connected components are a nice way to characterize structures arising from terms that contain a Kleene star. The definition of strongly connected component is accompanied by some auxiliary definitions on strongly connected components, and some of their properties of strongly connected components with respect to process algebra.
2.1 Syntax
The process algebra BPA∗0,1 is a process algebra that only contains terms with alternative composition, action prefixing, sequential composition, the unary Kleene star, deadlock and the empty process. Let A be a nonempty alpha- bet. Then every term φ in BPA∗0,1 on A is defined as:
φ ::= 0 | 1 | α.φ | φ + φ | φ · φ | φ∗ where α ranges over A.
Note that in BPA, PA, and ACP there is normally no action prefixing; instead, the elements of A are added as constants. Since BPA∗0,1, PA∗0,1, and ACP∗1 contain the empty process, we can use action prefixing on the empty process (α.1) to get a process that is equivalent to a process consisting of only the action α. Therefore we can remove the action constants from BPA∗0,1, PA∗0,1, and ACP∗1.
The process algebra PA∗0,1on the alphabet A is a process algebra that not only contains every term from BPA∗0,1, but also has parallel composition. Let A be a nonempty alphabet. Then every term φ in PA∗0,1 on A is defined as:
φ ::= 0 | 1 | α.φ | φ + φ | φ · φ | φ∗| φ k φ | φT φ where α ranges over A.
6 2.2 Operational rules
The process algebra ACP∗1 is a process algebra that not only contains every term from BPA∗0,1 and PA∗0,1, but also introduces communication. Let A be a nonempty alphabet and γ be an associative, commutative partial function.
Then every term φ in ACP∗1 on A and γ is defined as:
φ ::= 0 | 1 | α.φ | φ + φ | φ · φ | φ∗| φ k φ | φT φ | (φ | φ) | ∂H(φ) where α ranges over A.
The semantics of these three process algebras will be defined in the next section on operational rules.
2.2 Operational rules
The operational rules assign meaning to the syntax. A term P may do an α- transition to Q, denoted P −→ Q, when the transition can be derived using theα operational rules.
We write P −→n Q if there exist P0, P1, . . . , Pn and α0, α1. . . , αn−1such that P = P0
α0
−→ P1 α1
−→ . . . α−→ Pn−1 n = Q. Furthermore, we write P −→∗ Q and P −→+Q if P −→k Q, for some k ≥ 0 and k > 0 respectively.
Let P −→ Q be a transition. The α in the transition is called an action. Weα may refer to Q as the residue. We say that that transition is an α-transition.
Operational rules BPA∗0,1:
1 1↓ 2 α.x−→ xα
3 x−→ xα 0 x + y−→ xα 0 4
y−→ yα 0 x + y−→ yα 0 5
x↓
x + y↓ 6 y↓
x + y↓
7 x−→ xα 0
x · y−→ xα 0· y 8
x↓ y−→ yα 0 x · y−→ yα 0 9
x↓ y↓
x · y↓
10 x−→ xα 0
x∗−→ xα 0· x∗ 11 x∗↓ Additional operational rules for PA∗0,1:
12 x−→ xα 0 xT y
−→ xα 0k y 13
x−→ xα 0 x k y−→ xα 0k y
14 y−→ yα 0
x k y−→ x k yα 0 15
x↓ y↓
x k y↓
Finally, the additional rules for ACP∗1:
16 x−→ xα 0 α 6∈ H
∂H(x)−→ ∂α H(x0)
17 x−→ xα 0 y−→ yβ 0 γ(α, β) = 0 x | y−→ xδ 0k y0
18 x−→ xα 0 y−→ yβ 0 γ(α, β) = 0 x k y−→ x0 0k y0
2.3 Bisimulation 7
2.3 Bisimulation
We define bisimilarity between processes. If two processes are bisimilar, then their behaviors are not distinguishable. Therefore, we consider them equal.
Definition 2.3.1. Let P be the set of all processes. A relation R ⊆ P × P is called a bisimulation relation iff for all P ∈ P and Q ∈ P such that P R Q holds, it also holds for all actions α:
1. If P −→ Pα 0, then there is a Q0 such that Q−→ Qα 0 with P0R Q0, 2. If Q−→ Qα 0, then there is a P0 such that P −→ Pα 0 with P0R Q0, and 3. P ↓ iff Q↓.
We say P is bisimilar to Q, denoted P ↔ Q, if there exists a bisimulation relation between P and Q.
2.4 Strongly connected components
As noted in the introduction, the Kleene star plays a big role in our proofs.
Therefore we need a notion of a repetitive structure.
Definition 2.4.1. A strongly connected component is a nonempty set T of processes such that for every pair of processes P, P0∈ T , P −→∗P0, and for all P ∈ T , P −→∗P0 and P0 −→∗P implies P0∈ T .
The definition of a strongly connected component in process graphs is equivalent with the standard definition of strongly connected components in graph theory [5]. As with the graph theoretical definition, our definition of strongly connected component is also maximal.
Definition 2.4.2. A strongly connected component T is trivial iff it consists of precisely one state P and P 6−→+P , and non-trivial otherwise.
We will mostly study non-trivial strongly connected components, note that a strongly connected component T is non-trivial iff for every state P ∈ T , P −→+ P .
Lemma 2.4.3. Every process S is contained in exactly one strongly connected component.
Proof. Every process S is at least in some strongly connected component, since S −→0S. Assume that S is in strongly connected components T and T0, then for arbitrary S0 ∈ T and S00 ∈ T0, S0 −→∗S −→∗ S00 and S00−→∗ S −→∗ S0, therefore every S00 ∈ T0 is also in T and every S0 ∈ T is also in T0, and thus T = T0. Therefore S is in at most one strongly connected component.
Definition 2.4.4. Let T be a strongly connected component. Then (α, Q) is an exit transition of T if P −→ Q for some P ∈ T and Q 6∈ T .α
All transitions from a state in a trivial strongly connected component are exit transitions.
8 2.4 Strongly connected components
Definition 2.4.5. We call an exit transition (α, P ) live if there exists a Q↓
such that P −→∗Q.
We call an exit transition (α, P ) dead if (α, P ) is not live.
To reason about exit transitions more effectively, we also define states that potentially have some exit transitions.
Definition 2.4.6. Let T be a strongly connected component. Then P ∈ T is an exiting-state of T iff P has a live exit transition or P ↓.
Definition 2.4.7. An exiting-state S is called open iff S↓.
An exiting-state S is called closed iff S6 ↓.
Note that it directly follows that every exiting-state is either open or closed.
Figure 2.1 is an example of a process that has a non-trivial strongly connected component, live and dead exit transitions, and open and closed exiting-states.
P Q R
1 0
b c
a a
a a S
Figure 2.1: Strongly Connected Componentconsisting of P , Q, R, and S In Figure 2.1 we see a non-trivial strongly connected component {P, Q, R, S}.
There are two exit transitions, P −→ 1 and Rb −→ 0. The exit transitionc P −→ 1 is live, as 1 has a derivation to termination. The exit transition Rb −→ 0c is dead, as 0 has no derivation to termination. Both P and S are exiting-states, as P has a live exit transition, and S can terminate. The exiting-state P is closed, as P 6 ↓, and the exiting-state S is open, as S↓.
Chapter 3
Expressivity of Process Algebras Without the Empty Process
Both [3] and [4] contain proofs that BPA∗0 is less expressive than PA∗0and that PA∗0 is less expressive than ACP∗. The contents and motivation for this thesis originate in [4]. We contemplate the effects of the addition of the empty process to BPA∗0, PA∗0, and ACP∗. As we will find out, the same ordering exists for BPA∗0,1, PA∗0,1, and ACP∗1. The proofs presented in [4] for BPA∗0 ≺ PA∗0 and PA∗0 ≺ ACP∗ can, however, not be reused to prove that BPA∗0,1 ≺ PA∗0,1 and PA∗0,1≺ ACP∗1.
We will first analyze the argument that BPA∗0 ≺ PA∗0 and the problems for translating it to BPA∗0,1 ≺ PA∗0,1, and secondly do the same for PA∗0≺ ACP∗ and PA∗0,1≺ ACP∗1.
BPA∗0 is less expressive than PA∗0
P 1
2 3
4 a
a a a
a a
a a
a
Figure 3.1: Counterexample P
Bergstra, Fokkink and Ponse propose in their argument a term in PA∗0, for which they argue exists no term in BPA∗0. This counterexample is (aa)∗a k a, as shown in Figure 3.1. They argue that P cannot be expressed in BPA∗0by the following lemma:
“Let C be a cycle in a labelled transition system associated to a process term over BPA∗0. Then there is at most one state P ∈ C that has a successor Q such that P is not a proper substate of Q.”
103 Expressivity of Process Algebras Without the Empty Process
Note that a cycle is a list (P1, P2, . . . , Pn) such that there exist α1, α2, . . . , αn with Pi
αi
−→ Pi+1 for every 1 ≤ i < n and Pn αn
−→ P1. Note that P is a proper substate of Q if Q −→+P .
d
b a
c P
P0
0
Q e
Figure 3.2: P = (a(b + c0))∗de
That lemma expresses the crucial idea, but is strictly speaking incorrect. Take the BPA∗0 term P = (a(b + c0))∗de, as shown in Figure 3.2. Consider the cycle (P, P0). In that cycle P has Q as a successor, and P0 has deadlock, 0, as a successor. Clearly, P and P0 are not proper substates of Q and 0 respectively.
A problem similar to this also exists in BPA∗0,1, we have circumvented this problem by defining live exit transitions in Definition 2.4.5. The lemma in [4]
could easily be corrected by demanding that Q has a derivation to termination, which 0 does not have in the counterexample depicted in Figure 3.2.
P P0
1 a a b
c c
Figure 3.3: Cycle C
Even the modified lemma that holds for BPA∗0, does not hold for BPA∗0,1, as shown by the counterexample C = (P, P0) (see Figure 3.3), where P = 1(a(1 + b1))∗c1 and P0= (1 + b1)(a(1 + b1))∗c1, since both P and P0 have a c-action to 1 and P and P0 are clearly not proper substates of 1. One could weaken the lemma, by replacing the requirement that there is at most one state P ∈ C that can properly exit C, by the requirement that if there is more than one state P ∈ C that can properly exit C, then some property holds. The latter is a logical consequence of the original lemma. By instantiating the right property we shall find the proof for BPA∗0,1≺ PA∗0,1.
PA∗0 is less expressive than ACP∗
Bergstra, Fokkink and Ponse propose in their argument a term in ACP∗, for which they argue is no term in PA∗0. This counterexample is (aa)∗a k a, where γ(a, a) = a, as shown in Figure 3.4.
They argue that P cannot be expressed in PA∗0 by the following lemma:
3 Expressivity of Process Algebras Without the Empty Process11
P 1
2 3
4 a
a a a
a a
a a
a
a a
a
Figure 3.4: Counterexample P
“Let C be a cycle in a labelled transition system associated to a process term over PA∗0. If there is a state in C with an exit action, then every other state in C has only successors in C.”
Note that an exit action in their work is a transition to a state that represents termination.
d
b a
c P
Q c
R
Q e
Figure 3.5: P = (a(b + cc))∗d
The same BPA∗0 term, P = (a(b + c0))∗de, depicted in Figure 3.2, is also a counterexample for this lemma. It contains the cycle C = (P, P0), and C contains a state with an exit action, namely P , therefore every other state in C should only have successors in C. However, there is also a state P0 in C, P0 has a successor that is clearly not in C, namely 0. This can again be repaired by demanding that every other state in C has only successors in C or dead successors. However, this is not enough. With that quick fix, we might still have the PA∗0 term P = (a(b + cc))∗de, as shown in Figure 3.5. C = (P, Q) is a valid cycle, but a state R outside C exists, where R is a successor of Q.
Intuitively we would like to have ‘cycles’ that also contain R, or any other state that is still in the same repetitive structure. This is why we use strongly connected components instead of cycles. So the second fix is that we take C as a strongly connected component, and not as a cycle.
With the modifications such that it holds for PA∗0, that lemma still does not hold for PA∗0,1, as shown by the counterexample C = (P, P0) (see Figure 3.3), where P = 1(a(1 + b1))∗c1 and P0 = (1 + b1)(a(1 + b1))∗c1, since both P and P0 have a c-action, that effectively is an exit action. There is no obvious way to weaken that lemma to a property that could prove PA∗0,1≺ ACP∗1. The essential concept is that a process that must contain a parallel composition due to its behavior, cannot do an exit action in PA∗0since that would require both
123 Expressivity of Process Algebras Without the Empty Process
sides to do an action, thus requiring two steps to termination. The idea that a process needs a behavior that requires the term to contain a parallel operator, and an action that cannot come from either side of the parallel operator is the only overlap between the proof that PA∗0≺ ACP∗ and PA∗0,1≺ ACP∗1.
Chapter 4
Relative Expressivity of BPA ∗ 0,1 and PA ∗ 0,1
To prove that PA∗0,1 is strictly more expressive than BPA∗0,1 using strongly connected components, we first analyze the syntactic structure of the terms that constitute a non-trivial strongly connected component in BPA∗0,1.
To find that syntactic structure, we define a function on terms that is non- increasing over the derivation of a term. Since there is a derivation from a term to itself in a non-trivial strongly connected component, possibly via some other term in that non-trivial strongly connected component, that function must have equal values for each term in a non-trivial strongly connected component. We call this function the operator counter.
Since many terms may only do transitions that decrease the operator count, only a small subset of all terms, namely the terms that may do a transition that does not decrease the operator count, are possibly in some non-trivial strongly connected component. We will, therefore, use the operator counter to prove the properties to which a term must cohere when it is inside a non-trivial strongly connected component. We use the restriction on the possible shapes of terms inside a non-trivial strongly connected component to find a restriction on the possible behaviors of processes that have a repetitive structure. Lastly, we will find a counter-example in PA∗0,1that contains a repetitive structure that violates the restrictions from BPA∗0,1.
4.1 Operator counter
We will define a function on terms. This function is designed to be non- increasing over a derivation. The intuition behind the function is that it is an upper bound on the number of times we can ‘see’ a certain operator as main operator in a derivation. What it means to ‘see’ a certain operator is not immediately obvious, and we will clarify the intuition per operator.
The first operator is the alternative composition. Consider a transition P + Q−→ R, if R has the alternative composition as the main operator, intuitivelyα
14 4.1 Operator counter
this is a different instance of the alternative composition. Consider, for example a1+b(c1+d1), where a1+b(c1+d1)−→ c1+d1 is a valid transition with clearlyb a new instance of the alternative composition as the main operator. Perhaps the most surprising definition is P∗ as OC+(P∗) = 0. However, consider the fact that, every term reachable from P∗ in at least one step is of the shape P0· P∗. Definition 4.1.1. The alternative composition counter function OC+of a term is inductively defined below.
1. OC+(0) = 0 2. OC+(1) = 0
3. OC+(a.P ) = OC+(P )
4. OC+(P + Q) = max(OC+(P ), OC+(Q)) + 1 5. OC+(P · Q) = OC+(Q)
6. OC+(P∗) = 0
We will now prove that the alternative composition counter is a non-increasing function.
Lemma 4.1.2. If P −→ R then OCα +(P ) ≥ OC+(R)
Proof. We do structural induction on P and therefore distinguish cases accord- ing to the syntactic form of P .
1. If P = 0, then P −→ R is not possible, and the claim automatically holds.α 2. If P = 1, then P −→ R is not possible, and the claim automatically holds.α 3. If P = a.P0, then only a.P0 −→ R is possible, and R = Pa 0. According to
the definition OC+(P ) = OC+(P0) = OC+(R).
4. If P = P0+ P00, then, without loss of generality, P0−→ R. By inductionα hypothesis OC+(P0) ≥ OC+(R), so OC+(P ) = max(OC+(P0), OC+(P00))+
1 > OC+(R).
5. If P = P0 · P00, then we distinguish two cases. If we apply operational rule 7, then R = P000· P00, and OC+(P ) = OC+(P00) = OC+(R). Or if we apply operational rule 8, then P00 −→ R, by induction hypothesisα OC+(P00) ≥ OC+(R) and OC+(P ) = OC+(P00) by definition.
6. If P = P0∗, then R = P00· P0∗, and by definition OC+(P0∗) = OC+(P00· P0∗) = OC+(R).
Corollary 4.1.3. If P −→∗Q, then OC+(P ) ≥ OC+(Q).
Proof. The corollary follows by induction over the length of P −→∗ Q using Lemma 4.1.2.
4.1 Operator counter 15
Consider a transition a.P −→ P . If P happens to be of the form a.Pa 0, the intuition tells us that we see a new prefix, as we expect a.a.1 to have a prefix count of 2.
Definition 4.1.4. The prefix counter function OCa. of a term is inductively defined below.
1. OCa.(0) = 0 2. OCa.(1) = 0
3. OCa.(a.P ) = OCa.(P ) + 1
4. OCa.(P + Q) = max(OCa.(P ), OCa.(Q)) 5. OCa.(P · Q) = OCa.(Q)
6. OCa.(P∗) = 0
We will now prove that the prefix counter is a non-increasing function.
Lemma 4.1.5. If P −→ R then OCα a.(P ) ≥ OCa.(R)
Proof. We do structural induction on P and therefore distinguish cases accord- ing to the syntactic form of P .
1. If P = 0, then P −→ R is not possible, and the claim automatically holds.α 2. If P = 1, then P −→ R is not possible, and the claim automatically holds.α 3. If P = a.P0, then only a.P0−→ R is possible, and R = Pa 0. According to
the definition OCa.(P ) ≥ OCa.(P0) = OCa.(R).
4. If P = P0+ P00, then, without loss of generality, P0−→ R. By inductionα hypothesis OCa.(P0) ≥ OCa.(R), so OCa.(P ) = max(OCa.(P0), OCa.(P00)) ≥ OCa.(R).
5. If P = P0· P00, then we distinguish two cases. If we apply operational rule 7, then R = P000 · P00, and OCa.(P ) = OCa.(P00) = OCa.(R). Or if we apply operational rule 8, then P00 −→ R, by induction hypothesisα OCa.(P00) ≥ OCa.(R) and OCa.(P ) = OCa.(P00) by definition.
6. If P = P0∗, then R = P00· P0∗, and by definition OCa.(P0∗) = OCa.(P00· P0∗) = OCa.(R).
Corollary 4.1.6. If P −→∗Q, then OCa.(P ) ≥ OCa.(Q).
Proof. The corollary follows by induction over the length of P −→∗ Q using Lemma 4.1.5.
16 4.1 Operator counter
A term that has the unary Kleene star as the main operator, has the property that every term reachable in one or more steps has the sequential composition as the main operator, or in other words for every derivation P∗−→+P0, there are Q, Q0 such that P0 = Q · Q0. Therefore we intuitively expect the operator of the unary Kleene star to not exceed 1.
Note that the reason why the definition of OC∗(P · Q) seems a little peculiar is that we want to differentiate between terms such as 1P∗ and P∗. If the operator counter function is non-increasing, then we trivially see that there is no derivation 1P∗−→∗P∗, as the latter has a higher unary Kleene star count.
Definition 4.1.7. The unary Kleene star counter function OC∗ of a term is inductively defined below.
1. OC∗(0) = 0 2. OC∗(1) = 0
3. OC∗(a.P ) = OC∗(P )
4. OC∗(P + Q) = max(OC∗(P ), OC∗(Q))
5. OC∗(P · Q) =
(0, if ∃Q0 Q = Q0∗
OC∗(Q), if ¬∃Q0 Q = Q0∗
6. OC∗(P∗) = 1
We will now prove that the unary Kleene star counter is a non-increasing func- tion.
Lemma 4.1.8. If P −→ R then OCα ∗(P ) ≥ OC∗(R)
Proof. We do structural induction on P and therefore distinguish cases accord- ing to the syntactic form of P .
1. If P = 0, then P −→ R is not possible, and the claim automatically holds.α 2. If P = 1, then P −→ R is not possible, and the claim automatically holds.α 3. If P = a.P0, then only a.P0 −→ R is possible, and R = Pa 0. According to
the definition OC∗(P ) = OC∗(P0) = OC∗(R).
4. If P = P0+ P00, then, without loss of generality, P0−→ R. By inductionα hypothesis OC∗(P0) ≥ OC∗(R), so OC∗(P ) = max(OC∗(P0), OC∗(P00)) ≥ OC∗(R).
5. If P = P0 · P00, then we distinguish two cases. If we apply operational rule 7, then R = P000 · P00, and OC∗(P ) = OC∗(P00) = OC∗(R). Or if we apply operational rule 8, then P00 −→ R, by induction hypothesisα OC∗(P00) ≥ OC∗(R) and OC∗(P ) = OC∗(P00) by definition.
6. If P = P0∗, then R = P00· P0∗, and by definition OC∗(P0∗) > OC∗(P00· P0∗) = OC∗(R).
4.1 Operator counter 17
Corollary 4.1.9. If P −→∗Q, then OC∗(P ) ≥ OC∗(Q).
Proof. The corollary follows by induction over the length of P −→∗ Q using Lemma 4.1.8.
For a term P · Q −→ Pα 0· Q, there are two different intuitions. One could argue that the sequential composition in P · Q is the same as in P0· Q, since it remains ‘untouched’, but one could also argue that, as the term is different, we see another instance of a sequential composition as main operator. For our definition, we rely on the first intuition, and treat a sequential composition as different only if the right hand side has been changed.
Due to the Kleene star, the definition of OC·(P · Q) is a bit peculiar again. As- sume we take a naive definition of OC·(P ·Q), for example OC·(P ·Q) = OC·(Q)+
1. If a Q0 exists such that Q = Q0∗, then OC·(P · Q0∗) = OC·(Q0∗) + 1 = 2.
However a transition Q0∗−→ P · Qα 0∗ exists, making the sequential composition counter function not non-increasing. This cannot be fixed by changing the value of OC·(Q0∗), as this changes the value of OC·(P · Q0∗) with the same amount.
The case distinction for OC·(P · Q) fixes this non-increasingness problem, as can be seen in the corresponding lemma. The non-naive definition also matches the intuition that a derivation P0Q∗ −→ Pα 1Q∗ −→ . . .β −→ Pγ nQ∗ can only see precisely one sequential composition, as the right hand side remains constant.
Definition 4.1.10. The sequential composition counter function OC·of a term is inductively defined below.
1. OC·(0) = 0 2. OC·(1) = 0
3. OC·(P + Q) = max(OC·(P ), OC·(Q)) 4. OC·(a.P ) = OC·(P )
5. OC·(P · Q) =
(1, if ∃Q0 Q = Q0∗
OC·(Q) + 1, if ¬∃Q0 Q = Q0∗
6. OC·(P∗) = 1
We will now prove that the sequential composition counter is a non-increasing function.
Lemma 4.1.11. If P −→ R then OCα ·(P ) ≥ OC·(R)
Proof. We do structural induction on P and therefore distinguish cases accord- ing to the syntactic form of P .
1. If P = 0, then P −→ R is not possible, and the claim automatically holds.α 2. If P = 1, then P −→ R is not possible, and the claim automatically holds.α 3. If P = a.P0, then only a.P0−→ R is possible, and R = Pa 0. According to
the definition OC·(P ) = OC·(P0) = OC·(R).
18 4.2 Syntactic shape of strongly connected components
4. If P = P0+ P00, then, without loss of generality, P0−→ R. By inductionα hypothesis OC·(P0) ≥ OC·(R), so OC·(P ) = max(OC·(P0), OC·(P00)) ≥ OC·(R).
5. If P = P0· P00, where P006= S∗, then we distinguish two cases. We apply operational rule 7, then R = P000· P00, and OC·(P ) = OC·(P00) = OC·(R).
Or we apply operational rule 8, then P00−→ R, by induction hypothesisα OC·(P00) ≥ OC·(R) and OC·(P ) ≥ OC·(P00) by definition.
6. If P = P0 · P00∗, then we distinguish two cases. If we apply operational rule 7, then R = P000· P00∗, and OC·(P ) = 1 = OC·(R). Or if we apply operational rule 8, then P00∗−→ Pα 000· P00∗, and OC·(P ) = 1 = OC·(R).
7. If P = P0∗, then R = P00· P0∗, and by definition OC·(P0∗) = 1 = OC·(P00· P0∗) = OC·(R).
Corollary 4.1.12. If P −→∗Q, then OC·(P ) ≥ OC·(Q).
Proof. The corollary follows by induction over the length of P −→∗ Q using Lemma 4.1.11.
Definition 4.1.13. The operator counter OC(P ) of a term P in BPA∗0,1is a 4- tuple equal to (OC·(P ), OC+(P ), OCa.(P ), OC∗(P )). We say that for a relation R ∈ {=, <, >, ≥, ≤, 6=}, OC(P ) R OC(P0) iff for at least one argument ⊕, OC⊕(P ) R OC⊕(P0), and for the other arguments OC⊕(P ) = OC⊕(P0).
Note that the definition of an operator counter is purely syntactical and there- fore, for two terms P and P0 with P ↔ P0 it is not at all necessary that OC(P ) = OC(P0).
Corollary 4.1.14. For no operator ⊕ ∈ {a., +, ·,∗} is there a transition P −→α Q such that OC⊕(P ) < OC⊕(Q).
Proof. This follows directly from Lemmas 4.1.6, 4.1.3, 4.1.9 and 4.1.12.
4.2 Syntactic shape of strongly connected com- ponents
First, we distinguish a syntactically special type of strongly connected compo- nent, namely the basic strongly connected component. As we will later find out, this is the most elementary type of strongly connected component in BPA∗0,1. Definition 4.2.1. A strongly connected component T = {P0, P1, . . . Pn} is basic iff there are some Pi0and Q such that for every process Pi∈ T Pi= Pi0Q∗ and {P00, . . . , Pn0} is not a non-trivial strongly connected component.
As we have a non-increasing function on terms, there are some derivations that we know cannot exist, namely a derivation where the OC increases. So if we have a transition P −→ Q, where OC(P ) > OC(Q), then Q 6−→α ∗P . From this we can conclude that:
4.2 Syntactic shape of strongly connected components 19
Corollary 4.2.2. There is no derivation such that P∗ −→+ P∗, P + Q −→+ P + Q or a.P −→+a.P in BPA∗0,1.
Proof. This follows from Corollary 4.1.14, since the operator counter of P∗, P + Q and a.P are strictly larger than the operator counter of their respective residuals.
We introduce a shorthand notation. Let U be a nonempty set of processes and Q a process then U Q is shorthand for {P Q | P ∈ U }. The expression U k V means {P k Q | P ∈ U, Q ∈ V }, for nonempty sets of processes U and V . Note that in BPA∗0,1 this means that every process P in a non-trivial strongly connected component has the sequential composition as the main operator, as this is the only remaining operator that can be the main operator. As seen in Definition 4.2.1, a basic strongly connected component has the sequential composition as the main operator. However, a non-trivial strongly connected component T0 can also be sequentially composed to T = T0P , and then the states in T also have the sequential composition as the main operator. These are in fact the only types of non-trivial strongly connected components in BPA∗0,1. Lemma 4.2.3. Every non-trivial strongly connected component T in BPA∗0,1 is either basic, or there is another non-trivial strongly connected component T0 with T = T0P .
Proof. We can always write T = {P0Q0, . . . , PnQn}, due to Corollary 4.2.2. As T is a strongly connected component, we know that OC(R) = OC(R0), for all members R, R0 of T , (Corollary 4.1.14). We make a case distinction:
1. There exist 0 ≤ i ≤ n and Q0 such that Qi= Q0∗. There is at least one PjQj ∈ T , such that PiQi
−→ Pα jQj, by the definition of non-trivial strongly connected components. If transition rule 7 has been applied to derive the transition PiQi
−→ Pα jQj, then Qi = Qj, and if transition rule 8 has been applied, then we must also apply transition rule 10 to derive Qi−→ Pα jQj, since Qi = Q0∗, and that would also mean that Qi = Qj. It follows with induction on n that if PiQi −→n PkQk, then Qk = Qi = Q0∗. There are two possibilities, T0 = {P0, . . . , Pn} is a non- trivial strongly connected component or T0 is not. If T0 is a non-trivial strongly connected component, then T = T0Q0∗, and if T0 is not a non- trivial strongly connected component then T is basic (Definition 4.2.1).
2. There are no 0 ≤ i ≤ n and Q0 such that Qi = Q0∗. Assume that for some i, j with PiQi
−→ Pα jQj, Qi 6= Qj. Looking at the operational semantics, we know that transition rule 8 must be ap- plied. From Definition 4.1.13 and the fact that Qi 6= Q0∗ we derive that OC·(Qi) < OC·(PiQi) and from Corollary 4.1.14 we know that OC·(PjQj) ≤ OC·(Qi). As OC·(PjQj) < OC·(PiQi), we can apply Corol- lary 4.1.14 yet again to find that there is no sequence OC·(PjQj) −→∗ OC·(PiQi). Therefore we must conclude that all Qi = Qj and since no Qk has a unary Kleene star as the main operator, combined with Corol- lary 4.1.14, we conclude that there must exist a non-trivial strongly con- nected component T0 with T0Q = T .
20 4.3 BPA∗0,1 is less expressive than PA∗0,1
4.3 BPA
∗0,1is less expressive than PA
∗0,1A basic strongly connected component can only do non-exiting-transitions or terminate. Since every non-basic non-trivial strongly connected component T equals a basic strongly connected component B sequentially composed with some other processes P0, P1, . . . Pn to T = ((BP0) . . . Pn), whenever B↓ holds, the processes P0, P1, . . . Pn might do a transition. Clearly, these transitions are only reachable from states where the B terminates. More formally:
Lemma 4.3.1. For every pair of processes S, S0 in a non-trivial strongly con- nected component T in BPA∗0,1, if both S and S0have some live exit transitions, S and S0 have the same live exit transitions.
Proof. It follows from Lemma 4.2.3 that every non-trivial strongly connected component is shaped like ((T R1) · · · )Rn, where T is a basic-scc. By Defini- tion 2.4.6, only the exiting-states in T are viable candidates to have live exit transitions in T . We do induction over the syntactic shape of non-trivial strongly connected components, where the induction hypothesis is that all exiting-states have the same set of live exit transitions, and the exiting-states are either all open or all closed.
If T is basic, then T has no live exit transitions, since every transition from a process PiQ∗ ∈ {P0Q∗, . . . , PnQ∗} goes to a state PjQ∗ with PjQ∗ −→+ 1Q∗ unless PjQ∗ is dead (Definition 2.4.5), and the only possible transitions are shaped 1Q∗−→+PiQ∗.
If T is not basic, then there is a term P , such that T = T0P . We know that all exiting-states S ∈ T0 also have the same set of live exit transitions E, due to the induction hypothesis. If S is open in T0, then the set of live exit transitions of SP ∈ T equals E ∪ {(α, P0) | P −→ Pα 0}. Also, if P ↓, then all exiting-states in T are open, and if ¬P ↓, then all exiting-states in T are closed. If ¬S↓, then the set of live exit transitions of SP ∈ T equals E, and all exiting-states in T are closed.
If a process P contains a non-trivial strongly connected component, then that non-trivial strongly connected component must adhere to the property from Lemma 4.3.1. However a process Q might exist that does not contain any non-trivial strongly connected component, but that is bisimilar to P with a non-trivial strongly connected component. If this is the case, the property from Lemma 4.3.1 cannot be used to prove something about expressivity of BPA∗0,1. We introduce the notion of bisimilar sets of processes, and thus bisimilar strongly connected components.
Definition 4.3.2. Two sets of processes T and U are bisimilar, iff for every process P ∈ T , there is a Q ∈ U such that P ↔ Q, and for every process Q ∈ U , there is a process P ∈ T such that P ↔ Q.
Before we prove that such a Q without any non-trivial strongly connected com- ponent does not exist, we first state the following proposition:
Proposition 4.3.3. For every finite BPA∗0,1 term X there are only a finite number of terms reachable from X.
4.3 BPA∗0,1 is less expressive than PA∗0,1 21
Proof. Straightforward by structural induction.
Lemma 4.3.4. For two bisimilar terms P and Q, if P contains a strongly connected component T , then Q contains a strongly connected component U , with T ↔ U .
Proof. Assume that Q does not contain a strongly connected component bisim- ilar with T . For every S, S0 ∈ T and integer N , there exists some n ≥ N with S −→nS0. As Q is bisimilar with P , there are some R ↔ S and R0↔ S0, not in any strongly connected component bisimilar to T , such that R −→nR0. Due to Proposition 4.3.3 a sufficiently large N exists, such that R −→n−k R0 −→ Rk 0, therefore R0 is in a strongly connected component and bisimilar to S0 ∈ T therefore R0∈ U for some U ↔ T .
This is enough groundwork to prove that some processes cannot be expressed in BPA∗0,1. We will prove that one of those processes can be expressed in PA∗0,1 in Theorem 4.3.5.
Theorem 4.3.5. BPA∗0,1 is less expressive than PA∗0,1.
Proof. From Lemma 4.3.1 follows that no two processes in the same non-trivial strongly connected component in BPA∗0,1 have different sets of exit transitions, and Figure 4.1 shows an example of a non-trivial strongly connected component in PA∗0,1 that violates that property. Namely {1, 2} is a non-trivial strongly connected component, and 1 has the exit transition (a, 3) while 3 has the exit transition (a, 4). We may apply Lemma 4.3.4, and then conclude that there is nothing bisimilar to Figure 4.1 in BPA∗0,1.
a a
a
a
a a
1
2
3
4
Figure 4.1: Counterexample (aa1)∗k a1 We can easily modify the proof to prove BPA∗0≺ PA∗0. Corollary 4.3.6. BPA∗0is less expressive than PA∗0.
Proof. As (aa1)∗ k a1 has no bisimilar term in PA∗0, as it contains the unary Kleene star. We modify the term to (aa)∗a k a. Then the essential part for the counterexample remains the same. As there is no BPA∗0,1term that can express (aa)∗a k a and BPA∗0≺ BPA∗0,1, there is no bisimilar term in BPA∗0.