21 |
RACR: A Scheme Library for Reference Attribute Grammar Controlled Rewriting: Developer ManualBürger, Christoff 07 February 2013 (has links)
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.:1. Introduction
1.1. RACR is Expressive, Elegant, Ecient, Flexible and Reliable
1.2. Structure of the Manual
2. Library Overview
2.1. Architecture
2.2. Instantiation
2.3. API
3. Abstract Syntax Trees
3.1. Specification
3.2. Construction
3.3. Traversal
3.4. Node Information
4. Attribution
4.1. Specification
4.2. Evaluation and Querying
5. Rewriting
5.1. Primitive Rewrite Functions
5.2. Rewrite Strategies
6. AST Annotations
6.1. Attachment
6.2. Querying
7. Support API
A. RACR Source Code
B. MIT License
API Index
|
Page generated in 0.052 seconds