Context-Oriented Behavioral Programming

05/05/2020
by   Achiya Elyasaf, et al.
0

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 and keep the separation of concerns of the codebase? how to model the changing behaviors? how to verify the system behavior? and more. 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. We begin with providing abstract semantics for COBP, laying the foundations for applying reasoning algorithms to context-aware behavioral programs. We then exemplify the semantics with formal specifications of systems, including a variant of Conway's Game of Life. Finally, we present a JavaScript-based implementation of the paradigm and 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.

READ FULL TEXT
research
06/03/2018

BPjs --- a framework for modeling reactive systems using a scripting language and BP

We describe some progress towards a new common framework for model drive...
research
04/30/2022

What Petri Net Obliges Us to Say

We identify and demonstrate a weakness of Petri Nets (PN) in specifying ...
research
10/30/2018

Research Issues in Mining User Behavioral Rules for Context-Aware Intelligent Mobile Applications

Context-awareness in smart mobile applications is a growing area of stud...
research
07/11/2020

Context-Aware Temporal Logic for Probabilistic Systems

In this paper, we introduce the context-aware probabilistic temporal log...
research
12/03/2019

A Formal Approach to the Engineering of Domain-Specific Distributed Systems

We review some results regarding specification, programming and verifica...
research
02/14/2020

Sub-method, partial behavioral reflection with Reflectivity: Looking back on 10 years of use

Context. Refining or altering existing behavior is the daily work of eve...

Please sign up or login with your details

Forgot password? Click here to reset