Context-Oriented Programming and Modeling in Julia with Context Petri Nets

In the future, technical systems, e.g., cyber-physical systems will increasingly become adaptive to changing contexts. However, programming context-adaptive systems is challenging. The context-specific behavior as well as when contexts change their activeness must be specified. Common general-purpos...

Full description

Saved in:
Bibliographic Details
Published in:Proceedings (EUROMICRO Conference on Software Engineering and Advanced Applications. Online) pp. 1 - 9
Main Authors: Gutsche, Christian, Prokopets, Volodymyr, Wang, Zizhe, Gotz, Sebastian, ABmann, Uwe
Format: Conference Proceeding
Language:English
Published: IEEE 28.08.2024
Subjects:
ISSN:2376-9521
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:In the future, technical systems, e.g., cyber-physical systems will increasingly become adaptive to changing contexts. However, programming context-adaptive systems is challenging. The context-specific behavior as well as when contexts change their activeness must be specified. Common general-purpose object-oriented languages require encoding the context-specific behavior in if-cascades. Standard polymorphism is insufficient to express the changing behavior of objects in different contexts because the complexity rises with the combinatorial explosion of a large, potentially multi-dimensional context space. Moreover, specifying when contexts are active has to be implemented as part of the application logic. In conclusion, there are two problems: the definition of context-specific behavior and the management of context changes. In this paper, we present a framework for the Julia programming language to develop context-adaptive systems. The framework also enables context-adaptive equation-based modeling. For context management, Petri nets are utilized. Julia was chosen for the implementation due to its simulation ecosystem, rich metaprogramming, and multiple dispatch, which enables precise specification of behavioral variants. We evaluate our approach by using two examples. The first scenario is a smart home control application. The second example shows how our framework can be used together with equation-based modeling for simulation.
ISSN:2376-9521
DOI:10.1109/SEAA64295.2024.00011