Abstract
We study the problem of parametric parallel complexity analysis of concurrent, message-passing programs. To make the analysis local and compositional, it is based on a conservative extension of binary session types, which structure the type and direction of communication between processes and stand in a Curry-Howard correspondence with intuitionistic linear logic. The main innovation is to enrich session types with the temporal modalities next (◯ A), always (□ A), and eventually (◇ A), to additionally prescribe the timing of the exchanged messages in a way that is precise yet flexible. The resulting temporal session types uniformly express properties such as the message rate of a stream, the latency of a pipeline, the response time of a concurrent queue, or the span of a fork/join parallel program. The analysis is parametric in the cost model and the presentation focuses on communication cost as a concrete example. The soundness of the analysis is established by proofs of progress and type preservation using a timed multiset rewriting semantics. Representative examples illustrate the scope and usability of the approach.
Supplemental Material
- Elvira Albert, Jesús Correas, Einar Broch Johnsen, and Guillermo Román-Díez. 2015. Parallel Cost Analysis of Distributed Systems. In Static Analysis, Sandrine Blazy and Thomas Jensen (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 275–292.Google Scholar
- Martin Avanzini, Ugo Dal Lago, and Georg Moser. 2015. Analysing the Complexity of Functional Programs: Higher-Order Meets First-Order. In 29th Int. Conf. on Functional Programming (ICFP’15). Google Scholar
Digital Library
- Stephanie Balzer and Frank Pfenning. 2017. Manifest Sharing with Session Types. In International Conference on Functional Programming (ICFP). ACM, 37:1–37:29.Google Scholar
- Gérard Berry and Georges Gonthier. 1992. The ESTEREL Synchronous Programming Language: Design, Semantics, Implementation. Sci. Comput. Program. 19, 2 (Nov. 1992), 87–152. Google Scholar
Digital Library
- Guy E. Blelloch and Margaret Reid-Miller. 1997. Pipelining with Futures. In Proceedings of the Ninth Annual ACM Symposium on Parallel Algorithms and Architectures (SPAA ’97). ACM, New York, NY, USA, 249–259. Google Scholar
Digital Library
- Laura Bocchi, Weizhen Yang, and Nobuko Yoshida. 2014. Timed Multiparty Session Types. In CONCUR 2014 – Concurrency Theory, Paolo Baldan and Daniele Gorla (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 419–434.Google Scholar
- Luís Caires, Jorge A. Pérez, Frank Pfenning, and Bernardo Toninho. 2013. Behavioral Polymorphism and Parametricity in Session-Based Communication. In Proceedings of the European Symposium on Programming (ESOP’13), M.Felleisen and P.Gardner (Eds.). Springer LNCS 7792, Rome, Italy, 330–349. Google Scholar
Digital Library
- Luís Caires and Frank Pfenning. 2010. Session Types as Intuitionistic Linear Propositions. In Proceedings of the 21st International Conference on Concurrency Theory (CONCUR 2010). Springer LNCS 6269, Paris, France, 222–236. Google Scholar
Digital Library
- Luís Caires, Frank Pfenning, and Bernardo Toninho. 2016. Linear Logic Propositions as Session Types. Mathematical Structures in Computer Science 26, 3 (2016), 367–423.Google Scholar
Cross Ref
- Iliano Cervesato and Andre Scedrov. 2009. Relating State-Based and Process-Based Concurrency through Linear Logic. Information and Computation 207, 10 (Oct. 2009), 1044–1077. Google Scholar
Digital Library
- Norman Danner, Daniel R. Licata, and Ramyaa Ramyaa. 2015. Denotational Cost Semantics for Functional Languages with Inductive Types. In 29th Int. Conf. on Functional Programming (ICFP’15). Google Scholar
Digital Library
- Ankush Das, Jan Hoffmann, and Frank Pfenning. 2017. Work Analysis with Resource-Aware Session Types. CoRR abs/1712.08310 (2017). arXiv: 1712.08310 http://arxiv.org/abs/1712.08310 Google Scholar
Digital Library
- Rowan Davies. 1996. A Temporal Logic Approach to Binding-Time Analysis. In Proceedings of the Eleventh Annual Symposium on Logic in Computer Science, E. Clarke (Ed.). IEEE Computer Society Press, New Brunswick, New Jersey, 184–195. http://www.cs.cmu.edu/afs/cs/user/rowan/www/papers/multbta.ps.Z Google Scholar
Digital Library
- Nicolas Feltman, Carlo Angiuli, Umut Acar, and Kayvon Fatahalian. 2016. Automatically Splitting a Two-Stage Lambda Calculus. In Proceedings of the 25th European Symposium on Programming (ESOP), P. Thiemann (Ed.). Springer LNCS 9632, Eindhoven, The Netherlands, 255–281.Google Scholar
Digital Library
- Jérôme Fortier and Luigi Santocanale. 2013. Cuts for Circular Proofs: Semantics and Cut Elimination. In 22nd Conference on Computer Science Logic (LIPIcs), Vol. 23. 248–262.Google Scholar
- Simon J. Gay and Malcolm Hole. 2005. Subtyping for Session Types in the π -Calculus. Acta Informatica 42, 2–3 (2005), 191–225.Google Scholar
Cross Ref
- Dan R. Ghica and Alex I. Smith. 2014. Bounded Linear Types in a Resource Semiring. In Proceedings of the 23rd European Symposium on Programming Languages and Systems - Volume 8410. Springer-Verlag New York, Inc., New York, NY, USA, 331–350. Google Scholar
Digital Library
- Stéphane Gimenez and Georg Moser. 2016. The Complexity of Interaction. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’16). ACM, New York, NY, USA, 243–255. Google Scholar
Digital Library
- Dennis Griffith. 2016. Polarized Substructural Session Types. Ph.D. Dissertation. University of Illinois at Urbana-Champaign.Google Scholar
- Dennis Griffith and Elsa L. Gunter. 2013. Liquid Pi: Inferrable Dependent Session Types. In Proceedings of the NASA Formal Methods Symposium. Springer LNCS 7871, 186–197.Google Scholar
- Sumit Gulwani, Krishna K. Mehra, and Trishul M. Chilimbi. 2009. SPEED: Precise and Efficient Static Estimation of Program Computational Complexity. In 36th ACM Symp. on Principles of Prog. Langs. (POPL’09). 127–139. Google Scholar
Digital Library
- N. Halbwachs, P. Caspi, P. Raymond, and D. Pilaud. 1991. The synchronous data flow programming language LUSTRE. Proc. IEEE 79, 9 (Sep 1991), 1305–1320.Google Scholar
Cross Ref
- Robert H. Halstead, Jr. 1985. MULTILISP: A Language for Concurrent Symbolic Computation. ACM Trans. Program. Lang. Syst. 7, 4 (Oct. 1985), 501–538. Google Scholar
Digital Library
- Jan Hoffmann, Ankush Das, and Shu-Chun Weng. 2017. Towards Automatic Resource Bound Analysis for OCaml. In 44th Symposium on Principles of Programming Languages (POPL’17). Google Scholar
Digital Library
- Jan Hoffmann and Zhong Shao. 2015. Automatic Static Cost Analysis for Parallel Programs. In Proceedings of the 24th European Symposium on Programming on Programming Languages and Systems - Volume 9032. Springer-Verlag New York, Inc., New York, NY, USA, 132–157. Google Scholar
Digital Library
- Kohei Honda, Vasco T. Vasconcelos, and Makoto Kubo. 1998. Language Primitives and Type Discipline for Structured Communication-Based Programming. In 7th European Symposium on Programming Languages and Systems (ESOP’98). Springer LNCS 1381, 122–138. Google Scholar
Digital Library
- Naoki Kobayashi. 2002. A Type System for Lock-Free Processes. Information and Computation 177 (2002), 122–159. Google Scholar
Digital Library
- Neelakantan R. Krishnaswami and Nick Benton. 2011. Ultrametric Semantics of Reactive Programs. In 26th IEEE Symposium on Logic in Computer Science, (LICS’11). 257–266. Google Scholar
Digital Library
- Ugo Dal Lago and Marco Gaboardi. 2011. Linear Dependent Types and Relative Completeness. In 26th IEEE Symp. on Logic in Computer Science (LICS’11). 133–142. Google Scholar
Digital Library
- Julien Lange and Nobuko Yoshida. 2017. On the Undecidability of Asynchronous Session Subtyping. In Proceedings of the 20th International Conference on Foundations of Software Science and Computation Structures (FoSSaCS). Springer LNCS 10203, 441–457. Google Scholar
Digital Library
- Hugo A. López, Carlos Olarte, and Jorge A. Pérez. 2009. Towards a Unified Framework for Declarative Structure Communications. In Proceedings of the Workshop on Programming Language Approaches to Concurrency and Communication-Centric Software (PLACES), A. Beresford and S. Gay (Eds.). EPTCS 17, 1–15.Google Scholar
- Hiroshi Nakano. 2000. A Modality for Recursion. In 15th IEEE Symposium on Logic in Computer Science (LICS’00). 255–266. Google Scholar
Digital Library
- Rumyana Neykova, Laura Bocchi, and Nobuko Yoshida. 2014. Timed Runtime Monitoring for Multiparty Conversations. In 3rd International Workshop on Behavioural Types (BEAT 2014).Google Scholar
- W. Paul, U. Vishkin, and H. Wagener. 1983. Parallel dictionaries on 2–3 trees. In Automata, Languages and Programming, Josep Diaz (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 597–609. Google Scholar
Digital Library
- Frank Pfenning and Dennis Griffith. 2015. Polarized Substructural Session Types. In Proceedings of the 18th International Conference on Foundations of Software Science and Computation Structures (FoSSaCS 2015), A. Pitts (Ed.). Springer LNCS 9034, London, England, 3–22. Invited talk.Google Scholar
Cross Ref
- Amir Pnueli. 1977. The Temporal Logic of Programs. In Proceedings of the 18th Symposium on Foundations of Computer Science (FOCS’77). IEEE Computer Society, 46–57. Google Scholar
Digital Library
- Marc Pouzet. 2006. Lucid Synchrone Release, version 3.0 Tutorial and Reference Manual. (2006).Google Scholar
- Neda Saeedloei and Gopal Gupta. 2014. Timed π -Calculus. In 8th International Symposium on Trustworthy Global Computing - Volume 8358 (TGC 2013). Springer-Verlag New York, Inc., New York, NY, USA, 119–135.Google Scholar
Cross Ref
- Miguel Silva, Mário Florido, and Frank Pfenning. 2016. Non-Blocking Concurrent Imperative Programming with Session Types. In Fourth International Workshop on Linearity.Google Scholar
- Bernardo Toninho, Luís Caires, and Frank Pfenning. 2013. Higher-Order Processes, Functions, and Sessions: A Monadic Integration. In Proceedings of the European Symposium on Programming (ESOP’13), M.Felleisen and P.Gardner (Eds.). Springer LNCS 7792, Rome, Italy, 350–369. Google Scholar
Digital Library
- Bernardo Toninho, Luís Caires, and Frank Pfenning. 2014. Corecursion and Non-Divergence in Session-Typed Processes. In Proceedings of the 9th International Symposium on Trustworthy Global Computing (TGC 2014), M. Maffei and E. Tuosto (Eds.). Springer LNCS 8902, Rome, Italy, 159–175.Google Scholar
Cross Ref
- Philip Wadler. 2012. Propositions as Sessions. In Proceedings of the 17th International Conference on Functional Programming (ICFP 2012). ACM Press, Copenhagen, Denmark, 273–286. Google Scholar
Digital Library
- Ezgi Çiçek, Gilles Barthe, Marco Gaboardi, Deepak Garg, and Jan Hoffmann. 2017. Relational Cost Analysis. In 44th Symposium on Principles of Programming Languages (POPL’17). Google Scholar
Digital Library
Index Terms
Parallel complexity analysis with temporal session types
Recommendations
Intrinsically-Typed Mechanized Semantics for Session Types
PPDP '19: Proceedings of the 21st International Symposium on Principles and Practice of Declarative ProgrammingSession types have emerged as a powerful paradigm for structuring communication-based programs. They guarantee type soundness and session fidelity for concurrent programs with sophisticated communication protocols. As type soundness proofs for languages ...
Haskell session types with (almost) no class
HASKELL '08We describe an implementation of session types in Haskell. Session types statically enforce that client-server communication proceeds according to protocols. They have been added to several concurrent calculi, but few implementations of session types ...
Session types revisited
Session types are a formalism used to model structured communication-based programming. A binary session type describes communication by specifying the type and direction of data exchanged between two parties. When session types and session processes ...






Comments