skip to main content

Pirouette: higher-order typed functional choreographies

Published:12 January 2022Publication History
Skip Abstract Section

Abstract

We present Pirouette, a language for typed higher-order functional choreographic programming. Pirouette offers programmers the ability to write a centralized functional program and compile it via endpoint projection into programs for each node in a distributed system. Moreover, Pirouette is defined generically over a (local) language of messages, and lifts guarantees about the message type system to its own. Message type soundness also guarantees deadlock freedom. All of our results are verified in Coq.

Skip Supplemental Material Section

Supplemental Material

Auxiliary Presentation Video

We present Pirouette, a language for typed higher-order functional choreographic programming. Pirouette offers programmers the ability to write a centralized functional program and compile it via endpoint projection into programs for each node in a distributed system. Moreover, Pirouette is defined generically over a (local) language of messages, and lifts guarantees about the message type system to its own. Message type soundness also guarantees deadlock freedom. All of our results are verified in Coq.

References

  1. F.W. Burton. 1987. Functional Programming for Concurrent and Distributed Programming. Comput. J., 30, 5 (1987), 437–450. https://doi.org/10.1093/comjnl/30.5.437 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Marco Carbone, Kohei Honda, and Nobuko Yoshida. 2007. A Calculus of Global Interaction based on Session Types. In Developments in Computational Model (DCM). https://doi.org/10.1016/j.entcs.2006.12.041 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Marco Carbone and Fabrizio Montesi. 2013. Deadlock-Freedom-by-Design: Multiparty Asynchronous Global Programming. In Principles of Programming Languages (POPL). https://doi.org/10.1145/2429069.2429101 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Marco Carbone, Fabrizio Montesi, and Carsten Schürmann. 2014. Choreographies, Logically. In Concurrency Theory (CONCUR). https://doi.org/10.1007/978-3-662-44584-6_5 Google ScholarGoogle ScholarCross RefCross Ref
  5. Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop. 2006. Links: Web Programming Without Tiers. In Formal Methods for Components and Objects (FMCO). https://doi.org/10.1007/978-3-540-74792-5_12 Google ScholarGoogle ScholarCross RefCross Ref
  6. Ezra E.K. Cooper and Philip Wadler. 2009. The RPC Calculus. In Principles and Practice of Declarative Programming (PPDP). https://doi.org/10.1145/1599410.1599439 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Luís Cruz-Filipe, Eva Graversen, Lovro Lugović, Fabrizio Montesi, and Marco Peressotti. 2021. Choreographies as Functions. arxiv:2111.03701 In Preperation for ECOOP.Google ScholarGoogle Scholar
  8. Luís Cruz-Filipe and Fabrizio Montesi. 2017. A Core Model for Choreographic Programming. In Formal Aspects of Component Software (FACS). https://doi.org/10.1007/978-3-319-57666-4_3 Google ScholarGoogle ScholarCross RefCross Ref
  9. Luís Cruz-Filipe and Fabrizio Montesi. 2017. Procedural Choreographic Programming. In Formal Techniques for Distributed Objects, Components, and Systems (FORTE). https://doi.org/10.1007/978-3-319-60225-7_7 Google ScholarGoogle ScholarCross RefCross Ref
  10. Luís Cruz-Filipe, Fabrizio Montesi, and Marco Peressotti. 2019. Choreographies in Coq. In Types for Proofs and Programs (TYPES). http://www.ii.uib.no/~bezem/abstracts/TYPES_2019_paper_27Google ScholarGoogle Scholar
  11. Luís Cruz-Filipe, Fabrizio Montesi, and Marco Peressotti. 2021. Certifying Choreography Compilation. In International Colloquium on Theoretical Aspects of Computing (ICTAC).Google ScholarGoogle Scholar
  12. Luís Cruz-Filipe, Fabrizio Montesi, and Marco Peressotti. 2021. Formalizing a Turing-Complete Choreographic Language in Coq. In Interactive Theorem Proving (ITP).Google ScholarGoogle Scholar
  13. Mila Dalla Preda, Maurizio Gabbrielli, Saverio Giallorenzo, Ivan Lanese, and Jacopo Mauro. 2015. Dynamic Choreographies: Safe Runtime Updates of Distributed Applications. In Coordination Models and Languages (COORDINATION). https://doi.org/10.1007/978-3-319-19282-6_5 Google ScholarGoogle ScholarCross RefCross Ref
  14. Ornela Dardha, Elena Giachino, and Davide Sangiorgi. 2012. Session Types Revisited. In Principles and Practice of Declarative Programming (PPDP). https://doi.org/10.1145/2370776.2370794 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Henry DeYoung, Luís Caires, Frank Pfenning, and Bernardo Toninho. 2012. Cut Reduction in Linear Logic as Asynchronous Session-Typed Communication. In Computer Science Logic (CSL). https://doi.org/10.4230/LIPIcs.CSL.2012.228 Google ScholarGoogle ScholarCross RefCross Ref
  16. Alessandro Giacalone, Prateek Mishra, and Sanjiva Prasad. 1989. Facile: A Symmetric Integration of Concurrent and Functional Programming. International Journal of Parallel Programming, 18 (1989), 121–160. https://doi.org/10.1007/BF01491213 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Saverio Giallorenzo, Fabrizio Montesi, and Marco Peressotti. 2020. Choreographies as Objects. arxiv:2005.09520Google ScholarGoogle Scholar
  18. Andrew K. Hirsch and Deepak Garg. 2021. Pirouette: Higher-Order Typed Functional Choreographies (Technical Report). MPI-SWS. https://www.mpi-sws.org/tr/2021-004.pdfGoogle ScholarGoogle Scholar
  19. Kohei Honda, Nobuko Yoshida, and Marco Carbone. 2016. Multiparty Asyncrhonous Session Types. J. ACM, 63, 1 (2016), 1–67. https://doi.org/10.1145/2827695 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Ivan Lanese, Fabrizio Montesi, and Gianluigi Zavattaro. 2013. Amending Choreographies. In Workshop on Automated Specification and Verification of Web Systems (WWV). https://doi.org/10.4204/EPTCS.123.5 Google ScholarGoogle ScholarCross RefCross Ref
  21. Daniel R. Licata and Robert Harper. 2010. A Monadic Formalization of ML5. In Logical Frameworks and Meta-Languages: Theory and Practice (LFMTP). https://doi.org/10.4204/EPTCS.34.7 Google ScholarGoogle ScholarCross RefCross Ref
  22. Fabrizio Montesi. 2013. Choreographic Programming. Ph.D. Dissertation. IT University of Copenhagen. https://www.fabriziomontesi.com/files/choreographic_programming.pdfGoogle ScholarGoogle Scholar
  23. Fabrizio Montesi. 2020. Introduction to Choreographies. Cambridge University Press. Accepted for Publication.Google ScholarGoogle Scholar
  24. Tom Murphy VII, Karl Crary, and Robert Harper. 2007. Type-safe Distributed Programming with ML5. In Trustworthy Global Computer (TGC). https://doi.org/10.1007/978-3-540-78663-4_9 Google ScholarGoogle ScholarCross RefCross Ref
  25. Alceste Scalas and Nobuko Yoshida. 2019. Less is more: Multiparty Session Types Revisited. In Principles of Programming Languages (POPL). https://doi.org/10.1145/3291638 Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. The Racket Team. 2021. Racket Documentation: Concurrency and Synchronization. https://docs.racket-lang.org/guide/concurrency.html Accessed July 3, 2021.Google ScholarGoogle Scholar
  27. Bernardo Toninho, Luis Caires, and Frank Pfenning. 2012. Functions as Session-Typed Processes. In Foundations of Software Science and Computational Structures (FoSSaCS). https://doi.org/10.1007/978-3-642-28729-9_23 Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. The World Wide Web Consortium (W3C). 2004. WS Choreography Model Overview. https://www.w3.org/TR/ws-chor-model/ Accessed January 29,2021.Google ScholarGoogle Scholar
  29. Philip Wadler. 2012. Propositions as Sessions. In International Conference on Functional Programming (ICFP). https://doi.org/10.1145/2364527.2364568 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Qiu Zongyan, Zhao Xiangpeng, Cai Chao, and Yang Hongli. 2007. Towards the Theoretical Foundation of Choreography. In The Web Conference (WWW). https://doi.org/10.1145/1242572.1242704 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Pirouette: higher-order typed functional choreographies

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!