Skip to main content

Corecursion and Non-divergence in Session-Typed Processes

  • Conference paper
  • First Online:
Trustworthy Global Computing (TGC 2014)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8902))

Included in the following conference series:

Abstract

Session types are widely accepted as an expressive discipline for structuring communications in concurrent and distributed systems. In order to express infinitely unbounded sessions, session typed languages often include general recursion which may introduce undesirable divergence, e.g., infinite unobservable reduction sequences. In this paper we address, by means of typing, the challenge of ensuring non-divergence in a session-typed \(\pi \)-calculus with general (co)recursion, while still allowing interesting infinite behaviors to be definable. Our approach builds on a Curry-Howard correspondence between our type system and linear logic extended with co-inductive types, for which our non-divergence property implies consistency. We prove type safety for our framework, implying protocol compliance and global progress of well-typed processes. We also establish, using a logical relation argument, that well-typed processes are compositionally non-divergent, that is, that no well-typed composition of processes, including those dynamically assembled via name passing, can result in divergent behavior.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Honda, K.: Types for dyadic interaction. In: Best, E. (ed.) CONCUR 1993. LNCS, vol. 715, pp. 509–523. Springer, Heidelberg (1993)

    Google Scholar 

  2. 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)

    Chapter  Google Scholar 

  3. Honda, K., Yoshida, N., Carbone, M.: Multiparty asynchronous session types. In: POPL, pp. 273–284 (2008)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  5. Wadler, P.: Propositions as sessions. In: ICFP 2012, pp. 273–286 (2012)

    Google Scholar 

  6. Toninho, B., Caires, L., Pfenning, F.: Dependent session types via intuitionistic linear type theory. In: PPDP 2011, pp. 161–172 (2011)

    Google Scholar 

  7. Pfenning, F., Caires, L., Toninho, B.: Proof-carrying code in a session-typed process calculus. In: Jouannaud, J.-P., Shao, Z. (eds.) CPP 2011. LNCS, vol. 7086, pp. 21–36. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  8. Caires, L., Pérez, J.A., Pfenning, F., Toninho, B.: Behavioral polymorphism and parametricity in session-based communication. In: Felleisen, M., Gardner, P. (eds.) Programming Languages and Systems. LNCS, vol. 7792, pp. 330–349. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  9. Toninho, B., Caires, L., Pfenning, F.: Higher-order processes, functions, and sessions: A monadic integration. In: Felleisen, M., Gardner, P. (eds.) Programming Languages and Systems. LNCS, vol. 7792, pp. 350–369. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  10. Sangiorgi, D., Walker, D.: The \(\pi \)-calculus: A Theory of Mobile Processes. Cambridge University Press (2001)

    Google Scholar 

  11. The Coq Development Team: The Coq Proof Assistant Reference Manual (2013)

    Google Scholar 

  12. Norell, U.: Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers University of Technology (2007)

    Google Scholar 

  13. Abel, A., Pientka, B.: Wellfounded recursion with copatterns: A unified approach to termination and productivity. In: LICS (2013)

    Google Scholar 

  14. Pérez, J.A., Caires, L., Pfenning, F., Toninho, B.: Linear logical relations for session-based concurrency. In: Seidl, H. (ed.) Programming Languages and Systems. LNCS, vol. 7211, pp. 539–558. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  15. Aranda, J., Di Giusto, C., Palamidessi, C., Valencia, F.: On recursion, replication and scope mechanisms in process calculi. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2006. LNCS, vol. 4709, pp. 185–206. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  16. Gay, S., Hole, M.: Subtyping for Session Types in the Pi Calculus. Acta Informatica 42(2–3), 191–225 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  17. Yoshida, N., Berger, M., Honda, K.: Strong normalisation in the pi -calculus. Inf. Comput. 191(2), 145–202 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  18. Gay, S., Vasconcelos, V.T.: Linear type theory for asynchronous session types. J. Funct. Programming 20(1), 19–50 (2010)

    Article  MATH  MathSciNet  Google Scholar 

  19. Deng, Y., Sangiorgi, D.: Ensuring Termination by Typability. In: Levy, J.-J., Mayr, E.W., Mitchell, J.C. (eds.) TCS 2004. IFIP, vol. 155, pp. 619–632. Springer, Boston (2004)

    Google Scholar 

  20. Sangiorgi, D.: Termination of processes. Math. Struct. in Comp. Sci. 16(1), 1–39 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  21. Morris, J.G., Lindley, S., Wadler, P.: The least must speak with the greatest (2014) Draft

    Google Scholar 

  22. Baelde, D.: Least and greatest fixed points in linear logic. TOCL 13(1) (January 2012)

    Google Scholar 

  23. Abel, A.: Strong normalization and equi-(co)inductive types. In: Della Rocca, S.R. (ed.) TLCA 2007. LNCS, vol. 4583, pp. 8–22. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  24. Mendler, N.P.: Inductive types and type constraints in the second-order lambda calculus. Annals of Pure and Applied Logic 5(12), 159–172 (1991)

    Article  MathSciNet  Google Scholar 

  25. Giménez, E.: Structural recursive definitions in type theory. In: Larsen, K.G., Skyum, S., Winskel, G. (eds.) ICALP 1998. LNCS, vol. 1443, pp. 397–408. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  26. Grégoire, B., Sacchini, J.L.: On strong normalization of the calculus of constructions with type-based termination. In: Fermüller, C.G., Voronkov, A. (eds.) LPAR-17. LNCS, vol. 6397, pp. 333–347. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Bernardo Toninho .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Toninho, B., Caires, L., Pfenning, F. (2014). Corecursion and Non-divergence in Session-Typed Processes. In: Maffei, M., Tuosto, E. (eds) Trustworthy Global Computing. TGC 2014. Lecture Notes in Computer Science(), vol 8902. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-45917-1_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-45917-1_11

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-45916-4

  • Online ISBN: 978-3-662-45917-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics