This paper will be presented at The 11th International Workshop on Context-Oriented Programming and Advanced Modularity (COP), at ECOOP 2019 - 15-19 July 2019 - Hammersmith, London, United Kingdom.
We implemented a feature-based context-oriented programming language, which clearly separates the notion of contexts from the notion of features. Contexts reify particular situations occurring in the surrounding environment, to which a software system can adapt. Features reify the system's behaviour; they are the language components that describe the system's functionality at a fine-grained level. Contexts are mapped to features, such that, when certain contexts become active at run-time, the corresponding features get selected and activated, thus adapting the system's functionality to those particular contexts.
In this paper we show the object-oriented architecture, design and implementation issues of such a feature-based context-oriented programming language, which we implemented on top of the Ruby programming language. An important part of our language design is the explicit representation of contexts and features in terms of hierarchical tree structures that capture the structural constraints to be maintained at runtime. We illustrate our language design with a small example of a feature-based context-oriented program written in this language.
About the authors :
Benoît Duhoux is a teaching assistant and researcher in INGI, at UCLouvain in Belgium. He is member of the RELEASeD Laboratory. He currently works on how to reconcile Context-Oriented Programming and User Interface Adaptation.
Kim Mens, is full Professor in Computer Science at the Université catholique de Louvain (UCL), Belgium where he leads the REsearch Laboratory on software Evolution And Software Development technology (RELEASeD)
Bruno Dumas, Professor of Computer Science, UNamur