Attribute Grammars and Their Applications

Author(s):  
Krishnaprasad Thirunarayan

Attribute grammars are a framework for defining semantics of programming languages in a syntax-directed fashion. In this chapter, we define attribute grammars, and then illustrate their use for language definition, compiler generation, definite clause grammars, design and specification of algorithms, and so forth. Our goal is to emphasize its role as a tool for design, formal specification and implementation of practical systems, so our presentation is example rich.

2005 ◽  
Vol 5 (4-5) ◽  
pp. 467-501 ◽  
Author(s):  
HENNING CHRISTIANSEN

A grammar formalism based upon CHR is proposed analogously to the way Definite Clause Grammars are defined and implemented on top of Prolog. These grammars execute as robust bottom-up parsers with an inherent treatment of ambiguity and a high flexibility to model various linguistic phenomena. The formalism extends previous logic programming based grammars with a form of context-sensitive rules and the possibility to include extra-grammatical hypotheses in both head and body of grammar rules. Among the applications are straightforward implementations of Assumption Grammars and abduction under integrity constraints for language analysis. CHR grammars appear as a powerful tool for specification and implementation of language processors and may be proposed as a new standard for bottom-up grammars in logic programming.


1981 ◽  
Vol 10 (105) ◽  
Author(s):  
David A. Watt

<p>Two new formalisms are introduced: extended attribute grammars, which are capable of defining completely the syntax of programming languages, and extended attributed trans!ation grammars, which are additionally capable of defining their semantics by translation. These grammars are concise and readable, and their suitability for language definition is demonstrated by a realistic example. The suitability of a large class of these grammars for compiler construction is also established, by borrowing the techniques already developed for attribute grammars and affix grammars.</p><p>Revised version of Glasgow Report No.10</p>


Author(s):  
Ash Asudeh ◽  
Gianluca Giorgolo

This book presents a theory of enriched meanings for natural language interpretation. Certain expressions that exhibit complex effects at the semantics/pragmatics boundary live in an enriched meaning space while others live in a more basic meaning space. These basic meanings are mapped to enriched meanings just when required compositionally, which avoids generalizing meanings to the worst case. The theory is captured formally using monads, a concept from category theory. Monads are also prominent in functional programming and have been successfully used in the semantics of programming languages to characterize certain classes of computation. They are used here to model certain challenging linguistic computations at the semantics/pragmatics boundary. Part I presents some background on the semantics/pragmatics boundary, informally presents the theory of enriched meanings, reviews the linguistic phenomena of interest, and provides the necessary background on category theory and monads. Part II provides novel compositional analyses of the following phenomena: conventional implicature, substitution puzzles, and conjunction fallacies. Part III explores the prospects of combining monads, with particular reference to these three cases. The authors show that the compositional properties of monads model linguistic intuitions about these cases particularly well. The book is an interdisciplinary contribution to Cognitive Science: These phenomena cross not just the boundary between semantics and pragmatics, but also disciplinary boundaries between Linguistics, Philosophy and Psychology, three of the major branches of Cognitive Science, and are here analyzed with techniques that are prominent in Computer Science, a fourth major branch. A number of exercises are provided to aid understanding, as well as a set of computational tools (available at the book's website), which also allow readers to develop their own analyses of enriched meanings.


1980 ◽  
Vol 3 (1) ◽  
pp. 105-116
Author(s):  
Bruno Courcelle ◽  
Jean-Claude Raoult

We give a completion theorem for ordered magmas (i.e. ordered algebras with monotone operations) in a general form. Particular instances of this theorem are already known, and new results follow. The semantics of programming languages is the motivation of such investigations.


Sign in / Sign up

Export Citation Format

Share Document