Decorated attribute grammars: attribute evaluation meets strategic programming

Lennart C L Kats, Anthony M. Sloane, Eelco Visser

Research output: Chapter in Book/Report/Conference proceedingConference proceeding contributionpeer-review

25 Citations (Scopus)

Abstract

Attribute grammars are a powerful specification formalism for tree-based computation, particularly for software language processing. Various extensions have been proposed to abstract over common patterns in attribute grammar specifications. These include various forms of copy rules to support non-local dependencies, collection attributes, and expressing dependencies that are evaluated to a fixed point. Rather than implementing extensions natively in an attribute evaluator, we propose attribute decorators that describe an abstract evaluation mechanism for attributes, making it possible to provide such extensions as part of a library of decorators. Inspired by strategic programming, decorators are specified using generic traversal operators. To demonstrate their effectiveness, we describe how to employ decorators in name, type, and flow analysis.

Original languageEnglish
Title of host publicationCompiler Construction
Subtitle of host publication18th International Conference, CC 2009, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009, York, UK, March 22-29, 2009. Proceedings
EditorsOege de Moor, Michael I. Schwartzbach
Place of PublicationBerlin
PublisherSpringer, Springer Nature
Pages142-157
Number of pages16
ISBN (Electronic)9783642007224
ISBN (Print)9783642007217
DOIs
Publication statusPublished - 2009
Event18th International Conference on Compiler Construction, CC 2009. Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009 - York, United Kingdom
Duration: 22 Mar 200929 Mar 2009

Publication series

NameLecture Notes in Computer Science
PublisherSpringer Berlin Heidelberg
Volume5501
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Other

Other18th International Conference on Compiler Construction, CC 2009. Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009
Country/TerritoryUnited Kingdom
CityYork
Period22/03/0929/03/09

Fingerprint

Dive into the research topics of 'Decorated attribute grammars: attribute evaluation meets strategic programming'. Together they form a unique fingerprint.

Cite this