Advanced

Rewritable Reference Attributed Grammars - design, implementation, and applications

Ekman, Torbjörn LU (2004)
Abstract
This thesis presents an object-oriented technique for rewriting abstract syntax trees in order to simplify compilation. The technique, Rewritable Reference Attributed Grammars (ReRAGs), is completely declarative and supports both rewrites and computations by means of attributes. We have implemented ReRAGs in our aspect-oriented compiler compiler tool JastAdd II. We present the ReRAG formalism, its evaluation algorithm, and examples of its use. JastAdd II uses three synergistic mechanisms for supporting separation of concerns: inheritance for model modularization, aspects for cross-cutting concerns, and rewrites that allow computations to be expressed on the most suitable model. This allows compilers to be written in a high-level... (More)
This thesis presents an object-oriented technique for rewriting abstract syntax trees in order to simplify compilation. The technique, Rewritable Reference Attributed Grammars (ReRAGs), is completely declarative and supports both rewrites and computations by means of attributes. We have implemented ReRAGs in our aspect-oriented compiler compiler tool JastAdd II. We present the ReRAG formalism, its evaluation algorithm, and examples of its use. JastAdd II uses three synergistic mechanisms for supporting separation of concerns: inheritance for model modularization, aspects for cross-cutting concerns, and rewrites that allow computations to be expressed on the most suitable model. This allows compilers to be written in a high-level declarative and modular fashion, supporting language extensibility as well as reuse of modules for different compiler-related tools. Each technique is presented using a series of simplified examples from static semantic analysis for the Java programming language.

A case study is presented where ReRAGs are used extensively to implement a compiler for the Control Module extension to the IEC61131-3 automation languages. That Control Modules concept is further extended, in a modular fashion, with object-oriented features to improve encapsulation, composition mechanisms, code re-use, and type safety. (Less)
Please use this url to cite or link to this publication:
author
supervisor
organization
publishing date
type
Thesis
publication status
published
subject
pages
94 pages
project
PalCom
language
English
LU publication?
yes
id
9fd934fc-91a6-4635-8a38-292d092534ef (old id 919059)
date added to LUP
2008-01-28 11:45:38
date last changed
2016-09-19 08:45:16
@misc{9fd934fc-91a6-4635-8a38-292d092534ef,
  abstract     = {This thesis presents an object-oriented technique for rewriting abstract syntax trees in order to simplify compilation. The technique, Rewritable Reference Attributed Grammars (ReRAGs), is completely declarative and supports both rewrites and computations by means of attributes. We have implemented ReRAGs in our aspect-oriented compiler compiler tool JastAdd II. We present the ReRAG formalism, its evaluation algorithm, and examples of its use. JastAdd II uses three synergistic mechanisms for supporting separation of concerns: inheritance for model modularization, aspects for cross-cutting concerns, and rewrites that allow computations to be expressed on the most suitable model. This allows compilers to be written in a high-level declarative and modular fashion, supporting language extensibility as well as reuse of modules for different compiler-related tools. Each technique is presented using a series of simplified examples from static semantic analysis for the Java programming language. <br/><br>
A case study is presented where ReRAGs are used extensively to implement a compiler for the Control Module extension to the IEC61131-3 automation languages. That Control Modules concept is further extended, in a modular fashion, with object-oriented features to improve encapsulation, composition mechanisms, code re-use, and type safety.},
  author       = {Ekman, Torbjörn},
  language     = {eng},
  pages        = {94},
  title        = {Rewritable Reference Attributed Grammars - design, implementation, and applications},
  year         = {2004},
}