Dynamic Attribute Grammars

Extended Abstract
  • Didier Parigot
  • Gilles Roussel
  • Martin Jourdan
  • Étienne Duris
Progam Analysis
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1140)


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).


Attribute Grammars static analysis implementation dynamic semantics applicative programming 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Henk Alblas. Attribute evaluation methods. In Alblas and Melichar [2], pages 48–113.Google Scholar
  2. 2.
    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.Google Scholar
  3. 3.
    Isabelle Attali. Compilation de programmes TYPOL par attributs sémantiques. PhD thesis, Université de Nice, April 1989.Google Scholar
  4. 4.
    John Boyland. Conditional attribute grammars. ACM Transactions on Programming Languages and Systems, 18(1):73–108, January 1996.Google Scholar
  5. 5.
    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.Google Scholar
  6. 6.
    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.Google Scholar
  7. 7.
    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.Google Scholar
  8. 8.
    Joost Engelfriet. Attribute grammars: Attribute evaluation methods. In Bernard Lorho, editor, Methods and Tools for Compiler Construction, pages 103–138. Cambridge University Press, 1984.Google Scholar
  9. 9.
    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.Google Scholar
  10. 10.
    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.Google Scholar
  11. 11.
    Martin Jourdan and Didier Parigot. The Fnc-2 System User's Guide and Reference Manual. INRIA, Rocquencourt, 1.9 edition, 1993.Google Scholar
  12. 12.
    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.Google Scholar
  13. 13.
    Catherine Julié and Didier Parigot. Space Optimization in the FNC-2 Attribute Grammar System. In Deransart and Jourdan [6]., pages 29–45.Google Scholar
  14. 14.
    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).Google Scholar
  15. 15.
    Donald E. Knuth. Semantics of context-free languages. Math. Systems Theory, 2(2):127–145, June 1968.Google Scholar
  16. 16.
    Stéphane Leibovitsch. Relations entre la sémantique dénotationnelle et les grammaires attribuées. Rapport de DEA, Université de Paris VII, September 1996.Google Scholar
  17. 17.
    Jukka Paakki. Attribute grammar paradigms — A high-level methodology in language implementation. ACM Computing Surveys, 27(2):196–255, June 1995.Google Scholar
  18. 18.
    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.Google Scholar
  19. 19.
    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. Google Scholar
  20. 20.
    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.Google Scholar
  21. 21.
    S. Doaitse Swierstra and Harald H. Vogt. Higher Order Attribute Grammars. In Alblas and Melichar [2]., pages 256–296.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Didier Parigot
    • 2
  • Gilles Roussel
    • 1
  • Martin Jourdan
    • 2
  • Étienne Duris
    • 2
  1. 1.Projet OSCARINRIALe Chesnay CedexFrance
  2. 2.Université de Marne-la-ValléeNoisy-le-GrandFrance

Personalised recommendations