Abstract
Choreographic programming is a paradigm for developing concurrent and distributed systems, where programs are choreographies that define, from a global viewpoint, the computations and interactions that communicating processes should enact. Choreography compilation translates choreographies into the local definitions of process behaviours, given as terms in a process calculus.
Proving choreography compilation correct is challenging and error-prone, because it requires relating languages in different paradigms (global interactions vs local actions) and dealing with a combinatorial explosion of proof cases. We present the first certified program for choreography compilation for a nontrivial choreographic language supporting recursion.
Work partially supported by Villum Fonden, grant no. 29518.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
For readability, we use notations closer to the usual mathematical ones than in formalisation, where they are slightly different due to Coq’s restrictions on overloading.
- 2.
The semantics of CC only requires extensional equality of states, which is why is quantified over rather than directly defined from .
- 3.
The choreography language CC is also inspired by the works [11, 12], but formalising it in Coq benefitted substantially from adopting a labelled transition system semantics. This is discussed extensively in [13]. In this work, we made similar changes to the process calculus not only for similar reasons, but also to keep a close correspondence with the choreography language.
- 4.
Processes communicate by name. In practice, names can be either process identifiers (cf. actors), network addresses, or session correlation data.
- 5.
Coq’s type inference mechanism allows us to omit types of most universally quantified variables and parameters. We abuse this possibility to lighten the presentation.
- 6.
Essentially because it is not possible to distinguish if the behaviour assigned to a label is because it was not defined, or because a recursive call to merge failed.
- 7.
Equality is not necessary, and it would make this property harder to prove.
References
Albert, E., Lanese, I. (eds.): Formal Techniques for Distributed Objects, Components, and Systems. LNCS, vol. 9688. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-39570-8
Basu, S., Bultan, T.: Automated choreography repair. In: Stevens, P., Wąsowski, A. (eds.) FASE 2016. LNCS, vol. 9633, pp. 13–30. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49665-7_2
Basu, S., Bultan, T., Ouederni, M.: Deciding choreography realizability. In: Field, J., Hicks, M. (eds.) Procs. POPL, pp. 191–202. ACM (2012). https://doi.org/10.1145/2103656.2103680
Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. Texts in Theoretical Computer Science, Springer (2004)
Carbone, M., Honda, K., Yoshida, N.: Structured communication-centered programming for web services. ACM Trans. Program. Lang. Syst. 34(2), 8:1-8:78 (2012). https://doi.org/10.1145/2220365.2220367
Carbone, M., Lindley, S., Montesi, F., Schürmann, C., Wadler, P.: Coherence generalises duality: A logical explanation of multiparty session types. In: Desharnais, J., Jagadeesan, R. (eds.) Procs. CONCUR. LIPIcs, vol. 59, pp. 33:1–33:15. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2016)
Carbone, M., Montesi, F.: Deadlock-freedom-by-design: multiparty asynchronous global programming. In: Giacobazzi, R., Cousot, R. (eds.) Procs. POPL, pp. 263–274. ACM (2013). https://doi.org/10.1145/2429069.2429101
Carbone, M., Montesi, F., Schürmann, C.: Choreographies, logically. Distributed Comput. 31(1), 51–67 (2018). https://doi.org/10.1007/s00446-017-0295-1
Castro-Perez, D., Ferreira, F., Gheri, L., Yoshida, N.: Zooid: a DSL for certified multiparty computation: from mechanised metatheory to certified multiparty processes. In: Freund, S.N., Yahav, E. (eds.) Procs. PLDI, pp. 237–251. ACM (2021). https://doi.org/10.1145/3453483.3454041
Cruz-Filipe, L., Montesi, F.: Choreographies in practice. In: Albert and Lanese [1], pp. 114–123. https://doi.org/10.1007/978-3-319-39570-8_8
Cruz-Filipe, L., Montesi, F.: Procedural choreographic programming. In: Bouajjani, A., Silva, A. (eds.) FORTE 2017. LNCS, vol. 10321, pp. 92–107. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-60225-7_7
Cruz-Filipe, L., Montesi, F.: A core model for choreographic programming. Theor. Comput. Sci. 802, 38–66 (2020). https://doi.org/10.1016/j.tcs.2019.07.005
Cruz-Filipe, L., Montesi, F., Peressotti, M.: Formalising a Turing-complete choreographic language in Coq. In: Cohen, L., Kaliszyk, C. (eds.) Procs. ITP. LIPIcs, vol. 193, pp. 15:1–15:18. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2021). https://doi.org/10.4230/LIPIcs.ITP.2021.15
Cruz-Filipe, L., Montesi, F., Peressotti, M.: A formalisation of a Turing-complete choreographic language in Coq. https://doi.org/10.5281/zenodo.4548709
Preda, M.D., Gabbrielli, M., Giallorenzo, S., Lanese, I., Mauro, J.: Dynamic choreographies: Theory and implementation. Log. Methods Comput. Sci. 13(2) (2017). https://doi.org/10.23638/LMCS-13(2:1)2017
Giallorenzo, S., Lanese, I., Russo, D.: ChIP: a choreographic integration process. In: Panetto, H., Debruyne, C., Proper, H.A., Ardagna, C.A., Roman, D., Meersman, R. (eds.) OTM 2018. LNCS, vol. 11230, pp. 22–40. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-02671-4_2
Giallorenzo, S., Montesi, F., Peressotti, M.: Choreographies as objects. CoRR abs/2005.09520 (2020)
Gomez-Londono, A., Aman Pohjola, J.: Connecting choreography languages with verified stacks. In: Procs. of the Nordic Workshop on Programming Theory, pp. 31–33 (2018)
Object Management Group: Business Process Model and Notation (2011). http://www.omg.org/spec/BPMN/2.0/
Honda, K., Yoshida, N., Carbone, M.: Multiparty asynchronous session types. J. ACM 63(1), 9 (2016). https://doi.org/10.1145/2827695, also: POPL, pp. 273–284 (2008)
Lluch Lafuente, A., Nielson, F., Nielson, H.R.: Discretionary information flow control for interaction-oriented specifications. In: Martí-Oliet, N., Ölveczky, P.C., Talcott, C. (eds.) Logic, Rewriting, and Concurrency. LNCS, vol. 9200, pp. 427–450. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-23165-5_20
Londoño, A.G.: Choreographies and cost semantics for reliable communicating systems (2020)
López, H.A., Heussen, K.: Choreographing cyber-physical distributed control systems for the energy sector. In: Seffah, A., Penzenstadler, B., Alves, C., Peng, X. (eds.) Procs. SAC, pp. 437–443. ACM (2017). https://doi.org/10.1145/3019612.3019656
López, H.A., Nielson, F., Nielson, H.R.: Enforcing availability in failure-aware communicating systems. In: Albert and Lanese [1], pp. 195–211. https://doi.org/10.1007/978-3-319-39570-8_13
Montesi, F.: Choreographic Programming. Ph.D. Thesis, IT University of Copenhagen (2013)
Montesi, F.: Introduction to choreographies (2021). Accepted for publication by Cambridge University Press
Needham, R.M., Schroeder, M.D.: Using encryption for authentication in large networks of computers. Commun. ACM 21(12), 993–999 (1978). https://doi.org/10.1145/359657.359659
Scalas, A., Yoshida, N.: Less is more: multiparty session types revisited. Proc. ACM Program. Lang. 3(POPL), 30:1–30:29 (2019). https://doi.org/10.1145/3290343
W3C: WS Choreography Description Language (2004). http://www.w3.org/TR/ws-cdl-10/
Wadler, P.: Propositions as sessions. J. Funct. Program. 24(2–3), 384–418 (2014). https://doi.org/10.1017/S095679681400001X
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Cruz-Filipe, L., Montesi, F., Peressotti, M. (2021). Certifying Choreography Compilation. In: Cerone, A., Ölveczky, P.C. (eds) Theoretical Aspects of Computing – ICTAC 2021. ICTAC 2021. Lecture Notes in Computer Science(), vol 12819. Springer, Cham. https://doi.org/10.1007/978-3-030-85315-0_8
Download citation
DOI: https://doi.org/10.1007/978-3-030-85315-0_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-85314-3
Online ISBN: 978-3-030-85315-0
eBook Packages: Computer ScienceComputer Science (R0)