Forschungsprojekte

RACR - A Scheme Library for Reference Attribute Grammar Controlled Rewriting

RACR is a Scheme attribute grammar library providing incremental attribute evaluation in the presence of arbitrary 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 realise this strategy, a dynamic attribute dependency graph is constructed throughout attribute evaluation - a technique we call Dynamic Attribute Dependency Analyses.

Besides synthesised and inherited attributes, RACR supports reference, parameterised and circular attributes, attribute broadcasting and abstract syntax tree and attribute inheritance. Since RACR is an ordinary Scheme library, its functions can arbitrarily interact with Scheme programs and vice versa. To implement attribute equations, users reuse or develop ordinary Scheme functions with arbitrary control-flows, function calls, macro expansions and continuations. The required bookkeeping for incremental attribute evaluation is transparently and automatically performed and cannot be bypassed or disturbed.

RACR hompage: http://code.google.com/p/racr/

Zu dieser Seite

Sebastian Götz
Letzte Änderung: 12.07.2016