A Model-Theoretic Description of Tree Adjoining Grammars 1
Total Page:16
File Type:pdf, Size:1020Kb
p() URL: http://www.elsevier.nl/locate/entcs/volume53.html 23 pages A Model-Theoretic Description of Tree Adjoining Grammars 1 Frank Morawietz and Uwe M¨onnich 2,3 Seminar f¨ur Sprachwissenschaft Universit¨at T¨ubingen T¨ubingen, Germany Abstract In this paper we show that non-context-free phenomena can be captured using only limited logical means. In particular, we show how to encode a Tree Adjoining Gram- mar [16] into a weakly equivalent monadic context-free tree grammar (MCFTG). By viewing MCFTG-rules as terms in a free Lawvere theory, we can translate a given MCFTG into a regular tree grammar. The latter is characterizable by both a tree automaton and a corresponding formula in monadic second-order (MSO) logic. The trees of the resulting regular tree language are then unpacked into the intended “linguistic” trees through a model-theoretic interpretation in the form of an MSO transduction based upon tree-walking automata. This two-step approach gives a logical as well as an operational description of the tree sets involved. 1 Introduction Algebraic, logical and regular characterizations of (tree) languages provide a natural framework for the denotational and operational semantics of grammar formalisms relying on the use of trees for their intended models. In the present context the combination of algebraic, logical and regular techniques does not onlyadd another description of mildlycontext-sensitive languages to an alreadylong list of weak equivalences between grammar for- malisms. It also makes available the whole bodyof techniques that have been developed in the tradition of algebraic language theory, logic and automata theory. 1 The research presented in this paper was supported by the Deutsche Forschungsgemein- schaft within the Sonderforschungsbereich 441, TP A2. The authors wish to thank Jens Michaelis and Stephan Kepser for helpful comments. 2 Email: [email protected] 3 Email: [email protected] c 2001 Published by Elsevier Science B. V. Morawietz and Monnich For regular string and tree languages, classical results in the descriptive theoryof recognizabilityhave established a tight connection between logical formalisms and language classes. Theyprovide translation procedures that transform logical specifications into finite automata equivalent to the language classes and vice versa. B¨uchi [3] and Elgot [7] have shown that regular string languages represented through finite (string) automata can be expressed by sentences in the weak MSO logic with one successor. For tree languages an analogous result is well known: a tree language is definable in weak MSO logic with multiple successors if and onlyif it is recognizable bya finite tree automaton [6,32]. It is these earlier characterizations that provide the reason for a renewed interest in logical approaches to grammar specifications. The main open ques- tion in this area of research is whether an appropriate extension of the MSO language can be found which is expressive enough to define significant proper- ties of natural languages without becoming too unwieldyfrom the perspective of complexitytheory. We believe, similarlyto the claims in Pullum and Scholz [28], that model- theoretic approaches to syntax represent an important aspect of the formal analysis of natural language formalisms. In the present context we try to circumvent the problems posed bythe limited expressive power of MSO by developing the model-theoretic description in terms of a two-step approach. We choose Tree Adjoining Grammar (TAG) [13,14,15] as maybe the prototyp- ical mildlycontext-sensitive formalism 4 for natural languages to illustrate our proposal for a denotational approach towards a generative, non-context-free formalism. The first step in the approach proposed in this paper consists in the use of a type of tree grammars which can be “lifted”, i.e., a certain amount of control information is explicitlycoded in the trees, such that the resulting tree sets are amenable to formalizations in terms of tree automata and MSO logic. In par- ticular, we will use a restricted form of context-free tree grammars (CFTGs), namely monadic CFTGs which have an adequate descriptive complexity(see Section 2.3 below). Since the weak equivalence between TAGs and monadic CFTGs has independentlybeen proven byM¨ onnich [24] and Fujiyoshi and Kasai [12], CFTGs form an adequate basis for the following work. Finally, a second step is necessaryto remove the explicit control information from the trees to recover the linguisticallyintended structures. Recently, Jim Rogers has shown that tree-adjoining languages can be characterized in terms of a monadic second-order definition on the three- dimensional tree manifolds [30]. We plan to work out in a future paper the exact relationship between the introduction of a further tree dimension and the device of higher types in the specification of lifted vocabularies. 4 In fact, the desiderata Joshi enumerates for any formalism dealing with natural languages coined this terminology. 2 Morawietz and Monnich 2 Preliminaries 2.1 Universal Algebra Recall that for a given set of sorts S,amany-sorted alphabet Σ (over S) is an ∗ indexed family Σw,s | w ∈S ,s∈Sof disjoint sets. A symbol σ ∈ Σw,s is an operator of type w, s, arity w, sort s and rank |w|. The elements of Σε,s are also called constants (of sort s). In case S is a singleton set {s}, i.e., in case Σ is a single-sorted or ranked alphabet (over sort s), we usuallywrite Σ n to denote the (unique) set of operators of rank n ∈ N. 5 In later sections of the paper we will mainlyuse the single-sorted case of alphabets. We will indicate the need for many-sorted alphabets where necessary. For such a ranked alphabet Σ, we denote by T (Σ) the set of trees over Σ. T (Σ) is inductivelydefined with base case Σ 0 ⊆ T (Σ) and recursive step f(t1,...,tn) ∈ T (Σ) if f ∈ Σn and ti ∈ T (Σ) for i =1,...,n. Furthermore, we fix an indexed set X = {x1,x2,...} of variables and de- note by Xn the subset {x1,...,xn}. Variables are considered to be constants, i.e., operators of rank 0. For a ranked alphabet Σ the family T (Σ,X) is defined to be T (Σ(X)), where Σ(X) is the ranked alphabet with Σ(X)0 =Σ0 ∪X and Σ(X)n =Σn for every n = 0. A subset L of T (Σ) is called a tree language over Σ. Having described the tree terms, it remains to specifythe central notion of an algebra and to give a precise definition of the wayin which the operator symbols induce operations on an algebra. Suppose that Σ is a ranked alphabet. A Σ-algebra A is a pair A = (A, (fA)f∈Σ) where the set A is the carrier of the algebra and for each op- n erator f ∈ Σn,fA : A → A is an operation of arity n on A. Different algebras, defined over the same operator domain, are related to each other if there exists a mapping between their carriers that is compatible with the basic structural operations. AΣ-homomorphism of Σ-algebras h : A −→ B is a function h : A −→ B, such that h(fA(a1,...,an)) = fB(h(a1),...,h(an)) for everyoperator f of rank n n and for every n-tuple (a1,...,an) ∈ A . The set of trees T (Σ,X) can be made into a Σ-algebra T(Σ,X) bydefining the operations in the following way. For every f in Σn, for every( t1,...,tn) n in T (Σ,X) : fT(Σ,X)(t1,...,tn)=f(t1,...,tn). Everyvariable-free tree t ∈ T (Σ) has a value in everyΣ-algebra A.Itis the value at t of the unique homomorphism h : T(Σ) → A. The existence of a unique homomorphism from the Σ-algebra of trees into an arbitraryΣ-algebra A provides also the basis for the view that regards the 5 Note that for S = {s} each w, s∈S∗ ×S is of the form sn,s for some n ∈ N. 3 Morawietz and Monnich elements of T (Σ,Xn)asderived operations. Each tree t ∈ T (Σ,Xn) induces n an n-aryfunction tA : A → A. The meaning of this function tA is defined in the following way. For every n (a1,...,an) ∈ A : tA(a1,...,an)=ˆa(t), wherea ˆ : T(Σ,Xn) → A is the unique homomorphism witha ˆ(xi)=ai. In the particular case where A is the Σ-algebra T(Σ,Xm) of trees over Σ that contain at most variables from Xm = {x1,...,xm} at their leaves the unique homomorphism extending the assignment of a tree ti ∈ T (Σ,Xm)to x X t t ,...,t t t ,...,t the variable i in n acts as a substitution T(Σ,Xm)( 1 n)= [ 1 n] where the right hand side indicates the result of substituting ti for xi in t. 2.2 Tree Adjoining Grammar The main obstacle for the simple and direct use of MSO logic stems from the fact that linguistic theories allow non-context-free structures and therefore cannot be accommodated within the classical approach outlined in Rogers’ monograph [29]. In this section we will sketch a definition of tree adjoin- ing grammars following Vijay-Shanker and Weir [34] and Joshi and Schabes [16]. This formalism has a descriptive complexitywhich is higher than that of context-free grammars. Additionally, TAGs are a derivational formalism and, hence, a logical approach towards describing the resulting tree sets presents a further problem. Definition 2.1 (Tree Adjoining Grammar) A Tree Adjoining Grammar (TAG)isaquintupleVN ,VT ,S,I, A where VN is a finite set of nonterminals, VT a finite set of terminals, S ∈ VN the start symbol, I a finite set of initial trees and A a finite set of auxiliary trees.