skip to main content
research-article
Open access

Pirouette: higher-order typed functional choreographies

Published: 12 January 2022 Publication History

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.

Supplementary Material

Auxiliary Presentation Video (popl22main-p131-p-video.mp4)
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
[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
[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
[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
[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
[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
[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.
[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
[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
[10]
Luís Cruz-Filipe, Fabrizio Montesi, and Marco Peressotti. 2019. Choreographies in Coq. In Types for Proofs and Programs (TYPES). https://www.ii.uib.no/~bezem/abstracts/TYPES_2019_paper_27
[11]
Luís Cruz-Filipe, Fabrizio Montesi, and Marco Peressotti. 2021. Certifying Choreography Compilation. In International Colloquium on Theoretical Aspects of Computing (ICTAC).
[12]
Luís Cruz-Filipe, Fabrizio Montesi, and Marco Peressotti. 2021. Formalizing a Turing-Complete Choreographic Language in Coq. In Interactive Theorem Proving (ITP).
[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
[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
[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
[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
[17]
Saverio Giallorenzo, Fabrizio Montesi, and Marco Peressotti. 2020. Choreographies as Objects. arxiv:2005.09520
[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.pdf
[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
[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
[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
[22]
Fabrizio Montesi. 2013. Choreographic Programming. Ph.D. Dissertation. IT University of Copenhagen. https://www.fabriziomontesi.com/files/choreographic_programming.pdf
[23]
Fabrizio Montesi. 2020. Introduction to Choreographies. Cambridge University Press. Accepted for Publication.
[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
[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
[26]
The Racket Team. 2021. Racket Documentation: Concurrency and Synchronization. https://docs.racket-lang.org/guide/concurrency.html Accessed July 3, 2021.
[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
[28]
The World Wide Web Consortium (W3C). 2004. WS Choreography Model Overview. https://www.w3.org/TR/ws-chor-model/ Accessed January 29,2021.
[29]
Philip Wadler. 2012. Propositions as Sessions. In International Conference on Functional Programming (ICFP). https://doi.org/10.1145/2364527.2364568
[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

Cited By

View all
  • (2024)Locally Abstract, Globally Concrete Semantics of Concurrent Programming LanguagesACM Transactions on Programming Languages and Systems10.1145/364843946:1(1-58)Online publication date: 29-Mar-2024
  • (2024)Choral: Object-oriented Choreographic ProgrammingACM Transactions on Programming Languages and Systems10.1145/363239846:1(1-59)Online publication date: 16-Jan-2024
  • (2024)Alice or Bob?: Process polymorphism in choreographiesJournal of Functional Programming10.1017/S095679682300011434Online publication date: 23-Jan-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Proceedings of the ACM on Programming Languages
Proceedings of the ACM on Programming Languages  Volume 6, Issue POPL
January 2022
1886 pages
EISSN:2475-1421
DOI:10.1145/3511309
Issue’s Table of Contents
This work is licensed under a Creative Commons Attribution International 4.0 License.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 January 2022
Published in PACMPL Volume 6, Issue POPL

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. Choreographies
  2. Concurrency
  3. Functional Programming

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)744
  • Downloads (Last 6 weeks)54
Reflects downloads up to 30 Aug 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Locally Abstract, Globally Concrete Semantics of Concurrent Programming LanguagesACM Transactions on Programming Languages and Systems10.1145/364843946:1(1-58)Online publication date: 29-Mar-2024
  • (2024)Choral: Object-oriented Choreographic ProgrammingACM Transactions on Programming Languages and Systems10.1145/363239846:1(1-59)Online publication date: 16-Jan-2024
  • (2024)Alice or Bob?: Process polymorphism in choreographiesJournal of Functional Programming10.1017/S095679682300011434Online publication date: 23-Jan-2024
  • (2023)Choreographic Programming of Isolated TransactionsElectronic Proceedings in Theoretical Computer Science10.4204/EPTCS.378.5378(49-60)Online publication date: 13-Apr-2023
  • (2023)HasChor: Functional Choreographic Programming for All (Functional Pearl)Proceedings of the ACM on Programming Languages10.1145/36078497:ICFP(541-565)Online publication date: 31-Aug-2023
  • (2023)A Core Calculus for Equational Proofs of Cryptographic ProtocolsProceedings of the ACM on Programming Languages10.1145/35712237:POPL(866-892)Online publication date: 11-Jan-2023
  • (2023)A Formal Theory of Choreographic ProgrammingJournal of Automated Reasoning10.1007/s10817-023-09665-367:2Online publication date: 27-May-2023

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media