面向方面程序中模块化推理的类型安全编织

E. Bodden
{"title":"面向方面程序中模块化推理的类型安全编织","authors":"E. Bodden","doi":"10.1145/2162010.2162012","DOIUrl":null,"url":null,"abstract":"In previous work, we and others have studied how aspects can implement important cross-cutting concerns, such as runtime monitors, security monitors, and other security primitives. It is hard to design aspects that implement such concerns correctly. Therefore, once written, one desires to reuse the according aspect definitions for other systems. In current aspect-oriented systems, however, aspects usually carry, through their pointcuts, explicit references to the base code. Those references are fragile and give up important software engineering properties such as modular reasoning and independent evolution of aspects and base code, hence hindering aspect reuse. A well-studied solution to this problem is to separate base code and aspects using an intermediate interface abstraction.\n In this keynote talk, I will show that previous approaches to solving the problem for AspectJ fail at restoring modular reasoning because they do not provide modular type checking; programs can fail to compose when woven, even though their interfaces are compatible. As I will show, the approaches fail for different reasons. Some represent join points as structs or objects, which breaks lexical scoping. Others lack important information in join point type descriptors, which precludes Java-like typing guarantees.\n I will report on a novel abstraction called Join Point Interfaces (JPIs), which, by design, supports modular reasoning and independent evolution by providing a modular typechecking algorithm. JPIs further offer polymorphic dispatch on join points, with an advice-dispatch semantics akin to multi-methods. As I will show, our semantics solves important problems present in previous approaches to advice dispatch.\n We have fully implemented JPIs as an open-source extension to the AspectBench Compiler. A study on existing aspect-oriented programs of varying sizes and domains supports our major design choices and reveals potential for exploiting polymorphism through non-trivial join-point type hierarchies. However, as the study also reveals, our current language design is not yet perfect, and thus further work is needed.","PeriodicalId":245301,"journal":{"name":"Workshop on Foundations of Aspect-Oriented Languages","volume":"43 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2012-03-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Towards typesafe weaving for modular reasoning in aspect-oriented programs\",\"authors\":\"E. Bodden\",\"doi\":\"10.1145/2162010.2162012\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"In previous work, we and others have studied how aspects can implement important cross-cutting concerns, such as runtime monitors, security monitors, and other security primitives. It is hard to design aspects that implement such concerns correctly. Therefore, once written, one desires to reuse the according aspect definitions for other systems. In current aspect-oriented systems, however, aspects usually carry, through their pointcuts, explicit references to the base code. Those references are fragile and give up important software engineering properties such as modular reasoning and independent evolution of aspects and base code, hence hindering aspect reuse. A well-studied solution to this problem is to separate base code and aspects using an intermediate interface abstraction.\\n In this keynote talk, I will show that previous approaches to solving the problem for AspectJ fail at restoring modular reasoning because they do not provide modular type checking; programs can fail to compose when woven, even though their interfaces are compatible. As I will show, the approaches fail for different reasons. Some represent join points as structs or objects, which breaks lexical scoping. Others lack important information in join point type descriptors, which precludes Java-like typing guarantees.\\n I will report on a novel abstraction called Join Point Interfaces (JPIs), which, by design, supports modular reasoning and independent evolution by providing a modular typechecking algorithm. JPIs further offer polymorphic dispatch on join points, with an advice-dispatch semantics akin to multi-methods. As I will show, our semantics solves important problems present in previous approaches to advice dispatch.\\n We have fully implemented JPIs as an open-source extension to the AspectBench Compiler. A study on existing aspect-oriented programs of varying sizes and domains supports our major design choices and reveals potential for exploiting polymorphism through non-trivial join-point type hierarchies. However, as the study also reveals, our current language design is not yet perfect, and thus further work is needed.\",\"PeriodicalId\":245301,\"journal\":{\"name\":\"Workshop on Foundations of Aspect-Oriented Languages\",\"volume\":\"43 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2012-03-26\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Workshop on Foundations of Aspect-Oriented Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/2162010.2162012\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Workshop on Foundations of Aspect-Oriented Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2162010.2162012","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

在以前的工作中,我们和其他人已经研究了方面如何实现重要的横切关注点,例如运行时监视器、安全监视器和其他安全原语。很难设计正确实现这些关注点的方面。因此,一旦编写完成,人们就会希望在其他系统中重用相应的方面定义。然而,在当前面向方面的系统中,方面通常通过其切入点携带对基本代码的显式引用。这些引用是脆弱的,并且放弃了重要的软件工程属性,例如模块推理和方面和基本代码的独立演化,因此阻碍了方面的重用。针对这个问题,一个经过充分研究的解决方案是使用中间接口抽象来分离基代码和方面。在这个主题演讲中,我将展示以前解决AspectJ问题的方法在恢复模块推理方面失败,因为它们没有提供模块类型检查;即使程序的接口是兼容的,它们在编织时也可能无法组合。正如我将展示的,这些方法由于不同的原因而失败。有些将连接点表示为结构或对象,这打破了词法作用域。其他连接点类型描述符中缺少重要信息,这就排除了类似java的类型保证。我将报告一种称为连接点接口(jpi)的新颖抽象,它通过提供模块化类型检查算法,在设计上支持模块化推理和独立演化。jpa进一步在连接点上提供多态分派,其建议分派语义类似于多方法。正如我将展示的,我们的语义解决了以前的通知分派方法中存在的重要问题。我们已经完全实现了JPIs作为AspectBench编译器的开源扩展。对现有不同规模和领域的面向方面程序的研究支持了我们的主要设计选择,并揭示了通过重要的连接点类型层次结构利用多态性的潜力。然而,正如这项研究也揭示的那样,我们目前的语言设计还不完善,因此需要进一步的工作。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Towards typesafe weaving for modular reasoning in aspect-oriented programs
In previous work, we and others have studied how aspects can implement important cross-cutting concerns, such as runtime monitors, security monitors, and other security primitives. It is hard to design aspects that implement such concerns correctly. Therefore, once written, one desires to reuse the according aspect definitions for other systems. In current aspect-oriented systems, however, aspects usually carry, through their pointcuts, explicit references to the base code. Those references are fragile and give up important software engineering properties such as modular reasoning and independent evolution of aspects and base code, hence hindering aspect reuse. A well-studied solution to this problem is to separate base code and aspects using an intermediate interface abstraction. In this keynote talk, I will show that previous approaches to solving the problem for AspectJ fail at restoring modular reasoning because they do not provide modular type checking; programs can fail to compose when woven, even though their interfaces are compatible. As I will show, the approaches fail for different reasons. Some represent join points as structs or objects, which breaks lexical scoping. Others lack important information in join point type descriptors, which precludes Java-like typing guarantees. I will report on a novel abstraction called Join Point Interfaces (JPIs), which, by design, supports modular reasoning and independent evolution by providing a modular typechecking algorithm. JPIs further offer polymorphic dispatch on join points, with an advice-dispatch semantics akin to multi-methods. As I will show, our semantics solves important problems present in previous approaches to advice dispatch. We have fully implemented JPIs as an open-source extension to the AspectBench Compiler. A study on existing aspect-oriented programs of varying sizes and domains supports our major design choices and reveals potential for exploiting polymorphism through non-trivial join-point type hierarchies. However, as the study also reveals, our current language design is not yet perfect, and thus further work is needed.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信