File Information

File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/82/c82-1012_metho.xml

Size: 8,651 bytes

Last Modified: 2025-10-06 14:11:25

<?xml version="1.0" standalone="yes"?>
<Paper uid="C82-1012">
  <Title>TREE DIRECTED GRAMMARS</Title>
  <Section position="3" start_page="0" end_page="77" type="metho">
    <SectionTitle>
TREE DIRECTED GRA~tMARS
</SectionTitle>
    <Paragraph position="0"> We define trees in the manner of \[2\] and \[7\] as mappings from tree domains (special subsets of N*, where N is the set of natural numbers) into an alphabet Z and call them therefore trees &amp;quot;over&amp;quot; Z. We assume for the rest of the paper that Z is ranked. Because trees are flnlte mappings it is convenient to identify a tree with its graph. So e.g. the set</Paragraph>
    <Paragraph position="2"> represents the tree of fig. I.</Paragraph>
  </Section>
  <Section position="4" start_page="77" end_page="77" type="metho">
    <SectionTitle>
78 W. D1LGER
</SectionTitle>
    <Paragraph position="0"> a a e figure 1 If u is an element of a tree domain, a 6 ~, and t(u) = a, then the pair &lt;u,a&gt; is called a n0dz of t. Let T be any set of trees over E. A TDG G T for T is a quadruple</Paragraph>
    <Paragraph position="2"> where ~ is the alphabet of terminals of G m, ~ is the set of productions of G T, and u E E U 4. It follows fr6m this definition that the elements of E play the role of nonterminals in G T. When they are used for this purpose in the productions, they are enclosed in brackets, so we get from E the set</Paragraph>
    <Paragraph position="4"> The elements of ~ are further used in the structural condition parts of the productions. There we should be able to distinguish between different occurrences of ~he same symbol in a tree. In order to represent such distinctions, the symbols are provided with indices, so we get from E the set EIN D = U {aila E E} iEIND for some index set IND (in general a subset of N).</Paragraph>
    <Paragraph position="5"> Now a production p E ~ is a triple (\[al\],SO,~) with a q ~, e e (4 U \[EIND\])*, and sc is a structural condition which contains the symbol a I .</Paragraph>
    <Paragraph position="6"> In order to explain the application of a production we have to define the structural conditions. Assume, x E E and X = {Xl,X2,...}. Then the set of structural indiuid~als is</Paragraph>
    <Paragraph position="8"> There are four two-place predicates defined on SI, namely DOM (&amp;quot;dominates immediately&amp;quot;), DOM* (&amp;quot;dominates&amp;quot;), LFT (&amp;quot;is immediately left from&amp;quot;), and LFT * (&amp;quot;is left from&amp;quot;). Atomic structural conditions are TRUE, FALSE, P(~,~) where P is one of the four predicates above and ~,~ E SI.</Paragraph>
    <Paragraph position="9"> A ~t~uct~ral ~ondltZon is then an atomic structural condition or a Boolean expression over the set of atomic structural conditions.</Paragraph>
    <Paragraph position="10"> For example, if ~ = {a,b,c,d,e}, IND = {1,2}, then the following expressions are structural conditions:</Paragraph>
    <Paragraph position="12"> The semantics of a structural condition is defined in the usual way by an interpreting function from the condition into a semantic domain.</Paragraph>
    <Paragraph position="13"> Here, the trees of T are semantic domains. The four predicates DOM, ...,LFT * are always interpreted in the same way, and this interpretation should be obvious. The main part of the interpretation is the assignment of the structural individuals to the nodes of a tree, which is called the ,od~ ~Zgnment. A mapping of the individuals of a structural condition into the set of nodes of a tree is a node assignment, if it obeys the following restrictions: If a 6 E, then an individual ~ (i 6 IND) should be assigned to a node with label a, whereas the individuals e~ and e. (i ~ j) should be assigned to different nodes with the ~ same 3 label u. An individual x~ 6 X can be assigned to an arbitrary node. A tree t ~atZsfig~ a structural condition sc if there exists a node assignment such that sc holds for the assigned nodes of t under the assumed interpretation of the four predicates and the usual interpretation of the Boolean operators.</Paragraph>
    <Paragraph position="14"> The reader is invited to check, how the tree of the example above satisfies the structural conditions I. - 4.</Paragraph>
    <Paragraph position="15"> The structural conditions are similar to the local constraints of Joshi and Levy \[5\], and it can be shown that both are equivalent with regard to their ability to describe relations on the set of nodes of a tree.</Paragraph>
    <Paragraph position="16"> Assume, p = (\[ul\],sc,~) is a production of G m. Then the structural individual u I m~st occur in sc. Assume further that</Paragraph>
    <Paragraph position="18"> where yl,y 2 E (~ u \[ZTw_\]) ~, i E IND, and there is a node assignment which m~ps e~ on a nod~U&lt;u,a&gt; in tree t and t satisfies sc in such a way that ~I ~s mapped on &lt;u,a&gt; as well, then p can be applied to y:</Paragraph>
    <Paragraph position="20"> Some of the individuals of X occurring in e may be replaced by the node assignment for sc by individuals of \[~T,,~\]. In this way derivations in G T with regard %o a tree taze def!~d. If a derivation stops with a word y e ~, y can be regarded as a translation of t.</Paragraph>
    <Paragraph position="21"> 80 &amp;quot; W. DILGER Assume e.g. we are given the following four productions:</Paragraph>
    <Paragraph position="23"> with regard to the tree of the example above.</Paragraph>
  </Section>
  <Section position="5" start_page="77" end_page="77" type="metho">
    <SectionTitle>
TOP-DOWN TREE TRANSDUCERS i
</SectionTitle>
    <Paragraph position="0"> A top-dow~ IAZC/ t~n~da~zr (TDTT) (cf. \[4\]) is a transducing automaton which proceeds top-down from the root to the leaves in a tree and in each step yields an output. It is defined as a quintuple</Paragraph>
    <Paragraph position="2"> over T. when SUCh a rule is applied to a tree ~ at a node with label u, the variables ~ are replaced by those subtrees of t whose roots are immediately dof~inated by the node with label a.</Paragraph>
    <Paragraph position="3"> Assume e.g. we are given the TDTT</Paragraph>
    <Paragraph position="5"> There are some obvious similarities between TDGs and TDTTs. It is easy to see that not every TDTT can be transformed into an equivalent TDG, because the TDTTs have the states as an additional means to direct derivations. In some cases the derivation can be directed by appropriate structural conditions in the same way as it is done by states, but i~ is easy to construct examples where this is impossible. On the other hand, each TDG can be transformed into an equivalent TDTT. The main step of this transformation is to put together some of the productions so that the resulting productions satisfy the condition that all symbols of the structural condition part except a I are situated below the symbolu I in each tree, where a I correspond~ to the first component of the @roduction.</Paragraph>
    <Paragraph position="6"> Take e.g. the productions</Paragraph>
    <Paragraph position="8"> The first and the second production satisfy the condition, the third one does not, because the nodes assigned to x I and x~ are above that one assigned to c I in each tree which satisfies the SStructural condition. But we ca~ put together the second and the third production and get a new one:</Paragraph>
    <Paragraph position="10"> NOW this production is &amp;quot;better&amp;quot; than the third above, but it does not yet satisfy our condition. Therefore we put it together with the first one and get</Paragraph>
    <Paragraph position="12"> This production is acceptable and together with the production (\[el\],TRUE,AR) it performs the same derivation as the four productions above. The productions resulting from this transformation process are all proceeding downward in a tree. Each of them can be transformed into a TDTT of its own and finally these single TDTTs are composed to one TDTT which is equivalent to the TDG.</Paragraph>
    <Paragraph position="13"> The transformation process sketched above can be made only if the TDG is loop-free. That means that each node of a tree is passed during a derivation in TDG at most once.</Paragraph>
    <Paragraph position="14"> Now we can adopt the result of Baker \[I\] about top-down tree transductions. It states that the family of the images of recognizable sets of trees (e.g. the set of derivation trees of a context-free grammar) under a top-down transduction is properly contained in the family of deterministic context-sensltive languages. In other words, the result of t~e translation of the set of derivation trees of a context-free grammar by a TDG is at most a deterministic context- sensitive language. /</Paragraph>
  </Section>
class="xml-element"></Paper>
Download Original XML