File Information

File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/98/p98-2217_metho.xml

Size: 17,187 bytes

Last Modified: 2025-10-06 14:15:00

<?xml version="1.0" standalone="yes"?>
<Paper uid="P98-2217">
  <Title>A tabular interpretation of a class of 2-Stack Automata</Title>
  <Section position="3" start_page="0" end_page="1334" type="metho">
    <SectionTitle>
1 Strongly-driven 2-Stack Automata
</SectionTitle>
    <Paragraph position="0"> 2SA are natural extensions of Push-Down Automata working on a pair of stacks. However, it is known that unrestricted 2SA have the power of a Turing Machine. The remedy is to consider asymmetric stacks, one being the Master Stack MS where most of the work is done and the other being the Auxiliary Stack AS mainly used for restricted &amp;quot;bookkeeping&amp;quot;. The following remarks are intended to give an idea of the restrictions we want to enforce. The first ones are rather standard and may be found under different forms in the literature. The last one justifies the qualification of &amp;quot;strongly-driven&amp;quot; for our automata. \[Session\] AS should actually be seen as a stack of session stacks, each one being associated to a session. Only the topmost session stack may be consulted or modified. This idea is closely related to the notion of Embedded Push-Down Automata (Rambow, 1994, 96-102).</Paragraph>
    <Paragraph position="1"> \[Linearity\] A session starts in mode write w and switches at some point in mode erase e. In mode w (resp. e), no element can be popped from (resp. pushed to) the master stack MS.</Paragraph>
    <Paragraph position="2"> Switching back from e to w is not allowed. This requirement is related to linearity because it means that a same session stack is never used twice by &amp;quot;descendants&amp;quot; of an element in MS.</Paragraph>
    <Paragraph position="3"> \[Soft Session Exit\] Exiting a session is only possible when reaching back, with an empty session stack and in mode erase, the MS element that initiated the session.</Paragraph>
    <Paragraph position="4"> \[Driving\] Each pushing on MS done in write mode leaves some mark in MS about the action that  of this mark (in erase mode) will guide which action should take place on the session stack.</Paragraph>
    <Paragraph position="5"> In other words, we want the erasing actions to faithfully retrace the writing actions.</Paragraph>
    <Paragraph position="6"> Formally, a SD-2SA .A is specified by a tuple (~, .M, X, $0, $l, O) where ~ denotes the finite set of terminals, .M the finite set of master stack elements and X the finite set of auxiliary stack elements. The init symbol $0 and final symbol $y are distinguished elements of Ad. O is a finite set of transitions.</Paragraph>
    <Paragraph position="7"> The master stack MS is a word in (D.M)* where 2) denotes the set {/~, x.~, ---% ~} of action marks used to remember which action (w.r.t. the auxiliary stack AS) takes place when pushing the next master stack element. The empty master stack is noted e and a non-empty master stack ~1A1 ... ~nAn where A,~ denotes the topmost element.</Paragraph>
    <Paragraph position="8"> The meaning of the action marks is:  /2 Pushing of an element on AS.</Paragraph>
    <Paragraph position="9"> &amp;quot;x~ Popping of the topmost element of AS.</Paragraph>
    <Paragraph position="10"> --* No action on AS.</Paragraph>
    <Paragraph position="11">  Creation of a new session (with a new empty session stack on AS).</Paragraph>
    <Paragraph position="12"> The auxiliary stack AS is a word of (K:X*)* where K: = {~w,~e} is a set of two elements used to delimit session stacks in AS. Delimiter ~w (resp. ~e) is used to start a new session from a session which is in writing (resp. erasing) mode. The empty auxiliary stack is noted e.</Paragraph>
    <Paragraph position="13"> Given some input string xl ... xi E E*, a configuration of .A is a tuple (m, u, ~, ~) where m E {w, e} denotes a mode (writing or erasing), u a string position in \[0, f\], -- the master stack and ~ the auxiliary stack. Modes are ordered by w -~ e to capture the fact that no switching from e to w is possible. The initial configuration of ,4 is (w, 0, ~$0, ~w) and the final one (e, f, ~$f, ~W).</Paragraph>
    <Paragraph position="14"> A transition is given as a pair (p, --, ~), z (q, O, 0) where p, q are modes (or, with some abuse, variables ranging over modes), z in E*, .-- and O suffixes of master stacks in .M(2)Ad)*, and ~,0 suffixes of auxiliary stacks in X*(~gX*)* = (XUK:)*. Such a transition applies on any configuration (p, u, k~--, ~b~) such that xu+l ... x, = z and returns (q, v, ~0, C/0).</Paragraph>
    <Paragraph position="15"> We restrict the kind of allowed transitions:  SWAP (p, A, ~), z (q, B, ~) with p _ q and either e K: (&amp;quot;session bottom check&amp;quot;) or ~ = e (&amp;quot;no AS consultation&amp;quot;) .</Paragraph>
    <Paragraph position="16"> /-WRITE (w,A, e), z (w, ATB, b) /-ERASE (e, A/ZB,a) , z (e, D, e) --*-WRITE (w, A, e), ~ , (w, A-*B, e) --*-ERASE (e, A-+B, e) , ~ ~ (e, C, e) ~-WRITE (m, A, e), z, (w, A~B, ~m) ~-ERASE (e, A~B, ~m) ~i~ (m, C, e) x,~-WRITE (w, A, a), ~, (w, A'x~B, e) &amp;quot;~-ERASE (e, A&amp;quot;~B, e) , ~ , (e, C, c)  Figure 1 graphically outlines the different kinds of transitions using a 2D representation where the X-axis (Y-axis) is related to the master (resp. auxiliary) stack. Figure 1 also shows the two forms of derivations we encounter (during a same session). 2 Using 2SA to parse LIGs Indexed Grammars (Aho, 1968) are an extension of Context-free Grammars in which a stack of indices is associated with each non-terminal symbol. Linear Indexed Grammars (Gazdar, 1987) are a restricted form of Indexed Grammars in which the index stack of at most one body non-terminal (the child) is related with the stack of the head non-terminal (the father). The other stacks of the production must have a bounded stack size.</Paragraph>
    <Paragraph position="17"> Formally, a LIG G is a 5-tuple (VT, VN, S, VI,P) where VT is a finite set of terminals, VN is a finite set of non-terminals, S E VN is the start symbol, VI is a finite set of indices and P is a finite set of productions. Following (Gazdar, 1987) we consider productions in which at most one element can be pushed on or popped from a stack of indices:  To each production k of type PUSH, POP or HOR, we associate a characteristic tuple t(k) = (d, 5, a,/3) where d is the position of the child and the other arguments given by the following table: Type 5 a</Paragraph>
    <Paragraph position="19"> We introduce symbols ~'k,i as a shortcut for dotted productions \[Ak,0~Ak,1 ... Ak,i * Ak,i+ l ... Ak,,~ \].</Paragraph>
    <Paragraph position="20"> In order to design a broad class of parsing strategies ranging from pure top-down to pure bottom-up, we parameterize the automaton to be presented by a call projection -'* from 12 to )2 cart and a return projection *'-&amp;quot; from 12 to &amp;quot;W et where ~ = VN U VI and \]2 cart and V ret are two sets of elements. We require \]2 cart N \]2 ret = 0 and (&amp;quot;-*, +'-) to be invertible, i.eVX, rev, (X,*X) = (V, ~) =:~ x = r The projections extend to sequences by taking X1... X: = X-~I ... ~ and &amp;quot;~ =e (similarly for +-).</Paragraph>
    <Paragraph position="21"> Given a LIG G and a choice of projections, we define the 2SA .A(G, -~, = ~-) (Vr, M, X, -~, ~, O) where M = {Vk,i}U~TU~TT, X = ~//U~//, and whose transitions are built using the following rules.</Paragraph>
    <Paragraph position="22">  The reader may easily check that A(G,-'-*, ~-'-) recognizes L(G). The choice of the call and return elements for the MS (A~k,i and Ak,i) and the AS ('-~ and ~') defines a parsing strategy, by controlling how information flow between the phases of prediction and propagation. The following table lists the choices corresponding to the main parsing strategies (but others are definable).</Paragraph>
    <Paragraph position="23">  It is also worth to note that the description of A(G,-*, +--) could be simplified. Indeed, for every configuration (m,u,E,~) derivable with .A(G, &amp;quot;--*,*-&amp;quot;), we can show that --- = ~Vkl,ilSt... Vk.,i,,SnX, and that 5t only depends on Vk~,i~. That means that we could use a master stack without action marks, these marks being implicitly given by the elements XTk,i.</Paragraph>
  </Section>
  <Section position="4" start_page="1334" end_page="1335" type="metho">
    <SectionTitle>
3 Using 2SA to parse TAGs
</SectionTitle>
    <Paragraph position="0"> Tree Adjoining Grammars are a extension of CFG introduced by Joshi in (Joshi, 1987) that use trees instead of productions as primary representing structure. Formally, a TAG is a 5-tuple G = (VN,VT, S,I,A), where VN is a finite set of non-terminal symbols, VT a finite set of terminal symbols, S the axiom of the grammar, I a finite set of initial trees and A a finite set of auxiliary trees. IUA is the set of elementary trees. Internal nodes are labeled by non-terminals and leaf nodes by terminals or e, except for exactly one leaf per auxiliary tree (the foot) which is labeled by the same non-terminal used as label of its root node.</Paragraph>
    <Paragraph position="1"> New trees are derived by adjoining: let be a a tree containing a node u labeled by A and let be fl an auxiliary tree whose root and foot nodes are also labeled by A. Then, the adjoining of/3 at the adjunction node u is obtained by excising the subtree a~ of a with root u, attaching/3 to u and attaching the excised subtree to the foot of/3 (See Fig. 2).</Paragraph>
    <Paragraph position="2">  An elementary tree a may be represented by a set P(a) of context free productions, each one being either of the form * Yk,O ---4 Pk,1... Pk,n~, where Yk,o denotes some non-leaf node k of a and uk,i the i th son of k.</Paragraph>
    <Paragraph position="3">  * vk,0 --* alC/, where vk,0 denotes some leaf node k of c~ with terminal label ak.</Paragraph>
    <Paragraph position="4"> As done for LIGs, we introduce symbols Vk,i to denote dotted productions and consider projections &amp;quot;* and ~ to define the parameterized</Paragraph>
    <Paragraph position="6"> given by the following rules (and illustrated in Figure 2).</Paragraph>
    <Paragraph position="7">  Non prefix-valid variants of the top-down and Earley-like strategies can also be defined, by taking ~ = _L and ~ = r~ for every root node r~ of an auxiliary tree j3 (the projections being unmodified on the other elements). In other words, we get a full prediction on the context-free backbone of G but no prediction on the adjunctions.</Paragraph>
  </Section>
  <Section position="5" start_page="1335" end_page="1335" type="metho">
    <SectionTitle>
4 Items
</SectionTitle>
    <Paragraph position="0"> We identify two kinds of elementary derivations, namely Context-Free \[CF\] and escaped Context-Free \[xCF\] derivations, respectively represented by CF and xCF items. An item keeps the pertinent information relative to a derivation, which allows to apply the sequence of transitions associated with the derivation in different contexts.</Paragraph>
    <Paragraph position="1"> Before presenting these items, we introduce the following classification about derivations.</Paragraph>
    <Paragraph position="2"> A derivation (p,u, EA,~)\[--~7 / (q,v,O,O) is said rightward if no element of E is accessed (even for consultation) during the derivation and if A is only consulted. Then F~A is a prefix of O.</Paragraph>
    <Paragraph position="3"> Similarly, a derivation (p, u, E, ~)1-~&amp;quot; (q, v, O, 0) is said upward if no element of ~ is accessed (even for consultation). Then ~ is a prefix of 0.</Paragraph>
    <Paragraph position="4"> We also note w\[q/p\] the prefix substitution of p by q for all words w,p, q on some vocabulary such that p is prefix of w.</Paragraph>
    <Section position="1" start_page="1335" end_page="1335" type="sub_section">
      <SectionTitle>
4.1 Context-Free Derivations
</SectionTitle>
      <Paragraph position="0"> A Context-Free \[CF\] derivation only depends on the topmost element A of the initial stack MS. That means that no element of the initial AS and no element of MS below element A is needed: (o, u,-A, ~)l-~l (w, v, OB, 0)1-~2 (m, w, OBhC, ~c) where</Paragraph>
      <Paragraph position="2"> where O' = and o' = O\[gl \].</Paragraph>
      <Paragraph position="3"> The proposition suggests representing the CF derivation by a CF item of the form</Paragraph>
      <Paragraph position="5"/>
    </Section>
    <Section position="2" start_page="1335" end_page="1335" type="sub_section">
      <SectionTitle>
4.2 Escaped Context-Free Derivations
</SectionTitle>
      <Paragraph position="0"> An escaped Context-Free \[xCF\] derivation is almost a CF derivation, except for an escape sub-derivation that accesses deep elements of AS.</Paragraph>
      <Paragraph position="1"> where (w, u, EA, ~) I~ (w,v, eB, e)</Paragraph>
      <Paragraph position="3"> The proposition suggests representing the xCF derivation by an xCF item of the form ABS\[i:) E\]Ce where A = (u,A), B -- (v,B/, /~ = (s,D,d/, E = (t, E / and C -- (w, C, c/.</Paragraph>
      <Paragraph position="4"> In order to homogenize notations, we also use the alternate notation ABS\[oo\]Cm to represent CF item ABSC'rn, introducing a dummy symbol o. The specific forms taken by CF and xCF items for the different actions 5 are outlined in Figure 3.</Paragraph>
    </Section>
  </Section>
  <Section position="6" start_page="1335" end_page="1338" type="metho">
    <SectionTitle>
5 Combining items and transitions
</SectionTitle>
    <Paragraph position="0"> We provide the rules to combine items and transitions in order to retrieve all possible 2SA derivations. These rules do not explicit the scanning constraints and suppose that the string z may be read between positions w and k of the input string* They use holes * to denote slots that not need be consulted. For any mini configuration A = (u, A, a), we note ~o = (u, A) its micro projection*</Paragraph>
    <Paragraph position="2"> where C? = (w, C, c), ~' = (k, F, c), and either c=~=~degor~=e.</Paragraph>
    <Paragraph position="3"> The best way to apprehend these rules is to visualize them graphically as done for the two most complex ones (Rules 6 and 9) in Figures 4 and 5.</Paragraph>
    <Section position="1" start_page="1335" end_page="1335" type="sub_section">
      <SectionTitle>
5.1 Reducing the complexity
</SectionTitle>
      <Paragraph position="0"> An analysis of the time complexity to apply each rule gives us polynomial complexities O(n&amp;quot;) with u &lt;_ 6 except for Rule 9 where u = 8. However, by adapting an idea from (Nederhof, 1997), we replace Rule 9 by the alternate and equivalent Rule 11. &amp;quot;Bdeg*/\[b'Edeg\]C'e }</Paragraph>
      <Paragraph position="2"> and (when O C/ v) O = (l, O, b).</Paragraph>
      <Paragraph position="3"> Rule 11 has same complexity than Rule 9, but may actually be split into two rules of lesser complexity O(n6), introducing an intermediary pseudo-item BB/Z\[\[OP\]\]Ce (intuitively assimilable to a &amp;quot;deeply escaped&amp;quot; CF derivation).</Paragraph>
      <Paragraph position="4"> Rule 12 collects these pseudo-items (independently from any transition) while Rule 13 combines them with items (given a/Z-ERASE transition ~-).</Paragraph>
      <Paragraph position="5"> BB/Z\[/)Edeg\]C'e }===~ BB/Z\[\[OP\]\](3'e (12) *Ddeg\\[OP\]E,e</Paragraph>
      <Paragraph position="7"> and (when O C/ o) O = (l, O, b).</Paragraph>
      <Paragraph position="8"> Theorem 5.1 The worst time complexity of the application rules (1,2,3,4,5,6,7,8,10,12,13) is O(n 6) where n is the length of the input string. The worst space complexity is O(nS).</Paragraph>
    </Section>
    <Section position="2" start_page="1335" end_page="1338" type="sub_section">
      <SectionTitle>
5.2 Correctness results
</SectionTitle>
      <Paragraph position="0"> Two main theorems establish the correctness of derivable items w.r.t, derivable configurations.</Paragraph>
      <Paragraph position="1"> A derivable item is either the initial item or an item resulting from the application of a combination rules on derivable items. The initial item (0, e)(0, e)~\[oo\] &lt;0, $0, ~w&gt; w stands for the virtual  derivation step (w, 0, e, e)\[- (w, 0, ~$0, ~w). Theorem 5.2 (Soundness)For every derivable item Z = AB6\[PSIE\]Cm, there exists a derivation  on configurations (o, e) I-D--- Ul~- v such that H\[-~- V is a CF or xCF derivation representable by I.</Paragraph>
      <Paragraph position="2"> Proof: By induction on the item derivation length and by case analysis. I  Theorem 5.3 (Completeness) For all derivable configuration (m, w, EC , ~c), there exists a derivable item AB~\[DE\]Cm such that C = (w, C, c}.  Proof: By induction on the configuration derivation length and by case analysis of the different application rules. We also need the following &amp;quot;Extraction Lemma&amp;quot;. | Proposition 5.1 From any derivation (0, e)I--~- (m, w, EC, ~c) may be extracted a suffix CF or xCF sub-derivation U\[~ (m, .,, ~.C, ~c) for some configuration U.</Paragraph>
    </Section>
    <Section position="3" start_page="1338" end_page="1338" type="sub_section">
      <SectionTitle>
5.3 Illustration
</SectionTitle>
      <Paragraph position="0"> In the context of TAG parsing (Sect. 3), we can provide some intuition of the items that are built with .A(G, &amp;quot;-*, +-), using some characteristic points encountered during the traversal of an adjunction (Fig. 6).</Paragraph>
    </Section>
  </Section>
class="xml-element"></Paper>
Download Original XML