by Malte Appeltauer,
Robert Hirschfeld, Michael Haupt and
Hidehiko MasuharaAbstract:
The development of context-aware systems requires dynamic adaptation that challenges state-of-the-art programming language support. Context-oriented programming (COP) provides dedicated abstractions for first-class representation of context-dependent behavior. So far, COP has been implemented for dynamically-typed languages such as Lisp, Smalltalk, Python, Ruby, and JavaScript relying on reflection mechanisms, and for the statically-typed programming language Java based on libraries and pre-processors. ContextJ is our compiler-based COP implementation for Java that properly integrates COP's layer concept into the Java type system. In this paper, we introduce ContextJ's language constructs, semantics, and implementation. We present a case-study of a ContextJ-based desktop application.
Reference:
ContextJ: Context-Oriented Programming with Java (Malte Appeltauer, Robert Hirschfeld, Michael Haupt and Hidehiko Masuhara), In JSSST Journal on Computer Software, volume 28, 2011. (Presented as [appeltauer2009jssst]. JSSST Best Paper Award.)
Bibtex Entry:
@article{appeltauer2011compsoft,
pdf = {compsoft2011.pdf},
author = {Malte Appeltauer and Robert Hirschfeld and Michael Haupt and Hidehiko Masuhara},
doi = {10.11309/jssst.28.1_272},
title = {{ContextJ}: Context-Oriented Programming with {Java}},
journal = {JSSST Journal on Computer Software},
year = 2011,
volume = 28,
number = 1,
pages = {272--292},
month = jan,
note = {Presented as \cite{appeltauer2009jssst}. \href{https://www.jssst.or.jp/award/detail/ronbunsho_list.html}{JSSST Best Paper Award.}},
abstract = {The development of context-aware systems requires dynamic adaptation that challenges state-of-the-art programming language support. Context-oriented programming (COP) provides dedicated abstractions for first-class representation of context-dependent behavior. So far, COP has been implemented for dynamically-typed languages such as Lisp, Smalltalk, Python, Ruby, and JavaScript relying on reflection mechanisms, and for the statically-typed programming language Java based on libraries and pre-processors. ContextJ is our compiler-based COP implementation for Java that properly integrates COP's layer concept into the Java type system. In this paper, we introduce ContextJ's language constructs, semantics, and implementation. We present a case-study of a ContextJ-based desktop application.}
}