The declarative nature of implicit layer activation

Stefan Ramson, Jens Lincke, R. Hirschfeld
{"title":"The declarative nature of implicit layer activation","authors":"Stefan Ramson, Jens Lincke, R. Hirschfeld","doi":"10.1145/3117802.3117804","DOIUrl":null,"url":null,"abstract":"Context-oriented programming (cop) directly addresses context variability by providing dedicated language concepts: layers, units of modularity store context-dependent behavior. During runtime, layers can be applied dynamically depending on the current context of the program. Various activation means for layers have been proposed. Most of them require developers to model context switches explicitly. In contrast, implicit layer activation (ila) allows developers to bind the activation status of a layer to a boolean predicate. The associated layer stays automatically active as long as the given predicate evaluates to true. Despite its declarative semantics, ila is usually implemented in an imperative fashion. In this paper, we present and compare two implementation variants for ila in ContextJS: an imperative and a reactive implementation. Furthermore, we discuss their trade-offs regarding code complexity as well as runtime overhead.","PeriodicalId":162398,"journal":{"name":"Proceedings of the 9th ACM International Workshop on Context-Oriented Programming","volume":"63 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-06-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 9th ACM International Workshop on Context-Oriented Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3117802.3117804","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 7

Abstract

Context-oriented programming (cop) directly addresses context variability by providing dedicated language concepts: layers, units of modularity store context-dependent behavior. During runtime, layers can be applied dynamically depending on the current context of the program. Various activation means for layers have been proposed. Most of them require developers to model context switches explicitly. In contrast, implicit layer activation (ila) allows developers to bind the activation status of a layer to a boolean predicate. The associated layer stays automatically active as long as the given predicate evaluates to true. Despite its declarative semantics, ila is usually implemented in an imperative fashion. In this paper, we present and compare two implementation variants for ila in ContextJS: an imperative and a reactive implementation. Furthermore, we discuss their trade-offs regarding code complexity as well as runtime overhead.
隐式层激活的声明性
面向上下文的编程(cop)通过提供专门的语言概念直接处理上下文的可变性:层、模块化单元存储与上下文相关的行为。在运行时,可以根据程序的当前上下文动态地应用层。提出了各种层的激活方法。它们中的大多数都要求开发人员显式地对上下文切换建模。相反,隐式层激活(ila)允许开发人员将层的激活状态绑定到布尔谓词。只要给定谓词的计算结果为true,关联层就会自动保持活动状态。尽管ila具有声明性语义,但它通常以命令式的方式实现。在本文中,我们提出并比较了在ContextJS中实现ila的两种变体:命令式实现和响应式实现。此外,我们还讨论了它们在代码复杂性和运行时开销方面的权衡。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信