首页    期刊浏览 2024年12月01日 星期日
登录注册

文章基本信息

  • 标题:Introducing Composite Layers in EventCJ
  • 本地全文:下载
  • 作者:Tetsuo Kamina ; Tomoyuki Aotani ; Hidehiko Masuhara
  • 期刊名称:Information and Media Technologies
  • 电子版ISSN:1881-0896
  • 出版年度:2013
  • 卷号:8
  • 期号:2
  • 页码:279-286
  • DOI:10.11185/imt.8.279
  • 出版社:Information and Media Technologies Editorial Board
  • 摘要: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.
  • 关键词:context-oriented programming;atomic layers;activation;languages
国家哲学社会科学文献中心版权所有