Introducing Composite Layers in EventCJ (bibtex)
by Tetsuo Kamina, Tomoyuki Aotani and Hidehiko Masuhara
Abstract:
Context-oriented programming (COP) languages provide a modularization mechanism called a layer, which modularizes behaviors that are executable under specific contexts, and specify a way to dynamically switch behaviors. However, the correspondence between real-world contexts and units of behavioral variations is not simple. Thus, in existing COP languages, context-related concerns can easily be tangled within a piece of layer activation code. In this paper, we address this problem by introducing a new construct called a composite layer, which declares a proposition in which ground terms are given other layer names (true when active). A composite layer is active only when the proposition is true. We introduce this construct into EventCJ, out COP language, and verify this approach by conducting two case studies involving a context-aware Twitter client and a program editor. The results obtained in our approach show that the layer activation code is simple and free from tangled context-related concerns. We also discuss the efficient implementation of this mechanism in EventCJ.
Reference:
Introducing Composite Layers in EventCJ (Tetsuo Kamina, Tomoyuki Aotani and Hidehiko Masuhara), In IPSJ Transaction on Programming, volume 6, 2013.
Bibtex Entry:
@article{kamina2013ipsj-trpro,
  pdf = {kamina2013ipsj-trpro.pdf},
  author = {Tetsuo Kamina and Tomoyuki Aotani and Hidehiko Masuhara},
  title = {Introducing Composite Layers in {EventCJ}},
  doi = {10.11185/imt.8.279},
  journal = {IPSJ Transaction on Programming},
  year = 2013,
  volume = 6,
  number = 1,
  pages = {1--8},
  month = jan,
  annote = {First presented at IPSJ SIG-PRO workshop on June 2012 \cite{kamina2012pro}},
  abstract = {Context-oriented programming (COP) languages provide a modularization mechanism called a layer, which modularizes behaviors that are executable under specific contexts, and specify a way to dynamically switch behaviors. However, the correspondence between real-world contexts and units of behavioral variations is not simple. Thus, in existing COP languages, context-related concerns can easily be tangled within a piece of layer activation code. In this paper, we address this problem by introducing a new construct called a composite layer, which declares a proposition in which ground terms are given other layer names (true when active). A composite layer is active only when the proposition is true. We introduce this construct into EventCJ, out COP language, and verify this approach by conducting two case studies involving a context-aware Twitter client and a program editor. The results obtained in our approach show that the layer activation code is simple and free from tangled context-related concerns. We also discuss the efficient implementation of this mechanism in EventCJ.}
}
Powered by bibtexbrowser