On-Demand Layer Activation for Type-Safe Deactivation

T. Kamina, Tomoyuki Aotani, Atsushi Igarashi
{"title":"On-Demand Layer Activation for Type-Safe Deactivation","authors":"T. Kamina, Tomoyuki Aotani, Atsushi Igarashi","doi":"10.1145/2637066.2637070","DOIUrl":null,"url":null,"abstract":"Dynamic layer deactivation in context-oriented programming (COP) allows a layer to be dynamically disabled in the running application in a disciplined way. Deactivating a layer may lead to an error if there is another layer which has been activated but depends on the deactivated layer in the sense that the latter calls a method that exists only in the former. A type system or static analysis might be able to check the absence of such depending layers at each deactivation point but it would not be very easy, especially in the open-world setting. We argue that the on-demand activation, which implicitly activates all layers on which currently activated layer depends, addresses this problem. In this mechanism, the precedent layer deactivation is canceled when the depending layer requires the implementation of the deactivated layer. This means that this mechanism can ensure that all method calls succeed without performing the checks of absent depending layers, which simplifies the type system. We formalize this idea as an extension of ContextFJ, a COP extension of Featherweight Java, and prove its type soundness.","PeriodicalId":434800,"journal":{"name":"Proceedings of 6th ACM International Workshop on Context-Oriented Programming","volume":"2 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-07-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"8","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of 6th ACM International Workshop on Context-Oriented Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2637066.2637070","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 8

Abstract

Dynamic layer deactivation in context-oriented programming (COP) allows a layer to be dynamically disabled in the running application in a disciplined way. Deactivating a layer may lead to an error if there is another layer which has been activated but depends on the deactivated layer in the sense that the latter calls a method that exists only in the former. A type system or static analysis might be able to check the absence of such depending layers at each deactivation point but it would not be very easy, especially in the open-world setting. We argue that the on-demand activation, which implicitly activates all layers on which currently activated layer depends, addresses this problem. In this mechanism, the precedent layer deactivation is canceled when the depending layer requires the implementation of the deactivated layer. This means that this mechanism can ensure that all method calls succeed without performing the checks of absent depending layers, which simplifies the type system. We formalize this idea as an extension of ContextFJ, a COP extension of Featherweight Java, and prove its type soundness.
类型安全停用的按需层激活
面向上下文编程(COP)中的动态层停用允许在运行的应用程序中以有规则的方式动态禁用层。如果存在另一个已激活但依赖于已激活层的层,则停用一个层可能导致错误,因为后者调用仅存在于前者中的方法。类型系统或静态分析可能能够在每个停用点检查这些依赖层的缺失,但这并不容易,特别是在开放世界设置中。我们认为,按需激活,隐式激活当前激活层所依赖的所有层,解决了这个问题。在这种机制中,当依赖层需要实现取消激活层时,取消先前层的取消激活。这意味着该机制可以确保所有方法调用都成功,而无需执行缺失依赖层的检查,从而简化了类型系统。我们将此想法形式化为ContextFJ的扩展,ContextFJ是轻量级Java的COP扩展,并证明其类型的正确性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信