Higher-Order Processes, Functions, and Sessions: A Monadic Integration

  • Bernardo Toninho
  • Luis Caires
  • Frank Pfenning
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7792)


In prior research we have developed a Curry-Howard interpretation of linear sequent calculus as session-typed processes. In this paper we uniformly integrate this computational interpretation in a functional language via a linear contextual monad that isolates session-based concurrency. Monadic values are open process expressions and are first class objects in the language, thus providing a logical foundation for higher-order session typed processes. We illustrate how the combined use of the monad and recursive types allows us to cleanly write a rich variety of concurrent programs, including higher-order programs that communicate processes. We show the standard metatheoretic result of type preservation, as well as a global progress theorem, which to the best of our knowledge, is new in the higher-order session typed setting.


Linear Logic Process Expression Concurrent Program Typing Rule Functional Language 
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.


  1. 1.
    Abel, A.: Type-based termination, inflationary fixed-points, and mixed inductive-coinductive types. In: Proceedings of FICS 2012, pp. 1–11 (2012)Google Scholar
  2. 2.
    Altenkirch, T., Chapman, J., Uustalu, T.: Monads Need Not Be Endofunctors. In: Ong, L. (ed.) FOSSACS 2010. LNCS, vol. 6014, pp. 297–311. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  3. 3.
    Benton, P.N.: A Mixed Linear and Non-Linear Logic: Proofs, Terms and Models (Extended Abstract). In: Pacholski, L., Tiuryn, J. (eds.) CSL 1994. LNCS, vol. 933, pp. 121–135. Springer, Heidelberg (1995)CrossRefGoogle 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.
    Caires, L., Pfenning, F., Toninho, B.: Towards concurrent type theory. In: Types in Language Design and Implementation, pp. 1–12 (2012)Google Scholar
  6. 6.
    Caires, L., Pérez, J.A., Pfenning, F., Toninho, B.: Relational parametricity for polymorphic session types. Tech. Rep. CMU-CS-12-108, Carnegie Mellon Univ. (2012)Google Scholar
  7. 7.
    Cervesato, I., Scedrov, A.: Relating state-based and process-based concurrency through linear logic. Information and Computation 207(10), 1044–1077 (2009)MathSciNetzbMATHCrossRefGoogle Scholar
  8. 8.
    DeYoung, H., Caires, L., Pfenning, F., Toninho, B.: Cut reduction in linear logic as asynchronous session-typed communication. In: Computer Science Logic (2012)Google Scholar
  9. 9.
    Fairtlough, M., Mendler, M.: Propositional lax logic. Information and Computation 137(1), 1–33 (1997)MathSciNetzbMATHCrossRefGoogle Scholar
  10. 10.
    Gay, S., Vasconcelos, V.T.: Linear type theory for asynchronous session types. J. Funct. Programming 20(1), 19–50 (2010)MathSciNetzbMATHCrossRefGoogle Scholar
  11. 11.
    Honda, K.: Types for Dyadic Interaction. In: Best, E. (ed.) CONCUR 1993. LNCS, vol. 715, pp. 509–523. Springer, Heidelberg (1993)CrossRefGoogle Scholar
  12. 12.
    Hughes, J.: Generalising monads to arrows. Sci. of Comp. Prog. 37, 67–111 (1998)CrossRefGoogle Scholar
  13. 13.
    Mazurak, K., Zdancewic, S.: Lolliproc: to concurrency from classical linear logic via curry-howard and control. In: ICFP, pp. 39–50 (2010)Google Scholar
  14. 14.
    Mostrous, D., Yoshida, N.: Two Session Typing Systems for Higher-Order Mobile Processes. In: Della Rocca, S.R. (ed.) TLCA 2007. LNCS, vol. 4583, pp. 321–335. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  15. 15.
    Nanevski, A., Pfenning, F., Pientka, B.: Contextual modal type theory. Transactions on Computational Logic 9(3) (2008)Google Scholar
  16. 16.
    Peyton Jones, S.L., Wadler, P.: Imperative functional programming. In: Principles of Prog. Lang., POPL 1993, pp. 71–84 (1993)Google Scholar
  17. 17.
    Pfenning, F., Simmons, R.J.: Substructural operational semantics as ordered logic programming. In: Logic in Comp. Sci., pp. 101–110 (2009)Google Scholar
  18. 18.
    Swamy, N., Chen, J., Fournet, C., Strub, P.Y., Bhargavan, K., Yang, J.: Secure distributed programming with value-dependent types. In: ICFP, pp. 266–278 (2011)Google Scholar
  19. 19.
    Toninho, B., Caires, L., Pfenning, F.: Dependent session types via intuitionistic linear type theory. In: Prin. Pract. Decl. Program., pp. 161–172 (2011)Google Scholar
  20. 20.
    Wadler, P.: Propositions as sessions. In: ICFP, pp. 273–286 (2012)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Bernardo Toninho
    • 1
    • 2
  • Luis Caires
    • 2
  • Frank Pfenning
    • 1
  1. 1.Computer Science DepartmentCarnegie Mellon UniversityPittsburghUSA
  2. 2.CITI and Faculdade de Ciências e TecnologiaUniversidade Nova de LisboaLisboaPortugal

Personalised recommendations