Context-Oriented Behavioral Programming

被引:13
作者
Elyasaf, Achiya [1 ]
机构
[1] Ben Gurion Univ Negev, Dept Software & Informat Syst Engn, Beer Sheva, Israel
关键词
Behavioral programming; Scenario-based programming; Programming paradigm; Context awareness; Context-oriented programming; Context-Oriented Behavioral Programming;
D O I
10.1016/j.infsof.2020.106504
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Context: Modern systems require programmers to develop code that dynamically adapts to different contexts, leading to the evolution of new context-oriented programming languages. These languages introduce new software-engineering challenges, such as: how to maintain the separation of concerns of the codebase? how to model the changing behaviors? how to verify the system behavior? and more. Objective: This paper introduces Context-Oriented Behavioral Programming (COBP) - a novel paradigm for developing context-aware systems, centered on natural and incremental specification of context-dependent behaviors. As the name suggests, we combine behavioral-programming (BP) - a scenario-based modeling paradigm - with context idioms that explicitly specify when scenarios are relevant and what information they need. The core idea is to connect the behavioral model with a data model that represents the context, allowing an intuitive connection between the models via update and select queries. Combining behavioral-programming with context-oriented programming brings the best of the two worlds, solving issues that arise when using each of the approaches in separation. Methods: We begin with providing abstract semantics for COBP and two implementations for the semantics, laying the foundations for applying reasoning algorithms to context-aware behavioral programs. Next, we exemplify the semantics with formal specifications of systems, including a variant of Conway's Game of Life. Then, we provide two case studies of real-life context-aware systems (one in robotics and another in IoT) that were developed using this tool. Throughout the examples and case studies, we provide design patterns and a methodology for coping with the above challenges. Results: The case studies show that the proposed approach is applicable for developing real-life systems, and presents measurable advantages over the alternatives - behavioral programming alone and context-oriented programming alone. Conclusion: We present a paradigm allowing programmers and system engineers to capture complex context-dependent requirements and align their code with such requirements.
引用
收藏
页数:19
相关论文
共 40 条
  • [1] Abowd GD, 1999, LECT NOTES COMPUT SC, V1707, P304
  • [2] [Anonymous], 2005, P DYN LANG S DLS 05
  • [3] Aotani Tomoyuki, 2011, P 3 CONT OR PROGR WO
  • [4] Asimov I., 1942, ASTOUNDING SCI FICTI, V29, P94
  • [5] Bar -Sinai M., 2019, PROC 59 ISR ANN C AE, P1407
  • [6] Bar-Sinai Michael, 2020, THESIS BEN GURION U
  • [7] Semantics for consistent activation in context-oriented systems
    Cardozo, Nicolas
    Gonzalez, Sebastian
    Mens, Kim
    Van Der Straeten, Ragnhild
    Vallejos, Jorge
    D'Hondt, Theo
    [J]. INFORMATION AND SOFTWARE TECHNOLOGY, 2015, 58 : 71 - 94
  • [8] Colledanchise M, 2017, ABS170900084 CORR
  • [9] Costanza P., 2008, P 12 INT C SOFTW PRO, P9
  • [10] LSCs: Breathing life into message sequence charts
    Damm, W
    Harel, D
    [J]. FORMAL METHODS IN SYSTEM DESIGN, 2001, 19 (01) : 45 - 80