RACR: A Scheme Library for Reference Attribute Grammar Controlled Rewriting

This report presents RACR, a reference attribute grammar library for the programming language Scheme. RACR supports incremental attribute evaluation in the presence of abstract syntax tree rewrites. It provides a set of functions that can be used to specify abstract syntax tree schemes and their at...

Full description

Bibliographic Details
Main Author: Bürger, Christoff
Other Authors: Technische Universität Dresden, Fakultät Informatik
Format: Others
Language:English
Published: Saechsische Landesbibliothek- Staats- und Universitaetsbibliothek Dresden 2013
Subjects:
Online Access:http://nbn-resolving.de/urn:nbn:de:bsz:14-qucosa-104623
http://nbn-resolving.de/urn:nbn:de:bsz:14-qucosa-104623
http://www.qucosa.de/fileadmin/data/qucosa/documents/10462/RACR-A-Scheme-Library-for-Reference-Attribute-Grammar-Controlled-Rewriting.pdf
Description
Summary:This report presents RACR, a reference attribute grammar library for the programming language Scheme. RACR supports incremental attribute evaluation in the presence of abstract syntax tree rewrites. It provides a set of functions that can be used to specify abstract syntax tree schemes and their attribution and construct respective trees, query their attributes and node information and annotate and rewrite them. Thereby, both, reference attribute grammars and rewriting, are seamlessly integrated, such that rewrites can reuse attributes and attribute values change depending on performed rewrites – a technique we call Reference Attribute Grammar Controlled Rewriting. To reevaluate attributes influenced by abstract syntax tree rewrites, a demand-driven, incremental evaluation strategy, which incorporates the actual execution paths selected at runtime for control-flows within attribute equations, is used. To realize this strategy, a dynamic attribute dependency graph is constructed throughout attribute evaluation – a technique we call Dynamic Attribute Dependency Analyses. The report illustrates RACR's motivation, features, instantiation and usage. In particular its application programming interface is documented and exemplified. The report is a reference manual for RACR developers. Further, it presents RACR’s complete implementation and therefore provides a good foundation for readers interested into the details of reference attribute grammar controlled rewriting and dynamic attribute dependency analyses.