TY - GEN
T1 - Decorated attribute grammars
T2 - 18th International Conference on Compiler Construction, CC 2009. Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009
AU - Kats, Lennart C L
AU - Sloane, Anthony M.
AU - Visser, Eelco
PY - 2009
Y1 - 2009
N2 - 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.
AB - 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.
UR - http://www.scopus.com/inward/record.url?scp=70350666814&partnerID=8YFLogxK
U2 - 10.1007/978-3-642-00722-4_11
DO - 10.1007/978-3-642-00722-4_11
M3 - Conference proceeding contribution
AN - SCOPUS:70350666814
SN - 9783642007217
T3 - Lecture Notes in Computer Science
SP - 142
EP - 157
BT - Compiler Construction
A2 - de Moor, Oege
A2 - Schwartzbach, Michael I.
PB - Springer, Springer Nature
CY - Berlin
Y2 - 22 March 2009 through 29 March 2009
ER -