Attribute and unification grammar are syntax-directed grammatical formalisms that bear an important resemblance to each other and, especially in the case of unification grammar, enjoy certain currency as tools for linguistic description. A systematic study and comparison of the two formalisms, however, has not been reported to date. This paper reviews and compares the two formalisms, both from the point of view of their notations and expressive capabilities, and from that of their underlying algebraic semantics. The key to the semantic comparison is an algebraic formulation of the semantics of unification and the algebraic semantics of attribute grammar developed by Chirica and Martin [6]. The main result is that, from the point of view of their definitions and semantics, attribute grammar is more general than unifieatiun grammar, since it rests on a richer semantic algebra. This greater generality has important implications regarding the expressive power of the formalism and the possibility of efficient computational implementations for it. Also regarding their semantics, it is revealed that attribute grammar, unlike unification grammar, does not restrict attribute values to their basic term interpretation. This is a double-edged sword which, on the one hand, makes attribute grammar expressive and computationaUy efficient and, on the other, makes it computationally difficult to implement, because of the so-called "attribute evaluation problem". For unification grammar, the noted restriction on term interpretations is at the heart of the difficulties encountered in implementing such linguistically motivated extensions to the basic formalism as negation and disjunction. The conclusion of this study is that attribute grammar is a better suited and more highly developed grammatical formalism for the description of natural and artificial languages, due to its greater generality, expressive power and, also importantly, more efficient computational implementations.
IntroductionAttribute grammar [29] is an elegant formalization of the augmented contextfree grammars found in most current natural language systems. It bears an important resemblance to the attribute-value of "complex-feature-based" approaches to language which rely on unification in their underlying interpretation [28,33]. While in attribute grammar (AG) attribute values and conditions are defined declaratively by a set of J.C. Baltzer AG, Science Publishers 74 N. Correa, Attribute and unification grammar attribution rules and conditions associated with each production in the grammar, and attribute evaluation is heavily dependent on the modes of the attributes and the data dependencies introduced by the rules used to define their values, in unificationbased formalisms (UG), unification of label-value structures serves the dual role of defining attribute values and conditions, and attribute evaluation amounts to the solution of a system of equations on the attribute-value structures, imposed by the particular derivation of the input string. Both form...