Return to search

RACR: A Scheme Library for Reference Attribute Grammar Controlled Rewriting: Developer Manual

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

Identiferoai:union.ndltd.org:DRESDEN/oai:qucosa:de:qucosa:25494
Date07 February 2013
CreatorsBürger, Christoff
PublisherTechnische Universität Dresden
Source SetsHochschulschriftenserver (HSSS) der SLUB Dresden
LanguageEnglish
Detected LanguageEnglish
Typedoc-type:workingPaper, info:eu-repo/semantics/workingPaper, doc-type:Text
Rightsinfo:eu-repo/semantics/openAccess
Relationurn:nbn:de:bsz:14-qucosa-79344, qucosa:24841

Page generated in 0.0021 seconds