[Invited Talk] Generating Adaptations in Context-Oriented Programming using Reinforcement Learning Options
Self-adaptive software systems continuously adapt in response to internal and external changes in their execution environment, captured as contexts. The Context-oriented Programming (COP) paradigm posits a technique for the development of self-adaptive systems, capturing their main characteristics with specialized programming language constructs. In COP, adaptations are specified as independent modules that are composed in and out of the base system as contexts are activated and deactivated in response to sensed circumstances from the surrounding environment. However, the definition of adaptations, their contexts and associated specialized behavior, need to be specified at design time. In complex cyber physical systems this is intractable, if not impossible, due to new unpredicted operating conditions arising. In this paper, we propose Auto-COP, a new technique to enable generation of adaptations at run time. Auto-COP uses Reinforcement Learning (RL) options to build action sequences, based on the previous instances of the system execution (for example, actions enacted by human operators). Options are further explored in interaction with the environment, and the most suitable options for each context are used to generate adaptations exploiting the COP abstractions. To validate Auto-COP, we present two case studies exhibiting different system characteristics and application domains: a driving assistant and a robot delivery system. We present examples of Auto-COP code generated at run time, to illustrate the types of circumstances (contexts) requiring adaptation, and the corresponding generated adaptations for each context. We confirm that the generated adaptations exhibit correct system behavior measured by domain-specific performance metrics (e.g., conformance to specified speed limit), while reducing the number of required execution/actuation steps by a factor of two showing that the adaptations are regularly selected by the running system as adaptive behavior is more appropriate than the execution of primitive actions. Therefore, we demonstrate that Auto-COP is able to increase system adaptivity by enabling run-time generation of new adaptations for conditions detected at run time, while retaining the modularity offered by COP languages.
I have been working on adaptive systems for the last couple of years. Currently I am approaching adaptive systems from programming language perspective, working on development (programming language design), verification (partial, and incremental techniques), and application (smart environments, CPS, and IoT) of these systems.