Specifying transformation sequences as computation on program fragments with an abstract attribute grammar

M. Schordan, D. Quinlan
{"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.
使用抽象属性语法将转换序列指定为程序片段上的计算
我们提出了一种基于语法的方法,用于将转换指定为对中间表示进行操作的转换操作序列。转换序列在抽象属性语法的语义动作中指定。中间表示的面向对象设计与抽象语法之间的映射直接反映了语法结构中的面向对象设计。它具有允许在语言表示的任意抽象级别上使用基于语法的工具的属性。程序片段可以是源字符串,也可以是中间表示的片段,它们可以在规范中互换使用。我们通过使用可用的属性语法工具和用于指定和执行c++程序转换的源到源基础结构ROSE来演示该方法的适用性。使用定点算法的数据流分析工具的结果被集成为可用于启用或禁用转换序列的可用属性。使用抽象属性语法,转换被计算为表示重构操作序列的属性值。不同转换序列的组合允许子转换规范的重用。最后,我们讨论了允许基于模式的程序表示重构的重写工具的对应关系。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信