Computer Software
Print ISSN : 0289-6540
EventCJ: A Context-Oriented Language with Declarative Per-object Layer Transitions
Tomoyuki AOTANITetsuo KAMINAHidehiko MASUHARA
Author information
JOURNAL FREE ACCESS

2013 Volume 30 Issue 3 Pages 3_130-3_147

Details
Abstract

This paper proposes a context-oriented programming (COP) language EventCJ. COP is a programming technique that helps to modularize context-dependent behavior and contexts by using partial methods and layers, respectively. Changes of contexts in the specification are changes of the states (active or inactive) of layers in the COP program. EventCJ is designed on top of Java and provides layers as the means of modularizing behavior with respect to each context. It also provides event declarations and layer transition rules, which are not available in other COP languages. The two mechanisms enable us to separate changes of the states of each layer from other concerns and control the states of layers independently from calling contexts. This paper shows the language design of EventCJ through a simple example and gives a calculus called Featherweight EventCJ, which is an extension of ContextFJ, to show the semantics. Compilation is achieved by translating EventCJ programs to AspectJ. The paper also gives a simple idea to optimize EventCJ programs.

Content from these authors
© 2013 Japan Society for Software Science and Technology
Previous article Next article
feedback
Top