Abstract
Session types provide static guarantees that concurrent programs respect communication protocols. We give a novel account of recursive session types in the context of GV, a small concurrent extension of the linear λ-calculus. We extend GV with recursive types and catamorphisms, following the initial algebra semantics of recursion, and show that doing so naturally gives rise to recursive session types. We show that this principled approach to recursion resolves long-standing problems in the treatment of duality for recursive session types.
We characterize the expressiveness of GV concurrency by giving a CPS translation to (non-concurrent) λ-calculus and proving that reduction in GV is simulated by full reduction in λ-calculus. This shows that GV remains terminating in the presence of positive recursive types, and that such arguments extend to other extensions of GV, such as polymorphism or non-linear types, by appeal to normalization results for sequential λ-calculi. We also show that GV remains deadlock free and deterministic in the presence of recursive types.
Finally, we extend CP, a session-typed process calculus based on linear logic, with recursive types, and show that doing so preserves the connection between reduction in GV and cut elimination in CP.
- S. Abramsky. Proofs as processes. Theor. Comput. Sci., 135(1):5–9, 1994. Google Scholar
Digital Library
- R. Atkey, S. Lindley, and J. G. Morris. Conflation confers concurrency. In S. Lindley, C. McBride, P. W. Trinder, and D. Sannella, editors, A List of Successes That Can Change the World - Essays Dedicated to Philip Wadler on the Occasion of His 60th Birthday, volume 9600 of Lecture Notes in Computer Science, pages 32–55. Springer, 2016.Google Scholar
- D. Baelde. Least and greatest fixed points in linear logic. ACM Trans. Comput. Logic, 13(1):2:1–2:44, Jan. 2012. Google Scholar
Digital Library
- D. Baelde and D. Miller. Least and greatest fixed points in linear logic. In N. Dershowitz and A. Voronkov, editors, Logic for Programming, Artificial Intelligence, and Reasoning, 14th International Conference, LPAR 2007, Yerevan, Armenia, October 15-19, 2007, Proceedings, volume 4790 of Lecture Notes in Computer Science, pages 92–106. Springer, 2007. Google Scholar
Digital Library
- G. Bellin and P. J. Scott. On the π-Calculus and linear logic. Theoretical Computer Science, 135(1):11–65, 1994. Google Scholar
Digital Library
- G. Bernardi and M. Hennessy. Using higher-order contracts to model session types (extended abstract). In P. Baldan and D. Gorla, editors, CONCUR 2014, volume 8704 of Lecture Notes in Computer Science, pages 387–401. Springer, 2014.Google Scholar
Cross Ref
- G. Bernardi and M. Hennessy. Using higher-order contracts to model session types. CoRR, abs/1310.6176v4, 2015.Google Scholar
- G. Bernardi, O. Dardha, S. J. Gay, and D. Kouzapas. On duality relations for session types. In Trustworthy Global Computing - 9th International Symposium, TGC 2014, Rome, Italy, September 5-6, 2014. Revised Selected Papers, pages 51–66, 2014.Google Scholar
- R. S. Bird and O. de Moor. Algebra of programming. Prentice Hall International series in computer science. Prentice Hall, 1997. Google Scholar
Digital Library
- V. Bono and L. Padovani. Typing copyless message passing. Logical Methods in Computer Science, 8(1), 2012.Google Scholar
- V. Bono, L. Padovani, and A. Tosatto. Polymorphic types for leak detection in a session-oriented functional language. In D. Beyer and M. Boreale, editors, Formal Techniques for Distributed Systems - Joint IFIP WG 6.1 International Conference, FMOODS/FORTE 2013, Held as Part of the 8th International Federated Conference on Distributed Computing Techniques, DisCoTec 2013, Florence, Italy, June 3-5, 2013. Proceedings, volume 7892 of Lecture Notes in Computer Science, pages 83–98. Springer, 2013.Google Scholar
- M. Boreale. On the expressiveness of internal mobility in namepassing calculi. In U. Montanari and V. Sassone, editors, CONCUR ’96, Concurrency Theory, 7th International Conference, Pisa, Italy, August 26-29, 1996, Proceedings, volume 1119 of Lecture Notes in Computer Science, pages 163–178. Springer, 1996. Google Scholar
Digital Library
- L. Caires and F. Pfenning. Session types as intuitionistic linear propositions. In P. Gastin and F. Laroussinie, editors, CONCUR 2010 - Concurrency Theory, 21th International Conference, CONCUR 2010, Paris, France, August 31-September 3, 2010. Proceedings, volume 6269 of Lecture Notes in Computer Science, pages 222–236. Springer, 2010. Google Scholar
Digital Library
- M. Carbone, S. Lindley, F. Montesi, C. Shürmann, and P. Wadler. Coherence generalises duality: a logical explanation of multiparty session types. In CONCUR. LIPICS, 2016. To appear.Google Scholar
- O. Danvy and L. R. Nielsen. A first-order one-pass CPS transformation. In M. Nielsen and U. Engberg, editors, Foundations of Software Science and Computation Structures, 5th International Conference, FOSSACS 2002. Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2002 Grenoble, France, April 8-12, 2002, Proceedings, volume 2303 of Lecture Notes in Computer Science, pages 98–113. Springer, 2002. Google Scholar
Digital Library
- O. Dardha. Recursive session types revisited. In Proceedings Third Workshop on Behavioural Types, BEAT 2014, Rome, Italy, 1st September 2014.Google Scholar
Cross Ref
- , pages 27–34, 2014.Google Scholar
- O. Dardha, E. Giachino, and D. Sangiorgi. Session types revisited. In D. D. Schreye, G. Janssens, and A. King, editors, Principles and Practice of Declarative Programming, PPDP’12, Leuven, Belgium - September 19 - 21, 2012, pages 139–150. ACM, 2012. Google Scholar
Digital Library
- A. Filinski. Linear continuations. In R. Sethi, editor, Conference Record of the Nineteenth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Albuquerque, New Mexico, USA, January 19-22, 1992, pages 27–38. ACM Press, 1992. Google Scholar
Digital Library
- P. Freyd. Algebraically complete categories. In G. R. Aurelio Carboni, Maria Cristina Pedicchio, editor, Category Theory - Proceedings of the International Conference held in Como, Italy, July 22–28, 1990. Springer, 1990.Google Scholar
- S. J. Gay and V. T. Vasconcelos. Linear type theory for asynchronous session types. Journal of Functional Programming, 20(01):19–50, 2010. Google Scholar
Digital Library
- J. A. Goguen, J. W. Thatcher, E. G. Wagner, and J. B. Wright. Initial algebra semantics and continuous algebras. J. ACM, 24(1):68–95, 1977. Google Scholar
Digital Library
- K. Honda. Types for dyadic interaction. In E. Best, editor, CONCUR ’93, 4th International Conference on Concurrency Theory, Hildesheim, Germany, August 23-26, 1993, Proceedings, volume 715 of Lecture Notes in Computer Science, pages 509–523. Springer, 1993. Google Scholar
Digital Library
- K. Honda, V. T. Vasconcelos, and M. Kubo. Language primitives and type discipline for structured communication-based programming. In C. Hankin, editor, ESOP, volume 1381 of Lecture Notes in Computer Science, pages 122–138. Springer, 1998. Google Scholar
Digital Library
- N. Kobayashi, B. C. Pierce, and D. N. Turner. Linearity and the picalculus. ACM Trans. Program. Lang. Syst., 21(5):914–947, 1999. Google Scholar
Digital Library
- J. Lévy and L. Maranget. Explicit substitutions and programming languages. In Foundations of Software Technology and Theoretical Computer Science, 1999, volume 1738 of LNCS. Springer, 1999. Google Scholar
Digital Library
- S. Lindley and J. G. Morris. A semantics for propositions as sessions. In Programming Languages and Systems - 24th European Symposium on Programming, ESOP 2015, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015, London, UK, April 11-18, 2015. Proceedings, pages 560–584, 2015.Google Scholar
- S. Lindley and J. G. Morris. Lightweight functional session types, 2015.Google Scholar
- Draft http://homepages.inf.ed.ac.uk/slindley/ papers/fst-draft-february2015.pdf.Google Scholar
- B. Liskov and L. Shrira. Promises: Linguistic support for efficient asynchronous procedure calls in distributed systems. In Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language Design and Implementation, PLDI ’88, pages 260–267, New York, NY, USA, 1988. ACM. Google Scholar
Digital Library
- E. Meijer, M. M. Fokkinga, and R. Paterson. Functional programming with bananas, lenses, envelopes and barbed wire. In J. Hughes, editor, Functional Programming Languages and Computer Architecture, 5th ACM Conference, Cambridge, MA, USA, August 26-30, 1991, Proceedings, volume 523 of Lecture Notes in Computer Science, pages 124–144. Springer, 1991. Google Scholar
Digital Library
- K. Takeuchi, K. Honda, and M. Kubo. An interaction-based language and its typing system. In C. Halatsis, D. G. Maritsas, G. Philokyprou, and S. Theodoridis, editors, PARLE ’94: Parallel Architectures and Languages Europe, 6th International PARLE Conference, Athens, Greece, July 4-8, 1994, Proceedings, volume 817 of Lecture Notes in Computer Science, pages 398–413. Springer, 1994. Google Scholar
Digital Library
- The Links Team. Links, 2016. http://groups.inf.ed.ac.uk/ links.Google Scholar
- B. Toninho, L. Caires, and F. Pfenning. Corecursion and nondivergence in session-typed processes. In Trustworthy Global Computing - 9th International Symposium, TGC 2014, Rome, Italy, September 5-6, 2014. Revised Selected Papers, pages 159–175, 2014.Google Scholar
- V. T. Vasconcelos, S. J. Gay, and A. Ravara. Type checking a multithreaded functional language with session types. Theor. Comput. Sci., 368(1-2):64–87, 2006. Google Scholar
Digital Library
- P. Wadler. Propositions as sessions. J. Funct. Program., 24(2-3):384– 418, 2014.Google Scholar
Cross Ref
Index Terms
Talking bananas: structural recursion for session types
Recommendations
Talking bananas: structural recursion for session types
ICFP 2016: Proceedings of the 21st ACM SIGPLAN International Conference on Functional ProgrammingSession types provide static guarantees that concurrent programs respect communication protocols. We give a novel account of recursive session types in the context of GV, a small concurrent extension of the linear λ-calculus. We extend GV with ...
Gradual session types
Session types are a rich type discipline, based on linear types, that lift the sort of safety claims that come with type systems to communications. However, web-based applications and micro services are often written in a mix of languages, with type ...
Acyclic Recursion with Polymorphic Types and Underpecification
ICAART 2016: Proceedings of the 8th International Conference on Agents and Artificial IntelligenceThe paper extends Moschovakis higher-order type theory of acyclic recursion by adding type polymorphism. We extend the type system of the theory to model parametric information that pertains to underspecified types. Different kinds of type polymorphism ...







Comments