An expressive and modular layer activation mechanism for Context-Oriented Programming

被引:2
|
作者
Leger, Paul [1 ]
Cardozo, Nicolas [2 ]
Masuhara, Hidehiko [3 ]
机构
[1] Univ Catolica Norte, Escuela Ingeniria, Coquimbo, Chile
[2] Univ Andes, Syst & Comp Engn Dept, Bogota, Colombia
[3] Tokyo Inst Technol, Tokyo, Japan
关键词
Context -Oriented Programming; Activation mechanisms; EMA; LANGUAGE;
D O I
10.1016/j.infsof.2022.107132
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Context. There is a trend in the software industry towards building systems that dynamically adapt their behavior in response to their surrounding environment, given the proliferation of various technological devices, such as notebooks, smartphones, and wearables, capable of capturing their execution context. Context-oriented Programming (COP) allows developers to use layer abstractions to adapt software behavior to the context. A layer is associated with a context and can be dynamically activated in direct response to gathered information from its surrounding execution environment. However, most existing layer activation mechanisms have been tailored specifically to address a particular concern; implying that developers need to tweak layer definitions in contortive ways or create new specialized activation mechanisms altogether if their specific needs are not supported. Objective. Complementing ideas to expressively declare activation mechanism models with interfaces that define conditionals of activation mechanisms modularly, this paper proposes an Expressive and Modular Activation mechanism, named EMA. Method. To propose EMA, we analyze existing activation mechanisms in COP regarding activation features and scope strategies. After, we propose the design of EMA and validate it with a case study discussion. Results. Using a concrete JavaScript implementation of EMA, named EMAjs, we can implement two Web applications: a smartphone application as an example to illustrate EMAjs in action, and an application of home automation to discuss and compare our proposal. Conclusions. Our proposed mechanism allows developers to instantiate different activation scope strategies and interfaces to decouple the declaration of activation mechanism conditionals from the base code.
引用
收藏
页数:14
相关论文
共 50 条
  • [1] Push-based Reactive Layer Activation in Context-Oriented Programming
    Kamina, Tetsuo
    Aotani, Tomoyuki
    Masuhara, Hidehiko
    PROCEEDINGS OF THE 9TH INTERNATIONAL WORKSHOP ON CONTEXT-ORIENTED PROGRAMMING, 2017, : 17 - 21
  • [2] ReactCOP: Modular and ScalableWeb Development with Context-Oriented Programming
    Lorenz, David H.
    Shmuel, Ofir
    COMPANION PROCEEDINGS OF THE 2023 ACM SIGPLAN INTERNATIONAL CONFERENCE ON SYSTEMS, PROGRAMMING, LANGUAGES, AND APPLICATIONS: SOFTWARE FOR HUMANITY, SPLASH COMPANION 2023, 2023, : 63 - 64
  • [3] Context-oriented Programming
    Hirschfeld, Robert
    Costanza, Pascal
    Nierstrasz, Oscar
    JOURNAL OF OBJECT TECHNOLOGY, 2008, 7 (03): : 125 - 151
  • [4] Context-Oriented Behavioral Programming
    Elyasaf, Achiya
    Information and Software Technology, 2021, 133
  • [5] Context-Oriented Behavioral Programming
    Elyasaf, Achiya
    INFORMATION AND SOFTWARE TECHNOLOGY, 2021, 133
  • [6] An Introduction to Context-Oriented Programming with ContextS
    Hirschfeld, Robert
    Costanza, Pascal
    Haupt, Michael
    GENERATIVE AND TRANSFORMATIONAL TECHNIQUES IN SOFTWARE ENGINEERING II, 2008, 5235 : 396 - +
  • [7] Layer Modeling and Its Code Generation based on Context-oriented Programming
    Yamamoto, Chinatsu
    Tanigawa, Ikuta
    Hisazumi, Kenji
    Sato, Mikiko
    Ohkawa, Takeshi
    Ogura, Nobuhiko
    Watanabe, Harumi
    PROCEEDINGS OF THE 9TH INTERNATIONAL CONFERENCE ON MODEL-DRIVEN ENGINEERING AND SOFTWARE DEVELOPMENT (MODELSWARD), 2021, : 330 - 336
  • [8] TinyCORP: A Calculus for Context-Oriented Reactive Programming
    Kamina, Tetsuo
    Aotani, Tomoyuki
    PROCEEDINGS OF THE WORKSHOP ON CONTEXT-ORIENTED PROGRAMMING (COP'19), 2019, : 1 - 8
  • [9] A framework for analyzing context-oriented programming languages?
    Elyasaf, Achiya
    Cardozo, Nicolas
    Sturm, Arnon
    JOURNAL OF SYSTEMS AND SOFTWARE, 2023, 198
  • [10] Towards Runtime Adaptation in Context-Oriented Programming
    Han, Bo
    Zhao, Yinliang
    Zhu, Changpeng
    Zeng, Qinghua
    2013 10TH INTERNATIONAL CONFERENCE ON ELECTRICAL ENGINEERING, COMPUTING SCIENCE AND AUTOMATIC CONTROL (CCE), 2013, : 201 - 208