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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Honda, K.: Types for dyadic interaction. In: Best, E. (ed.) CONCUR 1993. LNCS, vol. 715, pp. 509–523. Springer, Heidelberg (1993)
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)
Honda, K., Yoshida, N., Carbone, M.: Multiparty asynchronous session types. In: POPL, pp. 273–284 (2008)
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)
Wadler, P.: Propositions as sessions. In: ICFP 2012, pp. 273–286 (2012)
Toninho, B., Caires, L., Pfenning, F.: Dependent session types via intuitionistic linear type theory. In: PPDP 2011, pp. 161–172 (2011)
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)
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)
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)
Sangiorgi, D., Walker, D.: The \(\pi \)-calculus: A Theory of Mobile Processes. Cambridge University Press (2001)
The Coq Development Team: The Coq Proof Assistant Reference Manual (2013)
Norell, U.: Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers University of Technology (2007)
Abel, A., Pientka, B.: Wellfounded recursion with copatterns: A unified approach to termination and productivity. In: LICS (2013)
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)
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)
Gay, S., Hole, M.: Subtyping for Session Types in the Pi Calculus. Acta Informatica 42(2–3), 191–225 (2005)
Yoshida, N., Berger, M., Honda, K.: Strong normalisation in the pi -calculus. Inf. Comput. 191(2), 145–202 (2004)
Gay, S., Vasconcelos, V.T.: Linear type theory for asynchronous session types. J. Funct. Programming 20(1), 19–50 (2010)
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)
Sangiorgi, D.: Termination of processes. Math. Struct. in Comp. Sci. 16(1), 1–39 (2006)
Morris, J.G., Lindley, S., Wadler, P.: The least must speak with the greatest (2014) Draft
Baelde, D.: Least and greatest fixed points in linear logic. TOCL 13(1) (January 2012)
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)
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)
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)
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)