Abstract
Some interesting communication protocols can be precisely described only by context-free session types, an extension of conventional session types supporting a general form of sequential composition. The complex metatheory of context-free session types, however, hinders the definition of corresponding checking and inference algorithms. In this work, we study a new syntax-directed type system for context-free session types that is easy to embed into a host programming language. We also detail 2 OCaml embeddings that allow us to piggyback on OCaml’s type system to check and infer context-free session types.
- Amal Ahmed, Matthew Fluet, and Greg Morrisett. 2007. L<sup>3</sup>: A linear language with locations. Fundamenta Informaticae 77, 4 (2007), 397--449. Google Scholar
Digital Library
- Arthur Charguéraud and François Pottier. 2008. Functional translation of a calculus of capabilities. In Proceedings of the 13th ACM SIGPLAN International Conference on Functional Programming (ICFP’08). ACM, New York, NY, 213--224. Google Scholar
Digital Library
- Bruno Courcelle. 1983. Fundamental properties of infinite trees. Theoretical Computer Science 25 (1983), 95--169.Google Scholar
- Ornela Dardha, Elena Giachino, and Davide Sangiorgi. 2017. Session types revisited. Information and Computation 256 (2017), 253--286. Google Scholar
Digital Library
- Romain Demangeon and Kohei Honda. 2011. Full abstraction in a subtyped pi-calculus with linear types. In Concurrency Theory. Lecture Notes in Computer Science, Vol. 6901. Springer, 280--296. Google Scholar
Digital Library
- Gert Florijn. 1995. Object protocols as functional parsers. In Object-Oriented Programming. Lecture Notes in Computer Science, Vol. 952. Springer, 351--373. Google Scholar
Digital Library
- Emily P. Friedman. 1976. The inclusion problem for simple languages. Theoretical Computer Science 1, 4 (1976), 297--316.Google Scholar
Cross Ref
- Alain Frisch and Jacques Garrigue. 2010. First-class modules and composable signatures in Objective Caml 3.12. In Proceedings of the ACM SIGPLAN Workshop on Machine Learning.Google Scholar
- Simon Gay and Malcolm Hole. 2005. Subtyping for session types in the π-calculus. Acta Informatica 42, 2-3 (2005), 191--225.Google Scholar
Cross Ref
- Simon J. Gay and Vasco T. Vasconcelos. 2010. Linear type theory for asynchronous session types. Journal of Functional Programming 20, 1 (2010), 19--50. Google Scholar
Digital Library
- Kohei Honda. 1993. Types for dyadic interaction. In Concurrency Theory. Lecture Notes in Computer Science, Vol. 715. Springer, 509--523. Google Scholar
Digital Library
- Kohei Honda, Vasco T. Vasconcelos, and Makoto Kubo. 1998. Language primitives and type disciplines for structured communication-based programming In Programming Languages and Systems. Lecture Notes in Computer Science, Vol. 1381. Springer, 122--138. Google Scholar
Digital Library
- Raymond Hu and Nobuko Yoshida. 2016. Hybrid session verification through endpoint API generation. In Fundamental Approaches to Software Engineering. Lecture Notes in Computer Science, Vol. 9633. Springer, 401--418.Google Scholar
- Hans Hüttel, Ivan Lanese, Vasco T. Vasconcelos, Luís Caires, Marco Carbone, Pierre-Malo Deniélou, et al. 2016. Foundations of session types and behavioural contracts. ACM Computing Surveys 49, 1 (2016), 3. Google Scholar
Digital Library
- Atsushi Igarashi and Naoki Kobayashi. 2005. Resource usage analysis. ACM Transactions on Programming Languages and Systems 27, 2 (March 2005), 264--313. Google Scholar
Digital Library
- A. J. Kfoury, J. Tiuryn, and P. Urzyczyn. 1993. Type reconstruction in the presence of polymorphic recursion. ACM Transactions on Programming Languages and Systems 15, 2 (1993), 290--311. Google Scholar
Digital Library
- Naoki Kobayashi. 2002. Type systems for concurrent programs. In Formal Methods at the Crossroads: From Panacea to Foundational Support. Lecture Notes in Computer Science. Springer, 439--453. Extended version available at http://www.kb.ecei.tohoku.ac.jp/koba/papers/tutorial-type-extended.pdf.Google Scholar
Cross Ref
- Naoki Kobayashi, Benjamin C. Pierce, and David N. Turner. 1999. Linearity and the pi-calculus. ACM Transactions on Programming Languages and Systems 21, 5 (1999), 914--947. Google Scholar
Digital Library
- A. J. Korenjak and J. E. Hopcroft. 1966. Simple deterministic languages. In Proceedings of the 7th Annual Symposium on Switching and Automata Theory (SWAT’66). IEEE, Los Alamitos, CA, 36--46. Google Scholar
Digital Library
- John Launchbury and Simon L. Peyton Jones. 1995. State in Haskell. Lisp and Symbolic Computation 8, 4 (1995), 293--341. Google Scholar
Digital Library
- John C. Mitchell and Gordon D. Plotkin. 1988. Abstract types have existential type. ACM Transactions on Programming Languages and Systems 10, 3 (1988), 470--502. Google Scholar
Digital Library
- Eugenio Moggi and Amr Sabry. 2001. Monadic encapsulation of effects: A revised approach (extended version). Journal of Functional Programming 11, 6 (2001), 591--627. Google Scholar
Digital Library
- Dimitris Mostrous, Nobuko Yoshida, and Kohei Honda. 2009. Global principal typing in partially commutative asynchronous sessions. In Programming Languages and Systems. Lecture Notes in Computer Science, Vol. 5502. Springer, 316--332. Google Scholar
Digital Library
- Oscar Nierstrasz. 1993. Regular types for active objects. In Proceedings of the 8th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA’93). ACM, New York, NY, 1--15. Google Scholar
Digital Library
- Luca Padovani. 2016. FuSe—A Simple Library Implementation of Binary Sessions. Retrieved May 27, 2018 from http://www.di.unito.it/~padovani/Software/FuSe/FuSe.html.Google Scholar
- Luca Padovani. 2017. A simple library implementation of binary sessions. Journal of Functional Programming 27 (2017), e4.Google Scholar
Cross Ref
- Luca Padovani. 2017. Context-free session type inference. In Programming Languages and Systems. Lecture Notes in Computer Science, Vol. 10201. Springer, 804--830. Google Scholar
Digital Library
- António Ravara and Vasco T. Vasconcelos. 2000. Typing non-uniform concurrent objects. In Concurrency Theory. Lecture Notes in Computer Science, Vol. 1877. Springer, 474--488. Google Scholar
Digital Library
- John H. Reppy. 1999. Concurrent Programming in ML. Cambridge University Press. Google Scholar
Digital Library
- Mario Südholt. 2005. A model of components with non-regular protocols. In Software Composition. Lecture Notes in Computer Science, Vol. 3628. Springer, 99--113. Google Scholar
Digital Library
- Peter Thiemann and Vasco T. Vasconcelos. 2016. Context-free session types. In Proceedings of the 21st International Conference on Functional Programming (ICFP’16). ACM, New York, NY, 462--475. Google Scholar
Digital Library
- Jesse A. Tov. 2012. Practical Programming With Substructural Types. Ph.D. Dissertation. Northeastern University, Boston, MA. Google Scholar
Digital Library
- Jesse A. Tov and Riccardo Pucella. 2010. Stateful contracts for affine types. In Programming Languages and Systems. Lecture Notes in Computer Science, Vol. 6012. Springer, 550--569. Google Scholar
Digital Library
- Jesse A. Tov and Riccardo Pucella. 2011. Practical affine types. In Proceedings of the 38th Annual Symposium on Principles of Programming Languages (POPL’11). ACM, New York, NY, 447--458. Google Scholar
Digital Library
- Philip Wadler. 2014. Propositions as sessions. Journal of Functional Programming 24, 2-3 (2014), 384--418.Google Scholar
Cross Ref
- David Walker and Kevin Watkins. 2001. On regions and linear types. In Proceedings of the 6th International Conference on Functional Programming (ICFP’01). ACM, New York, NY, 181--192. Google Scholar
Digital Library
- Andrew K. Wright and Matthias Felleisen. 1994. A syntactic approach to type soundness. Information and Computation 115, 1 (1994), 38--94. Google Scholar
Digital Library
- Jeremy Yallop and Oleg Kiselyov. 2010. First-class modules: Hidden power and tantalizing promises. In Proceedings of the ACM SIGPLAN Workshop on Machine Learning.Google Scholar
Index Terms
Context-Free Session Type Inference
Recommendations
System with Context-free Session Types
Programming Languages and SystemsAbstractWe study increasingly expressive type systems, from —an extension of the polymorphic lambda calculus with equirecursive types—to —the higher-order polymorphic lambda calculus with equirecursive types and context-free session types. Type ...
Context-Free Session Type Inference
Programming Languages and SystemsAbstractSome interesting communication protocols can be precisely described only by context-free session types, an extension of conventional session types with a general form of sequential composition. The complex metatheory of context-free session types, ...
An existential crisis resolved: type inference for first-class existential types
Despite the great success of inferring and programming with universal types, their dual—existential types—are much harder to work with. Existential types are useful in building abstract types, working with indexed types, and providing first-class ...






Comments