Formal Aspects of Computing

, Volume 28, Issue 4, pp 531–566 | Cite as

Event-based run-time adaptation in communication-centric systems

  • Cinzia Di Giusto
  • Jorge A. Pérez
Open Access
Original Article


Communication-centric systems are software systems built as assemblies of distributed artifacts that interact following predefined communication protocols. Session-based concurrency is a type-based approach to ensure the conformance of communication-centric systems to such protocols. This paper presents a model of session-based concurrency with mechanisms for run-time adaptation. Our model allows us to specify communication-centric systems whose session behavior can be dynamically updated at run-time. We improve on previous work by proposing an event-based approach: adaptation requests, issued by the system itself or by its context, are assimilated to events which may trigger adaptation routines. These routines exploit type-directed checks to enable the reconfiguration of processes with active protocols. We equip our model with a type system that ensures communication safety and consistency properties: while safety guarantees absence of run-time communication errors, consistency ensures that update actions do not disrupt already established session protocols. We provide soundness results for binary and multiparty protocols.


Concurrency Behavioral types Session types Run-time adaptation Process calculi 


  1. AR12.
    Anderson G, Rathke J (2012) Dynamic software update for message passing programs. In: Jhala R, Igarashi A (eds) Programming Languages and Systems—10th Asian Symposium, APLAS. Proceedings, vol. 7705 of Lecture Notes in Computer Science, pages 207–222. Springer, Kyoto, pp 207–222Google Scholar
  2. BCD+13.
    Bocchi L, Chen TC, Demangeon R, Honda K, Yoshida N (2013) Monitoring networks through multiparty session types. In: Beyer D, Boreale M (eds) Formal Techniques for Distributed Systems—Joint IFIP WG 6.1 International Conference, FMOODS/FORTE, Held as Part of the 8th International Federated Conference on Distributed Computing Techniques, DisCoTec. Proceedings, vol. 7892 of Lecture Notes in Computer Science. Springer, Florence, pp 50–65Google Scholar
  3. BCH+13.
    Bravetti M, Carbone M, Hildebrandt TT, Lanese I, Mauro J, Pérez JA, Zavattaro G (2013) Towards global and local types for adaptation. In: Counsell S, Núñez M (eds) Software Engineering and Formal Methods—SEFM Collocated Workshops, vol. 8368 of Lecture Notes in Computer Science. Springer, pp 3–14Google Scholar
  4. BDPZ12.
    Bravetti M, Di Giusto C, Pérez JA, Zavattaro G (2012) Adaptable Processes. Log. Methods Comput. Sci. 8(4)Google Scholar
  5. CDP14.
    Castellani I, Dezani-Ciancaglini M, Pérez JA (2014) Self-adaptation and secure information flow in multiparty structured communications: a unified perspective. In: Carbone M (ed) Proceedings Third Workshop on Behavioural Types, BEAT, vol. 162 of EPTCS. Rome, pp 9–18Google Scholar
  6. CDV15.
    Coppo M, Dezani-Ciancaglini M, Venneri B (2014) Self-adaptive multiparty sessions. Serv Orient Comput Appl 9(3-4):249–268CrossRefGoogle Scholar
  7. CDYP16.
    Coppo M, Dezani-Ciancaglini M, Yoshida N, Padovani L (2016) Global progress for dynamically interleaved multiparty sessions. Math Struct Comput Sci 26(2):238–302MathSciNetCrossRefGoogle Scholar
  8. DGL+14.
    Dalla Preda M, Giallorenzo S, Lanese I, Mauro J, Gabbrielli M (2014) AIOCJ: a choreographic framework for safe adaptive distributed applications. In: Combemale B, Pearce DJ, Barais O, Vinju JJ (eds) Software Language Engineering—7th International Conference, SLE, vol. 8706 of Lecture Notes in Computer Science. Springer, pp 161–170Google Scholar
  9. DP13a.
    Di Giusto C, Pérez JA (2013) Disciplined structured communications with consistent runtime adaptation. In: Shin SY, Maldonado JC (eds) Proceedings of the 28th Annual ACM Symposium on Applied Computing, SAC. ACM, Coimbra 1913–1918Google Scholar
  10. DP13b.
    Di Giusto C, Pérez JA (2013) Session types with runtime adaptation: overview and examples. In: PLACES, vol. 137 of EPTCS, pp 21–32Google Scholar
  11. DP15.
    Di Giusto C, Pérez JA (2015) Disciplined structured communications with disciplined runtime adaptation. Sci Comput Program 97:235–265CrossRefGoogle Scholar
  12. DP16.
    Di Giusto C, Pérez JA (2016) An event-based approach to runtime adaptation in communication-centric systems. In: Hildebrandt T, Ravara A, van der Werf JM, Weidlich M (eds) Web services, formal methods, and behavioral types: 11th international workshop, WS-FM 2014, Eindhoven, The Netherlands, September 11–12, 2014, and 12th international workshop, WS-FM/BEAT 2015, Madrid, Spain, September 4–5, 2015, Revised Selected Papers. Springer International Publishing, Cham, pp 67–85. doi: 10.1007/978-3-319-33612-1
  13. DRMR13.
    Dumas M, Rosa ML, Mendling J, Reijers HA (2013) Fundamentals of Business Process Management. Springer, Nww YorkCrossRefGoogle Scholar
  14. Fox11.
    Fox J (2011) A formal orchestration model for dynamically adaptable services with COWS. In: Proceedings International Conference on Adaptive and Self-Adaptive Systems and Applications (ADAPTIVE 2011). IARIA, pp 67–72Google Scholar
  15. GH05.
    Gay SJ, Hole M (2005) Subtyping for session types in the pi calculus. Acta Inf 42(2–3):191–225MathSciNetCrossRefzbMATHGoogle Scholar
  16. HKP+10.
    Hu R, Kouzapas D, Pernet O, Yoshida N, Honda K (2010) Type-safe eventful sessions in java. In: D’Hondt T (ed) ECOOP Object-Oriented Programming, 24th European Conference. Proceedings, vol. 6183 of Lecture Notes in Computer Science. Springer, Maribor, pp 329–353Google Scholar
  17. HVK98.
    Honda K, Vasconcelos VT, Kubo M (1998) Language primitives and type discipline for structured communication-based programming. In: Hankin C (ed) Programming Languages and Systems—ESOP’98, 7th European Symposium on Programming, Held as Part of the European Joint Conferences on the Theory and Practice of Software, ETAPS’98, Proceedings, vol. 1381 of Lecture Notes in Computer Science. Springer, Lisbon, pp 122–138Google Scholar
  18. HYC08.
    Honda K, Yoshida N, Carbone M (2008) Multiparty asynchronous session types. In: Necula GC, Wadler P (eds) POPL. ACM, pp 273–284Google Scholar
  19. JC93.
    Jaccheri ML, Conradi R (1993) Techniques for process model evolution in EPOS. IEEE Trans Softw Eng 19(12):1145–1156CrossRefGoogle Scholar
  20. Kou12.
    Kouzapas D (2012) A Study of Bisimulation Theory for Session Types. Ph.D. thesis, Imperial College LondonGoogle Scholar
  21. KYH11.
    Kouzapas D, Yoshida N, Honda K (2011) On asynchronous session semantics. In: Bruni R, Dingel J (eds) Formal Techniques for Distributed Systems—Joint 13th IFIP WG 6.1 International Conference, FMOODS 2011, and 31st IFIP WG 6.1 International Conference, FORTE 2011. Proceedings, vol. 6722 of Lecture Notes in Computer Science. Springer, Reykjavik, pp 228–243Google Scholar
  22. KYHH16.
    Kouzapas D, Yoshida N, Hu R, Honda K (2016) On asynchronous eventful session semantics. Mathe Struct Comput Sci 26(2):303–364MathSciNetCrossRefGoogle Scholar
  23. MGR04.
    Müller R, Greiner U, Rahm E (2004)\({A_{gent}w_{ork}}\): a workflow system supporting rule-based workflow adaptation. Data Knowl Eng 51(2):223–256Google Scholar
  24. MPW92.
    Milner R, Parrow J, Walker D (1992) A calculus of mobile processes, i. Inf Comput 100(1):1–40Google Scholar
  25. Pad10.
    Padovani L (2010) Session types = intersection types + union types. In: Pimentel E, Venneri B, Wells JB (eds) Proceedings Fifth Workshop on Intersection Types and Related Systems, vol. 45 of EPTCS. ITRS, Edinburgh, pp 71–89Google Scholar
  26. PVV14.
    Padovani L, Vasconcelos VT, Vieira HT (2014) Typing liveness in multiparty communicating systems. In: Kühn E, Pugliese R (eds) Coordination Models and Languages—16th IFIP WG 6.1 International Conference, COORDINATION, Held as Part of the 9th International Federated Conferences on Distributed Computing Techniques, DisCoTec 2014, Proceedings, vol. 8459 of Lecture Notes in Computer Science. Springer, Berlin, pp 147–162Google Scholar
  27. RRD04.
    Rinderle S, Reichert M, Dadam P (2004) Correctness criteria for dynamic changes in workflow systems—a survey. Data Knowl Eng 50(1): 9–34CrossRefGoogle Scholar
  28. SC06.
    Seco JC, Caires L (2006) Types for dynamic reconfiguration. In: Sestoft P (ed) Programming Languages and Systems, 15th European Symposium on Programming, ESOP, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS, Proceedings, vol. 3924 of Lecture Notes in Computer Science. Springer, Vienna, pp 214–229Google Scholar
  29. VV13.
    Vieira HT, Vasconcelos VT (2013) Typing progress in communication-centred systems. In: De Nicola R, Julien C (eds) Coordination Models and Languages, 15th International Conference, COORDINATION, Held as Part of the 8th International Federated Conference on Distributed Computing Techniques, DisCoTec. Proceedings, vol. 7890 of Lecture Notes in Computer Science. Springer, Florencem, pp 236–250Google Scholar

Copyright information

© The Author(s) 2016

Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Authors and Affiliations

  1. 1.Université de Nice Sophia-Antipolis, CNRS, I3S, UMR 7271Sophia AntipolisFrance
  2. 2.University of GroningenGroningenThe Netherlands

Personalised recommendations