Bridging the gap between Context-Oriented Domain Analysis and Context-Oriented Programming
Research context
Contextual information is playing an increasingly important role for applications and services ranging from those that are location-based to those that are situation-dependent or even deeply personalized. The context of an application, defined as any piece of information which is computationally accessible, is clearly becoming a central notion to an emerging class of applications in the fields of internet and mobile computing. Devices of the future will observe user behavior and monitor the environment to seamlessly deliver the appropriate content and services. Despite this, there is little explicit support for context awareness in mainstream software development techniques and tools. This makes the development of these applications more complex than necessary.
At the PROG lab, we have been exploring the influence of the context on software systems at two different levels. At a requirement analysis level, we have identified the need for a comprehensive understanding of the problem space of context-aware systems. We have proposed the Context-Oriented Domain Analysis (CODA) model which is a specialized approach for analyzing, structuring, and formalizing the software requirements of context-aware systems. It is a graphical notation, based on feature diagrams. The figure below shows an example of a CODA diagram for a context-aware cell phone.
CODA diagrams enforces modelers to think in terms of basic context-unaware behavior (the default behavior of the cell phone in the example) which can be further reļ¬ned by means of context-dependent adaptations at certain variation points (e.g. different ways to receive an incoming communication according to battery level, location or time of the day).
At a programming language level, we have worked on a new programming technique called Context-Oriented Programming (COP) which enables software entities to adapt their behavior dynamically to their execution context. COP treats context explicitly, and provides mechanisms to dynamically adapt behavior in reaction to changes in context, even after system deployment at runtime. We have implemented COP as an extension to the Common Lisp Object System, called ContextL.
Although both works above are rather complementary, thus far there is little research on the combination between these two approaches. In ContextL, for instance, the programmer has to manually decide which context-dependent adaptations need to be activated. However, CODA is a notation for describing dependencies between such behavioral variations that could, in principle, be used to automate the decisions what adaptations to install. We argue that in the realization of this combination there is a first step towards an integrated vision of context-oriented software engineering.
Research goals
The goal of this thesis proposal is two-fold:
- At a conceptual level we propose the student to investigate the principles of CODA and COP and establish the basis for a combination of these two approaches.
- At a technical level we are interested in an implementation of CODA that works in conjunction with ContextL.
References
- Context-Oriented Programming, Robert Hirschfeld, Pascal Costanza and Oscar Nierstrasz, Journal of Object Technology, March-April 2008
- Language Constructs for Context-oriented Programming - An Overview of ContextL, Pascal Costanza and Robert Hirschfeld, Dynamic Languages Symposium, co-located with OOPSLA'05, San Diego, California, USA, October 2005
- Context-Oriented Domain Analysis, Brecht Desmet, Jorge Vallejos, Pascal Costanza, Wolfgang De Meuter, Theo D'Hondt, Sixth International and Interdisciplinary Conference on Modeling and Using Context, Roskilde University, Denmark, August 2007