On Duality Relations for Session Types

  • Giovanni Bernardi
  • Ornela Dardha
  • Simon J. Gay
  • Dimitrios Kouzapas
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8902)


Session types are a type formalism used to describe communication protocols over private session channels. Each participant in a binary session owns one endpoint of a session channel. A key notion is that of duality: the endpoints of a session channel should have dual session types in order to guarantee communication safety. Duality relations have been independently defined in different ways and different works, without considering their effect on the type system. In this paper we systematically study the existing duality relations and some new ones, and compare them in order to understand their expressiveness. The outcome is that those relations are split into two groups, one related to the naïve inductive duality, and the other related to a notion of mutual compliance, which we borrow from the literature on contracts for web-services.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bernardi, G., Dardha, O., Gay, S.J., Kouzapas, D.: On duality relations for session types (2014).
  2. 2.
    Bernardi, G., Hennessy, M.: Using higher-order contracts to model session types. CoRR, abs/1310.6176 (2013)Google Scholar
  3. 3.
    Bono, V., Padovani, L.: Typing copyless message passing. Logical Methods in Computer Science 8(1) (2012)Google Scholar
  4. 4.
    Caires, L., Pfenning, F.: Session types as intuitionistic linear propositions. In: Gastin, P., Laroussinie, F. (eds.) CONCUR 2010. LNCS, vol. 6269, pp. 222–236. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  5. 5.
    Castagna, G., Dezani-Ciancaglini, M., Giachino, E., Padovani, L.: Foundations of session types. In: Porto, A., López-Fraguas, F.J. (eds.) PPDP, pp. 219–230. ACM (2009)Google Scholar
  6. 6.
    Chen, T., Dezani-Ciancaglini, M., Yoshida, N.: On the preciseness of subtyping in session types. In: Proceedings of the 16th International Symposium on Principles and Practice of Declarative Programming (PPDP) (2014)Google Scholar
  7. 7.
    Dardha, O., Giachino, E., Sangiorgi, D.: Session types revisited. In: PPDP, pp. 139–150. ACM (2012)Google Scholar
  8. 8.
    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)CrossRefGoogle Scholar
  9. 9.
    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
  10. 10.
    Gay, S.J., Hole, M.: Subtyping for session types in the pi calculus. Acta Inf. 42(2–3), 191–225 (2005)CrossRefzbMATHMathSciNetGoogle Scholar
  11. 11.
    Gay, S.J., Vasconcelos, V.T.: Linear type theory for asynchronous session types. J. Funct. Program. 20(1), 19–50 (2010)CrossRefzbMATHMathSciNetGoogle Scholar
  12. 12.
    Honda, K., Vasconcelos, V.T., Kubo, M.: Language primitives and type discipline for structured communication-based programming. In: Hankin, C. (ed.) ESOP 1998. LNCS, vol. 1381, pp. 122–138. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  13. 13.
    Pierce, B.C.: Types and Programming Languages. MIT Press (2002)Google Scholar
  14. 14.
    Stoughton, A.: Substitution revisited. Theor. Comput. Sci. 59, 317–325 (1988)CrossRefzbMATHMathSciNetGoogle Scholar
  15. 15.
    Takeuchi, K., Honda, K., Kubo, M.: An interaction-based language and its typing system. In: Halatsis, C., Philokyprou, G., Maritsas, D., Theodoridis, S. (eds.) PARLE 1994. LNCS, vol. 817, pp. 398–413. Springer, Heidelberg (1994)CrossRefGoogle Scholar
  16. 16.
    Vallecillo, A., Vasconcelos, V.T., Ravara, A.: Typing the behavior of software components using session types. Fundam. Inform. 73(4), 583–598 (2006)zbMATHMathSciNetGoogle Scholar
  17. 17.
    Wadler, P.: Propositions as sessions. In: ICFP, pp. 273–286 (2012)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • Giovanni Bernardi
    • 1
  • Ornela Dardha
    • 2
  • Simon J. Gay
    • 2
  • Dimitrios Kouzapas
    • 2
    • 3
  1. 1.IMDEA Software InstituteMadridSpain
  2. 2.School of Computing ScienceUniversity of GlasgowGlasgowUK
  3. 3.Department of ComputingImperial College LondonLondonUK

Personalised recommendations