Convergence and Diversity in the Control Hierarchy
Year: 2023

Abstract:
Weir has defined a hierarchy of language classes whose second member (L2) is generated by tree-adjoining grammars (TAG), linear indexed grammars (LIG), combinatory categorial grammars, and head grammars. The hierarchy is obtained using the mechanism of control, and L2 is obtained using a contextfree grammar (CFG) whose derivations are controlled by another CFG. We adapt Weir’s definition of a controllable CFG to give a definition of controllable pushdown automata (PDAs). This yields three new characterizations of L2 as the class of languages generated by PDAs controlling PDAs, PDAs controlling CFGs, and CFGs controlling PDAs. We show that these four formalisms are not only weakly equivalent but equivalent in a stricter sense that we call d-weak equivalence. Furthermore, using an even stricter notion of equivalence called d-strong equivalence, we make precise the intuition that a CFG controlling a CFG is a TAG, a PDA controlling a PDA is an embedded PDA, and a PDA controlling a CFG is a LIG. The fourth member of this family, a CFG controlling a PDA, does not correspond to any formalism we know of, so we invent one and call it a Pushdown Adjoining Automaton.

heading: 1 Introduction
text: Weir (1992) defined a hierarchy of formal languages whose first level (L1) is the class of contextfree languages, and whose second level (L2) is the class generated by several existing formalisms: tree-adjoining grammars (Joshi et al., 1975), linear indexed grammars (Gazdar, 1988), combinatory categorial grammars (Steedman, 1987) and head grammars (Pollard, 1984), which were proven weakly equivalent in a classic paper (Joshi et al., 1991; Vijay-Shanker and Weir, 1994), and embedded pushdown automaton (EPDA) as well (VijayShanker, 1987).
Weir’s hierarchy is obtained using the mechanism of control, and L2 is obtained by using a
context-free grammar (CFG) to control another modified CFG, called a labeled distinguished CFG or LD-CFG. Here, we define a controllable pushdown automaton (PDA), called a labeled distinguished PDA (LD-PDA), and show that PDAs can also be used as controllers. By combining a controller CFG or PDA with a controlled LD-CFG or LD-PDA, we obtain a total of four formalisms that characterize L2.
We show that these four formalisms are not only weakly equivalent but equivalent in a stricter sense that we call d-weak equivalence. Furthermore, using an even stricter notion of equivalence called d-strong equivalence, we make precise the intuition that a CFG controlling a CFG is essentially TAG, a PDA controlling a PDA is an EPDA, and a PDA controlling a CFG is a LIG. The fourth member of this family, CFGs controlling PDAs, does not correspond to any existing automaton we know of, so we invent one and call it a Pushdown Adjoining Automaton (PAA).
The main contributions of this paper are: • Adapting Weir’s LD-CFG to pushdown au-
tomata (LD-PDA). • Two new definitions of equivalence between for-
malisms, d-weak equivalence and d-strong equivalence. • Four d-weakly equivalent formalisms (one old, three new) obtained by controlling an LD-
7597
CFG/PDA using a controller CFG/PDA, three of which are d-strongly equivalent to TAG, LIG and EPDA, respectively. • A new formalism, PAA, d-strongly equivalent to the fourth formalism.

heading: 2 Preliminaries
text: Let [=] denote the set of integers {1, . . . , =}, and let [8: 9] denote the set of integers {8, . . . , 9}.
For any sets X and Y, we write X̆ = {X̆ | X ∈ X} and X[Y] = {X [Y] | X ∈ X, Y ∈ Y}.

heading: 2.1 Context-free grammars
text: We assume familiarity with CFGs; see App. A.1 for definitions. The following normal form will be convenient later.
Definition 1. A CFG is in normal form if its productions have one of the forms X → Y1 · · · Y : or X → a.
A CFG derivation is sometimes thought of as a sequence of rewriting steps, and sometimes as a tree. The distinction is important in this paper, and we always refer to the former as derivations and the latter as derivation trees. See App. A.1, Def. 29 for a definition and Fig. 2a for an example.

heading: 2.2 Pushdown automata
text: Definition 2. A pushdown automaton (PDA) is a tuple P = (&,Σ, Γ, X, (@ ], S), (@ 5 , Y)) where &, Σ and Γ are finite sets of states, input symbols and stack symbols, X is a finite set of transitions, and (@ ], S) and (@ 5 , Y) are called the initial and final configurations, where @ ], @ 5 ∈ & and S ∈ Γ. The transitions are of the form ?,X 0−→ @, $, where ?, @ ∈ &, $ ∈ Γ∗, X ∈ Γ and a ∈ Σ ∪ {Y}. We say that a transition scans a and is scanning iff |a| > 0.
This definition is similar to that of Hopcroft et al. (2006) but has only a single final configuration. Stacks are represented as strings over Γ, from top to bottom. Thus, in the stack $ = X1 · · ·X=, the X1 is at the top of the stack, while X= is at the bottom.
See App. A.2 for further definitions. We again define a normal form that will be convenient later.
Definition 3. A PDA is in normal form if its transitions have one of the forms @,X Y−→ $ or @,X a−→ Y.
Unlike with CFGs, there is essentially no difference between treating PDA derivations as sequences of transitions or as (unary-branching) trees. See App. A.2, Def. 34 for a definition and Fig. 2b for an example.

heading: 3 Equivalence of Formalisms
text: We think of grammars and automata generically as “formal systems” that have derivation trees yielding strings. By equipping formal systems with derivation trees, we can define a notion of equivalence that is stricter than weak equivalence, and another notion that is more precise than strong equivalence.
Definition 4. A formal system F over alphabet Σ is a set of derivation trees together with a yield function . : → Σ∗ that defines a language L(F) = {. (3) | 3 ∈ }. Definition 5. Two formal systems F and F′ are dweakly equivalent if there is a bijection q between the derivation trees of F and F′ such that for any derivation tree 3 of F that yields the string s, the derivation tree q(3) of F′ also yields s. Example 1. Consider two CFGs Gfin and Ginf:
Gfin = {S→ a} Ginf = {S→ S, S→ a}.
These grammars are weakly equivalent, but not dweakly equivalent, because Gfin has just one derivation of a, but Ginf has infinitely many, so there is no bijection between their derivation sets.
Although there is a standard method to remove unary productions S→ S, on weighted grammars this method requires the semiring of weights to be complete; it will not work with general semirings. D-weak equivalence captures this distinction.
Example 2. Consider a CFG Gaa = {S → AA; A → a} and PDA Paa = {?, S Y−→ ?,A ; ?,A a−→ ?, Y}. Both Gaa and Paa derive just one string, aa, each with a single derivation. Thus, Gaa and Paa are d-weakly equivalent.
Strong equivalence is traditionally understood to mean that two formal systems generate the same sets of structural descriptions, but this notion cannot be made precise without defining what structural descriptions are. For our purposes, it will suffice to use derivation trees, thought of as unlabeled, unordered trees. Definition 6. Two formal systems F and F′ are d-strongly equivalent if there is a bijection q between the derivation trees of F and F′ such that for any derivation tree 3 of F, 3 and q(3) are isomorphic as unlabeled, unordered trees, and 3 and q(3) yield the same string. Example 3. Fig. 2 shows the derivation trees of the string aa in the CFG G and the PDA P defined
in Example 2. G and P are not d-strongly equivalent, because there is no isomorphism between their derivation trees: the derivation tree in G is branching while the derivation tree in P is not.
In general, CFG and PDA are d-weakly equivalent (App. D, Prop. 7), but not d-strongly equivalent.

heading: 4 Control
text: After a number of formalisms were proven to be equivalent characterizations of a language class L2 that is slightly more powerful than context-free languages (CFLs), Weir (1992) introduced the control hierarchy to characterize an infinite sequence of language classes, starting with CFLs and L2. The essential idea is that L2 languages can be recognized by a CFG in which the productions do not apply freely, but are controlled by another CFG.

heading: 4.1 LD-CFGs
text: To make a CFG controllable, Weir augments it slightly, as follows.
Definition 7. A labeled distinguished contextfree grammar (LD-CFG) is a tuple G = (N ,Σ, !,R, S), where N , Σ and ! are finite sets of nonterminal symbols, terminal symbols and labels, R is a finite set of productions, and S ∈ N is the start symbol. The productions have one of the forms ℓ : A → UB̆V or ℓ : A → U, where ℓ ∈ !, A ∈ N , B̆ ∈ N̆ , and U, V ∈ (N ∪ Σ)∗.
The labels enable a controller, which is a formal system over !, to decide what productions the LD-CFG (the controllee) can use. Because the controller generates/accepts strings over !, whereas an LD-CFG derivation tree has a branching structure, the distinguishing marks (̆) determine the paths of the derivation tree that are controlled.
Definition 8. A sentential form of an LD-CFG is a pair (",,) where " ∈ ((N ∪ Σ) [!∗])∗ is a sequence of terminal and nonterminal symbols,
each augmented with a string of labels, and , ⊆ !∗ is a set of control words.
Definition 9. If there is a production ℓ : A → #1B̆#2 ∈ R, then we write ("1 A[F] "2,,) ℓ =⇒ ("1 #1 [Y] B[Fℓ] #2 [Y] "2,,). If there is a production ℓ : A → #, where # ∈ N∗, then we write ("1 A[F] "2,,) ℓ =⇒ ("1 #[Y] "2,, ∪ {Fℓ}). Definition 10. Let, ⊆ !∗. If
(S[Y], ∅) ℓ1=⇒ ("1,,1) ℓ2 =⇒ · · · ⇒ ℓ= ("=,,=)
where "= ∈ Σ∗ and,= ⊆ , , we say that G derives "= under, .
Example 4. Below is an LD-CFG G1 and the derivation tree for the string aabbccdd.
ℓ1 : S1 → AS̆1D ℓ2 : S1 → BS̆1C ℓ3 : S1 → Y ℓ4 : A→ a ℓ5 : B→ b ℓ6 : C→ c ℓ7 : D→ d
S1
D d ℓ7 S1 D
d ℓ7
S1
C
c ℓ6
S1
C
c ℓ6
S1
Y ℓ3
B b ℓ5
ℓ2
B b ℓ5
ℓ2
A
a ℓ4
ℓ1
A
a ℓ4
ℓ1
The control words used in this derivation are {ℓ1ℓ1ℓ2ℓ2ℓ3, ℓ4, ℓ5, ℓ6, ℓ7}. Definition 11. Let , ⊆ !∗. The language of G under , is the set of strings L(,,G) = {s | G derives s under,}. Definition 12. Let F2 be a formal system defining strings over ! and G1 an LD-CFG. Then F2 controlling G1 form a single formal system, which we call F2 ⊲ G1 and which defines the language L(F2 ⊲ G1) = L(L(F2),G1). Example 5. Below is an example CFG G2 that can be used as a controller for G1 above (Example 4).
S2 → TL3 T→ L1TL2 T→ Y L8 → ℓ8 (8 ∈ [1:3]) S2 → ℓ8 (8 ∈ [4:7])
It generates the language {ℓ=1 ℓ=2 ℓ3 | = ≥ 0} ∪ {ℓ8 | 8 ∈ [4:7]}, which makes the LD-CFG generate the language {a=b=c=d= | = ≥ 0}.
The controller could also be a PDA, like P2:
@,S2 Y−→ @, TL3
@, T Y−→ @, L1TL2 @, T Y−→ @, Y
@, L8 ℓ8−→ @, Y (8 ∈ [1:3])
@,S2 ℓ8−→ @, Y (8 ∈ [4:7])

heading: 4.2 LD-PDAs
text: Weir’s definition of LD-CFG can be adapted to pushdown automata. Definition 13. A labeled distinguished PDA (LD-PDA) is a tuple P = (&,Σ, Γ, !, X, (@ ], S), (@ 5 , $ 5 )), where &, Σ and Γ are finite sets of states, input symbols and stack symbols, X is a finite set of transitions, and (@ ], S) and (@ 5 , $ 5 ) ∈ & × (Γ[!∗])∗ are the initial and final configurations. The transitions are of the form ℓ : @,A a−→ A,", or ℓ : @,A a−→ A,"B̆#, where ℓ ∈ !, @, A ∈ &, a ∈ Σ, A ∈ Γ, B̆ ∈ Γ̆, and ", # ∈ Γ∗. Example 6. Below is an example LD-PDA, P1, where @ is both initial and final:
ℓ1 : @, S1 Y−→ @,AS̆1D ℓ2 : @, S1 Y−→ @,BS̆1C ℓ3 : @, S1 Y−→ @, Y
ℓ4 : @,A a−→ @, Y ℓ5 : @,B b−→ @, Y
ℓ6 : @,C c−→ @, Y ℓ7 : @,D d−→ @, Y
Definition 14. A configuration of an LD-PDA P is a tuple (@, $,,), where @ is the current state, $ ∈ (Γ[!∗])∗ is a sequence of stack symbols, each augmented with a string of labels, and, ⊆ !∗ is a set of control words. Definition 15. If there is a transition ℓ : @,A a−→ A, #1B̆#2 ∈ X, we write (@,A[F] $,,) ℓ =⇒ (A, #[Y] B[Fℓ] #[Y] $′,,). If there is a transition ℓ : @,A a =⇒ A, #, we write
(@,A[F] $,, ∪ {Fℓ}) ℓ=⇒ (A, #[Y] $,, ∪ {Fℓ}).
Definition 16. Let , ⊆ !∗. If (@ ], S, ∅) ℓ1 =⇒
(@1, $1,,1) ℓ2 =⇒ · · · ℓ=−1===⇒ (@=−1, $=−1,,=−1) ℓ= =⇒ (@ 5 , Y,,=), where,= ⊆ , , and for 8 = 1, . . . , =, transition ℓ8 scans a8, then we say that P accepts string a1a2 · · · a=−1a= under, . Definition 17. Let , ⊆ !∗. The language accepted by P under, is the set of stringsL(,,P) = {s | P accepts s under,}.
Definition 18. Let F2 be a formal system defining strings over ! and P1 an LD-PDA. Then F2 controlling P1 form a single formal system, which we call F2 ⊲ P1 and which defines the language L(F2 ⊲ P1) = L(L(F2),P1).

heading: 4.3 Four two-level formalisms
text: Considering both CFGs and PDAs as both controllers and controllees yields four two-level formalisms, one of which is Weir’s original two-level grammar, and the other three of which are new.
Proposition 1. CFG ⊲ CFG, CFG ⊲ PDA, PDA ⊲ PDA and PDA ⊲ CFG are d-weakly equivalent.
Proof. See App. D.
From now on, we will use different fonts for the symbols in the controllee and the controller. In a controllee LD-CFG/LD-PDA, we use X, Y , . . . and a, b, . . . for the nonterminal/stack symbols and terminal/input symbols. In a controller CFG/PDA, we use A,B , . . . for the nonterminal/stack symbols and a, b, . . . or ℓ, ℓ1, . . . for the terminal/input symbols.

heading: 5 Derivation Trees of Two-Level Formalisms
text: In order to show that our four two-level formalisms are d-strongly equivalent to other L2 formalisms, we need to establish what derivation trees look like in these formalisms. Weir actually gives two definitions of derivation in a two-level grammar. The first is the one we have reproduced above, where a partial control word is written inside the square brackets. The second runs a leftmost derivation of the controller CFG inside the square brackets. In this section, we follow this second approach, except that we use derivation trees, not leftmost derivations. We give a separate definition for each twolevel formalism. Ideally, these definitions would have followed “for free” from the definitions of derivation trees of (LD-)CFGs and (LD-)PDAs, but we save this level of generality for future work.
Fig. 3 shows the derivation of string aabbccdd under the four two-level formalisms considered in this paper. The rest of this section discusses each formalism in turn. We assume all controllers and controllees are in normal form; see App. C for the general case.
PDA ⊲ PDA For PDA, derivations and derivation trees are the same thing, so derivation trees of PDA
⊲ PDA follow Weir’s definition straightforwardly. There are three cases to consider.
(a) If a derivation node is labeled @,X [B,A] , and B,A
ℓ−→ @ 5 , Y is a controller transition, and ℓ is a controllee transition @,X a−→ A, Y, then the node can have child
@,X [B,A]
A, a
(b) If a derivation node is labeled @,X [B,A#] , and B,A
ℓ−→ C, Y is a controller transition, and ℓ is a controllee transition @,X Y−→ A, Y1 · · · Y3−1 Z̆ Y3+1 · · · Y : , then
@, X [B,A# ]
A , Y1 [@] , S2 ] · · · Y3−1 [@] , S2 ] Z [C , # ] Y3+1 [@] , S2 ] · · · Y: [@] , S2 ]
(c) If a derivation node is labeled @,X [B,A#] , and B,A Y−→ C, $ is a controller transition, then
@,X [B,A#]
@,X [C, $#]
PDA ⊲ CFG This formalism is not much more difficult than CFG ⊲ CFG.
(a) If a derivation node is labeled X [@,A], and @,A
ℓ−→ @ 5 , Y is a controller transition, and ℓ is a controllee production X → a, then
X [@,A] a
(b) If a derivation node is labeled X [@,A#], and @,A
ℓ−→ A, Y is a controller transition, and ℓ is a controllee production X → Y1 · · · Y3−1 Z̆ Y3+1 · · · Y: , then
X [@,A# ]
Y: [@] , S2 ]· · ·Y3+1 [@] , S2 ]Z [A , # ]Y3−1 [@] , S2 ]· · ·Y1 [@] , S2 ]
(c) If a derivation node is labeled X [@,A#], and @,A
Y−→ A, $ is a controller transition, then X [@,A#]
X [A, $#]
CFG ⊲ CFG When the controller is a CFG and therefore has branching derivation trees, the controllee’s derivation becomes fragmented. To ensure that the fragments form one correct derivation, we need to add some extra information to the derivation nodes: each node is labeled X/Z[A], where A is a controller nonterminal, and X and Z are controllee nonterminals or ⊥. We write X/⊥[A] as X [A].
Moreover, the yield of a subderivation is in general a discontinuous string. We write ∗ to indicate a hole in a string (meant to resemble foot nodes in TAG), and we write D(E) to plug E into the first hole in D; that is, if D = D1 ∗ D2 where D1 does not have a hole, then D(E) = D1ED2.
(a) If a derivation node is labeled X [A], and A→ ℓ is a controller production, and ℓ is a controllee production X → a, then
X [A] a
The yield is 0. (b) If a derivation node is labeled X/Z[A], and A → ℓ is a controller production, and ℓ is a controllee production X → Y1 · · · Y38−1 Z̆ Y3+1 · · · Y: , then
X/Z[A]
Y: [S2]· · ·Y3+1 [S2]Y3−1 [S2]· · ·Y1 [S2]
If each child node Y8 [S2] has yield F8, then the parent has yield F1 · · ·F3−1 ∗ F3+1 · · ·F: .
(c) If a derivation node is labeled X/Z[A], and A→ B1 · · ·B: is a controller production, then
X/Z[A]
Y:−1/Y: [B:]· · ·Y0/Y1 [B1]
where Y0 = X, Y: = Z, and Y1, . . . , Y:−1 can be any controllee nonterminals. If the children have yields F1, F2, . . . , F: , then the parent has yield F1(F2(· · · (F:))). CFG ⊲ PDA The derivation trees of CFG ⊲ PDA are the most complicated. To cut down on complexity, we make use of the fact that every PDA
that accepts by empty stack is equivalent to one with only one state (Hopcroft et al., 2006), and indeed the equivalence is d-strong (App. A, Prop. 6). Therefore, we assume that the controllee has just one state, @.
Derivation nodes are labeled (@, ), where @ is a state and is a string of symbols of the form X/Z[A] (as above, for CFG ⊲ CFG) or ∗.
(a) If a derivation node is labeled @, ∗?X [A] , where ∗? denotes either the presence or absence of a ∗, and A→ ℓ is a controller production, and ℓ is a controllee transition @,X a−→ @, Y, then
@, ∗?X [A]
@, a
If the yield of the child is F, then the yield of the parent is ∗?0F.
(b) If a derivation node is labeled @, X/Z[A] , and A → ℓ is a controller production, and ℓ is a controllee transition @,X Y−→ @, Y1 · · · Y3−1 Z̆ Y3+1 · · · Y: , then
@, X/Z[A]
@, Y1 [S2] · · · Y3−1 [S2] ∗ Y3+1 [S2] · · · Y: [S2]
The yield of the parent is just the yield of the child. (c) If a derivation node is labeled @, X/Z[A] , and A→ B1 · · ·B : is a controller production, then @, X/Z[A]
@, Y:−1/Y: [B:]· · ·@, Y0/Y1 [B1]
where Y0 = X, Y: = Z, and Y1, . . . , Y:−1 can be any controllee nonterminals. If the children have yields F1, F2, . . . , F: , then the parent has yield F1(F2(· · · (F:))).
The reader may be surprised that is placed on the leftmost child. It would be equally sensible to place it on any of the children, but the leftmost child makes the yield function simplest.

heading: 6 Correspondences with L2 Formalisms
text: We can now show how PDA ⊲ PDA, PDA ⊲ CFG, and CFG ⊲ CFG are d-strongly equivalent to EPDA, LIG, and TAG, respectively, and to introduce PAA, which is d-strongly equivalent to CFG ⊲ PDA.

heading: 6.1 Embedded pushdown automata
text: Definition 19. An embedded pushdown automaton (EPDA) is a tuple
P = (&,Σ, Γ, X, (@ ], [S]), (@ 5 , Y)), where &, Σ, N and Γ are finite sets of states, input symbols and stack symbols, X is a finite set of transitions, and (@ ], [S]) and (@ 5 , Y) are called the initial and final configurations, where @ ], @ 5 ∈ &, and S ∈ Γ. The transitions are of the form ?, [A ··] a−→ @, [$ ··] ′ or ?, [A] a−→ @, Y, where ?, @ ∈ &, A ∈ Γ, $ ∈ Γ∗, , ′ ∈ ([S])∗, and a ∈ Σ ∪ {Y}.
An EPDA maintains a stack of stacks. Each transition can pop and push from the top stack, as well as pop the top stack and/or push other stacks above and below it.
Proposition 2. An EPDA is d-strongly equivalent to a PDA ⊲ PDA.
Proof. See App. E.

heading: 6.2 Linear indexed grammars
text: Definition 20. A linear indexed grammar (LIG) is a tuple G = (N ,Σ, Γ,R, S, S), where N , Σ and Γ are sets of nonterminals, terminals and stack symbols, R is a finite set of productions, S ∈ N is the start symbol, and S ∈ Γ is the initial stack. The production rules are of the form X [A ··] → 1Y [$ ··] 2 or X [A] → a, where X, Y ∈ N , $ ∈ Γ∗, A ∈ Γ, 1, 2 ∈ (N [S] ∪ Σ)∗, and a ∈ Σ ∪ {Y}.
Each nonterminal symbol is augmented with a stack (in square brackets). A production with lhs X rewrites a nonterminal X [A$] into its rhs, while popping A and pushing zero or more stack symbols.1 Exactly one of the rhs nonterminals inherits the stack, while the others get new stacks.
Proposition 3. A LIG is d-strongly equivalent to a PDA ⊲ CFG.
Proof. See App. E.

heading: 6.3 Tree-adjoining grammars
text: Definition 21. A tree-adjoining grammar (TAG) is a tuple G = (V, C,Σ, S ,R) whereV, C and Σ are finite sets of variable, constant,2 and terminal symbols, S ∈ V is the start symbol and R is a set of productions. The productions are of the form X → V, where X ∈ V and V ∈ T (V∪C∪Σ∪{Y}).
1Most LIG definitions (Vijay-Shanker, 1987; Joshi et al., 1991; Kanazawa, 2014) allow only productions that pop/push at most one symbol from/to a nonterminal’s stack.
2The terms variable and constant come from Lang (1994) and are equivalent to nonterminals with obligatory and null adjunction constraints, respectively.
In V, interior nodes must be in V ∪ C. There is one leaf inV ∪ C that is designated the foot node and marked with ∗. The path from the root to the foot node is called the spine. Other leaves must be in V (in which case they are called substitution nodes and marked with ↓) or Σ ∪ {Y}.
This definition is close to non-strict TAG (Lang, 1994; Rogers, 2003). Unlike the usual definition, its rules have left-hand sides and do not require the root and foot node to have the same label. We also do not allow substitution, as it can be simulated by adjunction. A TAG derivation starts with S and proceeds by repeatedly choosing a variable X and rewriting it using a production X → V, such that the children of X become the children of V’s foot node. See App. B.3 for additional definitions. Definition 22. A TAG production X → V, where V has a foot node, is called spinal3 if every node of is either on the spine or the child of a node on the spine. A TAG production X → U, where U does not have a foot node, is called spinal if there is a leaf [ such that every node is either on the path from the root to [ or the child of such a node. A TAG is called spinal if all its productions are spinal.
TAG derivation trees were defined by VijayShanker (1987). We show an example TAG and derivation tree in Fig. 4.
Proposition 4. A spinal TAG is d-strongly equivalent to a CFG ⊲ CFG.
Proof. See App. E; we give a brief sketch here, using the same three cases as in §5. Case (a) corresponds to the TAG production
- [A] → X
a
Case (b) corresponds to the TAG production
X/Z [A] → X
Y: [S2]↓· · ·Y3+1 [S2]↓Z∗Y3−1 [S2]↓· · ·Y1 [S2]↓
Case (c) corresponds to the TAG productions
X/Z[A] → X/Y1 [B1] Y1/Y2 [B2]
Y:−1/Z[B:]∗
X [A] → X/Y1 [B1] Y1/Y2 [B2]
Y:−1 [B:]↓ 3This term comes from Fujiyoshi and Kasai (2000), who
use it for context-free tree grammars.
If : = 0 then the corresponding TAG productions are
X/X[A] → X∗ X [A] → X
Y

heading: 6.4 Pushdown adjoining automata
text: A pushdown adjoining automaton (PAA) maintains a stack of symbols. The stack symbols are either variable symbols, which can be rewritten, or constant symbols, which cannot. Each stack symbol is augmented with another stack, written below it:
ABC DE
Here, the top-level stack is ABC, in which B is augmented with stack DE. The other symbols have empty stacks, which are not shown.
A PAA transition has a lhs which is a variable symbol and a rhs which is a stack (as described above). The rhs may have one symbol occurrence called the foot; if so, both the lhs and the foot are written as X .
At each step, the PAA operates on the topmost stack that has a variable X on top. If it has a transition X
a−→ b, then it scans a, pops X and pushes b. If X had a stack attached, then the stack becomes attached to the foot of b. Finally, any constant symbol that has an empty stack is deleted.
Example 7. The PAA for {a=b=c=d=} is shown in Fig. 5, along with the run of this PAA on aabbccdd.
The nested stacks of a PAA, described informally above, are treated formally as trees with a special constant symbol > at the root. However, we continue to draw them as shown above, without >.
Definition 23. A pushdown adjoining automaton (PAA) is a tuple P = (Σ,V, C, X, S) where Σ, V, and C are finite sets of input symbols, variable stack symbols, and constant stack symbols, X is a set of transitions and S ∈ V is the initial stack. The transitions are of the form X
a−→ b where X ∈ V and b ∈ T (V ∪C). The root of b is >, and at most one leaf in b is designated the foot and written as X .
Definition 24. The path from the root to the foot of a PAA production’s rhs is called its spine. We say that a PAA production is spinal if every rhs node is either on the spine or a child of a node on the spine. A PAA is spinal if all of its productions are spinal.
Definition 25. If b ∈ T (V ∪ C) without constant leaf nodes, the top variable of b is defined as follows: If b = X , then the top variable is X . If b = X
b1 · · · where X ∈ V, then the top variable
is X. If b = X b1 · · · where X ∈ C, then the top variable of b is the top variable of b1.
Definition 26. If b has top variable X , and there is a transition g = (X a−→ d), then we write b g=⇒ b ′ if b ′ can be obtained from b by replacing its top variable X with d (sans >), making the children of X the children of the foot of d, and deleting any constant leaf nodes.
In a PAA derivation tree (see Fig. 5 for an example), every node is a stack, written without its embedded stacks. If X$ is such a node and (X a−→ b) is a transition, then the stacks of b$ are its children.
Proposition 5. A spinal PAA is d-strongly equivalent to a CFG ⊲ PDA.
Proof. See App. E; we give a brief sketch here, using the same three cases as in §5.
Case (a) corresponds to the rule
X [A] 0−→ Y Case (b) corresponds to the rule
X/Z [A] Y−→ Y1 [S2] · · · Y3−1 [S2] / Y3+1 [S2] · · · Y: [S2]
where Z is constant. Case (c) corresponds to the rules
X/Z[A] Y−→ X/Y1 [B1] Y1/Y2 [B2]
Y:−1/Z[B:] X [A] Y−→ X/Y1 [B1]
Y1/Y2 [B2] Y:−1 [B:]
If : = 0 then we must insert a constant symbol:
X/X[A] Y−→ X X [A] Y−→ X

heading: 7 Conclusion
text: We introduced new notions of equivalence between formalisms, d-weak equivalence and dstrong equivalence, that allow for finer-grained
comparisons than weak equivalence. By extending Weir’s idea of control to PDAs, we obtained three new formalisms recognizing L2, all d-weakly equivalent to Weir’s original two-level grammar. But by nuancing the idea of control to account for the difference between CFG derivations and derivation trees, we showed that they are not d-strongly equivalent. Instead, three of them are d-strongly equivalent to existing L2 formalisms, namely TAG, LIG and EPDA, and the fourth is d-strongly equivalent to our new L2 formalism, PAA.
Limitations
We currently give separate definitions of the derivation trees of the four two-level formalisms. Ideally, one could give a general definition of derivation tree in a multi-level formalism, and then derive each particular case by plugging in the definition of derivation trees of (LD-)CFGs and (LD-)PDAs. We leave this generalization for future work.
The d-strong equivalence results only hold for spinal TAG and spinal PAA. However, full TAG and PAA are not d-strongly equivalent to spinal TAG and spinal PAA, and therefore they are not d-strongly equivalent to CFG ⊲ CFG and CFG ⊲ PDA, either.
Ethics Statement
The authors foresee no ethical concerns with the research presented in this paper.

heading: Acknowledgements
text: We would like to thank the anonymous reviewers for their comments and suggestions.

heading: A Context-Free Formal Systems
text: A.1 Context-Free Grammars Definition 27. A context-free grammar (CFG) is a tuple G = (N ,Σ,R, S), whereN and Σ are finite sets of nonterminal and terminal symbols, R is a finite set of production rules, and S ∈ N is a distinguished start symbol. The production rules are of the form A → ", where A ∈ N and " ∈ (N ∪ Σ)∗. Definition 28. A sentential form of a CFG G is a sequence of nonterminal and terminal symbols " ∈ (N ∪ Σ)∗. If ? = (X → ") ∈ R and #1, #2 ∈ (N ∪ Σ)∗, we write #1X#2 ? =⇒ #1"#2. If
S ?1 ==⇒ "1 ?2 ==⇒ · · · ?===⇒ "=
where "= ∈ Σ∗, we say that G derives "=. The language generated by G is L(G) = {s | G derives s}. Definition 29. The set of derivation trees of a CFG is the smallest set defined as follows.
• If a ∈ Σ then the tree consisting of a single node a is an a-type derivation tree (whose yield is a).
• If (X → V1 · · · V:) ∈ R and, for 8 = 1, . . . , : , 38 is a V8-type derivation tree, then the following is an X-type derivation tree:
X
3:· · ·31
whose yield is . (3) = . (31) · · ·. (3:). A derivation tree of G is an S-type derivation tree.
A.2 Pushdown Automata Definition 30. A configuration of a PDA is a pair (@, $), where @ ∈ & is the current state and $ is the current contents of the stack.
Definition 31. If (?,X#) and (@, $#) are configurations, and g = (?,X a−→ @, $) is a transition, we write (?,X#) g=⇒ (@, $#). Definition 32. A run of a PDA is a sequence of transitions 0 = (g1, . . . , g=) such that there are configurations (@0, $0), . . . , (@=, $=) such that
(@0, $0) g1 ==⇒ · · · g===⇒ (@=, $=).
If each g8 scans a8, then we say that the run scans a1 · · · a=.
A run 0 is called a pop computation of X from @0 to @= if $0 = X$=, and for all 8 < =, |$8 | ≥ |$0 |.
An accepting run (or derivation) is a pop computation of S from @ ] to @ 5 . Definition 33. Let P be a PDA. If P has an accepting run that scans s ∈ Σ∗, we say that P accepts s. The language recognized by P is L(P) = {s ∈ Σ∗ | P accepts s}. Definition 34. The set of derivation trees of a PDA is the smallest set defined as follows.
• The tree consisting of a single node (@ 5 , Y) (which is the final configuration), is a (@ 5 , Y)type derivation tree (whose yield is Y).
• If (@, $) a=⇒ (@′, $′) and ′ is a (@′, $′)-type derivation tree, then the following is a (@, $)- type derivation tree:
= (@, $)
′ a
If the yield of ′ is F′, then the yield of is 0F′.
A derivation tree of % is a (@ ], S)-type derivation tree, where (@ ], S) is the initial configuration.
The definitions of runs, accepting runs, and pop computation for LD-PDAs are analogous to those for PDAs.
Proposition 6. Every PDA is d-strongly equivalent to a PDA with one state.
Proof. Given a PDA
P = (&,Σ, Γ, X, (@ ], S), (@ 5 , Y))
construct the PDA
P′ = ({@′},Σ, Γ′, X′, (@′, S′), (@′, Y)) Γ′ = {-@A | - ∈ Γ, @, A ∈ &} S′ = S@]@ 5
and for every transition (@, - 0−→ A,.1.2 · · ·.:) ∈ X with : > 0, let X′ contain transitions (@′, -@B: 0−→ @′, . AB11 . B1B2 2 · · ·. B:−1B: : ) for all B1, . . . , B: ∈ &. For every transition (@, - 0−→ A, Y) ∈ X, let X′ contain transition @′, -@A
0−→ @′, Y. We claim that P and P′ are d-strongly equivalent. (⇒) Given a derivation of P, apply the above
construction to each of the transitions used. Although the construction generates many possible sequences of transitions, exactly one sequence is a well-formed derivation. (⇐) Given a derivation of P′, just apply the reverse construction to each of the transitions used.

heading: B L2 Formalisms
text: B.1 Embedded Pushdown Automata To distinguish between the two types of stacks in an EPDA, we will call them the outer stack and the inner stacks. A inner stack is written as [$], $ ∈ Γ∗ is written from top to bottom as in a PDA. We write outer stacks as = [$1] · · · [$=], where [$1] is at the top, while [$=] is at the bottom. Definition 35. A configuration of an EPDA is a pair (@, ), where @ is the current state and is the current contents of the outer stack.
Definition 36. If an EPDA has a transition g = (@, [A ··] a−→ A, 1 [$ ··] 2), then we write, for any ∈ ([Γ∗])∗ and # ∈ Γ∗,
(@, [A#] ) g=⇒ (A, 1 [$#] 2 ).
Similarly, if an EPDA has a transition g = (@, [A] a−→ A, Y), then we write
(@, [A] ) g=⇒ (A, ).
The definitions of scanning and non-scanning transitions, runs, and accepting runs of an EPDA, and EPDAs accepting strings and recognizing languages, are all analogous to those for PDAs.
Definition 37. An EPDA is in normal form if its transitions have one of the following types
?, [A ··] Y−→ @, [S] · · · [··] · · · [S], ?, [A ··] Y−→ ?, [B1 · · ·B : ··], ?, [A] a−→ @, Y.
B.2 Linear Indexed Grammars Definition 38. A sentential form " ∈ (N [Γ∗] ∪ Σ)∗ of a LIG is a sequence of nonterminal symbols, each augmented with a stack, and terminal symbols.
Definition 39. If a LIG has a production ? = (X [A ··] → 1Y [$ ··] 2), then we write, for any 1, 2 ∈ (N [Γ∗] ∪ Σ)∗ and # ∈ Γ∗,
1 X [A#] 2 ? =⇒ 1 1 Y [$#] 2 2.
Similarly, if a LIG has a production ? = (X [A] → a), then we write
1 X [A] 2 ? =⇒ 1 a 2.
A LIG derivation starts with the start symbol and initial stack S[S]. The definitions of LIG derivations, LIG derivation trees, LIGs accepting strings, and LIGs recognizing languages are all analogous to those for CFGs.
Definition 40. A LIG is in normal form if its productions have one of the following types
X [A ··] → Y1 [S] · · · Y3 [··] · · · Y : [S], X [A ··] → X [B1 · · ·B : ··],
X [A] → a.
B.3 Tree-Adjoining Grammars
Definition 41. A tree V with a foot node is adjoined at an interior node [ by removing the children of [, replacing [ with V and inserting the old children of [ as the children of the foot node of V. The old label of [ is thus lost.
A tree U without a foot node is substituted at a leaf node [ by replacing [ with U. The old label of [ is thus lost.
Definition 42. If g = (X → V) is a TAG production, U is a tree with a node [ labeled X , and U′ is the resulting of adjoining or substituting V at [, we write U g =⇒ U′.
Definition 43. Let G be a TAG. If
S g1 ==⇒ U1 ⇒ · · · g= ==⇒ U=
where U= does not have any variable nodes, then we say that G derives U=.
Definition 44. The tree language of a TAG is the set of trees it derives. Additionally, the yield of a tree is the string obtained by concatenating the terminal symbols at the leaves of the tree, and the string language of a TAG is the set of strings yielded by its tree language.
Definition 45. A TAG is in normal form if its productions are of the types shown in Fig. 6.
B.4 Pushdown Adjoining Automata
Definition 46. A PAA is in normal form if its transitions are of the types shown in Fig. 7.

heading: C Derivation Trees of Two-Level Formalisms
text: In §5 we showed what the derivation trees of four two-level formalisms look like when both the controller and the controllee are in normal form. In this section, we give details on what the derivation trees look like for general controller CFGs/PDAs and controllee LD-CFGs/LD-PDAs.
PDA ⊲ PDA The normal form and general form of PDAs are not so different, so moving to general PDAs is straightforward. We still distinguish between the cases where the controller transition is (a,b) scanning or (c) non-scanning, and if the former, whether the controllee transition has (a) no distinguished symbol or (b) a distinguished symbol.
(a) If a derivation node is labeled @,X [B,A#] , and B,A
ℓ−→ @ 5 , Y is a controller transition, and ℓ is a controllee transition @,X a−→ A, Y1 · · · Y : (with no distinguished symbol),
@, X [B,A]
A , Y1 [@] , S2 ] · · · Y: [@] , S2 ] a
(b) If B,A ℓ−→ C, $ is a controller transition, and ℓ is a controllee transition @,X a−→
A, Y1 · · · Y3−1 Z̆ Y3+1 · · · Y : , then the node can have child
@, X [B,A# ]
A , Y1 [@] , S2 ] · · · Y3−1 [@] , S2 ] Z [C ,$# ] Y3+1 [@] , S2 ] · · · Y: [@] , S2 ] a
Case (c) stays the same.
PDA ⊲ CFG Generalizing to a PDA controller is also not very difficult here.
(a) If a derivation node is labeled X [@,A], and @,A
ℓ−→ @ 5 , Y is a controller transition, and ℓ is a controllee production X → h1 · · · h: , where each h8 is either a terminal or non-distinguished nonterminal symbol, then the node can have children as follows. For each 8,
• If h8 is a terminal a, then there is a child a.
• If h8 is a non-distinguished nonterminal Y , then there is a child Y [@ ], S2].
(b) If a derivation node is labeled X [@,A#], and @,A
ℓ−→ A, $ is a controller transition, and ℓ is a controllee production X → h1 · · · h: , where each h8 is either a terminal, nonterminal, or distinguished nonterminal symbol, then the node can have children as follows. For each 8,
• If h8 is a terminal or non-distinguished nonterminal, then there is a child as in case (a).
• If h8 is a distinguished nonterminal Z, then there is a child Z [A, $#].
Case (c) stays the same.
CFG ⊲ CFG Generalizing to a CFG controller is more complicated because a production can now yield multiple terminal symbols, which causes the controllee to use multiple productions in a single derivation step.
Derivation nodes are labeled X/Z[A] where A is a controller nonterminal, and - and / are controllee nonterminals or ⊥. We write X/⊥[A] as X [A].
If a derivation node is labeled X/Z[A], and A→ V1 · · · V: is a controller production, where each V8 is either a nonterminal or a terminal symbol, then the derivation node can have children as follows. Let Y0 = X, Y: = Z, and Y1, . . . , Y:−1 be any controllee nonterminals. For each 8:
(a) If V8 is a terminal ℓ that names a controllee production Y8−1 → h1 · · · h<, where each h 9 is a terminal or non-distinguished nonterminal (and Y8 = ⊥), then for each 9 ,
• If h 9 is a terminal a, then there is a child a.
• If h 9 is a non-distinguished nonterminal Y , then there is a child Y [S2].
(b) If V8 is a terminal ℓ that names a controllee production Y8−1 → h1 · · · h<, where each h 9 is a terminal, nonterminal or distinguished nonterminal (and Y8 ≠ ⊥), then for each 9 ,
• If h 9 is a terminal or non-distinguished nonterminal, then there is a child as in case (a).
• If h 9 is a distinguished nonterminal, it must be Y̆ 8 (and Y 8 ≠ ⊥).
(c) If V8 is a nonterminal B , then there is a child Y8−1/Y8 [B].
CFG ⊲ PDA Derivation nodes are labeled (@, ), where @ is a state and is a string of symbols of the form X/Z[A] (as above, for CFG ⊲ CFG) or ∗.
If a derivation node is labeled @, ∗?X/Z[A] (where ∗? denotes either the presence or absence of a ∗), and A→ V1 · · · V: is a controller production, where each V8 is either a nonterminal or terminal symbol, then the derivation node can have children as follows. Let Y0 = X, Y: = Z, and Y1, . . . , Y:−1 be any controllee nonterminals. For each 8:
(a) If V8 is a terminal ℓ that names a controllee transition @, Y8−1
a−→ @,W1 · · ·W: (with no distinguished symbol and Y8 = ⊥), then there is a child
@,W1 [S2] · · ·W: [S2] a
(b) If V8 is a terminal ℓ that names a controllee transition @, Y8−1
a−→ @,W1 · · ·W3−1 Y̆8 W3+1 · · ·W: (and Y8 ≠ ⊥), then there is a child
@,W1 [S2] · · ·W3−1 [S2] ∗W3+1 [S2] · · ·W: [S2] a
(c) If V8 is a nonterminal B , then there is a child
@, Y8−1/Y8 [B] Y
Finally, append to the leftmost child.

heading: D D-Weak Equivalence Proofs
text: Proposition 7. CFG and PDA are d-weakly equivalent.
Proof. (⇒) Let G = (N ,Σ,R, S) be a CFG in normal form. We define the PDA in normal form PG = ({@},Σ,N , X, (@, S) , (@, Y)), where
X = {@,A Y−→ @,B1 · · ·B : | A→ B1 · · ·B : ∈ R} ∪ {@,A a−→ @, Y | A→ a ∈ R}.
We prove by induction on the height ℎ of the derivation tree that for each A-type derivation tree 3 of G that yields F, PG has a pop computation of A that scans F.
Base case: When the height is ℎ = 2, it must hold that G has a production A → a. The yield of the derivation is a. By construction, PG has the transition @,A
a−→ @, Y, which is a pop computation of A that scans a.
Inductive Step: We assume that the statement holds for each A-type derivation of height up to ℎ and we assume that 3 is a derivation tree of height ℎ + 1 yielding F = F1F2 · · ·F: , which has root A and children B1,B2, . . . ,B : . We assume that the B1,B2, . . . ,B : -type derivations have yield F1, F2, . . . , F: . This implies that G has the production A → B1B2 · · ·B: and PG has the transition @,A
Y−→ @,B1B2 · · ·B: . By the inductive hypothesis, PG has pop computations (from state @ to state @) of B1,B2, . . . ,B: scanning F1, F2, . . . , F: , thus it has a pop computation of A that yields F.
Therefore, there is a yield-preserving bijection between the S-type derivations of G and PG’s pop computations of S (accepting runs). (⇐) Let P = (&,Σ, Γ, (@ ], S), (@ 5 , Y)) be a PDA in normal form. We define the CFG in normal form
GP = (N ,Σ,R, S ′) N = {A?@ | A ∈ Γ, ?, @ ∈ &} S ′ = S@]@ 5
and R is constructed as follows: • For each transition (?,A Y−→ @,B1 · · ·B :) ∈ X, and for each A1, A2, . . . , A: ∈ &, include production A?A: → B@A11 BA1A22 · · ·B A:−1A: : .
• For each transition (?,A a−→ @, Y) ∈ X, include production A?@ → a.
We prove that for each pop computation of A of P from ? to @ that scans F, there is a A?@-type derivation of GP with yield F. We prove the statement by induction on the length ; of the pop computation.
Base case: When the pop computation has length ; = 1, it must consist of a single transition ?, S
a−→ @, Y. It scans the string a. By construction, GP has a production S ?@ → a, thus it has a derivation yielding a.
Inductive Step: We assume that the statement holds for all pop computations of length up to ; and 0 is a pop computation of A such that its first transition is ?,A
Y−→ @,B1B2 · · ·B: , followed by pop computations of B1,B2, . . . ,B: from ? to A1, A1 to A2, . . ., and A:−1 to A: , respectively. We assume that the pop computations of B1,B2, . . . ,B: scan F1, F2, . . . , F: , therefore 0 scans F = F1F2 · · ·F: . By construction, GP has a production A?@ → B ?A11 BA1A22 · · ·B A:−1A: : . By the inductive hypothesis GP has B ?A11 B A1A2 2 · · ·B A:−1A: : - type derivations yielding F1F2 · · ·F: , thus it also has a A?A: -type derivation yielding F.
Therefore, there is a yield-preserving bijection between the accepting runs of P (pop computations of S from @ ] to @ 5 ) and derivation trees of GP.
Proposition 8. LD-CFG and LD-PDA are dweakly equivalent, in the sense that for any LDCFG G, there is an LD-PDA PG such that for any controller F, F ⊲ G and F ⊲ PG are d-weakly equivalent; conversely, for any any LD-PDA P, there is an LD-PDA GP such that for any controller F, F ⊲ P and F ⊲ GP are d-weakly equivalent.
Proof. (⇒) Let G = (N ,Σ, !,R, S) be an LDCFG in normal form. We define the LD-PDA
PG = ({@},Σ,N , !, X, (@, S) , (@, Y))
where X is constructed as follows:
• For each (ℓ : A → B1 · · · B̆3 · · ·B :) in R, include transition ℓ : @,A Y−→ @,B1 · · · B̆3 · · ·B : .
• For each (ℓ : A→ a) ∈ R, include transition ℓ : @,A a−→ @, Y.
The rest of the proof is similar to the proof of Prop. 7. The only addition is to observe that PG uses each control word the same number of times that G does, ensuring that the derivations of F,
F ⊲ G and F ⊲ PG are in one-to-one correspondence. (⇐) Let P = (&,Σ, Γ, !, (@ ], S) , (@ 5 , Y) ) be an LD-PDA in normal form. We define the LD-CFG in normal form
GP = (N ,Σ,R, S′) N = {A?@ | A ∈ Γ, ?, @ ∈ &} S′ = S@]@ 5
and R is constructed as follows:
• For each ℓ : ?,A Y−→ @,B1 · · · B̆3 · · ·B : in X, and for each A1, A2, . . . , A: ∈ &, include production ℓ : A?A: → B@A11 B A1A2 2 · · · B̆ A3−1A3 3 · · ·B A:−1A: : .
• For each transition (ℓ : ?,A a−→ @, Y) ∈ X, include production ℓ : A?@ → a.
Again, the rest of the proof is similar to the proof of Prop. 7.
Proposition 1. CFG ⊲ CFG, PDA ⊲ CFG, CFG ⊲ PDA and PDA ⊲ PDA are d-weakly equivalent.
Proof. When two two-level formalisms have the same controllee but one has a controller CFG and the other has a controller PDA, it is sufficient to define controllers that are d-weakly equivalent. The proof of Prop. 7 shows that this is possible and how the controllers can be defined. If there is a bijection between the derivations of the CFG and PDA for each control word, the rules of the controllee will be applied in the same order in both two-level formalisms, thus generating the same set of strings with an equal number of derivations.
When two two-level formalisms have the same controller but different controllees, the controllees must consume the control words in the same order and the same number of times. Indeed, the proof of Prop. 8 shows that this is possible and how the controllees can be defined.

heading: E D-Strong Equivalence Proofs
text: We assume for simplicity that the controller CFGs/PDAs and the LD-CFGs/LD-PDAs are in normal form in this section. However, the proofs of equivalence also hold in the general case.
Proposition 2. EPDA and PDA ⊲ PDA are dstrongly equivalent.
Proof. (⇒) Let
P = ( &,Σ, Γ, X, (@ ], [S]), (@ 5 , Y) ) be an EPDA in normal form. Construct the controllee LD-PDA and controller PDA
P1 = (&,Σ, {X}, !, X1, (@ ],X), (@ 5 , Y)) P2 = ({@}, !, Γ, X2, (@, S), (@, Y))
where the set of labels ! and the sets of transitions X1 and X2 are constructed as follows:
• For each transition (?, [A ··] Y−→ ?, [$ ··]) ∈ X, let ! contain a fresh label ℓ, let X2 contain the transition @,A
ℓ−→ @, $, and let X1 contain the transition ℓ : ?,X Y−→ ?,X.
• For each transition (?, [A ··] Y−→ A, [S] . . . [··] . . . [S]) in X, add a new label ℓ to !, the transition @,A
ℓ−→ @, Y to X2 and the transition ℓ : ?,X Y−→ A,X · · · X̆ · · ·X to X1.
• For each transition (?, [A] a−→ A, Y) ∈ X, add a new label ℓ to !, the transition @,A
ℓ−→ @, Y to X2 and the transition ℓ : ?,X a−→ A, Y to X1.
(⇐) We are given P2 ⊲ P1, and by Prop. 6 we can assume without loss of generality that both P1 and P2 have only one state. Thus
P1 = ({@},Σ, Γ1, !, X, (@, S1), (@, Y)) P2 = ({@}, !, Γ2, X2, (@, S2), (@, Y))
and we construct the EPDA
P′ = ({@},Σ, Γ′, X′, (@, [S1 [S2]]), (@, Y)) Γ′ = {X/Y [A] | A ∈ Γ2,X, Y ∈ Γ1}
∪ {X [A] | A ∈ Γ2,X ∈ Γ1}.
The set X′ is constructed as follows:
• For each transition (@,A Y−→ @,B1 · · ·B:) ∈ X2 where : > 0, and for each X0, . . . ,X: ∈ Γ1, let X′ contain the transition @, [X0/X: [A] ··] Y−→ @, [X0/X1 [B1] · · · X:−1/X: [B:] ··].
• For each transition (@,A Y−→ @, Y) ∈ X2, and for each X ∈ Γ1, let X′ contain the transition @, [X/X[A] ··] Y−→ @, [··].
• For each pair of transitions (@,A ℓ−→ @, Y) ∈ X2 and (ℓ : @,X Y−→ @, Y1 · · · Y̆3 · · · Y:) ∈ X1, let X′ contain the transition @, [X/Y3 [A] ··] Y−→ @, [Y1 [S2]] · · · [··] · · · [Y: [S2]] (where the [··] is in the 3-th position).
• For each pair of transitions (@,A ℓ−→ @, Y) ∈ X2 and (ℓ : @,X a−→ @, Y) ∈ X1, let X′ contain the transition @, [X [A]] a−→ @, Y.
Proposition 3. LIG and PDA ⊲ CFG are d-strongly equivalent.
Proof. (⇒) Let G = (N ,Σ, Γ,R, S, S) be a LIG in normal form. Construct the controllee LD-CFG and controller PDA
G1 = (N ,Σ, !,R1, S) P2 = ({@}, !, Γ, X2, (@, S) , (@, Y))
The set of labels !, the set of productions R1 and the set of transitions X2 are constructed as follows:
• For each production X [A ··] → X [$ ··] ∈ R, X2 contains the transition @,A
Y−→ @, $. • For each production
X [A ··] → Y1 [S] · · ·Y3 [ ··]· · · Y: [S], add a fresh label ℓ to !, the transition @,A
ℓ−→ @, Y to X2 and the production ℓ : X → Y1 · · · Y̆3 · · · Y : to R1.
• For each production X [A] → a, add a fresh label ℓ to !, the transition @,A
ℓ−→ @, Y to X2 and the production ℓ : X → a to R1. (⇐) Let G1 = (N ,Σ, !,R1, S) be a controllee
LD-CFG and P2 = ( &, !, Γ, X2, (@ ], S) , ( @ 5 , Y ) ) a controller PDA, both in normal form. Construct the LIG
G′ = (N ′,Σ, Γ,R ′, S, S) N ′ = {X@ | X ∈ N , @ ∈ &}
and the set R ′ is defined as follows: • For each transition (?,A Y−→ @, $) ∈ X2, and
for each X ∈ N , let R ′ contain a production X? [A ··] → X@ [$ ··].
• For each transition (?,A ℓ−→ @, Y) ∈ X2 and production (ℓ : X → Y1 · · · Y̆3 · · · Y :) ∈ R1, let R ′ contain a production X? [A ··] → Y@]1 [S] · · ·Y @ 3 [ ··]· · · Y @] : [S].
• For each transition (?,A ℓ−→ @ 5 , Y) ∈ X2 and production (ℓ : X → a) ∈ R1, let R ′ contain a production X? [A] → a.
Proposition 4. Spinal TAG and CFG ⊲ CFG are d-strongly equivalent.
Proof. (⇒) Let T = (V, C,Σ, S ,R) be a spinal TAG in normal form.
First, rename apart variables that allow adjunction and variables that allow substitution.
Then construct the controllee LD-CFG and controller CFG
G1 = (C ∪ { },Σ, !,R1, S1) G2 = (V, !,R2, S)
where ∉ C is a fresh constant symbol, and the set of labels ! and the sets of rules R1 and R2 are constructed as follows:
• For each rule of the type
A→ B1
B2
B :∗
R2 contains the production A → B1B2 · · ·B : .
• For each rule of the type
A→ B1
B2
B : ↓
! contains fresh labels ℓ0 and ℓ: , R2 contains the production S → ℓ0B1B2 · · ·B :−1ℓ:S , and R1 contains the productions
ℓ0 : A→ ℓ: : → B :
• For each rule of the type
A→ X∗
R2 contains the production A→ Y.
• For each rule of the type
A→ X
Y : ↓· · ·Y 3+1↓Z∗Y 3−1↓· · ·Y 1↓
! contains a fresh symbol ℓ, R1 contains the production ℓ : → Y 1 · · ·Y 3−1̆Y 3+1 · · ·Y : and R2 contains the production A→ ℓ.
• For each rule of the type
A→ X
a
! contains a fresh symbol ℓ, R1 contains the production ℓ : A → a and R2 contains the production S → ℓ. (⇐) Let G1 = (N1,Σ, !,R1, S1) be an LDCFG and G2 = (N2, !,R2, S2) a controller CFG. Construct the TAG
T = (V,N ,Σ, S1 [S2],R) V = {X/Y [A] | X, Y ∈ N ,A ∈ N ′}
∪ {X [A] | X ∈ N ,A ∈ N ′}
and the set R is constructed as follows: • For each production A → B1 · · ·B : ∈ R2,
where : > 0, and for each X0,X1, . . . ,X: ∈ N , let R contain the rules
X0/X: [A] → X0/X1 [B1] ...
X:−1/X: [B:]∗
X0 [A] → X0/X1 [B1] ...
X:−1 [B:]↓
• For each production A→ Y ∈ R2, let R contain the rules
X/X[A] → X∗ X [A] → X
Y
• For each pair of productions A→ ℓ ∈ R2 and ℓ : X → a ∈ R1, let R contain the rule
X [A] → X
a
• For each pair of productions A→ ℓ ∈ R2 and ℓ : X → Y1 · · · Y3−1Z̆Y3+1 · · · Y: ∈ R1, let R contain the rule
X/Z [A] → X
Y: [S2]↓· · ·Y3+1 [S2]↓Z∗Y3−1 [S2]↓· · ·Y1 [S2]↓
Proposition 5. Spinal PAA and CFG ⊲ PDA are d-strongly equivalent.
Proof. (⇒) Let M = (Σ,V, C, X, S) be a PAA in normal form.
First, rename apart variables that allow adjunction and variables that allow substitution.
Then construct the LD-PDA controllee and CFG controller
P1 = ({@},Σ, C ∪ { }, !, X1, S1) G2 = (V, !,R2, S)
where ∉ C is a fresh constant symbol, and the sets !, X1 and R2 are constructed as follows:
• For every transition in X of the form
A Y−→ Y 1 · · ·Y 3−1 Z Y 3+1 · · ·Y :
! contains a fresh label ℓ, R2 contains the production A→ ℓ and X1 contains the transition ℓ : @, Y−→ @,Y 1 · · ·Y 3−1̆Y 3+1 · · ·Y : .
• For every transition in X of the form
A a−→ Y
! contains a fresh label ℓ, R2 contains the production S → ℓ and X1 contains the transition ℓ : @,A a−→ @, Y.
• For every transition in X of the form
A Y−→ B1
B2 B:
R2 contains the production A→ B1 · · ·B: . • For every transition in X of the form
A Y−→ B1
B2 B:
! contains fresh labels ℓ0 and ℓ: , R2 contains the production S → ℓ0B1 · · ·B:−1ℓ:S and X1 contains the transitions
ℓ0 : @,A Y−→ @, ℓ: : @, Y−→ @,B:
• For every transition in X of the form
A Y−→ X
R2 contains the production A→ Y. (⇐) We are given G2 ⊲ P1, where G2 is a CFG and P1 is an LD-PDA. Without loss of generality, we may assume by Prop. 6 that P1 has only one state, so
P1 = ({@},Σ, Γ, !, X1, (@ ], S1), (@ 5 , Y)) G2 = (N , !,R2, S2)
We further assume that both are in normal form. Then we construct the PAA
M = (Σ,V, Γ, X′, S1 [S2]) V = {X/Y [A] | A ∈ N ,X, Y ∈ Γ}
∪ {X [A] | A ∈ N ,X ∈ Γ} where X′ is constructed as follows:
• For each production A → B1 · · ·B : ∈ R2, where : > 0, and for all X0,X1, . . . ,X: ∈ Γ, let X′ contain a transition
X0/Xk [A] Y−→ X0/X1 [B1] X1/X2 [B2]
Xk−1/Xk [B: ]
• For each production A→ Y ∈ R2 and for all X ∈ Γ, let X′ contain a transition
X/X[A] Y−→ X
• For all pairs of rules A → ℓ ∈ R2 and ℓ : @,X a−→ @, Y ∈ X1, let X′ contain the transition X [A] a−→ Y.
• For all pairs of rules A → ℓ ∈ R2 and ℓ : @,X Y−→ @, Y1 · · · Y3−1Z̆Y3+1 · · · Y : ∈ X1, let X′ contain a transition
X/Z [A] Y−→ Y1 [S2] · · · Y3−1 [S2] Z Y3+1 [S2] · · · Y: [S2]
ACL 2023 Responsible NLP Checklist

heading: A For every submission:
text: 3 A1. Did you describe the limitations of your work?
Limitations (not numbered)
3 A2. Did you discuss any potential risks of your work? Ethics Statement (not numbered)
3 A3. Do the abstract and introduction summarize the paper’s main claims? Abstract (not numbered) & Introduction (1)
7 A4. Have you used AI writing assistants when working on this paper? Left blank.
B 7 Did you use or create scientific artifacts? Left blank.
B1. Did you cite the creators of artifacts you used? No response.
B2. Did you discuss the license or terms for use and / or distribution of any artifacts? No response.
B3. Did you discuss if your use of existing artifact(s) was consistent with their intended use, provided that it was specified? For the artifacts you create, do you specify intended use and whether that is compatible with the original access conditions (in particular, derivatives of data accessed for research purposes should not be used outside of research contexts)? No response.
B4. Did you discuss the steps taken to check whether the data that was collected / used contains any information that names or uniquely identifies individual people or offensive content, and the steps taken to protect / anonymize it? No response.
B5. Did you provide documentation of the artifacts, e.g., coverage of domains, languages, and linguistic phenomena, demographic groups represented, etc.? No response.
B6. Did you report relevant statistics like the number of examples, details of train / test / dev splits, etc. for the data that you used / created? Even for commonly-used benchmark datasets, include the number of examples in train / validation / test splits, as these provide necessary context for a reader to understand experimental results. For example, small differences in accuracy on large test sets may be significant, while on small test sets they may not be. No response.
C 7 Did you run computational experiments? Left blank.
C1. Did you report the number of parameters in the models used, the total computational budget (e.g., GPU hours), and computing infrastructure used? No response.
The Responsible NLP Checklist used at ACL 2023 is adopted from NAACL 2022, with the addition of a question on AI writing assistance.
C2. Did you discuss the experimental setup, including hyperparameter search and best-found hyperparameter values? No response.
C3. Did you report descriptive statistics about your results (e.g., error bars around results, summary statistics from sets of experiments), and is it transparent whether you are reporting the max, mean, etc. or just a single run? No response.
C4. If you used existing packages (e.g., for preprocessing, for normalization, or for evaluation), did you report the implementation, model, and parameter settings used (e.g., NLTK, Spacy, ROUGE, etc.)? No response.
D 7 Did you use human annotators (e.g., crowdworkers) or research with human participants? Left blank.
D1. Did you report the full text of instructions given to participants, including e.g., screenshots, disclaimers of any risks to participants or annotators, etc.? No response.
D2. Did you report information about how you recruited (e.g., crowdsourcing platform, students) and paid participants, and discuss if such payment is adequate given the participants’ demographic (e.g., country of residence)? No response.
D3. Did you discuss whether and how consent was obtained from people whose data you’re using/curating? For example, if you collected data via crowdsourcing, did your instructions to crowdworkers explain how the data would be used? No response.
D4. Was the data collection protocol approved (or determined exempt) by an ethics review board? No response.
D5. Did you report the basic demographic and geographic characteristics of the annotator population that is the source of the data? No response.

heading: Future Work
text: We leave this generalization for future work. The d-strong equivalence results only hold for spinal TAG and spinal PAA. However, full TAG and PAA are not d-strongly equivalent to spinal TAG and spinal PAA, and therefore they are not d-strongly equivalent to CFG ⊲ CFG and CFG ⊲ PDA, either