ABSTRACT
This paper proposes EventCJ, a context-oriented programming (COP) language that can modularly control layer activation based on user-defined events. In addition to defining context-specific behaviors by using existing COP constructs, the EventCJ programmer declares events to specify when and on which instance layer switching should happen, and layer transition rules to specify which layers should be activated/deactivated upon events. These constructs enable controlling layer activation on a per-instance basis, separately from a base program. We also demonstrate an approach to verify safety properties of layer transitions by using a model checker. With these advantages, EventCJ enables more modular descriptions of context-aware programs, especially when layer switching is triggered in many places of a program, or by activities external to the base program. We implemented a prototype EventCJ compiler with Eclipse IDE support.
- Chris Allan, et al. Adding trace matching with free variables to AspectJ. In Proceedings of OOPSLA'05, pages 345--364, 2005. Google ScholarDigital Library
- Malte Appeltauer, et al. A comparison of context-oriented programming languages. In COP '09: International Workshop on Context-Oriented Programming, pages 1--6, New York, NY, USA, 2009. ACM. Google ScholarDigital Library
- Malte Appeltauer, Robert Hirschfeld, Michael Haupt, and Hidehiko Masuhara. ContextJ: Context-oriented programming with Java. Computer Software, 2011. to appear.Google Scholar
- Malte Appeltauer, Robert Hirschfeld, and Hidehiko Masuhara. Improving the development of context-dependent Java application with ContextJ. In COP'09, 2009. Google ScholarDigital Library
- Malte Appeltauer, et al. Event-specific software composition in context-oriented programming. In Proceedings of the International Conference on Software Composition 2010 (SC'10), volume 6144 of LNCS, pages 50--65, 2010. Google ScholarDigital Library
- Ivia Aracic, Vaidas Gasiunas, Mira Mezini, and Klaus Ostermann. An overview of CaesarJ. In Transactions on Aspect-Oriented Software Development I, volume 3880 of LNCS, pages 135--173, 2006. Google ScholarDigital Library
- Nick Benton, Luca Cardelli, and Cédric Fournet. Modern concurrency abstractions for C#. ACM Transactions on Programming Languages and Systems, 26(5):769--804, 2004. Google ScholarDigital Library
- Martin Bravenboer, Éric Tanter, and Eelco Visser. Declarative, formal, and extensible syntax definition for aspectj. In OOPSLA '06, pages 209--228, 2006. Google ScholarDigital Library
- Martin Bravenboer and Eelco Visser. Concrete syntax for objects: domain-specific language embedding and assimilation without restrictions. In OOPSLA'04, pages 365--383, 2004. Google ScholarDigital Library
- Mark Bull, Lorna Smith, Martin Westhead, David Henty, and Robert Davey. Benchmarking java grande applications. In the Second International Conference on The Practical Applications of Java, pages 63--73, 2000.Google Scholar
- Pascal Costanza and Theo D'Hondt. Feature description for context-oriented programming. In DSPL'08, 2008.Google Scholar
- Pascal Costanza and Robert Hirschfeld. Language constructs for context-oriented programming - an overview of ContextL. In Dynamic Language Symposium (DLS) '05, pages 1--10, 2005. Google ScholarDigital Library
- Pascal Costanza and Robert Hirschfeld. Reflective layer activation in contextl. In SAC'07, pages 1280--1285, 2007. Google ScholarDigital Library
- Pascal Costanza, Robert Hirschfeld, and Wolfgang De Meuter. Efficient layer activation for switching context-dependent behavior. In JMLC 2006, volume 4228 of LNCS, pages 84--103, 2006. Google ScholarDigital Library
- Brecht Desmet, Jorge Vallejos, Pascal Costanza, and Robert Hirschfeld. Layered design approach for context-aware systems. In VaMoS'07, 2007.Google Scholar
- Patrick Eugster and K. R. Jayaran. EventJava: An extension of Java for event correlation. In ECOOP'09, volume 5653 of LNCS, pages 570--594, 2009. Google ScholarDigital Library
- Carlo Ghezzi, Matteo Praella, and Guido Salvaneschi. Context-oriented programming in highly concurrent systems. In COP'10, 2010. Google ScholarDigital Library
- Carlo Ghezzi, Matteo Praella, and Guido Salvaneschi. Programming language support to context-aware adaptation - a case-study with Erlang. In SEAMS'10, pages 59--68, 2010. Google ScholarDigital Library
- Robert Hirschfeld, Pascal Costanza, and Michael Haupt. An introduction to context-oriented programming with ContextS. In GTTSE 2007, volume 5235 of LNCS, pages 396--407, 2008.Google ScholarDigital Library
- Robert Hirschfeld, Pascal Costanza, and Oscar Nierstrasz. Context-oriented programming. Journal of Object Technology, 7(3):125--151, 2008.Google ScholarCross Ref
- Gerard J. Holzmann. The model checker SPIN. IEEE Transaction on Software Engineering, 23(5):279--295, 1997. Google ScholarDigital Library
- Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. Designing event-based context transition in context-oriented programming. In COP'10, 2010. Google ScholarDigital Library
- Tetsuo Kamina and Tetsuo Tamai. Towards safe and flexible object adaptation. In COP'09, 2009. Google ScholarDigital Library
- Lennart C. L. Kats and Eelco Visser. The Spoofax language workbench. Rules for declarative specification of languages and IDEs. In Proceedings of the 25th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2010), 2010. Google ScholarDigital Library
- Hidehiko Masuhara, Yusuke Endoh, and Akinori Yonezawa. A fine-grained join point model for more reusable aspects. In APLAS'06, volume 4279 of LNCS, pages 131--147, 2006. Google ScholarDigital Library
- Angel Núñez, Jacques Noyé, and Vaidas Gasiūnas. Declarative definition of contexts with polymorphic events. In COP'09, 2009. Google ScholarDigital Library
- Tobias Rho, Günter Kniesel, and Malte Appeltauer. Fine-grained generic aspects. In FOAL'06, 2006.Google Scholar
- Tobias Rho, Mark Schmatz, and Armin B. Cremers. Towards context-sensitive service aspects. In OT4AML, 2006.Google Scholar
- Tetsuo Tamai, Naoyasu Ubayashi, and Ryoichi Ichiyama. An adaptive object model with dynamic role binding. In International Conference on Software Engineering (ICSE 2005), pages 166--175, 2005. Google ScholarDigital Library
- Tetsuo Tamai, Naoyasu Ubayashi, and Ryoichi Ichiyama. Objects as actors assuming roles in the environment. In Software Engineering for Multi-Agent Systems V, volume 4408 of LNCS, pages 185--203, 2007.Google ScholarDigital Library
- Martin von Löwis, Marcus Denker, and Oscar Nierstrasz. Context-oriented programming: beyond layers. In ICDL '07: Proceedings of the 2007 international conference on Dynamic languages, pages 143--156, 2007. Google ScholarDigital Library
- Robert J. Walker and Kevin Viggers. Implementing protocols via declarative event patterns. In Proceedings of FSE'04, pages 159--169, 2004. Google ScholarDigital Library
Index Terms
- EventCJ: a context-oriented programming language with declarative event-based context transition
Recommendations
Featherweight EventCJ: a core calculus for a context-oriented language with event-based per-instance layer transition
COP '11: Proceedings of the 3rd ACM International Workshop on Context-Oriented ProgrammingWe propose Featherweight EventCJ, which is a small calculus for context-oriented languages with event-based per-instance layer controls like EventCJ. It extends ContextFJ with stores, labels and transitions for modeling the per-instance layer management,...
Method safety mechanism for asynchronous layer deactivation
Context-oriented programming (COP) enhances the modularity of context-dependent behavior in context-aware systems, as it provides modules to implement context-dependent behavior (layers) and composes them dynamically in a disciplined manner (layer ...
Type-Safe Layer-Introduced Base Functions with Imperative Layer Activation
COP '15: Proceedings of the 7th ACM International Workshop on Context-Oriented ProgrammingLayer-introduced base methods, which are the methods with new signatures in a layer and are added to a class, give layers more freedom to organize definitions of context-dependent behavior. However, we need to be careful so as not to call a layer-...
Comments