Event-Specific Software Composition in Context-Oriented Programming

  • Malte Appeltauer
  • Robert Hirschfeld
  • Hidehiko Masuhara
  • Michael Haupt
  • Kazunori Kawauchi
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6144)

Abstract

Context-oriented programming (COP) introduces dedicated abstractions for the modularization and dynamic composition of crosscutting context-specific functionality. While existing COP languages offer constructs for control-flow specific composition, they do not yet consider the explicit representation of event-specific context-dependent behavior, for which we observe two distinguishing properties: First, context can affect several control flows. Second, events can establish new contexts asynchronously. In this paper, we propose new language constructs for event-specific composition and explicit context representation and introduce their implementation in JCop, our COP extension to Java.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Apel, S., Leich, T., Saake, G.: Aspectual feature modules. IEEE Transactions on Software Engineering 34(2), 162–180 (2008)CrossRefGoogle Scholar
  2. 2.
    Appeltauer, M., Hirschfeld, R., Haupt, M., Lincke, J., Perscheid, M.: A Comparison of Context-oriented Programming Languages. In: COP 2009: International Workshop on Context-Oriented Programming, pp. 1–6. ACM Press, New York (2009)Google Scholar
  3. 3.
    Appeltauer, M., Hirschfeld, R., Haupt, M., Masuhara, H.: ContextJ - Context-oriented Programming for Java (2009) (submitted)Google Scholar
  4. 4.
    Appeltauer, M., Hirschfeld, R., Masuhara, H.: Improving the Development of Context-dependent Java Applications with ContextJ. In: COP 2009: International Workshop on Context-Oriented Programming, pp. 1–5. ACM Press, New York (2009)Google Scholar
  5. 5.
    Appeltauer, M., Hirschfeld, R., Rho, T.: Dedicated Programming Support for Context-aware Ubiquitous Applications. In: UBICOMM 2008: Proceedings of the 2nd International Conference on Mobile Ubiquitous Computing, Systems, Services and Technologies, Washington, DC, USA, pp. 38–43. IEEE Computer Society Press, Los Alamitos (2008)CrossRefGoogle Scholar
  6. 6.
    Aracic, I., Gasiunas, V., Mezini, M., Ostermann, K.: Overview of CaesarJ. In: Rashid, A., Aksit, M. (eds.) Transactions on Aspect-Oriented Software Development I. LNCS, vol. 3880, pp. 135–173. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  7. 7.
    Avgustinov, P., Christensen, A.S., Hendren, L.J., Kuzins, S., Lhoták, J., Lhoták, O., de Moor, O., Sereni, D., Sittampalam, G., Tibble, J.: abc: An Extensible AspectJ Compiler. In: AOSD 2005: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pp. 87–98. ACM Press, New York (2005)Google Scholar
  8. 8.
    Batory, D.: Feature-Oriented Programming and the AHEAD Tool Suite. In: ICSE 2004: Proceedings of the 26th International Conference on Software Engineering, Washington, DC, USA, pp. 702–703. IEEE Computer Society, Los Alamitos (2004)CrossRefGoogle Scholar
  9. 9.
    Batory, D., O’Malley, S.: The design and implementation of hierarchical software systems with reusable components. ACM Transactions on Software Engeneering Methodologies 1(4), 355–398 (1992)CrossRefGoogle Scholar
  10. 10.
    Batory, D., Sarvela, J.N., Rauschmayer, A.: Scaling Step-Wise Refinement. IEEE Transactions on Software Engineering 30(6), 355–371 (2003)CrossRefGoogle Scholar
  11. 11.
    Bergel, A., Ducasse, S., Nierstrasz, O.: Classbox/J: controlling the scope of change in Java. In: OOPSLA 2005: Proceedings of the 20th Annual ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, And Applications, pp. 177–189. ACM Press, New York (2005)CrossRefGoogle Scholar
  12. 12.
    Bracha, G., Cook, W.: Mixin-based inheritance. In: OOPSLA 1990: Proceedings of the European Conference on Object Oriented Programming Systems Languages and Applications, pp. 303–311. ACM, New York (1990)CrossRefGoogle Scholar
  13. 13.
    Costanza, P., Hirschfeld, R.: Language Constructs for Context-oriented Programming: An Overview of ContextL. In: Proceedings of the 2005 Symposium on Dynamic Languages, pp. 1–10. ACM Press, New York (2005)CrossRefGoogle Scholar
  14. 14.
    Costanza, P., Hirschfeld, R., De Meuter, W.: Efficient Layer Activation for Switching Context-dependent Behavior. In: Lightfoot, D.E., Szyperski, C. (eds.) JMLC 2006. LNCS, vol. 4228, pp. 84–103. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  15. 15.
    Ducasse, S., Nierstrasz, O., Schärli, N., Wuyts, R., Black, A.P.: Traits: A Mechanism for Fine-Grained Reuse. ACM Trans. Program. Lang. Syst. 28(2), 331–388 (2006)CrossRefGoogle Scholar
  16. 16.
    Ekman, T., Hedin, G.: The JastAdd Extensible Java Compiler. In: OOPSLA 2007: Proceedings of the 22nd Annual ACM SIGPLAN Conference on Object-oriented Programming Systems and Applications, pp. 1–18. ACM Press, New York (2007)CrossRefGoogle Scholar
  17. 17.
    Eugster, P., Jayaram, K.R.: EventJava: An Extension of Java for Event Correlation. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 570–594. Springer, Heidelberg (2009)Google Scholar
  18. 18.
    Filman, R.E., Elrad, T., Clarke, S., Aksit, M. (eds.): Aspect-Oriented Software Development. Addison-Wesley, Boston (2005)Google Scholar
  19. 19.
    Gonzlez, S., Mens, K., Cdiz, A.: Context-Oriented Programming with the Ambient Object System. Journal of Universal Computer Science 14(20), 3307–3332 (2008)Google Scholar
  20. 20.
    Hedin, G., Magnusson, E.: JastAdd: An Aspect-oriented Compiler Construction System. Science of Computer Programming 47(1), 37–58 (2003)MATHCrossRefMathSciNetGoogle Scholar
  21. 21.
    Hirschfeld, R., Costanza, P., Haupt, M.: An Introduction to Context-Oriented Programming with ContextS. In: Lämmel, R., Visser, J., Saraiva, J. (eds.) GTTSE 2007 II. LNCS, vol. 5235, pp. 396–407. Springer, Heidelberg (2008)Google Scholar
  22. 22.
    Hirschfeld, R., Costanza, P., Nierstrasz, O.: Context-oriented Programming. Journal of Object Technology 7(3), 125–151 (2008)Google Scholar
  23. 23.
    Hirschfeld, R., Perscheid, M., Schubert, C., Appeltauer, M.: Dynamic contract layers. In: 25th Symposium on Applied Computing, Lausanne, Switzerland. ACM DL, New York (2010)Google Scholar
  24. 24.
    Steele Jr., G.L.: Common LISP: The Language, 2nd edn. Digital Press, Newton (1990)MATHGoogle Scholar
  25. 25.
    Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An Overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–354. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  26. 26.
    Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., Irwin, J.: Aspect-oriented Programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  27. 27.
    Núñez, A., Noyé, J., Gasiũnas, V.: Declarative Definition of Contexts with Polymorphic Events. In: COP 2009: International Workshop on Context-Oriented Programming, pp. 1–6. ACM Press, New York (2009)CrossRefGoogle Scholar
  28. 28.
    Rajan, H., Leavens, G.T.: Ptolemy: A language with quantified, typed events. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 155–179. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  29. 29.
    Schippers, H., Haupt, M., Hirschfeld, R., Janssens, D.: An Implementation Substrate for Languages Composing Modularized Crosscutting Concerns. In: Proc. SAC PSC. ACM Press, New York (2009)Google Scholar
  30. 30.
    Smith, R.B., Ungar, D.: Programming as an experience: The inspiration for self. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 303–330. Springer, Heidelberg (1995)Google Scholar
  31. 31.
    von Löwis, M., Denker, M., Nierstrasz, O.: Context-oriented Programming: Beyond Layers. In: Demeyer, S., Perrot, J.-F. (eds.) ICDL 2007: Proceedings of the 2007 International Conference on Dynamic Languages. ACM International Conference Proceeding Series, vol. 286, pp. 143–156. ACM Press, New York (2007)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Malte Appeltauer
    • 1
  • Robert Hirschfeld
    • 1
  • Hidehiko Masuhara
    • 2
  • Michael Haupt
    • 1
  • Kazunori Kawauchi
    • 2
  1. 1.Hasso-Plattner-InstituteUniversity of PotsdamGermany
  2. 2.Graduate School of Arts and ScienceUniversity of TokyoJapan

Personalised recommendations