2013 | OriginalPaper | Chapter
Enriching Context-Oriented Programming with Structured Context Representation
Authors : Jun Ma, Xianping Tao, Tao Zheng, Jian Lu
Published in: Pervasive Computing and the Networked World
Publisher: Springer Berlin Heidelberg
Activate our intelligent search to find suitable subject content or patents.
Select sections of text to find matching patents with Artificial Intelligence. powered by
Select sections of text to find additional relevant content using AI-assisted search. powered by
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.