Abstract
In the times of mobility and pervasiveness of computing, contextual information plays an increasingly crucial role in applications. This kind of information becomes a first class citizen in context-oriented programming (COP) paradigm. COP languages provide primitive constructs for easily writing applications that adapt their behaviour depending on the evolution of their operational environment, namely the context. We present these new constructs, the issues and the challenges that arise, reporting on our recent work on ML\(_\text {CoDa}\). It is a declarative language specifically designed for adaptation and equipped with a clear formal semantics and analysis tools. We will discuss some experiments done with a preliminary implementation of ML\(_\text {CoDa}\). Through them we will show how applications and context interactions can be better specified, analysed and controlled.
Similar content being viewed by others
Notes
Available at https://github.com/vslab/YieldProlog.
References
Appeltauer M, Hirschfeld R, Haupt M, Lincke J, Perscheid M (2009) A comparison of context-oriented programming languages. In: International Workshop on Context-Oriented Programming (COP ’09). ACM, New York, pp 6:1–6:6
Appeltauer M, Hirschfeld R, Haupt M, Masuhara H (2011) ContextJ: context-oriented programming with Java. Comput Softw 28(1):272–292
Bodei C, Degano P, Ferrari GL, Galletta L (2016) Last mile’s resources. In: Semantics, Logics, and Calculi, LNCS 9560. Springer, Berlin, pp 33–53
Bodei C, Degano P, Ferrari GL, Galletta L (2016) A step towards checking security in IoT. In: Proceedings of ICE 2016, EPTCS, vol 223, pp 128–142
Bodei C, Degano P, Ferrari GL, Galletta L (2016) Where do your IoT ingredients come from? In: Proceedings of the Coordination 2016, LNCS, vol 9686. Springer, Berlin, pp 35–50
Bodei C, Degano P, Ferrari GL, Galletta L (2017) Experimenting with a context-aware language. In: Malyshkin V (ed) Proceedings of 14th Conference on Parallel Computing Technologies, LNCS 10421. Springer, pp 3–17
Bodei C, Degano P, Ferrari GL, Galletta L (2017) Tracing where IoT data are collected and aggregated. Log Methods Comput Sci 13(3:5):1–38
Bodei C, Degano P, Galletta L, Focardi R, Tempesta M (2018) Transcompiling firewalls. In: Bauer L, Küsters R (eds) 7th International Conference on Principles of Security and Trust, POST 2018, LNCS, vol 10804. Springer, Berlin
Bodei C, Degano P, Galletta L, Focardi R, Tempesta M, Veronese L (2018) Language-independent synthesis of firewall policies. In: IEEE European Symposium on Security and Privacy, EuroS&P 2018. IEEE
Bodei C, Degano P, Galletta L, Salvatori F (2014) Linguistic mechanisms for context-aware security. In: Proceedings of the 11th International Colloquium on Theoretical Aspects of Computing, LNCS 8687. Springer, Berlin, pp 61–79
Bodei C, Degano P, Galletta L, Salvatori F (2016) Context-aware security: linguistic mechanisms and static analysis. J Comput Secur 24(4):427–477
Bodei C, Dinh VD, Ferrari GL (2017) Checking global usage of resources handled with local policies. Sci Comput Program 133:20–50
Busi M, Degano P, Galletta L (2018) Handling interference in a COP language. Submitted for publication
Busi M, Degano P, Galletta L (2016) A semantics for disciplined concurrency in COP. In: Proceedings of the ICTCS 2016, CEUR Proceedings, vol 1720, pp 177–189
Canciani A, Degano P, Ferrari GL, Galletta L (2015) A context-oriented extension of F#. In: FOCLASA 2015, EPTCS 201, pp 18–32
Code Quotation. https://docs.microsoft.com/en-Us/dotnet/fsharp/language-reference/code-quotations. Accessed 10 Sept 2018
Costanza P (2005) Language constructs for context-oriented programming. In: Proceedings of the Dynamic Languages Symposium. ACM Press, pp 1–10
Degano P, Ferrari GL, Galletta L (2014) A two-component language for COP. In: Proceedings of the 6th International Workshop on Context-Oriented Programming. ACM Digital Library
Degano P, Ferrari GL, Galletta L (2014) A two-phase static analysis for reliable adaptation. In: Proceedings of the 12th International Conference on Software Engineering and Formal Methods, LNCS 8702. Springer, Berlin, pp 347–362
Degano P, Ferrari GL, Galletta L (2016) Event-driven adaptation in COP. In: PLACES 2016, EPTCS 211, pp 37–45
Degano P, Ferrari GL, Galletta L (2016) A two-component language for adaptation: design, semantics and program analysis. IEEE Trans Softw Eng. https://doi.org/10.1109/TSE.2015.2496941
Galletta L (2014) Adaptivity: linguistic mechanisms and static analysis techniques. Ph.D. thesis, University of Pisa. https://etd.adm.unipi.it/theses/available/etd-05192014-153959/. Accessed 10 Sept 2018
Hirschfeld R, Costanza P, Nierstrasz O (2008) Context-oriented programming. J Object Technol 7(3):125–151
Kamina T, Aotani T, Masuhara H (2011) 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 ’11). ACM, pp 253–264
Kephart JO, Chess DM (2003) The vision of autonomic computing. IEEE Comput 36(1):41–50. https://doi.org/10.1109/MC.2003.1160055
Kiczales G, Hilsdale E, Hugunin J, Kersten M, Palm J, Griswold W (2001) An overview of aspectj. In: Knudsen J (ed) ECOOP 2001 Object-Oriented Programming, LNCS 2072. Springer, Berlin, pp 327–354
Lämmel R, Meijer E (2007) Revealing the X/O impedance mismatch–(changing lead into gold). In: Backhouse RC, Gibbons J, Hinze R, Jeuring J (eds) Datatype-Generic Programming-International Spring School, LNCS, vol 4719. Springer, Berlin, pp 285–367
Loke SW (2004) Representing and reasoning with situations for context-aware pervasive computing: a logic programming perspective. Knowl Eng Rev 19(3):213–233
Magee J, Kramer J (1996) Dynamic structure in software architectures. SIGSOFT Softw Eng Notes 21(6):3–14
Microsoft Cognitive Service. https://azure.microsoft.com/en-us/services/cognitive-services/. Accessed 10 Sept 2018
Microsoft .NET. https://www.microsoft.com/net/. Accessed 10 Sept 2018
Orsi G, Tanca L (2011) Context modelling and context-aware querying. In: Moor O, Gottlob G, Furche T, Sellers A (eds) Datalog Reloaded, LNCS 6702. Springer, Berlin, pp 225–244
Raspberry Pi. https://www.raspberrypi.org/. Accessed 10 Sept 2018
Salehie M, Tahvildari L (2009) Self-adaptive software: Landscape and research challenges. ACM Trans Auton Adapt Syst 4(2):14:1–14:42
Salvaneschi G, Ghezzi C, Pradella M (2012) Context-oriented programming: a software engineering perspective. J Syst Softw 85(8):1801–1817
Spinczyk O, Gal A, Schröder-Preikschat W (2002) AspectC++: an aspect-oriented extension to the C++ programming language. In: CRPIT ’02. Australian Computer Society, Inc., pp 53–60
Telegram. https://telegram.org/. Accessed 10 Sept 2018
Walker D, Zdancewic S, Ligatti J (2003) A theory of aspects. SIGPLAN Not 38(9):127–139
Wand M, Kiczales G, Dutchyn C (2004) A semantics for advice and dynamic join points in aspect-oriented programming. ACM Trans Program Lang Syst 26(5):890–910
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Bodei, C., Degano, P., Ferrari, GL. et al. Programming in a context-aware language. J Supercomput 75, 7750–7764 (2019). https://doi.org/10.1007/s11227-018-2603-3
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11227-018-2603-3