International School on Formal Methods for the Design of Computer, Communication and Software Systems

SFM 2015: Formal Methods for Multicore Programming pp 146-178 | Cite as

A Gentle Introduction to Multiparty Asynchronous Session Types

  • Mario Coppo
  • Mariangiola Dezani-Ciancaglini
  • Luca Padovani
  • Nobuko Yoshida
Chapter
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9104)

Abstract

This article provides a gentle introduction to multiparty session types, a class of behavioural types specifically targeted at describing protocols in distributed systems based on asynchronous communication. The type system ensures well-typed processes to enjoy non-trivial properties, including communication safety, protocol fidelity, as well as progress. The adoption of multiparty session types can positively affect the whole software lifecycle, from design to deployment, improving software reliability and reducing its development costs.

Notes

Acknowledgements

The research reported in this chapter has been partially supported by COST IC1201. The first three authors have been partially supported by MIUR PRIN Project CINA Prot. 2010LHT4KM and Torino University/Compagnia San Paolo Project SALT. The last author has been partially supported by EPSRC EP/K011715/01, EP/K034413/01 and EP/L00058X/1 and the EU project FP7-612985 UpScale.

References

  1. 1.
  2. 2.
    Bartoletti, M., Castellani, I., Deniélou, P.-M., Dezani-Ciancaglini, M., Ghilezan, S., Pantovic, J., Pérez, J.A., Thiemann, P., Toninho, B., Vieira, H.T.: Combining behavioural types with security analysis (2014, Submitted for Journal Publication)Google Scholar
  3. 3.
    Bettini, L., Coppo, M., D’Antoni, L., De Luca, M., Dezani-Ciancaglini, M., Yoshida, N.: Global progress in dynamically interleaved multiparty sessions. In: van Breugel, F., Chechik, M. (eds.) CONCUR 2008. LNCS, vol. 5201, pp. 418–433. Springer, Heidelberg (2008) CrossRefGoogle Scholar
  4. 4.
    Bhargavan, K., Corin, R., Deniélou, P.-M., Fournet, C., Leifer, J.J.: Cryptographic protocol synthesis and verification for multiparty sessions. In: Mitchell, J.C. (ed.) CSF 2009, pp. 124–140. IEEE Computer Society Press, Los Alamitos (2009) Google Scholar
  5. 5.
    Bocchi, L., Chen, T.-C., Demangeon, R., Honda, K., Yoshida, N.: Monitoring networks through multiparty session types. In: Beyer, D., Boreale, M. (eds.) FORTE 2013 and FMOODS 2013. LNCS, vol. 7892, pp. 50–65. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  6. 6.
    Bocchi, L., Demangeon, R., Yoshida, N.: A multiparty multi-session logic. In: Palamidessi, C., Ryan, M.D. (eds.) TGC 2012. LNCS, vol. 8191, pp. 97–111. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  7. 7.
    Bocchi, L., Honda, K., Tuosto, E., Yoshida, N.: A theory of design-by-contract for distributed multiparty interactions. In: Gastin, P., Laroussinie, F. (eds.) CONCUR 2010. LNCS, vol. 6269, pp. 162–176. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  8. 8.
    Bocchi, L., Melgratti, H., Tuosto, E.: Resolving non-determinism in choreographies. In: Shao, Z. (ed.) ESOP 2014 (ETAPS). LNCS, vol. 8410, pp. 493–512. Springer, Heidelberg (2014) CrossRefGoogle Scholar
  9. 9.
    Bocchi, L., Yang, W., Yoshida, N.: Timed multiparty session types. In: Baldan, P., Gorla, D. (eds.) CONCUR 2014. LNCS, vol. 8704, pp. 419–434. Springer, Heidelberg (2014) Google Scholar
  10. 10.
    Bonelli, E., Compagnoni, A.B.: Multipoint session types for a distributed calculus. In: Barthe, G., Fournet, C. (eds.) TGC 2007. LNCS, vol. 4912, pp. 240–256. Springer, Heidelberg (2008) CrossRefGoogle Scholar
  11. 11.
    Brand, D., Zafiropulo, P.: On communicating finite-state machines. J. ACM 30, 323–342 (1983)MathSciNetCrossRefMATHGoogle Scholar
  12. 12.
    Capecchi, S., Castellani, I., Dezani-Ciancaglini, M.: Typing access control and secure information flow in sessions. Inf. Comput. 238, 68–105 (2014)MathSciNetCrossRefMATHGoogle Scholar
  13. 13.
    Capecchi, S., Castellani, I., Dezani-Ciancaglini, M.: Information flow safety in multiparty sessions. Math. Struct. Comput. Sci. 1–43 (2015). http://journals.cambridge.org/article_S0960129514000619
  14. 14.
    Capecchi, S., Castellani, I., Dezani-Ciancaglini, M., Rezk, T.: Session types for access and information flow control. In: Gastin, P., Laroussinie, F. (eds.) CONCUR 2010. LNCS, vol. 6269, pp. 237–252. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  15. 15.
    Capecchi, S., Giachino, E., Yoshida, N.: Global escape in multiparty sessions. Math. Struct. Comput. Sci. 1–50 (2015). http://journals.cambridge.org/article_S0960129514000164
  16. 16.
    Carbone, M., Honda, K., Yoshida, N.: Structured communication-centered programming for web services. ACM Trans. Program. Lang. Syst. 34(2), 8 (2012)CrossRefMATHGoogle Scholar
  17. 17.
    Carbone, M., Montesi, F.: Deadlock-freedom-by-design: multiparty asynchronous global programming. In: Giacobazzi, R., Cousot, R. (eds.) POPL 2013, pp. 263–274. ACM, New York (2013) Google Scholar
  18. 18.
    Castagna, G., Dezani-Ciancaglini, M., Padovani, L.: On global types and multi-party session. Logical Methods Comput. Sci. 8(1), 24 (2012)MathSciNetCrossRefMATHGoogle Scholar
  19. 19.
    Castellani, I., Dezani-Ciancaglini, M., Pérez, J.A.: Self-adaptation and secure information flow in multiparty structured communications: a unified perspective. In: Carbone, M. (ed.) BEAT 2014. EPTCS, vol. 162, pp. 9–18 (2014)Google Scholar
  20. 20.
    Chen, T.-C., Bocchi, L., Deniélou, P.-M., Honda, K., Yoshida, N.: Asynchronous distributed monitoring for multiparty session enforcement. In: Bruni, R., Sassone, V. (eds.) TGC 2011. LNCS, vol. 7173, pp. 25–45. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  21. 21.
    Chen, T.-C., Honda, K.: Specifying stateful asynchronous properties for distributed programs. In: Koutny, M., Ulidowski, I. (eds.) CONCUR 2012. LNCS, vol. 7454, pp. 209–224. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  22. 22.
    Coppo, M., Dezani-Ciancaglini, M., Padovani, L., Yoshida, N.: Inference of global progress properties for dynamically interleaved multiparty sessions. In: De Nicola, R., Julien, C. (eds.) COORDINATION 2013. LNCS, vol. 7890, pp. 45–59. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  23. 23.
    Coppo, M., Dezani-Ciancaglini, M., Venneri, B.: Self-adaptive multiparty sessions. SOCA 1–20 (2014). http://dx.doi.org/10.1007/s11761-014-0171-9
  24. 24.
    Coppo, M., Dezani-Ciancaglini, M., Yoshida, N.: Asynchronous session types and progress for object oriented languages. In: Bonsangue, M.M., Johnsen, E.B. (eds.) FMOODS 2007. LNCS, vol. 4468, pp. 1–31. Springer, Heidelberg (2007) CrossRefGoogle Scholar
  25. 25.
    Coppo, M., Dezani-Ciancaglini, M., Yoshida, N., Padovani, L.: Global progress for dynamically interleaved multiparty sessions. Math. Struct. Comput. Sci. 1–65 (2015). http://journals.cambridge.org/article_S0960129514000188
  26. 26.
    Dalla Preda, M., Giallorenzo, S., Lanese, I., Mauro, J., Gabbrielli, M.: AIOCJ: a choreographic framework for safe adaptive distributed applications. In: Combemale, B., Pearce, D.J., Barais, O., Vinju, J.J. (eds.) SLE 2014. LNCS, vol. 8706, pp. 161–170. Springer, Heidelberg (2014) Google Scholar
  27. 27.
    Dardha, O., Giachino, E., Sangiorgi, D.: Session types revisited. In: De Schreye, D., Janssens, G., King, A. (eds.) PPDP 2012, pp. 139–150. ACM Press, New york (2012) Google Scholar
  28. 28.
    Demangeon, R., Honda, K.: Nested protocols in session types. In: Koutny, M., Ulidowski, I. (eds.) CONCUR 2012. LNCS, vol. 7454, pp. 272–286. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  29. 29.
    Demangeon, R., Honda, K., Hu, R., Neykova, R., Yoshida, N.: Practical interruptible conversations: distributed dynamic verification with multiparty session types and Python. Formal Methods Syst. Des. 1–29 (2014). http://dx.doi.org/10.1007/s10703-014-0218-8
  30. 30.
    Deniélou, P.-M., Yoshida, N.: Buffered communication analysis in distributed multiparty sessions. In: Gastin, P., Laroussinie, F. (eds.) CONCUR 2010. LNCS, vol. 6269, pp. 343–357. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  31. 31.
    Deniélou, P.-M., Yoshida, N.: Dynamic multirole session types. In: Ball, T., Sagiv, M. (eds.) POPL 2011, pp. 435–446. ACM Press, New York (2011) Google Scholar
  32. 32.
    Deniélou, P.-M., Yoshida, N.: Multiparty session types meet communicating automata. In: Seidl, H. (ed.) Programming Languages and Systems. LNCS, vol. 7211, pp. 194–213. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  33. 33.
    Deniélou, P.-M., Yoshida, N.: Multiparty compatibility in communicating automata: characterisation and synthesis of global session types. In: Fomin, F.V., Freivalds, R., Kwiatkowska, M., Peleg, D. (eds.) ICALP 2013, Part II. LNCS, vol. 7966, pp. 174–186. Springer, Heidelberg (2013) Google Scholar
  34. 34.
    Deniélou, P.-M., Yoshida, N., Bejleri, A., Hu, R.: Parameterised multiparty session types. Logical Methods Comput. Sci. 8(4), 1–46 (2012)MathSciNetCrossRefMATHGoogle Scholar
  35. 35.
    Dezani-Ciancaglini, M., de’Liguoro, U.: Sessions and session types: an overview. In: Laneve, C., Su, J. (eds.) WS-FM 2009. LNCS, vol. 6194, pp. 1–28. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  36. 36.
    Dezani-Ciancaglini, M., Mostrous, D., Yoshida, N., Drossopoulou, S.: Session types for object-oriented languages. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 328–352. Springer, Heidelberg (2006) CrossRefGoogle Scholar
  37. 37.
    Fossati, L., Hu, R., Yoshida, N.: Multiparty session nets. In: Maffei, M., Tuosto, E. (eds.) TGC 2014. LNCS, vol. 8902, pp. 112–127. Springer, Heidelberg (2014) Google Scholar
  38. 38.
    Henriksen, A.S., Nielsen, L., Hildebrandt, T.T., Yoshida, N., Henglein, F.: Trustworthy pervasive healthcare services via multiparty session types. In: Weber, J., Perseil, I. (eds.) FHIES 2012. LNCS, vol. 7789, pp. 124–141. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  39. 39.
    Honda, K.: Types for dyadic interaction. In: Best, E. (ed.) CONCUR 1993. LNCS, vol. 715, pp. 509–523. Springer, Heidelberg (1993) Google Scholar
  40. 40.
    Honda, K., Hu, R., Neykova, R., Chen, T.-C., Demangeon, R., Deniélou, P.-M., Yoshida, N.: Structuring Communication with session types. In: Agha, G., Igarashi, A., Kobayashi, N., Masuhara, H., Matsuoka, S., Shibayama, E., Taura, K. (eds.) Concurrent Objects and Beyond. LNCS, vol. 8665, pp. 105–127. Springer, Heidelberg (2014) Google Scholar
  41. 41.
    Honda, K., Mukhamedov, A., Brown, G., Chen, T.-C., Yoshida, N.: Scribbling interactions with a formal foundation. In: Natarajan, R., Ojo, A. (eds.) ICDCIT 2011. LNCS, vol. 6536, pp. 55–75. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  42. 42.
    Honda, K., Vasconcelos, V.T., Kubo, M.: Language primitives and type disciplines for structured communication-based programming. In: Hankin, C. (ed.) ESOP 1998. LNCS, vol. 1381, pp. 122–138. Springer, Heidelberg (1998) Google Scholar
  43. 43.
    Honda, K., Yoshida, N., Carbone, M.: Multiparty asynchronous session types. In: Necula, G.C., Wadler, P. (eds.) POPL’08, pp. 273–284. ACM Press, New York (2008)Google Scholar
  44. 44.
    Hu, R., Neykova, R., Yoshida, N., Demangeon, R., Honda, K.: Practical interruptible conversations. In: Legay, A., Bensalem, S. (eds.) RV 2013. LNCS, vol. 8174, pp. 130–148. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  45. 45.
    Hüttel, H., Lanese, I., Vasconcelos, V.T., Caires, L., Carbone, M., Deniélou, P.-M., Mostrous, D., Padovani, L., Ravara, A., Tuosto, E., Vieira, H.T., Zavattaro, G.: Foundations of Behavioural Types (2014). Submitted for journal publicationGoogle Scholar
  46. 46.
    Kouzapas, D., Yoshida, N.: Globally governed session semantics. Logical Methods Comput. Sci. 10, 1–45 (2015)Google Scholar
  47. 47.
    Kouzapas, D., Yoshida, N., Raymond, H., Honda, K.: On asynchronous eventful session semantics. Math. Struct. Comput. Sci. 29, 1–62 (2015)MATHGoogle Scholar
  48. 48.
    Lange, J., Tuosto, E.: Synthesising choreographies from local session types. In: Koutny, M., Ulidowski, I. (eds.) CONCUR 2012. LNCS, vol. 7454, pp. 225–239. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  49. 49.
    Lange, J., Tuosto, E., Yoshida, N.: From communicating machines to graphical choreographies. In: Rajamani, S.K., Walker, D. (eds.) POPL 2015, pp. 221–232. ACM Press, New York (2015) Google Scholar
  50. 50.
    Milner, R.: Communicating and Mobile Systems: The \(\pi \)-Calculus. Cambridge University Press, Cambridge (1999) MATHGoogle Scholar
  51. 51.
    Montesi, F., Yoshida, N.: Compositional choreographies. In: D’Argenio, P.R., Melgratti, H. (eds.) CONCUR 2013 – Concurrency Theory. LNCS, vol. 8052, pp. 425–439. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  52. 52.
    Mostrous, D., Yoshida, N., Honda, K.: Global principal typing in partially commutative asynchronous sessions. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 316–332. Springer, Heidelberg (2009) CrossRefGoogle Scholar
  53. 53.
    Neykova, R., Bocchi, L., Yoshida, N.: Timed runtime monitoring for multiparty conversations. In: Carbone, M. (eds.) BEAT 2014. EPTCS, vol. 162, pp. 19–26 (2014)Google Scholar
  54. 54.
    Neykova, R., Yoshida, N.: Multiparty session actors. In: Kühn, E., Pugliese, R. (eds.) COORDINATION 2014. LNCS, vol. 8459, pp. 131–146. Springer, Heidelberg (2014) CrossRefGoogle Scholar
  55. 55.
    Neykova, R., Yoshida, N., Hu, R.: SPY: local verification of global protocols. In: Legay, A., Bensalem, S. (eds.) RV 2013. LNCS, vol. 8174, pp. 358–363. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  56. 56.
    Ng, N., de Figueiredo Coutinho, J.G., Yoshida, N.: Protocols by default: safe MPI code generation based on session types. In: Franke, B. (ed.) CC 2015. LNCS, vol. 9031, pp. 212–232. Springer, Heidelberg (2015) CrossRefGoogle Scholar
  57. 57.
    Ng, N., Yoshida, N.: Pabble: parameterised Scribble. SOCA 1–16 (2014). http://dx.doi.org/10.1007/s11761-014-0172-8
  58. 58.
    Ng, N., Yoshida, N., Honda, K.: Multiparty session C: safe parallel programming with message optimisation. In: Furia, C.A., Nanz, S. (eds.) TOOLS 2012. LNCS, vol. 7304, pp. 202–218. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  59. 59.
    Ng, N., Yoshida, N., Luk, W.: Scalable session programming for heterogeneous high-performance systems. In: Counsell, S., Núñez, M. (eds.) SEFM 2013. LNCS, vol. 8368, pp. 82–98. Springer, Heidelberg (2014) CrossRefGoogle Scholar
  60. 60.
    Ng, N., Yoshida, N., Niu, X.Y., Tsoi, K.H., Luk, W.: Session types: towards safe and fast reconfigurable programming. SIGARCH CAN 40, 22–27 (2012)Google Scholar
  61. 61.
    Nielsen, L., Yoshida, N., Honda, K.: Multiparty symmetric sum types. In: Fröschle, S.B., Valencia, F.D. (eds.) EXPRESS 2010. EPTCS, vol. 41, pp. 121–135 (2010)Google Scholar
  62. 62.
  63. 63.
    Padovani, L.: Deadlock and Lock Freedom in the Linear \(\pi \)-Calculus. In: Henzinger, T.A., Miller, D. (eds.) CSL-LICS 2014, pp. 72:1–72:10. ACM Press, New York (2014). Extended technical report available at http://hal.archives-ouvertes.fr/hal-00932356v2/document Google Scholar
  64. 64.
    Padovani, L.: Fair subtyping for multi-party session types. Math. Struct. Comput. Sci. 1–41 (2015). http://journals.cambridge.org/article_S096012951400022X
  65. 65.
    Pierce, B., Sangiorgi, D.: Typing and subtyping for mobile processes. J. Math. Struct. Comput. SCi. 6(5), 409–454 (1996)MathSciNetMATHGoogle Scholar
  66. 66.
    Benjamin, C.: Types and Programming Languages. MIT Press, Cambridge (2002) MATHGoogle Scholar
  67. 67.
    Planul, J., Corin, R., Fournet, C.: Secure enforcement for global process specifications. In: Bravetti, M., Zavattaro, G. (eds.) CONCUR 2009. LNCS, vol. 5710, pp. 511–526. Springer, Heidelberg (2009) CrossRefGoogle Scholar
  68. 68.
    Savara. SAVARA JBoss RedHat Project (2010). http://www.jboss.org/savara
  69. 69.
    Scribble. Scribble JBoss RedHat Project (2008). http://www.jboss.org/scribble
  70. 70.
    Sivaramakrishnan, K.C., Nagaraj, K., Ziarek, L., Eugster, P.: Efficient session type guided distributed interaction. In: Clarke, D., Agha, G. (eds.) COORDINATION 2010. LNCS, vol. 6116, pp. 152–167. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  71. 71.
    Swamy, N., Chen, J., Fournet, C., Strub, P.-Y., Bhargavan, K., Yang, J.: Secure distributed programming with value-dependent types. In: Chakravarty, M.M.T., Hu, Z., Danvy, O. (eds.) ICFP 2011, pp. 266–278. ACM Press, New York (2011)Google Scholar
  72. 72.
    UNIFI. International Organization for Standardization ISO 20022 UNIversal Financial Industry message scheme (2002). http://www.iso20022.org
  73. 73.
    Web Services Choreography Working Group. Web Services Choreography Description Language (2002). http://www.w3.org/2002/ws/chor/
  74. 74.
    Yoshida, N.: Graph types for monadic mobile processes. In: Chandru, V., Vinay, V. (eds.) FSTTCS 1996. LNCS, vol. 1180, pp. 371–386. Springer, Heidelberg (1996) CrossRefGoogle Scholar
  75. 75.
    Yoshida, N., Hu, R., Neykova, R., Ng, N.: The Scribble protocol language. In: Abadi, M., Lluch Lafuente, A. (eds.) TGC 2013. LNCS, vol. 8358, pp. 22–41. Springer, Heidelberg (2014) CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Mario Coppo
    • 1
  • Mariangiola Dezani-Ciancaglini
    • 1
  • Luca Padovani
    • 1
  • Nobuko Yoshida
    • 2
  1. 1.Dipartimento di InformaticaUniversità di TorinoTurinItaly
  2. 2.Department of ComputingImperial College LondonLondonUK

Personalised recommendations