Abstract
Although Attribute Grammars were introduced long ago, their lack of expressiveness has resulted in limited use outside the domain of static language processing. With the new notion of Dynamic Attribute Grammars defined on top of Grammar Couples, we show that it is possible to extend this expressiveness and to describe computations on structures that are not just trees, but also on abstractions allowing for infinite structures. The result is a language that is comparable in power to most first-order functional languages, with a distinctive declarative character.
In this paper, we give a formal definition of Dynamic Attribute Grammars and show how to construct efficient visit-sequence-based evaluators for them, using traditional, well-established AG techniques (in our case, using the Fnc-2 system).
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Henk Alblas. Attribute evaluation methods. In Alblas and Melichar [2], pages 48–113.
Henk Alblas and Bořivoj Melichar, editors. Attribute Grammars, Applications and Systems, volume 545 of Lect. Notes in Comp. Sci., Prague, June 1991. Springer-Verlag.
Isabelle Attali. Compilation de programmes TYPOL par attributs sémantiques. PhD thesis, Université de Nice, April 1989.
John Boyland. Conditional attribute grammars. ACM Transactions on Programming Languages and Systems, 18(1):73–108, January 1996.
Bruno Courcelle and Paul Franchi-Zannettacci. Attribute Grammars and Recursive Program Schemes (i and ii). Theor. Comp. Sci., 17(2 and 3):163–191 and 235–257, 1982.
Pierre Deransart and Martin Jourdan, editors. Attribute Grammars and their Applications (WAGA), volume 461 of Lect. Notes in Comp. Sci., Paris, September 1990. Springer-Verlag.
Pierre Deransart, Martin Jourdan, and Bernard Lorho. Attribute Grammars: Definitions, Systems and Bibliography, volume 323 of Lect. Notes in Comp. Sci. Springer-Verlag, August 1988.
Joost Engelfriet. Attribute grammars: Attribute evaluation methods. In Bernard Lorho, editor, Methods and Tools for Compiler Construction, pages 103–138. Cambridge University Press, 1984.
Rodney Farrow. Automatic Generation of Fixed-point-finding Evaluators for Circular, but Well-defined, Attribute Grammars. In ACM SIGPLAN '86 Symp. on Compiler Construction, pages 85–98, Palo Alto, CA, June 1986.
Martin Jourdan. Des bienfaits de l'analyse statique sur la mise en œuvre des grammaires attribuées. Mémoire d'habilitation, Département de Mathématiques et d'Informatique, Université d'Orléans, April 1992.
Martin Jourdan and Didier Parigot. The Fnc-2 System User's Guide and Reference Manual. INRIA, Rocquencourt, 1.9 edition, 1993.
Martin Jourdan, Didier Parigot, Catherine Julié, Olivier Durin, and Carole Le Bellec. Design, implementation and evaluation of the FNC-2 attribute grammar system. In ACM SIGPLAN '90 Conf. on Programming Languages Design and Implementation, pages 209–222. White Plains, NY, June 1990. Published as ACM SIGPLAN Notices, volume 25, number 6.
Catherine Julié and Didier Parigot. Space Optimization in the FNC-2 Attribute Grammar System. In Deransart and Jourdan [6]., pages 29–45.
Uwe Kastens. Ordered attribute grammars. Acta Informatica, 13(3):229–256, 1980. See also: Bericht 7/78, Institut für Informatik II, University Karlsruhe (1978).
Donald E. Knuth. Semantics of context-free languages. Math. Systems Theory, 2(2):127–145, June 1968.
Stéphane Leibovitsch. Relations entre la sémantique dénotationnelle et les grammaires attribuées. Rapport de DEA, Université de Paris VII, September 1996.
Jukka Paakki. Attribute grammar paradigms — A high-level methodology in language implementation. ACM Computing Surveys, 27(2):196–255, June 1995.
Didier Parigot, Étienne Duris, Gilles Roussel, and Martin Jourdan. Attribute grammars: a declarative functional language. Rapport de recherche 2662, INRIA, October 1995. ftp://ftp.inria.fr/INRIA/publications/RR/RR-2662.ps.gz.
Didier Parigot, Etienne Duris, Gilles Roussel, and Martin Jourdan. Les grammaires attribuées: un langage fonctionnel déclaratif. In Journées Francophones des Langages Applicatifs 96, pages 263–279, Val-Morin, Québec, January 1996. Aussi dans les Actes des journées du GDR Programmation 95.
Didier Parigot, Gilles Roussel, Martin Jourdan, and Étienne Duris. Dynamic attribute grammars. Rapport de recherche 2881, INRIA, May 1996. ftp://ftp.inria.fr/INRIA/publications/RR/RR-2881.ps.gz.
S. Doaitse Swierstra and Harald H. Vogt. Higher Order Attribute Grammars. In Alblas and Melichar [2]., pages 256–296.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Parigot, D., Roussel, G., Jourdan, M., Duris, É. (1996). Dynamic Attribute Grammars. In: Kuchen, H., Doaitse Swierstra, S. (eds) Programming Languages: Implementations, Logics, and Programs. PLILP 1996. Lecture Notes in Computer Science, vol 1140. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61756-6_81
Download citation
DOI: https://doi.org/10.1007/3-540-61756-6_81
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61756-3
Online ISBN: 978-3-540-70654-0
eBook Packages: Springer Book Archive