{"title":"Specifying transformation sequences as computation on program fragments with an abstract attribute grammar","authors":"M. Schordan, D. Quinlan","doi":"10.1109/SCAM.2005.23","DOIUrl":null,"url":null,"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.","PeriodicalId":394744,"journal":{"name":"Fifth IEEE International Workshop on Source Code Analysis and Manipulation (SCAM'05)","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2005-09-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Fifth IEEE International Workshop on Source Code Analysis and Manipulation (SCAM'05)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SCAM.2005.23","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9
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.