The Semantics of Grammar Formalisms Seen as Computer Languages

The design, implementation, and use of grammar forma]isms for natural language have constituted a major branch of coml)utational linguistics throughout its development. By viewing grammar formalisms as just a special ease of computer languages, we can take advantage of the machinery of denotational semantics to provide a precise specification of their meaning. Using Dana Scott 's domain theory, we elucidate the nature of the feature systems used in augmented phrase-structure grammar formalisms, in particular those of recent versions of generalized phrase structure grammar, lexical functional grammar and PATRI1, and provide a (lcnotational semantics for a simple grammar formalism. We find that the mathematical structures developed for this purpose contain an operation of feature generalization, not available in those grammar formalisms, that can be used to give a partial account of the effect of coordination on syntactic features. 1. I n t r o d u c t i o n I The design, implementation, and use of grammar formalisms for natural lang,age have constituted a major branch of computational linguistics throughout its development. Itowever, notwithstanding the obvious superficial similarily between designing a grammar formalism and designing a programming language, the design techniques used for grammar formalisms have almost always fallen short with respect to those now available for programming language design. Formal and computational linguists most often explain the effect of a grammar formalism construct either by example or through its actual operation in a particular implementation. Such practices are frowned upon by most programming-language designers; they become even more dubious if one considers that most grammar formalisms in use are based either on a context-free skeleton with augmentations or on some closely related device (such as ATNs), consequently making them obvious candidates for IThe research reported in this paper has been made possible by a gift from the System Development Foundation. a declarative semantics z extended in the natural way from the declarative semantics of context-free grammars. The last point deserves amplification. Context-free grammars possess an obvious declarative semantics in which nonterminals represent sets of strings and rules represent n-ary relations over strings. This is brought out by the reinterpretation familiar from formal language theory of context-free grammars as polynomials over concatenation and set union. The grammar formalisms developed from the definite-clause subset of first order logic are the only others used in natural-language analysis that have been accorded a rigorous declarative semantics--in this case derived from the declarative semantics of logic programs [3,12,1 I]. Much confusion, wasted effort, and dissension have resulted from this state of affairs. In the absence of a rigorous semantics for a given grammar formalism, the user, critic, or implementer of the formalism risks misunderstanding the intended interpretation of a construct, and is in a poor position to compare it to alternatives. Likewise, the inventor of a new formalism can never be sure of how it compares with existing ones. As an example of these dillqculties, two simple changes in the implementation of the ATN formalism, the addition of a well-formed substring table and the use of a bottom-up parsing strategy, required a rather subtle and unanticipated reinterpretation of the register-testing and -setting actions, thereby imparting a different meaning to grammars that had been developed for initial top-down backtrack implementation [22]. Rigorous definitions of grammar formalisms can and should be made available. Looking at grammar formalisms as just a special case of computer languages, we can take advantage of the machinery of denotational semantics [20 i to provide a precise specification of their meaning. This approach can elucidate the structure of the data objects manipulated by a formalism and the mathematical relationships among various formalisms, suggest new possibilities for linguistic analysis (the subject matter of the formalisms), and establish connections between grammar formalisms and such other fields of research as programming2This use of the term "semantics" should not be confused with the more common usage denoting that portion of a grammar concerned with the meaning of object sentences. Here we are concerned with the meaning of the metalanguage.

[1]  Leonard Bolc,et al.  Natural Language Communication with Computers , 1978, Lecture Notes in Computer Science.

[2]  Joseph E. Stoy,et al.  Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory , 1981 .

[3]  Lauri Karttunen,et al.  Features and Values , 1984, ACL.

[4]  Fernando Pereira,et al.  The Formalism and Implementation of PATR-II , 1983 .

[5]  C. Pollard,et al.  Center for the Study of Language and Information , 2022 .

[6]  Fernando Pereira,et al.  Extraposition Grammars , 1981, CL.

[7]  David H. D. Warren,et al.  Parsing as Deduction , 1983, ACL.

[8]  David H. D. Warren,et al.  Definite Clause Grammars for Language Analysis - A Survey of the Formalism and a Comparison with Augmented Transition Networks , 1980, Artif. Intell..

[9]  Gordon D. Plotkin,et al.  A Powerdomain Construction , 1976, SIAM J. Comput..

[10]  H. B. Allen,et al.  A Functional Grammar , 1946 .

[11]  Michael B. Smyth Power Domains , 1978, J. Comput. Syst. Sci..

[12]  Stuart M. Shieber The design of a computer language for linguistic information , 1984 .

[13]  Robert A. Kowalski,et al.  The Semantics of Predicate Logic as a Programming Language , 1976, JACM.

[14]  Mitchell P. Marcus,et al.  D-Theory: Talking about Talking about Trees , 1983, ACL.

[15]  Michael Barlow,et al.  Developments in generalized phrase structure grammar , 1982 .

[16]  Geoffrey K. Pullum,et al.  Generalized phrase structure grammar : a theoretical synopsis , 1982 .

[17]  Dana S. Scott,et al.  Some Domain Theory and Denotational Semantics in Coq , 2009, TPHOLs.