EventCJ: a context-oriented programming language with declarative event-based context transition

  • Authors:
  • Tetsuo Kamina;Tomoyuki Aotani;Hidehiko Masuhara

  • Affiliations:
  • University of Tokyo, Tokyo, Japan;Japan Advanced Institute of Science and Technology, Nomi, Japan;University of Tokyo, Tokyo, Japan

  • Venue:
  • Proceedings of the tenth international conference on Aspect-oriented software development
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

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.