AspectJML: modular specification and runtime checking for crosscutting contracts

Henrique Rebêlo, Gary T. Leavens, M. Bagherzadeh, Hridesh Rajan, R. Lima, D. M. Zimmerman, Márcio Cornélio, Thomas Thüm
{"title":"AspectJML: modular specification and runtime checking for crosscutting contracts","authors":"Henrique Rebêlo, Gary T. Leavens, M. Bagherzadeh, Hridesh Rajan, R. Lima, D. M. Zimmerman, Márcio Cornélio, Thomas Thüm","doi":"10.1145/2577080.2577084","DOIUrl":null,"url":null,"abstract":"Aspect-oriented programming (AOP) is a popular technique for modularizing crosscutting concerns. In this context, researchers have found that the realization of design by contract (DbC) is crosscutting and fares better when modularized by AOP. However, previous efforts aimed at supporting crosscutting contract modularity might actually compromise the main DbC principles. For example, in AspectJ-style, reasoning about the correctness of a method call may require a whole-program analysis to determine what advice applies and what that advice does relative to DbC implementation and checking. Also, when contracts are separated from classes a programmer may not know about them and may break them inadvertently. In this paper we solve these problems with AspectJML, a new specification language that supports crosscutting contracts for Java code. We also show how AspectJML supports the main DbC principles of modular reasoning and contracts as documentation.","PeriodicalId":357928,"journal":{"name":"Proceedings of the 13th international conference on Modularity","volume":"94 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-04-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"22","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 13th international conference on Modularity","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2577080.2577084","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 22

Abstract

Aspect-oriented programming (AOP) is a popular technique for modularizing crosscutting concerns. In this context, researchers have found that the realization of design by contract (DbC) is crosscutting and fares better when modularized by AOP. However, previous efforts aimed at supporting crosscutting contract modularity might actually compromise the main DbC principles. For example, in AspectJ-style, reasoning about the correctness of a method call may require a whole-program analysis to determine what advice applies and what that advice does relative to DbC implementation and checking. Also, when contracts are separated from classes a programmer may not know about them and may break them inadvertently. In this paper we solve these problems with AspectJML, a new specification language that supports crosscutting contracts for Java code. We also show how AspectJML supports the main DbC principles of modular reasoning and contracts as documentation.
AspectJML:横切契约的模块化规范和运行时检查
面向方面编程(AOP)是模块化横切关注点的一种流行技术。在这种情况下,研究人员发现契约式设计(DbC)的实现是横切的,并且当被AOP模块化时效果更好。然而,先前旨在支持横切契约模块化的努力实际上可能损害了DbC的主要原则。例如,在aspectj风格中,关于方法调用正确性的推理可能需要对整个程序进行分析,以确定应用了什么通知,以及该通知相对于DbC实现和检查做了什么。此外,当契约与类分离时,程序员可能不知道它们,并可能在无意中破坏它们。在本文中,我们用AspectJML解决了这些问题,AspectJML是一种新的规范语言,支持Java代码的横切契约。我们还展示了AspectJML如何支持模块化推理和契约的主要DbC原则作为文档。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术文献互助群
群 号:604180095
Book学术官方微信