Advertisement

Experimenting with a Context-Aware Language

  • Chiara Bodei
  • Pierpaolo Degano
  • Gian-Luigi Ferrari
  • Letterio GallettaEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10421)

Abstract

Contextual information plays an increasingly crucial role in concurrent applications in the times of mobility and pervasiveness of computing. Context-Oriented Programming languages explicitly treat this kind of information. They provide primitive constructs to adapt the behaviour of a program, depending on the evolution of its operational environment, which is affected by other programs hosted therein independently and unpredictably. We discuss these issues and the challenges they pose, reporting on our recent work on \(\text {ML}_\text {CoDa}\), a language specifically designed for adaptation and equipped with a clear formal semantics and analysis tools. We will show how applications and context interactions can be better specified, analysed and controlled, with the help of some experiments done with a preliminary implementation of \(\text {ML}_\text {CoDa}\).

References

  1. 1.
    Appeltauer, M., Hirschfeld, R., Haupt, M., Masuhara, H.: ContextJ: context-oriented programming with Java. Comput. Softw. 28(1), 272–292 (2011)Google Scholar
  2. 2.
    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
  3. 3.
    Bodei, C., Degano, P., Ferrari, G.-L., Galletta, L.: Last mile’s resources. In: Probst, C.W., Hankin, C., Hansen, R.R. (eds.) Semantics, Logics, and Calculi. LNCS, vol. 9560, pp. 33–53. Springer, Cham (2016). doi: 10.1007/978-3-319-27810-0_2 CrossRefGoogle Scholar
  4. 4.
    Bodei, C., Degano, P., Galletta, L., Salvatori, F.: Context-aware security: linguistic mechanisms and static analysis. J. Comput. Secur. 24(4), 427–477 (2016)CrossRefzbMATHGoogle Scholar
  5. 5.
    Bodei, C., Dinh, V.D., Ferrari, G.L.: Checking global usage of resources handled with local policies. Sci. Comput. Program. 133, 20–50 (2017)CrossRefGoogle Scholar
  6. 6.
    Busi, M., Degano, P., Galletta, L.: A semantics for disciplined concurrency in COP. In: Proceedings of the ICTCS 2016. CEUR Proceedings, vol. 1720, pp. 177–189 (2016)Google Scholar
  7. 7.
    Canciani, A., Degano, P., Ferrari, G.L., Galletta, L.: A context-oriented extension of F#. In: FOCLASA 2015. EPTCS, vol. 201, pp. 18–32 (2015)Google Scholar
  8. 8.
    Ceri, S., Gottlob, G., Tanca, L.: What you always wanted to know about datalog (and never dared to ask). IEEE Trans. Knowl. and Data Eng. 1(1), 146–166 (1989)CrossRefGoogle Scholar
  9. 9.
    Costanza, P.: Language constructs for context-oriented programming. In: Proceedings of the Dynamic Languages Symposium, pp. 1–10. ACM Press (2005)Google Scholar
  10. 10.
    Degano, P., Ferrari, G.L., Galletta, L.: A two-component language for COP. In: Proceedings of the 6th International Workshop on Context-Oriented Programming. ACM Digital Library (2014)Google Scholar
  11. 11.
    Degano, P., Ferrari, G.-L., Galletta, L.: A two-phase static analysis for reliable adaptation. In: Giannakopoulou, D., Salaün, G. (eds.) SEFM 2014. LNCS, vol. 8702, pp. 347–362. Springer, Cham (2014). doi: 10.1007/978-3-319-10431-7_28 Google Scholar
  12. 12.
    Degano, P., Ferrari, G.L., Galletta, L.: Event-driven adaptation in COP. In: PLACES 2016. EPTCS, vol. 211 (2016)Google Scholar
  13. 13.
    Degano, P., Ferrari, G.L., Galletta, L.: A two-component language for adaptation: design, semantics and program analysis. IEEE Trans. Softw. Eng. (2016). doi: 10.1109/TSE.2015.2496941
  14. 14.
    Galletta, L.: Adaptivity: linguistic mechanisms and static analysis techniques. Ph.D. thesis, University of Pisa (2014). http://www.di.unipi.it/~galletta/phdThesis.pdf
  15. 15.
    Hirschfeld, R., Costanza, P., Nierstrasz, O.: Context-oriented programming. J. Object Technol. 7(3), 125–151 (2008)CrossRefGoogle Scholar
  16. 16.
    Kamina, T., Aotani, T., Masuhara, H.: EventCJ: a context-oriented programming language with declarative event-based context transition. In: Proceedings of the 10 International Conference on Aspect-Oriented Software Development (AOSD 2011), pp. 253–264. ACM (2011)Google Scholar
  17. 17.
    Kephart, J.O., Chess, D.M.: The vision of autonomic computing. IEEE Comput. 36(1), 41–50 (2003)CrossRefGoogle Scholar
  18. 18.
    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). doi: 10.1007/3-540-45337-7_18 CrossRefGoogle Scholar
  19. 19.
    Loke, S.W.: Representing and reasoning with situations for context-aware pervasive computing: a logic programming perspective. Knowl. Eng. Rev. 19(3), 213–233 (2004)CrossRefGoogle Scholar
  20. 20.
    Magee, J., Kramer, J.: Dynamic structure in software architectures. SIGSOFT Softw. Eng. Notes 21(6), 3–14 (1996)CrossRefGoogle Scholar
  21. 21.
    Orsi, G., Tanca, L.: Context modelling and context-aware querying. In: Moor, O., Gottlob, G., Furche, T., Sellers, A. (eds.) Datalog 2.0 2010. LNCS, vol. 6702, pp. 225–244. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-24206-9_13 CrossRefGoogle Scholar
  22. 22.
    Salehie, M., Tahvildari, L.: Self-adaptive software: landscape and research challenges. ACM Trans. Auton. Adapt. Syst. 4(2), 14:1–14:42 (2009)CrossRefGoogle Scholar
  23. 23.
    Salvaneschi, G., Ghezzi, C., Pradella, M.: Context-oriented programming: a software engineering perspective. J. Syst. Softw. 85(8), 1801–1817 (2012)CrossRefGoogle Scholar
  24. 24.
    Spinczyk, O., Gal, A., Schröder-Preikschat, W.: AspectC++: an aspect-oriented extension to the C++ programming language. In: CRPIT 2002, pp. 53–60. Australian Computer Society, Inc. (2002)Google Scholar
  25. 25.
    Walker, D., Zdancewic, S., Ligatti, J.: A theory of aspects. SIGPLAN Not. 38(9), 127–139 (2003)CrossRefzbMATHGoogle Scholar
  26. 26.
    Wand, M., Kiczales, G., Dutchyn, C.: A semantics for advice and dynamic join points in aspect-oriented programming. ACM Trans. Program. Lang. Syst. 26(5), 890–910 (2004)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Chiara Bodei
    • 1
  • Pierpaolo Degano
    • 1
  • Gian-Luigi Ferrari
    • 1
  • Letterio Galletta
    • 1
    Email author
  1. 1.Dipartimento di InformaticaUniversità di PisaPisaItaly

Personalised recommendations