File Information
File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/intro/84/p84-1027_intro.xml
Size: 6,242 bytes
Last Modified: 2025-10-06 14:04:26
<?xml version="1.0" standalone="yes"?> <Paper uid="P84-1027"> <Title>The Semantics of Grammar Formalisms Seen as Computer Languages</Title> <Section position="3" start_page="0" end_page="123" type="intro"> <SectionTitle> 1. Introduction I </SectionTitle> <Paragraph position="0"> 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.</Paragraph> <Paragraph position="1"> 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.</Paragraph> <Paragraph position="2"> a declarative semantics z extended in the natural way from the declarative semantics of context-free grammars.</Paragraph> <Paragraph position="3"> 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\].</Paragraph> <Paragraph position="4"> 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\].</Paragraph> <Paragraph position="5"> 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 &quot;semantics&quot; 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.</Paragraph> <Paragraph position="6"> language design and theories of abstract data types. This last point is particularly interesting because it opens up several possibilities--among them that of imposing a type discipline on the use of a formalism, with all the attendant advantages of compile-time error checking, modularity, and optimized compilation techniques for grammar rules, and that of relating grammar formalisms to other knowledge representation languages \[l\].</Paragraph> <Paragraph position="7"> As a specific contribution of this study, 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 (GPSG) \[5,15\], lexical functional grammar (LFG) \[2\] and PATR-II \[ 18,17\]; 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.</Paragraph> <Paragraph position="8"> Just as studies in the semantics of programming languages start by giving semantics for simple languages, so we will start with simple grammar formalisms that capture the essence of the method without an excess of obscuring detail. The present enterprise should be contrasted with studies of the generative capacity of formalisms using the techniques of formal language theory. First, a precise defini!;ion of the semantics of a formalism is a prerequisite for such generative-capacity studies, and this is precisely what we are trying to provide. Second, generative capacity is a very coarse gauge: in particular, it does not distinguish among different formalisms with the same generative capacity that may, however, have very different semantic accounts. Finally, the tools of formal language theory are inadequate to describe at a sufficiently abstract level formalisms that are based on the simultaneous solution of sets of constraints \[9,10\]. An abstract analysis of those formalisms requires a notion of partial information that is precisely captured by the constructs of denotationai semantics.</Paragraph> </Section> class="xml-element"></Paper>