Formalising a Turing-Complete Choreographic Language in Coq

Theory of choreographic languages typically includes a number of complex results that are proved by structural induction. The high number of cases and the subtle details in some of them lead to long reviewing processes, and occasionally to errors being found in published proofs. In this work, we take a published proof of Turing completeness of a choreographic language and formalise it in Coq. Our development includes formalising the choreographic language and its basic properties, Kleene's theory of partial recursive functions, the encoding of these functions as choreographies, and proving this encoding correct. With this effort, we show that theorem proving can be a very useful tool in the field of choreographic languages: besides the added degree of confidence that we get from a mechanised proof, the formalisation process led us to a significant simplification of the underlying theory. Our results offer a foundation for the future formal development of choreographic languages.

[1]  Alejandro Gómez-Londoño Choreographies and Cost Semantics for Reliable Communicating Systems Choreographies and Cost Semantics for Reliable Communicating Systems 1 An end-to-end verified compiler for a choreography language 2 Do You Have Space for Dessert? , 2020 .

[2]  Luís Cruz-Filipe,et al.  Choreographies in Practice , 2016, FORTE.

[3]  Flemming Nielson,et al.  Discretionary Information Flow Control for Interaction-Oriented Specifications , 2015, Logic, Rewriting, and Concurrency.

[4]  Gert Smolka,et al.  On synthetic undecidability in Coq, with an application to the Entscheidungsproblem , 2019, CPP.

[5]  Johannes AAman Pohjola,et al.  Connecting choreography languages with verified stacks , 2018 .

[6]  Fabrizio Montesi,et al.  Choreographies as Objects , 2020, ArXiv.

[7]  Davide Ancona,et al.  Behavioral Types in Programming Languages , 2016, Found. Trends Program. Lang..

[8]  Ivan Lanese,et al.  Foundations of Session Types and Behavioural Contracts , 2016, ACM Comput. Surv..

[9]  Ivan Lanese,et al.  ChIP: A Choreographic Integration Process , 2018, OTM Conferences.

[10]  Nobuko Yoshida,et al.  Structured Communication-Centered Programming for Web Services , 2007, TOPL.

[11]  Flemming Nielson,et al.  Enforcing Availability in Failure-Aware Communicating Systems , 2016, FORTE.

[12]  Alan M. Turing,et al.  Computability and λ-definability , 1937, Journal of Symbolic Logic.

[13]  Fabrizio Montesi,et al.  Deadlock-freedom-by-design: multiparty asynchronous global programming , 2013, POPL.

[14]  Vincent Zammit,et al.  A Proof of the S-m-n theorem in Coq , 1997 .

[15]  S. C. Kleene,et al.  Introduction to Metamathematics , 1952 .

[16]  Nobuko Yoshida,et al.  Multiparty asynchronous session types , 2008, POPL '08.

[17]  Samik Basu,et al.  Deciding choreography realizability , 2012, POPL '12.

[18]  Luís Cruz-Filipe,et al.  A Formalisation of a Turing-Complete Choreographic Language in Coq , 2021 .

[19]  Yannick Forster,et al.  Verified programming of Turing machines in Coq , 2020, CPP.

[20]  F. Montesi Introduction to Choreographies , 2018 .

[21]  Alan Schmitt,et al.  HOCore in Coq , 2015, ITP.

[22]  Roger M. Needham,et al.  Using encryption for authentication in large networks of computers , 1978, CACM.

[23]  Nobuko Yoshida,et al.  Less is more: multiparty session types revisited , 2019, Proc. ACM Program. Lang..

[24]  Philip Wadler,et al.  Theory and Applications of Behavioural Types (Dagstuhl Seminar 17051) , 2017, Dagstuhl Reports.

[25]  Frank Pfenning,et al.  Session Types as Intuitionistic Linear Propositions , 2010, CONCUR.

[26]  Kai Heussen,et al.  Choreographing cyber-physical distributed control systems for the energy sector , 2017, SAC.

[27]  Ivan Lanese,et al.  Dynamic Choreographies: Theory And Implementation , 2017, Log. Methods Comput. Sci..

[28]  Fabrizio Montesi,et al.  Certifying Choreography Compilation , 2021, ICTAC.

[29]  Luís Cruz-Filipe,et al.  A Core Model for Choreographic Programming , 2015, FACS.