lennart.cl

Decorated Attribute Grammars

Attribute Evaluation Meets Strategic Programming

Lennart C. L. Kats, Anthony M. Sloane, Eelco Visser. Decorated Attribute Grammars. Attribute Evaluation Meets Strategic Programming. In Compiler Construction (CC 2009), Volume 5501 of Lecture Notes in Computer Science, pages 142—157. Springer, March 2009. [pdf] [doi] [bib

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.

Presentation

Slides (PDF): Decorated Attribute Grammars.

More information

More information about this project can be found at the Aster project homepage.


[back to publications]