Pushdown Automata and Context-Free Grammars in Bisimulation Semantics

The Turing machine models an old-fashioned computer, that does not interact with the user or with other computers, and only does batch processing. Therefore, we came up with a Reactive Turing Machine that does not have these shortcomings. In the Reactive Turing Machine, transitions have labels to give a notion of interactivity. In the resulting process graph, we use bisimilarity instead of language equivalence. Subsequently, we considered other classical theorems and notions from automata theory and formal languages theory. In this paper, we consider the classical theorem of the correspondence between pushdown automata and context-free grammars. By changing the process operator of sequential composition to a sequencing operator with intermediate acceptance, we get a better correspondence in our setting. We find that the missing ingredient to recover the full correspondence is the addition of a notion of state awareness.


Introduction
A basic ingredient of any undergraduate curriculum in computer science is a course on automata theory and formal languages, as this gives students insight in the essence of a computer, and tells them what a computer can and cannot do.Usually, such a course contains the treatment of the Turing machine as an abstract model of a computer.However, the Turing machine is a very old-fashioned computer: it is deaf, dumb and blind, and all input from the user has to be put on the tape before the start.Computers behaved like this until the advent of the terminal in the mid 1970s.This is far removed from computers the students find all around them, which interact continuously with people, other computers and the internet.It is hard to imagine a self-driving car driven by a Turing machine that is deaf, dumb and blind, where all user input must be on the tape at the start of the trip.

Preliminaries
As a common semantic framework we use the notion of a labelled transition system.Definition 2.1.A labelled transition system is a quadruple (S, A, − →, ↓), where (1) S is a set of states; (2) A is a set of actions, τ ∈ A; (3) − → ⊆ S × A ∪ {τ } × S is an A ∪ {τ }-labelled transition relation; and (4) ↓ ⊆ S is the set of final or accepting states.A process graph is a labelled transition system with a special designated root state ↑, i.e., it is a quintuple (S, A, →, ↑, ↓) such that (S, A, →, ↓) is a labelled transition system, and ↑ ∈ S. We write s a − → s for (s, a, s ) ∈ → and s↓ for s ∈ ↓.
By considering language equivalence classes of process graphs, we recover languages as a semantics, but we can also consider other equivalence relations.Notable among these is bisimilarity.
Definition 2.2.Let (S, A, → , ↓) be a labelled transition system.A symmetric binary relation R on S is a bisimulation if it satisfies the following conditions for every s, t ∈ S such that s R t and for all a ∈ A ∪ {τ }: (1) if s a − → s for some s ∈ S, then there is a t ∈ S such that t a − → t and s R t ; and (2) if s↓, then t↓.
The results of this paper do not rely on abstraction from internal computations.This means we can use the strong version of bisimilarity defined above, which does not give special treatment to τ -labelled transitions.In general, when we do give special treatment to τ -labeled transitions, we use some form of branching bisimulation [GW96].
A process is a (strong) bisimulation equivalence class of process graphs.

Pushdown Automata
We consider an abstract model of a computer with a memory in the form of a stack : the stack is last in and first out, something can be added on top of the stack (push), or something can be removed from the top of the stack (pop).
If (s, a, d, x, t) ∈ → with d ∈ D, we write s a[d/x] − −−− → t, and this means that the machine, when it is in state s and d is the top element of the stack, can consume input symbol a, replace d by the string x and thereby move to state t.Likewise, writing s a[ /x] −−−→ t means that the machine, when it is in state s and the stack is empty, can consume input symbol a, put the string x on the stack and thereby move to state t.In steps s Notice that we defined a pushdown automaton in such a way that it can be detected if the stack is empty, i.e. when there is no top element.For example, consider the pushdown automaton depicted in Figure 1.It represents the process that can start to read an a, and after it has read at least one a, can read additional a's but can also read b's.Upon acceptance, it will have read up to as many b's as it has read a's.Interpreting symbol a as an increment and b as a decrement, we can see this process as a counter.
We do not consider the language of a pushdown automaton, but rather consider the process, i.e., the bisimulation equivalence class of the process graph of a pushdown automaton.A state of this process graph is a pair (s, x), where s ∈ S is the current state and x ∈ D * is the current contents of the stack (the left-most element of x being the top of the stack).In the initial state, the stack is empty.In a final state, acceptance can take place irrespective of the contents of the stack.The transitions in the process graph are labeled by the inputs of the pushdown automaton or τ .Definition 3.2.Let M = (S, A, D, →, ↑, ↓) be a pushdown automaton.The process graph P(M ) = (S P(M ) , A, − → P(M ) , ↑ P(M ) , ↓ P(M ) ) associated with M is defined as follows: ( (3 To distinguish, in the definition above, the set of states, the transition relation, the initial state and the set of accepting states of the pushdown automaton from similar components of the associated process graph, we have attached a subscript P(M ) to the latter.In the remainder of this paper, we will suppress the subscript whenever it is already clear from the context whether a component of the pushdown automaton or its associated process graph is meant.
Figure 2 depicts the process graph associated with the pushdown automaton depicted in Figure 1.
In language equivalence, the definition of acceptance in pushdown automata leads to the same set of languages when we define acceptance by final state (as we do here) and when we define acceptance by empty stack (not considering final states).In bisimilarity, these notions are different: acceptance by empty stack yields a smaller set of processes than acceptance by final state.This is illustrated by Figure 2: this process graph has infinitely many non-bisimilar final states.This cannot be realised if we define acceptance by empty stack.For details, see [BCLT09].
A pushdown automaton has only finitely many transitions, so there is a maximum number of transitions from a given state, called its branching degree.Then, also the associated process graph has a branching degree, that cannot be larger than the branching degree of the underlying pushdown automaton.Thus, in a process graph associated with a pushdown automaton, the branching is always bounded.

Sequential Processes: TSP
In the process setting, a context-free grammar is a recursive specification over a process algebra comprising actions, choice and sequencing.We start out from the seminal process algebra BPA of Bergstra and Klop [BK84].Later, it was extended to the process algebra BPA δε by adding two constants δ (for deadlock) and ε (for termination).This process algebra was reformulated as the Theory of Sequential Processes (TSP) in [BBR10], using 0 and 1 for δ and ε.We present TSP next, and then will argue that it is not suitable to obtain a correspondence with pushdown automata.
Let A be a set of actions and τ ∈ A the silent action, symbols denoting atomic events, and let P be a finite set of process identifiers.The sets A and P serve as parameters of the process theory that we shall introduce below.We use symbols a, b, . .., possibly indexed, to range over A ∪ {τ }, symbols X, Y, . . ., possibly indexed, to range over P. The set of sequential process expressions is generated by the following grammar (a ∈ A ∪ {τ }, X ∈ P): The constants 0 and 1 respectively denote the deadlocked (i.e., inactive but not accepting) process and the accepting process.For each a ∈ A ∪ {τ } there is a unary action prefix operator a. .The binary operators + and • denote alternative composition and sequential composition, respectively.We adopt the convention that a. binds strongest and + binds weakest.The symbol • is often omitted when writing sequential process expressions.
For a (possibly empty) sequence p 1 , . . ., p n we inductively define n i=1 p i = 0 if n = 0 and n i=1 p i = ( n−1 i=1 p i ) + p n if n > 0. A recursive specification over sequential process expressions is a mapping ∆ from P to the set of sequential process expressions.The idea is that the process expression p associated with a process identifier X ∈ P by ∆ defines the behaviour of X.We prefer to think of ∆ as a collection of defining equations X def = p, exactly one for every X ∈ P. We shall, throughout the paper, presuppose a recursive specification ∆ defining the process identifiers in P, and we shall usually simply write X def = p for ∆(X) = p.Note that, by our assumption that P is finite, ∆ is finite too.We associate behaviour with process expressions by defining, on the set of process expressions, a unary acceptance predicate ↓ (written postfix) and, for every a ∈ A ∪ {τ }, a binary transition relation a −→ (written infix), by means of the transition system specification presented in Figure 3.We write p a for "there does not exist p such that p a −→ p " and p for "p a for all a ∈ A ∪ {τ }".
For w ∈ A * we define p w → −→ p inductively, for all process expressions p, p , p ; We see that τ -steps do not contribute to the string w.We write p −→ p for there exists a ∈ A ∪ {τ } such that p a −→ p .Similarly, we write p → −→ p for there exists w ∈ A * such that p w → −→ p and say that p is reachable from p.When a process expression p satisfies both p ↓ and p −→ we say p has intermediate acceptance.We will need to take special care of such process expressions in the sequel.
We proceed to define when two process expressions are behaviourally equivalent.
Definition 4.1.A binary relation R on the set of sequential process expressions is a bisimulation iff R is symmetric and for all process expressions p and q such that if (p, q) ∈ R: (1) If p a −→ p , then there exists a process expression q , such that q a −→ q , and (p , q ) ∈ R.
(2) If p↓, then q↓.The process expressions p and q are bisimilar (notation: p ↔ q) iff there exists a bisimulation R such that (p, q) ∈ R.
The operational rules presented in Fig 3 are in the so-called path format from which it immediately follows that strong bisimilarity is a congruence [BV93].Branching bisimulation, however, is not a congruence, but by adding a rootedness condition we get rooted branching bisimulation which is a congruence [GW96].
As is customary in process theory, we restrict our attention to guarded recursive specifications, i.e., we require that every occurrence of a process identifier in the definition of some (possibly different) process identifier occurs within the scope of an action prefix.Note that we allow τ as a guard.This is possible since we use strong bisimulation, not rooted branching bisimulation.If we do not restrict to guarded recursion, unwanted behaviour can result, as the following example shows.
Example 4.2.Consider the (unguarded) recursive equation We show the process graph generated by the operational rules in Figure 4.
From the initial state, there are infinitely many transitions, to states that are all nonbisimilar.Thus, the process graph generated is infinitely branching, and it cannot be bisimilar to the graph of a pushdown automaton.
By restricting to guarded recursion, we guarantee that the associated process graphs are finitely branching.
It is convenient to present a guarded sequential specification in a normal form, the so-called Greibach normal form, see [BLB19].
Definition 4.3.A guarded sequential specification is in Greibach normal form, GNF, if every right-hand side of every equation has the following form: • (1+) n i=1 a i .αi for actions a i ∈ A ∪ {τ } and a sequence of identifiers α i ∈ P * , n ≥ 0. Recall that the empty summation equals 0. The 1 summand may or may not occur.Furthermore, the empty sequence denotes 1.
It is well-known that by adding a finite number of process identifiers, every guarded sequential specification can be brought into Greibach normal form (i.e. the behaviour associated with a process identifier by the original specification is strongly bisimilar to the behaviour associated with it by the transformed specification, see, e.g., [BLB19]).
Since bisimilarity is a congruence, we can consider the equational theory of sequential expressions.From [BBR10], we know that the finite axiomatization in Table 1 is a sound and ground-complete (i.e.complete for all process expressions, not including variables) axiomatisation for the theory TSP with sequential composition and without recursion.In axiomatisations, we use variables x, y, z denoting arbitrary process expressions.Now we show why the process algebra TSP is not suitable to establish a correspondence with pushdown automata.The problem is with the operational semantics of sequential composition.Consider the following example.
Example 4.4.Consider the recursive specification By following the operational rules, we obtain a process graph that is bisimilar to the one shown in Figure 5 (for simplicity we have identified states labelled with terms that are equal up to A5, A8 and A9).We see the similarity with Figure 2, but many more transitions are added.
We see that the state given by process expression Y n • X has n outgoing transitions, to states X, Y • X, . . ., Y n−1 • X, Y n+1 • X.These states are all non-bisimilar.Thus, the branching in this process graph is unbounded, and it cannot be the process graph of a pushdown automaton.
We call the phenomenon occurring here transparency: it is possible to skip part of the terms in a sequential composition.It causes that TSP is too expressive: by means of a guarded recursive specification we can specify a process that is not pushdown.On the other hand, TSP is insufficiently expressive at the same time: also due to transparency, the pushdown automaton in Figure 1 cannot be specified in TSP.
Theorem 4.5.There is no guarded recursive specification over TSP with a process graph bisimilar to the process graph in Figure 2.
Proof.Suppose such a guarded recursive specification does exist.Without loss of generality, we can assume it is in Greibach normal form, such that every state of its process graph is given by a sequential composition of identifiers.As in Figure 2, from every state a maximal number of consecutive b-steps can be executed, this is also true in the process graph of the specification, and this is also true for each of the identifiers.As the specification only has finitely many identifiers, there is a maximal number of consecutive b-steps any identifier can execute.Take a number k larger than this maximum, and consider the state (↑, 1 k ) of the counter, from which exactly k consecutive b-steps can be executed.This state is bisimilar to a sequential composition p of identifiers of the specification, so also from p, k consecutive b-steps can be executed.By choice of k, these b-steps cannot all come from the same component of p, so p contains two identifiers X, Y (X occurring before Y ), each of which can execute at least one b-step.As (↑, 1 k ) ↓, also p ↓, and each identifier in p must be accepting, so X ↓ and Y ↓.But then, the last operational rule of sequential composition can be applied to X, and the b-step(s) in X can be skipped.This gives a sequence of less than k consecutive b-steps from p, after which no further b can be executed.But the resulting state must be bisimilar to a state (↑, 1 n ) of the counter, with n > 0. From this state a further b can be executed, which gives a contradiction.
Transparency occurs because of the last rule of sequential composition in the operational semantics: process expression p • q can execute a step from q, thereby forgetting p if p is accepting.When p has intermediate acceptance, so p can still execute a step, this step is lost.
In order to recover the correspondence between pushdown automata and sequential process algebra, we need to change this operational rule.In order not to cause confusion, we introduce a new operator ;, called sequencing, that will replace the sequential composition operator • of TSP.We call the resulting theory TSP ; .It was introduced in [BLY17].

Sequential processes: TSP ;
We replace the sequential composition • of TSP by the sequencing operator ; of which the operational rules are shown in Figure 6.The last rule for sequencing has a so-called negative premise.It is well-known that transition system specifications with negative premises may not define a unique transition relation that agrees with provability from the transition system specification [Gro93, BG96,Gla04].Indeed, in [BLY17] it was already pointed out that the transition system specification in Figure 3 gives rise to such anomalies in case we use unguarded recursion.Consider recursive equation X def = X ; a.1 + 1.If X , then according to the rules for sequencing and recursion we find that X a −→ 1, which is a contradiction.On the other hand, X → is not provable from the transition system specification.This is the second reason for restricting our attention to guarded recursive specifications.If specification ∆ is guarded, then it is straightforward to prove that the mapping S from process expressions to natural numbers inductively defined by S(1) = S(0) = S(a.p)= 0, gives rise to a so-called stratification S from transitions to natural numbers defined by S (p a −→ p ) = S(p) for all a ∈ A ∪ {τ } and process expressions p and p .In [Gro93] it is proved that whenever such a stratification exists, then the transition system specification defines a unique transition relation that agrees with provability in the transition system specification.
The recursive specification now yields a process graph bisimilar to the one in Figure 2, which has only binary branching.We see that it is the process of a pushdown automaton.In the next section, we will prove that every recursive specification over TSP ; generates a process graph that is bisimilar to the process graph of a pushdown automaton.We find that the expressiveness of TSP ; is incomparable to the expressiveness of TSP: by means of a guarded specification over TSP ; we can define the always accepting counter (see Figure 1) but not an unboundedly branching process, and for TSP it is the other way around.
The operational rules presented in Fig 6 are in the so-called panth format from which it immediately follows that strong bisimilarity is a congruence [Ver95].Due to the sequencing operator, rooted branching bisimulation is no longer a congruence, and we have to add an extra condition: rooted divergence-preserving branching bisimulation [GW96, Lut20] is a congruence, which can be proved using [FGL19].
Using sequencing instead of sequential composition, the distributive law A4 is no longer valid as the following example shows.
In fact, due to this failure, there is no finite sound and ground-complete axiomatization of bisimilarity for (the recursion-free fragment of) TSP ; [Bel18,BLB19].In order to find an axiomatization, nevertheless, it suffices to add an auxiliary unary operator NA, denoting non-acceptance.Intuitively, NA(p) behaves as p except that it does not have the option to accept immediately.The operational semantics of NA is obtained by adding one very simple rule, see Figure 7. Now, we can formulate a sound and ground-complete axiomatization of bisimilarity for the recursion-free fragment of TSP ; in three parts.First, there are the axioms in Table 1 without the distributive law A4.Second, the axiomatization of the NA operator is straightforward: see axioms NA1-NA4 in Table 2.
Finally, instead of the distributive law we include axioms A11-A13 shown in Table 2.The ground-completeness argument in [Bel18,BLB19] proceeds via an elimination theorem: it is established that for every recursion-free process expression p there exists a recursion-free process expression q without occurrences of the operators ; and NA such that the equation p = q is derivable from the axioms above using equational logic.Thus the ground-completeness of the axiomatisation of bisimilarity for (the recursion-free fragment) of TSP ; follows from the ground-completeness of the axiomatisation of bisimilarity for (the recursion-free fragment of) BSP (see [BBR10,Theorem 4.4.12]).
In the context of a guarded recursive specification ∆, we can, moreover, obtain the following result.
The axioms for the auxiliary operator NA and weaker forms of distributivity.
Theorem 5.2 (head normal form theorem).Let ∆ be a guarded recursive specification.
For every process expression p there exists a natural number n and sequences of actions a 1 , . . ., a n and process expressions p 1 , . . ., p n such that the equation (where (1 + ) indicates that there may or may not be a summand 1), is derivable from the axioms for TSP ; and the equations in ∆ using equational logic.The process expression (1+) n i=1 a i .pi is called the head normal form of p. Proof.Let p be a process expression.Without loss of generality we may assume that p is guarded.For we can replace every unguarded occurrence of a process identifier in p by the right-hand side of its defining equation in ∆ which, since ∆ is guarded, results in process expression with one fewer unguarded occurrence of a process identifier.We now proceed by induction on the structure of p.
Note that p cannot be itself a process identifier, since then p would not be guarded.If p = 0, then p is a head normal form.If p = 1, then by A6 we have p = 1 + 0, which is a head normal form.If p = a.p , then by A6 and A1 we have that p = 0 + a.p = 0 i=1 a i p i + a.p = 1 i=1 a i .pi , with a 1 = a and p 1 = p , which is a head normal form.
Suppose that p = p + p and (using the induction hypothesis) that Then, using A1 and A2 and, if necessary, A3 to get rid of a superfluous occurrence of 1, we get that where a i = a i and and so p has a head normal form.Suppose that p = p ; p , and (using the induction hypothesis) that We distinguish three cases: (1) Suppose that the head normal form of p does not have the 1-summand.If n = 0, then p = p ; p = 0 ; p = 0 and the latter is a head normal form.Otherwise, if n > 0, then, by axioms NA1, NA3 and NA4 we have that p = NA( n i=1 a i .pi ).It then follows with applications A11, A5, NA1, NA3 and NA4 that (2) Suppose that the head normal form of p has the 1-summand, but the head normal form of p does not.If n = 0, then, by A6 we have that p = 1, so by A9 it follows that p = p ; p = 1 ; p = p .Otherwise, if n > 0, then we first note that, since the head normal form of p does not have the 1-summand, by the axioms for NA we get that p = NA(p ).Then we find with an application of the axiom A12 (and applications of A1 and A2 if necessary) that We can then proceed as in the first case to find the head normal form for p = n i=1 a i .pi ; p .
(3) Suppose that both the head normal forms of p and p have the 1-summand.Again, if n = 0, then, by A6 we have that p = 1, so by A9 it follows that p = p ; p = 1 ; p = p .Otherwise, if n > 0, then we apply the axiom A13 to get p = p ; p = 1 + n i=1 a i .pi ; p , we proceed as in the first case to find a head normal form n i=1 a i .pi ; p for n i=1 a i .pi ; p , and observe that p = 1 + n i=1 a i .pi ; p .Suppose that p = NA(p ), and (using the induction hypothesis) that Then by the axioms for NA, A1 and A6 we have

The correspondence
The classical theorem states that a language can be defined by a push-down automaton just in case it can be defined by a context-free grammar.In our setting, we do have that the process of a given guarded specification over TSP ; (i.e., the equivalence class of process graphs bisimilar to the process graph associated with the specification) coincides with the process of some push-down automaton (i.e., the equivalence class of process graphs bisimilar to the process graph associated with the push-down automaton), but not the other way around: there is a push-down automaton of which the process is different from the process of any guarded sequential specification.In this section, we will prove these facts; in the next section, we investigate what is needed in addition to recover the full correspondence.
We use the following extra notation.If α ∈ P * , say α = X 1 • • • X n , then α denotes the process expression inductively defined by α = 1 if n = 0 and α = (X 1 • • • X n−1 ) ; X n if n > 0. We will also use this construct indexed by a word x ∈ D * , so if we have X d ∈ P (d ∈ D), then α x is inductively defined by α = 1 and α xd = α x ; X d .
First of all, we look at the failing direction.It can fail if the push-down automaton has at least two states.For one state, it does work.Theorem 6.1.For every one-state pushdown automaton there is a guarded sequential specification of which the process coincides with the process of the automaton.
Proof.Let M = ({↑}, A, D, →, ↑, ↓) be a pushdown automaton.We have identifiers X and −−−→ ↑, then we can take either X = 1 or X = 0 as the resulting specification (in case ↓ = {↑} resp.↓ = ∅).Otherwise, add a summand a.α x ; X for each such transition to the equation of the initial identifier X. Next, the equation for the added identifier X d has a summand a.α x for each transition ↑ a[d/x] − −−− → ↑, and a summand 1 or 0, depending on whether ↑ ∈ ↓ or not.Now a bisimulation between the process graph of M and the process graph of the constructed specification can be obtained by relating a state (↑, x) (x ∈ D * ) to the state given by the sequence of identifiers α x ; X.The initial states are related (by identifying X and 1 ; X) and (↑, dx) The following guarded recursive specification is obtained for this pushdown automaton in accordance with the procedure described in the proof of Theorem 6.1.
Note that if we use the sequential composition operator • of TSP [BBR10] instead of the present sequencing operator ; of TSP ; , then Theorem 6.1 fails because of the transparency illustrated in Figure 5.With the sequential composition operator, we cannot find a recursive specification of the stack accepting in every state of Example 6.2, because of the same phenomenon.Theorem 6.3.There is a pushdown automaton with two states, such that there is no guarded sequential specification with the same process.
Proof.Consider the example pushdown automaton in Figure 8. Suppose there is a finite guarded sequential specification with the same process, depicted by the representative in Figure 9. Without loss of generality we can assume that this specification is in Greibach Normal Form (see [BLB19]).As a consequence, each state of the process graph generated by the automaton is bisimilar to a sequence of identifiers of the specification (as defined earlier).Take k a natural number that is larger than the number of process identifiers of the specification, and for 0 ≤ i ≤ k consider the state (↑, 1 i ) reached after executing i a-steps.
From this state, consider any sequence of steps w → −→ where a ∈ w.Thus, w contains at most one c and at most i b's.
In the process graph generated by the recursive specification, this same sequence of steps w → −→ is possible from the sequence of identifiers α i bisimilar to state (↑, 1 i ).Let X i be the first element of α i .From X i , we can also execute at most one c-step and i b-steps, without executing an a-step.
Since k is larger than the number of process identifiers of the specification, there must be a repetition in the identifiers X i (i ≤ k).Thus, there are numbers n, m, n < m ≤ k, with X n = X m .The process identifier X m can execute at most one c and n < m b's without executing an a.But α m b m → −→, so the additional b-steps must come from the second and following identifiers of the sequence.As the second identifier is reached by just executing b's, this is a state reached by just executing a's and b's, so it must allow an initial c-step.Now we can consider α m cb m → −→.This sequence of steps must also reach the second identifier, but then, a second c can be executed, contradicting that α i is bisimilar to (↑, 1 i ).
Thus, our assumption was wrong, and the theorem is proved.
We see that the contradiction is reached, because when we reach the second identifier in the sequence α i , we do not know whether we are in a state relating to the initial state or the final state of the pushdown automaton.Going from the first identifier to the second identifier by means of the sequencing operator, no extra information can be passed along.In the next section we will add a mechanism that allows the passing of extra information along the sequencing operator.Theorem 6.3 holds for the sequencing operator we introduced, but it holds in the same way for the sequential composition operator of TSP [BBR10].No intermediate acceptance is involved in the proof.
In the other direction, we can find a pushdown automaton with the same process as a given guarded sequential specification.The proof will be more complicated than the classical proof, where it is only needed to find a pushdown automaton with the same language.The classical proof uses the equivalence of acceptance by final state and acceptance by empty stack, which does not hold in bisimulation semantics.
We again have to deal with the failure of the distributive law.Due to this, we carefully need to consider every instance of intermediate acceptance.Consider the sequencing (a.1 + 1) ; b.1.The left argument of this sequencing shows intermediate acceptance, the right argument does not.As (a.1 + 1) ; b.1 ↔ a.1 ; b.1, the intermediate acceptance in the first argument is redundant, and can be removed.We have to restrict the notion of Greibach normal form, in order to remove all redundant intermediate acceptance.
We proceed to recall the definition of Acceptance Irredundant Greibach Normal Form from [BLB19].First, partition the set of process identifiers P into sets P ↓ = {X ∈ P | X↓} and P ↓ = {X ∈ P | X ↓}.Then, define the set P ↓ of hereditarily non-accepting process identifiers as the largest subset of P ↓ such that for all X ∈ P ↓ we have that if (X def = p) ∈ ∆ and Y is a process identifier occurring in p, then Y ∈ P ↓ .We say that α ∈ P * is acceptance irredundant if α ∈ P * ↓ P ↓ P * ↓ ∪ P * ↓ .Definition 6.4.A recursive specification ∆ is in Acceptance Irredundant Greibach Normal Form (AIGNF) if every right-hand side of every equation has the following form: • (1+) n i=1 a i .αi for actions a i ∈ A ∪ {τ }, acceptance irredundant sequences of identifiers α i ∈ P * , and n ≥ 0.
According to [BLB19, Proposition 20], for every recursive specification ∆ there exist P ⊇ P and a recursive specification ∆ in AIGNF such that for all X, Y ∈ P we have that X ↔ Y with respect to ∆ if, and only if, X ↔ Y with respect to ∆ .Moreover, every state of the process graph associated with a process identifier is given by an acceptance irredundant sequence of identifiers.Now that we can assume guarded sequential specifications to be in AIGNF, we are one step closer to associating a pushdown automaton with each of them.There is, however, still one complication we need to resolve, as illustrated by the following example.Example 6.5.Consider the AIGNF specification The sequence Y Y X reachable from X is non-accepting, and since The sequence Y X is non-accepting too, but we have that Y X b −→ X and X is accepting.Thus, we see that the b-transition emanating from Y can lead to a non-accepting state or to an accepting state, depending on the context.So it cannot be determined from the first process identifier of a sequence of process identifiers alone whether executing a transition from it will lead to an accepting state or a non-accepting state.
To determine when a pushdown automaton executing a sequential process needs to switch from non-accepting to accepting, it would be convenient if, given any acceptance irredundant sequence αβ with α a sequence of non-accepting process identifiers and β a sequence of accepting process identifiers: • the rightmost identifier in α is always from a designated subset P s ↓ of non-accepting identifiers; • all the other process identifiers in α are not in P s ↓ (nor can they reach a process identifier in P s ↓ ).
Let P s ↓ ⊆ P ↓ ; we say P s ↓ separates non-acceptance from acceptance in α if α ∈ (P ↓ − P s ↓ ) * P s ↓ P * ↓ ∪ P * ↓ .If there exists a set P s ↓ ⊆ P ↓ such that P s ↓ separates non-acceptance from acceptance in all sequences of process identifiers associated with the states of a process graph, then a pushdown automaton simulating the behaviour of that process graph can decide to switch from non-acceptance to acceptance if, and only if, it executes a transition from some process identifier in P s ↓ that leads to an accepting sequence of process identifiers.We now define when a subset of non-accepting process identifiers separates nonacceptance from acceptance in a given sequential specification in AIGNF.Definition 6.6.Let ∆ be in AIGNF and let P s ↓ ⊆ P ↓ .We say that P s ↓ separates nonacceptance from acceptance in ∆ if for all sequences of process identifiers α and β such that α a −→ β for some a ∈ A ∪ {τ } if holds that whenever P s ↓ separates non-acceptance from acceptance in α, then P s ↓ separates non-acceptance from acceptance in β.Note that for the AIGNF specification of Example 6.5 there does not exist a subset of non-accepting process identifiers that separates non-acceptance from acceptance, for we have that Y Y X is reachable from X and in Y Y X non-acceptance cannot be separated from acceptance.We shall illustrate below how, by adding an extra process identifier, the recursive specification of Example 6.5 can be transformed into a recursive specification in which {Y } separates non-acceptance from acceptance.
Example 6.7.The specification of Example 6.5 can be transformed to a specification in AIGNF in which {Y } separates non-acceptance from acceptance by introducing a new process identifier Z and changing the specification to We argue that {Y } separates non-acceptance from acceptance in this recursive specification.
To this end, suppose that α We generalise the insight of the preceding example in the following proposition.Proposition 6.8.For every recursive specification ∆ defining the process identifiers in P there exist a set of process identifiers P ⊇ P and a recursive specification ∆ defining the process identifiers in P such that ∆ is in AIGNF and P ↓ separates non-acceptance from acceptance in ∆ .Moreover, for all X, Y ∈ P we have that X ↔ Y with respect to ∆ if, and only if, X ↔ Y with respect to ∆ .Proof.By [BLB19, Proposition 20] we can assume without loss of generality that ∆ is in AIGNF.Let P † ↓ be a set of process identifiers disjoint from P and with the same cardinality as P ↓ ; with every X ∈ P ↓ we bijectively associate a process identifier in P † ↓ that we denote by X † .Furthermore, if α ∈ P * is an acceptance irredundant sequence of identifiers, then we denote by α † the sequence of identifiers in P = (P ∪ P † ↓ ) * that is obtained from α by replacing all occurrences of non-accepting process identifiers in α except the last one (if it exists) by their variants.That is, for all acceptance-irredundant sequences of process identifiers α, we define α † with induction on the length of α as follows: • if α ∈ P * ↓ or α ∈ P ↓ P * ↓ , then α † = α; and • if α = Xα and α ∈ P * ↓ P ↓ P * ↓ , then α † = X † (α ) † .Define the recursive specification ∆ for all process identifiers Y ∈ P as follows: (1) if i is obtained from α by replacing all occurrences (including the last) of nonaccepting process identifiers Z in α by their variant Z † .We first argue that for all X, Y ∈ P we have that X ↔ Y with respect to ∆ if, and only if, X ↔ Y with respect to ∆ .Let f : (P ) * → P * be the mapping that maps every sequence α ∈ (P ) * to the sequence obtained by replacing in α every occurrence of a process identifier X † ∈ P † ↓ by X.It is immediate from the definition of ∆ that for all α ∈ (P ) * we have that a −→ α with respect to ∆, then there exists β ∈ (P ) * such that α a −→ β with respect to ∆ and f (β) = α .It immediately follows from these two properties that if R is a bisimulation relation with respect to ∆, then {(α, β) ∈ (P ) * × (P ) * | (f (α), f (β)) ∈ R} is a bisimulation with respect to ∆ , and if R is a bisimulation relation with respect to ∆ , then {(f (α), f (β)) ∈ P * × P * | (α, β) ∈ R} is a bisimulation with respect to ∆.Hence, X ↔ Y with respect to ∆ if, and only if, X ↔ Y with respect to ∆ .
It remains to argue that if α is an acceptance irredundant sequence such that P ↓ separates non-acceptance from acceptance in α and α a −→ β for some action a, then also β is an acceptance irredundant sequence and P ↓ separates non-acceptance from acceptance in β.
If α is the empty sequence, then α a , so there is nothing to prove.
If α is not the empty sequence, then there is a process identifier Y such that α = Y α .We assume that α a −→ β and we distinguish cases according to whether Since Y ∈ P and P ↓ separates non-acceptance from acceptance in α, it follows that α ∈ P * ↓ .Hence, since α † i is acceptance irredundant and P ↓ separates non-acceptance from acceptance in α † i it follows that β is also acceptance irredundant and P ↓ separates non-acceptance from acceptance in β.
We can now associate with every guarded sequential specification a suitable pushdown automaton.Theorem 6.9.For every guarded sequential specification there is a pushdown automaton with a bisimilar process graph, with at most two states.
Proof.Let ∆ be a guarded sequential specification over P. By Proposition 6.8 we can assume without loss of generality that ∆ is in Acceptance Irredundant Greibach Normal Form and separates non-acceptance from acceptance.Moreover, there exists a subset P s ↓ of non-accepting process identifiers such that every state of the specification is given by a sequence of identifiers that is acceptance irredundant and P s ↓ separates non-acceptance from acceptance.The corresponding pushdown automaton has two states {n, t}.The initial state is n iff the initial identifier S ↓ and t iff the initial identifier S ↓ (as defined by the operational semantics), and the final state is t.
• For each summand a.α of an identifier X with X ↓ and α = 1 or the first identifier of α is an identifier with ↓, add a step t • For each summand a.α of an identifier X with X ↓ and the first identifier of α an identifier with ↓, add a step t • For each summand a.α of an identifier X ∈ P s ↓ and α = 1 or the first identifier of α is an identifier with ↓, add a step n −−−→ n.Now the bisimulation relation will relate 1 to (t, ) and will relate X d ; α x to (t, x) if X d ↓ and to (n, x) if X d ↓ for each x ∈ P * .Now it is not difficult to check that the process of this pushdown automaton is the same as the process of the given guarded sequential specification.
Figure 10: Pushdown automaton illustrating the construction in the proof of Theorem 6.9.
Example 6.10.Consider the recursive specification Notice it is in Acceptance Irredundant GNF.Notice that for all states in the process graph, there is never a sequence of more than one non-accepting identifier.We obtain the pushdown automaton shown in Figure 10.
In the case of the sequential composition operator of TSP [BBR10], Theorem 6.9 fails because a guarded recursive specification over TSP can generate a process graph with unbounded branching, that cannot be bisimilar to a process graph generated by a pushdown automaton (see Example 4.4).15:19 Note that Theorem 6.9 also fails when we use pushdown automata with acceptance by empty stack, for by means of a guarded specification over TSP ; (or TSP) we can generate a process graph with infinitely many non-bisimilar accepting states.
The conclusion of this section is, that the replacement of sequential composition • by sequencing ; results in a calculus that is not too expressive: every guarded specification yields the process of a pushdown automaton.On the other hand, this calculus is not expressive enough: we still cannot specify all pushdown processes.In order to do that, we need an extra ingredient.

Signals and conditions
In order to obtain the missing correspondence, we need a mechanism to pass state information along a sequencing operator.We shall prove that it suffices to add the mechanism provided by propositional signals together with a conditional statement as given in [BB97], see also [BBR10].
To keep the focus of attention on the process calculus, especially also when we consider a sound and ground-complete axiomatization for it, we want to concern ourselves as little as possible with the formalities of propositional logic.To this end, we presuppose a Boolean algebra B, with distinguished elements false and true, a unary operator ¬ and binary operators ∨ and ∧, freely generated by some suitable (finite or countably infinite) set of generators.The elements of this Boolean algebra can be thought of as abstract propositions modulo logical equivalence, and each generator as the logical equivalence class of some propositional variable.A valuation is a homomorphism from B into the two-element Boolean algebra; it is completely determined by how it maps the generators.Moreover, we have that if φ and ψ are elements of B and v(φ) = v(ψ) for all valuations v, then φ = ψ.Henceforth, for the sake of readability, we will commit a minor abuse of language by referring to the elements of B as propositions and to the generators as propositional variables.
Given an element φ of B and a process expression p, we write φ :→ p, with the intuitive meaning 'if φ then p'; the construct is referred to as conditional or guarded command .The operational behaviour of φ :→ p depends on a valuation that associates a truth value with φ.Upon executing an action a in a state with valuation v, a state with a possibly different valuation v results.The resulting valuation v is called the effect of the execution of a in a state with valuation v.
We present operational rules for guarded command in Figure 11; it presupposes a function effect that associates with every action a and every valuation v its effect.We define when a process expression together with a certain valuation can take a step or be in a final state.
On the basis of these rules, we can define a notion of bisimulation.We use stateless bisimulation, which means that two process graphs are bisimilar iff there is a bisimulation relation that relates two process expressions iff they are related under every possible valuation.The stateless bisimulation also allows non-determinism, as the effect of the execution of an action will allow every possible resulting sequel.See the example further on, after we also introduce the root signal operator.Definition 7.1.A binary relation R on the set of sequential process expressions with conditionals is a stateless bisimulation iff R is symmetric and for all process expressions p and q such that if (p, q) ∈ R: (1) If for some a ∈ A ∪ {τ } and valuations v, v we have p, v a −→ p , v , then there exists a process expression q , such that q, v a −→ q , v , and (p , q ) ∈ R.
(2) If for some valuation v we have p, v ↓, then q, v ↓.The process expressions p and q are stateless bisimilar (notation: p ↔ s q) iff there exists a stateless bisimulation R such that (p, q) ∈ R.
Stateless bisimulation is a congruence for sequential process expressions with conditionals (proven along the lines of [BBR10]), and so we can investigate the equational theory.We add the axioms in Table 3.Note that there is no elimination theorem here: due to the presence of unresolved propositional variables, conditionals cannot be removed from all closed terms.
Next, we introduce an operator that allows the observation of aspects of the current state of a process graph.The central idea is that the observable part of the state of a process 15:21 graph is represented by a proposition.We introduce the root-signal emission operator ∧ .A process expression φ ∧ x represents the process x that shows the signal φ in its initial state.In order to define this operator by operational rules, we need to define an additional predicate on process expressions, namely consistency.Cons( p, v ) will not hold when the valuation of the root signal of p is false.A step a −→ can only be between consistent states, and a state can only be accepting when it is consistent.Thus, if the effect of executing the action a is to set the value of the proposition φ to false (i.e., effect(a, v)(φ) = false for all valuations v), then the process expression a.(φ ∧ p) can under no valuation execute action a.
The operational rules are defined in Fig. 12. First, we define the consistency predicate.Next, we find that the rule for action prefix, the rules for choice and the second rule for ; in Fig. 11 require an extra condition.The other rules of Table 11 can remain unchanged.Finally, we give the operational rules of the root signal emission operator.To emphasise the difference between guarded commands and root signal emission, process expression φ :→ 1 is consistent under any valuation, whereas φ ∧ 1 is inconsistent under a valuation that assigns false to φ.So, if the effect of the action a is to set the value of φ to false, then a.(φ :→ 1), in any valuation, can execute an a-transition, whereas a.φ ∧ 1 cannot.We again have a stateless bisimulation, where two process expressions are related iff any valuation that makes the root signal of one process expression true also makes the root signal of the other process expression true and for each such valuation, the process graphs of the process expressions are stateless bisimilar.Definition 7.2.A binary relation R on the set of sequential process expressions with conditionals and signals is a stateless bisimulation iff R is symmetric and for all process expressions p and q such that if (p, q) ∈ R: (1) If for some valuation v we have Cons( p, v ), then also Cons( q, v ).
(2) If for some a ∈ A ∪ {τ } and valuations v, v we have p, v a −→ p , v , then there exists a process expression q , such that q, v a −→ q , v , and (p , q ) ∈ R.
(3) If for some valuation v we have p, v ↓, then q, v ↓.The process expressions p and q are bisimilar (notation: p ↔ s q) iff there exists a stateless bisimulation R such that (p, q) ∈ R.
Again, stateless bisimulation is a congruence for sequential process expressions with conditionals and signals (see [BBR10]), and we have the following additional axioms.
Table 4: The axioms for signals.
It is tedious but straightforward to verify that the extended theory is still sound.Below we shall prove first a head normal form theorem and then also a ground-completeness theorem.
Theorem 7.3 (head normal form theorem).Let ∆ be a guarded recursive specification.For every process expression p there exists a natural number n, sequences of propositions φ 1 , . . ., φ n , actions a 1 , . . ., a n , and process expressions p 1 , . . ., p n , and propositions ψ and χ such that is derivable from the axioms in Tables 1-4 and the equations in ∆ using equational logic.
The process expression at the right-hand side of the equation is called a head normal form of p, ψ is called its root signal and χ is called its acceptance condition.
Proof.Let p be a process expression.Without loss of generality we may assume that p is guarded, for we can replace every unguarded occurrence of a process identifier in p by the right-hand side of its defining equation in ∆ which, since ∆ is guarded, results in process expression with one fewer unguarded occurrence of a process identifier.We now proceed by induction on the structure of p.Note that p cannot be itself a process identifier, since then p would not be guarded.If p = 0, then p = 0 + 0 = 0 + true ∧ false :→ 1 by axioms A3, C2 and S1.Note that 0 + true ∧ false :→ 1 fits the shape of the right-hand side of Equation (7.1): we take n = 0 and we let ψ = true and χ = false.The above definition makes all undetermined guarded commands false, as is illustrated in the following example.
Example 7.10.Let P be a proposition variable, and let p = P :→ a.1 and q = P :→ b.1.Note that we have Cons( p, v ) for all valuations v (since p does not emit any signal), but p, v a −→ 1, v only if v(P ) = true.Hence, p does not have any outgoing transitions according to Definition 7.9.By the same reasoning, also q does not have any outgoing transitions.Therefore, p and q are bisimilar with respect to the transition relation induced on them by Definition 7.9.
When two process expressions are stateless bisimilar, then they are also bisimilar with respect to the transition relation induced on them by the Definition 7.9.The converse, however, does not hold: although the process expressions p and q in Example 7.10 are bisimilar, they are not stateless bisimilar.
To illustrate the interplay of root signal emission and guarded command, and to show how nondeterminism can be dealt with, we give the following example.Then S represents the process of tossing a coin until heads comes up, and its process graph is shown in Figure 13, as we shall now explain.Let Heads = (heads ∧ 1) ; (heads :→ hurray.1 + tails :→ S) and let Tails = (tails ∧ 1) ; (heads :→ hurray.1 + tails :→ S) .
To see that S  Proof.Suppose a finite guarded sequential specification with signals and conditions is given.Without loss of generality we can assume this specification is in Acceptance Irredundant Greibach normal form, so every state of the specification is given by a sequence of identifiers that is acceptance irredundant.
Because the specification is in AIGNF, it becomes easier to establish the acceptance and steps for any state of the process graph of the specification.For any variable of the specification, we have X ↓ iff for all valuations v that make the root signal of X true also make the acceptance condition of X true, and X a −→ α iff for all valuations v that make the root condition of X also make the guard of a true and Cons(v, a).
Because of the acceptance irredundancy, it holds that if X ↓ then also X ; β ↓ for every reachable state of the specification.Also, if X a −→ α then also X ; β a −→ α ; β for every reachable state of the specification X ; β.
This means we can follow the proof of Theorem 6.9 exactly, and we are done.

Conclusion
We looked at the classical theorem, that the set of languages given by a pushdown automaton coincides with the set of languages given by a context-free grammar.A language is an equivalence class of process graphs modulo language equivalence.A process is an equivalence class of process graphs modulo bisimulation.This paper solves the question how we can characterize the set of processes given by a pushdown automaton.In the process setting, a context-free grammar is a process algebra with actions, choice, sequential composition and recursion.We need to limit to guarded recursion in the process setting.Starting out from the seminal process algebra BPA of [BK84], we need to add constants for the inactive and accepting process and for the inactive non-accepting (deadlock) process.We look at the candidate process algebra TSP of [BBR10], but find it is not suitable: by means of a guarded recursive specification we find a process that cannot be the process of a pushdown automaton, and also, there is a process of a pushdown automaton that cannot be given by a guarded recursive specification.
If we replace the sequential composition operator of TSP by a sequencing operator [BLY17], we get a better situation: every guarded specification yields the process of a pushdown automaton, but still, not the other way around, there are processes of pushdown automata that cannot be given by a guarded specification.We obtain a complete correspondence by adding a notion of state awareness, that allows to pass on some information during sequencing.
A process is defined by a pushdown automaton if and only if it is defined by a finite guarded recursive specification over a process algebra with actions, choice, sequencing, conditions and signals.
We see that signals and conditions add expressive power to the process algebras considered, since a signal can be passed along the sequencing (or sequential composition) operator.If we go to the theory BCP, so without sequencing but with parallel composition, then we know from [BB97] that value passing can be replaced by signal observation.We leave it as an open problem, whether or not signals and conditions add to the expressive power of BCP.
A pushdown automaton is a model of a computer with a memory in the form of a stack.A parallel pushdown automaton is like a pushdown automaton, but with a memory in the form of a multiset (a set, where the elements have a multiplicity, telling how often they occur).It is interesting to compare the set of processes defined by a parallel pushdown automaton with the basic parallel processes, the processes that are defined by a guarded recursive specification over the language, where sequencing is replaced by parallel composition.We conjecture that every process defined by a basic parallel recursive specification can also be defined by a parallel pushdown automaton, and in the other direction that a process defined by a one-state parallel pushdown automaton can also be defined by a basic parallel recursive specification.In order to recover a full correspondence, we need to add an extra feature.We speculate this extra feature can be communication between parallel processes, without abstraction.Some details can be found in [Til11].
This paper contributes to our ongoing project to integrate automata theory and process theory.As a result, we can present the foundations of computer science using a computer model with interaction.Such a computer model relates more closely to the computers we see all around us.

Figure 2 :
Figure 2: The process graph of the counter.

Figure 3 :
Figure 3: Operational semantics for sequential process expressions.

Figure 8 :Figure 9 :
Figure 8: Pushdown automaton used in the proof of Theorem 6.3.

Figure 13 :
Figure13: The process graph associated with the specification of a coin toss.

toss−→
Tails and S toss −→ Heads, note that S, v toss −→ Heads, effect(toss, v) and S, v toss −→ Heads, effect(toss, v) for every valuation v.To see that Tails

toss−→
Tails and Tails toss −→ Heads, first observe that Cons( Tails, v ) if, and only if, v(tails) = true, and then note that for all such valuations v we, indeed, have Tails, v toss −→ Tails, effect(toss, v) and Tails, v toss −→ Heads, effect(toss, v) .

Table 3 :
The axioms for conditionals.