Hostname: page-component-89b8bd64d-r6c6k Total loading time: 0 Render date: 2026-05-08T21:50:29.528Z Has data issue: false hasContentIssue false

Alice or Bob?: Process polymorphism in choreographies

Published online by Cambridge University Press:  23 January 2024

EVA GRAVERSEN
Affiliation:
Department of Mathematics and Computer Science, University of Southern Denmark, Odense, Denmark (e-mail: efgraversen@imada.sdu.dk)
ANDREW K. HIRSCH
Affiliation:
Department of Computer Science and Engineering, University at Buffalo, SUNY, Buffalo, NY 14068, USA (e-mail: akhirsch@buffalo.edu)
FABRIZIO MONTESI
Affiliation:
Department of Mathematics and Computer Science, University of Southern Denmark, Odense, Denmark (e-mail: fmontesi@imada.sdu.dk)
Rights & Permissions [Opens in a new window]

Abstract

We present PolyChor$\lambda$, a language for higher-order functional choreographic programming—an emerging paradigm for concurrent programming. In choreographic programming, programmers write the desired cooperative behaviour of a system of processes and then compile it into an implementation for each process, a translation called endpoint projection. Unlike its predecessor, Chor$\lambda$, PolyChor$\lambda$ has both type and process polymorphism inspired by System F$_\omega$. That is, PolyChor$\lambda$ is the first (higher-order) functional choreographic language which gives programmers the ability to write generic choreographies and determine the participants at runtime. This novel combination of features also allows PolyChor$\lambda$ processes to communicate distributed values, leading to a new and intuitive way to write delegation. While some of the functional features of PolyChor$\lambda$ give it a weaker correspondence between the semantics of choreographies and their endpoint-projected concurrent systems than some other choreographic languages, we still get the hallmark end result of choreographic programming: projected programmes are deadlock-free by design.

Information

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2024. Published by Cambridge University Press
Figure 0

Fig. 1. Example of delegation.

Figure 1

Fig. 2. PolyChor$\lambda$ syntax.

Figure 2

Fig. 3. Typing rules (Selected).

Figure 3

Fig. 4. Kinding rules.

Figure 4

Fig. 5. Semantics of PolyChor$\lambda$ (selected rules).

Figure 5

Fig. 6. Local language syntax.

Figure 6

Fig. 7. Semantics of local processes.

Figure 7

Fig. 8. Semantics of networks.

Figure 8

Fig. 9. Projection of PolyChor$\lambda$ programmes.

Figure 9

Fig. 10. Projection of PolyChor$\lambda$ programmes (ctd.).

Figure 10

Fig. 11. Projection of PolyChor$\lambda$ types.

Figure 11

Fig. 12. Code of the case study on edge computing.

Submit a response

Discussions

No Discussions have been published for this article.