Event-based Context-Oriented Programming
We propose event-based context-oriented programming, and design and implement EventCJ, an event-based extension to ContextJ. Its design stems from our observation that, in many context-aware applications, context changes are triggered by external events. Thus, in addition to the current COP language mechanisms, namely the one to activate/deactivate layers in accordance with a flow of control in programs, and the one to dispatch method calls to partial methods on active layers, we propose a mechanism to declaratively specify how the receiver of events changes its active contexts. EventCJ can declare events that trigger context transitions, and context transition rules that define how each instance’s context changes when it receives a specific event.
- Tomoyuki Aotani, Tetsuo Kamina, and Hidehiko Masuhara, \newblock Featherweight EventCJ: a core calculus for a context-oriented language with event-based per-instance layer transition, In Proceedings of the Workshop on Context-Oriented Programming (COP’11), July 2011.
- Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara, EventCJ: A context-oriented programming language with declarative event-based context transition, in Proceedings of the 10th International Conference on Aspect-Oriented Software Development (AOSD’11), March 21–25 2011. (PDF)(C) ACM, 2011. This is the author’s version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version will be published in Proceedings of AOSD’11 (March 2011)
- Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara, Designing event-based context transition in context-oriented programming, in Proceedings of the Workshop on Context-Oriented Programming (COP’10), June 2010.