Choral

A mainstream choreographic programming language.

website repository

Description

Choral is a language for the programming of choreographies. A choreography is a multiparty protocol that defines how some roles (the proverbial Alice, Bob, etc.) should coordinate with each other to do something together. At the press of a button, the Choral compiler translates a choreography into a library for each role. Choral makes sure that the compiled libraries are compliant implementations of their source choreography, making developers more productive, and preventing them from writing incompatible implementations of communications.

Choral is currently interoperable with Java and it is compatible with Java in three ways:

Papers

Giallorenzo, S., Montesi, F., Peressotti, M., Richter, D., Salvaneschi, G. and Weisenburger, P. 2021. Multiparty Languages: The Choreographic and Multitier Cases. 35th European Conference on Object-Oriented Programming (ECOOP 2021) (Dagstuhl, Germany, 2021), 22:1–22:27.

Choreographic languages aim to express multiparty communication protocols, by providing primitives that make interaction manifest. Multitier languages enable programming computation that spans across several tiers of a distributed system, by supporting primitives that allow computation to change the location of execution. Rooted into different theoretical underpinnings—respectively process calculi and lambda calculus—the two paradigms have been investigated independently by different research communities with little or no contact. As a result, the link between the two paradigms has remained hidden for long.

In this paper, we show that choreographic languages and multitier languages are surprisingly similar. We substantiate our claim by isolating the core abstractions that differentiate the two approaches and by providing algorithms that translate one into the other in a straightforward way. We believe that this work paves the way for joint research and cross-fertilisation among the two communities.

@inproceedings{GMPRSW21,
  author = {Giallorenzo, Saverio and Montesi, Fabrizio and Peressotti, Marco and Richter, David and Salvaneschi, Guido and Weisenburger, Pascal},
  title = {{Multiparty Languages: The Choreographic and Multitier Cases}},
  booktitle = {35th European Conference on Object-Oriented Programming (ECOOP 2021)},
  pages = {22:1--22:27},
  series = {Leibniz International Proceedings in Informatics (LIPIcs)},
  isbn = {978-3-95977-190-0},
  issn = {1868-8969},
  year = {2021},
  volume = {194},
  editor = {M{\o}ller, Anders and Sridharan, Manu},
  publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address = {Dagstuhl, Germany},
  url = {https://drops.dagstuhl.de/opus/volltexte/2021/14065},
  urn = {urn:nbn:de:0030-drops-140658},
  doi = {10.4230/LIPIcs.ECOOP.2021.22}
}
Giallorenzo, S., Montesi, F. and Peressotti, M. 2020. Object-Oriented Choreographic Programming. CoRR. abs/22005.09520, (2020). DOI:10.48550/arXiv.2005.09520.

We present Choral, the first language for programming choreographies (multiparty protocols) that builds on top of mainstream programming abstractions: in Choral, choreographies are objects. Given a choreography that defines interactions among some roles (Alice, Bob, etc.), an implementation for each role in the choreography is automatically generated by a compiler. These implementations are libraries in pure Java, which developers can modularly compose in their own programs to participate correctly in choreographies.

@article{abs-2005-09520,
  author = {Giallorenzo, Saverio and Montesi, Fabrizio and Peressotti, Marco},
  title = {Object-Oriented Choreographic Programming},
  journal = {CoRR},
  volume = {abs/22005.09520},
  year = {2020},
  url = {https://arxiv.org/abs/2005.09520},
  doi = {10.48550/arXiv.2005.09520},
  archiveprefix = {arXiv},
  eprint = {2005.09520}
}