EventCJ: a context-oriented programming language with declarative event-based context transition
EventCJ: a context-oriented programming language with declarative event-based context transition
复制标题
DOI:
10.1145/1960275.1960305
复制
发表时间:
2011-03
期刊:
影响因子:
--
通讯作者:
T. Kamina;Tomoyuki Aotani;Hidehiko Masuhara
中科院分区:
文献类型:
--
作者:
T. Kamina;Tomoyuki Aotani;Hidehiko Masuhara
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.