Enriching context-oriented programming with structured context representation

  • Authors:
  • Jun Ma;Xianping Tao;Tao Zheng;Jian Lu

  • Affiliations:
  • State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, China;State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, China;Software Institute, Nanjing University, Nanjing, China;State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, China

  • Venue:
  • ICPCA/SWS'12 Proceedings of the 2012 international conference on Pervasive Computing and the Networked World
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Context-oriented Programming (COP) has been proposed as a new promising paradigm for programming context-aware applications in pervasive environments. However, the expressive power of the layer abstraction in current COP extensions is limited, as layers are only suitable for expressing context with boolean or nominal values and lack support for describing temporal property of context. Besides, partial methods of COP are defined only on top of each single layer but not on a combination of layers, and the behavior of an invoked method is unpredictable as it is determined by the layer activation order. In this paper, we enriches COP by replacing layers with well-structured context entries. Each context entry specifies a piece of context information as well as its temporal property, and a context is represented as a set of many context entries. Many new operations are introduced to manipulate context more conveniently. Furthermore, partial methods are now defined on the notion of situation which is expressed as a combination of multiple context entries, and the evaluation order of multiple active partial methods can be explicitly specified so that the behavior of an invoked method becomes predictable. An implementation on top of ContextJ* and experiments for evaluating it in term of time overhead are also presented in this paper.