Title :
Specifying transformation sequences as computation on program fragments with an abstract attribute grammar
Author :
Schordan, Markus ; Quinlan, Daniel
Author_Institution :
Inst. of Comput. Languages, Vienna Univ. of Technol., Austria
fDate :
30 Sept.-1 Oct. 2005
Abstract :
We present a grammar based approach for specifying a transformation as a sequence of transformation operations that operate on an intermediate representation. The transformation sequence is specified in the semantic actions of an abstract attribute grammar. The mapping between the object-oriented design of the intermediate representation and the abstract grammar directly reflects the object-oriented design in the structure of the grammar. It has properties that permit utilizing grammar based tools at arbitrary abstraction levels of the language representation. The program fragments can be both source strings and fragments of the intermediate representation that can be used interchangeably in the specification. We demonstrate the applicability of the approach by using available attribute grammar tools and the source-to-source infrastructure ROSE for specifying and performing transformations of C+ + programs. The results of data flow analysis tools using fixed point algorithms is integrated as available attributes that can be used for enabling or disabling transformation sequences. With the abstract attribute grammar the transformation is computed as an attribute value that represents a sequence of restructure operations. The composition of different transformation sequences permits the reuse of sub-transformation specifications. Eventually we discuss the correspondence to rewrite tools permitting a pattern based restructuring of the program representation.
Keywords :
C++ language; attribute grammars; formal specification; graph grammars; object-oriented programming; programming language semantics; C+ + programs; ROSE; abstract attribute grammar; data flow analysis; fixed point algorithms; object-oriented design; pattern based restructuring; program representation; source-to-source infrastructure; transformation sequence specification; Algorithm design and analysis; Computer languages; Conferences; Data analysis; Laboratories; Large-scale systems; Libraries; Optimizing compilers; Scientific computing;
Conference_Titel :
Source Code Analysis and Manipulation, 2005. Fifth IEEE International Workshop on
Print_ISBN :
0-7695-2292-0
DOI :
10.1109/SCAM.2005.23