在编译器开发中使用面向方面的关注点分离

Xiaoqing Wu, B. Bryant, Jeffrey G. Gray, Suman Roychoudhury, M. Mernik
{"title":"在编译器开发中使用面向方面的关注点分离","authors":"Xiaoqing Wu, B. Bryant, Jeffrey G. Gray, Suman Roychoudhury, M. Mernik","doi":"10.1145/1141277.1141646","DOIUrl":null,"url":null,"abstract":"A major difficulty in compiler development regards the proper modularization of concerns among the various compiler phases. The traditional object-oriented development paradigm has difficulty in providing an optimal solution towards modularizing the analysis phases of compiler development, because implementation of each phase often crosscuts the class hierarchy defined by language syntax constructs. Object-oriented design patterns, such as the Visitor pattern, also cannot solve the crosscutting problem adequately because an object is not a natural representation of a collection of operations. This paper demonstrates the benefits of applying aspect-oriented programming languages (e.g., AspectJ) and principles to compiler design and implementation. The experience result shows that the various language constructs in AspectJ (e.g., inter-type declaration, pointcut-advice model, static aspect members and aspect inheritance) fit well with the various computation needs of compiler development, which results in a compiler implementation with improved modularity and better separation of concerns. The ideas utilized in this paper can also be generalized to other software systems with a tree-like structure.","PeriodicalId":269830,"journal":{"name":"Proceedings of the 2006 ACM symposium on Applied computing","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2006-04-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"11","resultStr":"{\"title\":\"Separation of concerns in compiler development using aspect-orientation\",\"authors\":\"Xiaoqing Wu, B. Bryant, Jeffrey G. Gray, Suman Roychoudhury, M. Mernik\",\"doi\":\"10.1145/1141277.1141646\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"A major difficulty in compiler development regards the proper modularization of concerns among the various compiler phases. The traditional object-oriented development paradigm has difficulty in providing an optimal solution towards modularizing the analysis phases of compiler development, because implementation of each phase often crosscuts the class hierarchy defined by language syntax constructs. Object-oriented design patterns, such as the Visitor pattern, also cannot solve the crosscutting problem adequately because an object is not a natural representation of a collection of operations. This paper demonstrates the benefits of applying aspect-oriented programming languages (e.g., AspectJ) and principles to compiler design and implementation. The experience result shows that the various language constructs in AspectJ (e.g., inter-type declaration, pointcut-advice model, static aspect members and aspect inheritance) fit well with the various computation needs of compiler development, which results in a compiler implementation with improved modularity and better separation of concerns. The ideas utilized in this paper can also be generalized to other software systems with a tree-like structure.\",\"PeriodicalId\":269830,\"journal\":{\"name\":\"Proceedings of the 2006 ACM symposium on Applied computing\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2006-04-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"11\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 2006 ACM symposium on Applied computing\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/1141277.1141646\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 2006 ACM symposium on Applied computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1141277.1141646","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 11

摘要

编译器开发中的一个主要困难是如何在不同的编译器阶段之间适当地进行模块化。传统的面向对象开发范式很难为模块化编译器开发的分析阶段提供最佳解决方案,因为每个阶段的实现经常横切由语言语法构造定义的类层次结构。面向对象的设计模式,如访问者模式,也不能充分解决横切问题,因为对象不是操作集合的自然表示。本文演示了应用面向方面编程语言(例如,AspectJ)的好处,以及编译器设计和实现的原则。经验结果表明,AspectJ中的各种语言结构(例如,类型间声明、切入点通知模型、静态方面成员和方面继承)很好地适应了编译器开发的各种计算需求,从而使编译器实现具有改进的模块化和更好的关注点分离。本文所采用的思想也可以推广到其他具有树状结构的软件系统中。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Separation of concerns in compiler development using aspect-orientation
A major difficulty in compiler development regards the proper modularization of concerns among the various compiler phases. The traditional object-oriented development paradigm has difficulty in providing an optimal solution towards modularizing the analysis phases of compiler development, because implementation of each phase often crosscuts the class hierarchy defined by language syntax constructs. Object-oriented design patterns, such as the Visitor pattern, also cannot solve the crosscutting problem adequately because an object is not a natural representation of a collection of operations. This paper demonstrates the benefits of applying aspect-oriented programming languages (e.g., AspectJ) and principles to compiler design and implementation. The experience result shows that the various language constructs in AspectJ (e.g., inter-type declaration, pointcut-advice model, static aspect members and aspect inheritance) fit well with the various computation needs of compiler development, which results in a compiler implementation with improved modularity and better separation of concerns. The ideas utilized in this paper can also be generalized to other software systems with a tree-like structure.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
File system framework for organizing sensor networks Editorial message: special track on operating systems and adaptive applications Simplifying transformation of software architecture constraints Session details: Software engineering: sound solutions for the 21st century To infinity and beyond or, avoiding the infinite in security protocol analysis
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1