On Sessions and Infinite Data

  • Paula Severi
  • Luca Padovani
  • Emilio Tuosto
  • Mariangiola  Dezani-Ciancaglini
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9686)


We investigate some subtle issues that arise when programming distributed computations over infinite data structures. To do this, we formalise a calculus that combines a call-by-name functional core with session-based communication primitives and that allows session operations to be performed “on demand”. We develop a typing discipline that guarantees both normalisation of expressions and progress of processes and that uncovers an unexpected interplay between evaluation and communication.


Operational Semantic Parallel Composition Typing Judgement Session Type Evaluation Context 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.



The authors thank the reviewers for their valuable comments.


  1. 1.
    Ariola, Z.M., Felleisen, M., Maraist, J., Odersky, M., Wadler, P.: The call-by-need lambda calculus. In: Cytron, R.K., Lee, P. (eds.) Proceedings of POPL 1995, pp. 233–246. ACM Press (1995)Google Scholar
  2. 2.
    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
  3. 3.
    Cave, A., Ferreira, F., Panangaden, P., Pientka, B.: Fair reactive programming. In: Jagannathan, S., Sewell, P. (eds.) Proceedings of POPL 2014, pp. 361–372. ACM Press (2014)Google Scholar
  4. 4.
    Coppo, M., Dezani-Ciancaglini, M., Yoshida, N., Padovani, L.: Global progress for dynamically interleaved multiparty sessions. Math. Struct. Comput. Sci. 26(2), 238–302 (2016)MathSciNetCrossRefGoogle Scholar
  5. 5.
    Coquand, T.: Infinite objects in type theory. In: Barendregt, H., Nipkow, T. (eds.) TYPES 1993. LNCS, vol. 806, pp. 62–78. Springer, Heidelberg (1994)CrossRefGoogle Scholar
  6. 6.
    Courcelle, B.: Fundamental properties of infinite trees. Theoret. Comput. Sci. 25, 95–169 (1983)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Cruz-Filipe, L., Lanese, I., Martins, F., Ravara, A., Vasconcelos, V.: The stream-based service-centred calculus: a foundation for service-oriented programming. Formal Aspects Comput. 26(12), 865–918 (2014)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Deniélou, P.-M., Yoshida, N.: Dynamic multirole session types. In: Ball, T., Sagiv, M. (eds.) Proceedings of POPL 2011, pp. 435–446. ACM Press (2011)Google 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.
    Flanagan, C., Felleisen, M.: The semantics of future and an application. J. Funct. Program. 9(1), 1–31 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Gay, S.J., Vasconcelos, V.T.: Linear type theory for asynchronous session types. J. Funct. Program. 20(1), 19–50 (2010)MathSciNetCrossRefzbMATHGoogle 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.
    Hughes, J.: Why functional programming matters. Comput. J. 32(2), 98–107 (1989)CrossRefGoogle Scholar
  14. 14.
    Krishnaswami, N., Benton, N.: Ultrametric semantics of reactive programs. In: Grohe, M. (ed.) Proceedings of LICS 2011, pp. 257–266. IEEE (2011)Google Scholar
  15. 15.
    Krishnaswami, N.R., Benton, N., Hoffmann, J.: Higher-order functional reactive programming in bounded space. In: Proceedings of POPL 2012, pp. 45–58. ACM Press (2012)Google Scholar
  16. 16.
    Lindley, S., Morris, J.G.: A semantics for propositions as sessions. In: Vitek, J. (ed.) ESOP 2015. LNCS, vol. 9032, pp. 560–584. Springer, Heidelberg (2015)CrossRefGoogle Scholar
  17. 17.
    Manna, Z., Pnueli, A.: The Temporal Logic of Reactive and Concurrent Systems. Springer, Heidelberg (2012)zbMATHGoogle Scholar
  18. 18.
    Maraist, J., Odersky, M., Wadler, P.: The call-by-need lambda calculus. J. Funct. Program. 8(3), 275–317 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Nakano, H.: A modality for recursion. In: Abadi, M. (ed.) Proceedings of LICS 2000, pp. 255–266. IEEE (2000)Google Scholar
  20. 20.
    Padovani, L.: Deadlock and lock freedom in the linear \(\pi \)-calculus. In: Henzinger, T.A., Miller, D. (eds.) Proceedings of LICS 2014, pp. 72:1–72:10. ACM Press (2014)Google Scholar
  21. 21.
    Peyton Jones, S.: Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell. In: Hoare, T., Broy, M., Steinbrüggen, R. (eds.) Engineering Theories of Software Construction, pp. 47–96. IOS Press (2001)Google Scholar
  22. 22.
    Peyton Jones, S., Gordon, A., Finne, S.: Concurrent Haskell. In: Boehm, H., Steele Jr., G.L. (eds.) Proceedings of POPL 1996, pp. 295–308. ACM Press (1996)Google Scholar
  23. 23.
    Peyton Jones, S., Wadler, P.: Imperative functional programming. In: Deusen, M.S.V., Lang, B. (eds.) Proceedings of POPL 1993, pp. 71–84. ACM Press (1993)Google Scholar
  24. 24.
    Pierce, B.C.: Types and Programming Languages. MIT Press, Cambridge (2002)zbMATHGoogle Scholar
  25. 25.
    Sabel, D., Schmidt-Schauß, M.: A contextual semantics for concurrent Haskell with futures. In: Schneider-Kamp, P., Hanus, M. (eds.) Proceedings of PPDP 2011, pp. 101–112. ACM Press (2011)Google Scholar
  26. 26.
    Severi, P., de Vries, F.-J.: Pure type systems with corecursion on streams: from finite to infinitary normalisation. In: Thiemann, P., Findler, R.B. (eds.) Proceedings of ICFP 2012, pp. 141–152. ACM Press (2012)Google Scholar
  27. 27.
    Severi, P., Padovani, L., Tuosto, E., Dezani-Ciancaglini, M.: On sessions and infinite data. Technical report, Universiy of Leicester and Università di Torino (2016).
  28. 28.
    Toninho, B., Caires, L., Pfenning, F.: Corecursion and non-divergence in session-typed processes. In: Maffei, M., Tuosto, E. (eds.) TGC 2014. LNCS, vol. 8902, pp. 159–175. Springer, Heidelberg (2014)Google Scholar
  29. 29.
    Vasconcelos, V.T.: Fundamentals of session types. Inf. Comput. 217, 52–70 (2012)MathSciNetCrossRefzbMATHGoogle Scholar
  30. 30.
    Wadsworth, C.P.: Semantics and Pragmatics of the Lambda Calculus. Ph.D. thesis, Oxford University (1971)Google Scholar

Copyright information

© IFIP International Federation for Information Processing 2016

Authors and Affiliations

  • Paula Severi
    • 1
  • Luca Padovani
    • 2
  • Emilio Tuosto
    • 1
  • Mariangiola  Dezani-Ciancaglini
    • 2
  1. 1.Department of Computer ScienceUniversity of LeicesterLeicesterUK
  2. 2.Dipartimento di InformaticaUniversità di TorinoTurinItaly

Personalised recommendations