Skip to main content

Enriching Context-Oriented Programming with Structured Context Representation

  • Conference paper
Pervasive Computing and the Networked World (ICPCA/SWS 2012)

Part of the book series: Lecture Notes in Computer Science ((LNCCN,volume 7719))

  • 3886 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Dey, A.K.: Understanding and using context. Personal Ubiquitous Computing 5, 4–7 (2001)

    Article  Google Scholar 

  2. Schmidt, A.: Ubiquitous Computing - Computing in Context. PhD thesis, Lancaster University (2003)

    Google Scholar 

  3. Hirschfeld, R., Costanza, P., Nierstrasz, O.: Context-oriented programming. Journal of Object Technology 7, 125–151 (2008)

    Article  Google Scholar 

  4. Stevens, S.S.: On the theory of scales of measurement. Science 103, 677–680 (1946)

    Article  MATH  Google Scholar 

  5. Desmet, B., Vallejos, J., Costanza, P.: Layered design approach for context-aware systems. In: 1st VaMoS 2007 (2007)

    Google Scholar 

  6. Appeltauer, M., Hirschfeld, R., Haupt, M., Masuhara, H.: Contextj: Context-oriented programming with java. Information and Media Technologies 6, 399–419 (2011)

    Google Scholar 

  7. Appeltauer, M., Hirschfeld, R., Masuhara, H., Haupt, M., Kawauchi, K.: Event-Specific Software Composition in Context-Oriented Programming. In: Baudry, B., Wohlstadter, E. (eds.) SC 2010. LNCS, vol. 6144, pp. 50–65. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  8. Appeltauer, M., Hirschfeld, R., Haupt, M., Lincke, J., Perscheid, M.: A comparison of context-oriented programming languages. In: International Workshop on Context-Oriented Programming, COP 2009, pp. 6:1–6:6. ACM, New York (2009)

    Google Scholar 

  9. Wan, K., Alagar, V.S., Paquet, J.: Lucx: Lucid enriched with context. In: PLC, pp. 48–56 (2005)

    Google Scholar 

  10. Tong, X., Paquet, J., Mokhov, S.A.: Complete context calculus design and implementation in gipsy. CoRR abs/1002.4392 (2010)

    Google Scholar 

  11. Kamina, T., Aotani, T., Masuhara, H.: Eventcj: a context-oriented programming language with declarative event-based context transition. In: Proceedings of the Tenth International Conference on Aspect-Oriented Software Development, AOSD 2011, pp. 253–264. ACM, New York (2011)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ma, J., Tao, X., Zheng, T., Lu, J. (2013). Enriching Context-Oriented Programming with Structured Context Representation. In: Zu, Q., Hu, B., Elçi, A. (eds) Pervasive Computing and the Networked World. ICPCA/SWS 2012. Lecture Notes in Computer Science, vol 7719. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-37015-1_31

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-37015-1_31

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-37014-4

  • Online ISBN: 978-3-642-37015-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics