[{"@context":"http:\/\/schema.org\/","@type":"BlogPosting","@id":"https:\/\/wiki.edu.vn\/en\/wiki10\/choreographic-programming-wikipedia\/#BlogPosting","mainEntityOfPage":"https:\/\/wiki.edu.vn\/en\/wiki10\/choreographic-programming-wikipedia\/","headline":"Choreographic programming – Wikipedia","name":"Choreographic programming – Wikipedia","description":"From Wikipedia, the free encyclopedia Programming paradigm In computer science, choreographic programming is a programming paradigm where programs are compositions","datePublished":"2021-09-15","dateModified":"2021-09-15","author":{"@type":"Person","@id":"https:\/\/wiki.edu.vn\/en\/wiki10\/author\/lordneo\/#Person","name":"lordneo","url":"https:\/\/wiki.edu.vn\/en\/wiki10\/author\/lordneo\/","image":{"@type":"ImageObject","@id":"https:\/\/secure.gravatar.com\/avatar\/c9645c498c9701c88b89b8537773dd7c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c9645c498c9701c88b89b8537773dd7c?s=96&d=mm&r=g","height":96,"width":96}},"publisher":{"@type":"Organization","name":"Enzyklop\u00e4die","logo":{"@type":"ImageObject","@id":"https:\/\/wiki.edu.vn\/wiki4\/wp-content\/uploads\/2023\/08\/download.jpg","url":"https:\/\/wiki.edu.vn\/wiki4\/wp-content\/uploads\/2023\/08\/download.jpg","width":600,"height":60}},"image":{"@type":"ImageObject","@id":"https:\/\/en.wikipedia.org\/wiki\/Special:CentralAutoLogin\/start?type=1x1","url":"https:\/\/en.wikipedia.org\/wiki\/Special:CentralAutoLogin\/start?type=1x1","height":"1","width":"1"},"url":"https:\/\/wiki.edu.vn\/en\/wiki10\/choreographic-programming-wikipedia\/","wordCount":5482,"articleBody":"From Wikipedia, the free encyclopediaProgramming paradigmIn computer science, choreographic programming is a programming paradigm where programs are compositions of interactions among multiple concurrent participants.[1][2]Table of ContentsOverview[edit]Choreographies[edit]Endpoint Projection[edit]Development[edit]Languages[edit]See also[edit]References[edit]External links[edit]Overview[edit]Choreographies[edit]In choreographic programming, developers use a choreographic programming language to define the intended communication behaviour of concurrent participants. Programs in this paradigm are called choreographies.[1]Choreographic languages are inspired by security protocol notation (also known as “Alice and Bob” notation). The key to these languages is the communication primitive, for examplereads “Alice communicates the result of evaluating the expression expr to Bob, which stores it in its local variable x“.[2]Alice, Bob, etc. are typically called roles or processes.[1]The example below shows a choreography for a simplified single sign-on (SSO) protocol based on a Central Authentication Service (CAS) that involves three roles:Client, which wishes to obtain an access token from CAS to interact with Service.Service, which needs to know from CAS if the Client should be given access.CAS, which is the Central Authentication Service responsible for checking the Client‘s credentials.The choreography is:Client.(credentials, serviceID) -> CAS.authRequestif CAS.check(authRequest) then CAS.token = genToken(authRequest) CAS.Success(token) -> Client.result CAS.Success(token) -> Service.resultelse CAS.Failure -> Client.result CAS.Failure -> Service.resultThe choreography starts in Line 1, where Client communicates a pair consisting of some credentials and the identifier of the service it wishes to access to CAS. CAS stores this pair in its local variable authRequest (for authentication request).In Line 2, the CAS checks if the request is valid for obtaining an authentication token.If so, it generates a token and communicates a Success message containing the token to both Client and Service (Lines 3\u20135).Otherwise, the CAS informs Client and Service that authentication failed, by sending a Failure message (Lines 7\u20138). We refer to this choreography as the “SSO choreography” in the remainder.Endpoint Projection[edit]A key feature of choreographic programming is the capability of compiling choreographies to distributed implementations. These implementations can be libraries for software that needs to participate in a computer network by following a protocol,[2][3] or standalone distributed programs.[4][5]The translation of a choreography into distributed programs is called endpoint projection (EPP for short).[1][2]Endpoint projection returns a program for each role described in the source choreography.[2] For example, given the choreography above, endpoint projection would return three programs: one for Client, one for Service, and one for CAS. They are shown below in pseudocode form, where send and recv are primitives for sending and receiving messages to\/from other roles.Endpoint Projection (EPP) of the SSO choreographyClientServiceCASsend (credentials, serviceID) to CASrecv result from CASrecv authRequest from Clientif check(authRequest) then token = genToken(authRequest) send Success(token) to Client send Success(token) to Serviceelse send Failure to Client send Failure to ServiceFor each role, its code contains the actions that the role should execute to implement the choreography correctly together with the others.Development[edit]The paradigm of choreographic programming originates from its titular PhD thesis.[6][7][8]The inspiration for the syntax of choreographic programming languages can be traced back to security protocol notation, also known as “Alice and Bob” notation. Choreographic programming has also been heavily influenced by standards for service choreography and interaction diagrams, as well as developments of the theory of process calculi.[2][9]Choreographic programming is an active area of research. The paradigm has been used in the study of information flow,[10]parallel computing,[11]cyber-physical systems,[12][13]runtime adaptation,[5] and system integration.[14]Languages[edit]AIOCJ (website).[5] A choreographic programming language for adaptable systems that produces code in Jolie.Chor (website).[4] A session-typed choreographic programming language that compiles to microservices in Jolie.Choral (website). A higher-order, object-oriented choreographic programming language that compiles to libraries in Java.Core Choreographies.[15] A core theoretical model for choreographic programming. A mechanised implementation is available in Coq.[16][17]Kalas.[18] A choreographic programming language with a verified compiler to CakeML.Pirouette.[7] A mechanised choreographic programming language theory with higher-order procedures.See also[edit]References[edit]^ a b c d Yoshida, Nobuko; Vasconcelos, Vasco T.; Padovani, Luca; Bono, Nicholas Ng; Neykova, Rumyana; Montesi, Fabrizio; Mascardi, Viviana; Martins, Francisco; Johnsen, Einar Broch; Hu, Raymond; Giachino, Elena; Gesbert, Nils; Gay, Simon J.; Deni\u00e9lou, Pierre-Malo; Castagna, Giuseppe; Campos, Joana; Bravetti, Mario; Bono, Viviana; Ancona, Davide (2016). “Behavioral Types in Programming Languages”. Foundations and Trends in Programming Languages. 3 (2\u20133): 95\u2013230. doi:10.1561\/2500000031. hdl:10044\/1\/44282.^ a b c d e f Giallorenzo, Saverio; Montesi, Fabrizio; Peressotti, Marco; Richter, David; Salvaneschi, Guido; Weisenburger, Pascal (2021). Multiparty Languages: The Choreographic and Multitier Cases (Pearl). Leibniz International Proceedings in Informatics (LIPIcs). Vol.\u00a0194. pp.\u00a022:1\u201322:27. doi:10.4230\/LIPIcs.ECOOP.2021.22. ISBN\u00a09783959771900. (ECOOP 2021 Distinguished Paper)^ Choral programming language^ a b Carbone, Marco; Montesi, Fabrizio (2013). “Deadlock-freedom-by-design”. Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages – POPL ’13. p.\u00a0263. doi:10.1145\/2429069.2429101. ISBN\u00a09781450318327. S2CID\u00a015627190.^ a b c Preda, Mila Dalla; Gabbrielli, Maurizio; Giallorenzo, Saverio; Lanese, Ivan; Mauro, Jacopo (2017). “Dynamic Choreographies: Theory and Implementation”. Logical Methods in Computer Science. 13 (2). doi:10.23638\/LMCS-13(2:1)2017. S2CID\u00a05555662.^ Montesi, Fabrizio (2013). Choreographic Programming (PDF) (PhD). IT University of Copenhagen. ISBN\u00a0978-87-7949-299-8. (EAPLS Best PhD Dissertation Award)^ a b Hirsch, Andrew K.; Garg, Deepak (16 January 2022). “Pirouette: higher-order typed functional choreographies”. Proceedings of the ACM on Programming Languages. 6 (POPL): 1\u201327. doi:10.1145\/3498684. S2CID\u00a0243833095. (POPL 2022 Distinguished Paper)^ Arend Rensink (2015-08-30). “Fabrizio Montesi wins the EAPLS Best PhD Dissertation Award 2014”. European Association for Programming Languages and Systems.^ Carbone, Marco; Honda, Kohei; Yoshida, Nobuko (2012). “Structured Communication-Centered Programming for Web Services”. ACM Transactions on Programming Languages and Systems. 34 (2): 1\u201378. doi:10.1145\/2220365.2220367. S2CID\u00a015737118.^ Lluch Lafuente, Alberto; Nielson, Flemming; Nielson, Hanne Riis (2015). “Discretionary Information Flow Control for Interaction-Oriented Specifications”. Logic, Rewriting, and Concurrency (PDF). Lecture Notes in Computer Science. Vol.\u00a09200. pp.\u00a0427\u2013450. doi:10.1007\/978-3-319-23165-5_20. ISBN\u00a0978-3-319-23164-8. S2CID\u00a032617923.^ Cruz-Filipe, Lu\u00eds; Montesi, Fabrizio (2016). “Choreographies in Practice”. Formal Techniques for Distributed Objects, Components, and Systems. Lecture Notes in Computer Science. Vol.\u00a09688. pp.\u00a0114\u2013123. arXiv:1602.08863. doi:10.1007\/978-3-319-39570-8_8. ISBN\u00a0978-3-319-39569-2. S2CID\u00a018067252.^ L\u00f3pez, Hugo A.; Heussen, Kai (2017). “Choreographing cyber-physical distributed control systems for the energy sector”. Proceedings of the Symposium on Applied Computing. pp.\u00a0437\u2013443. doi:10.1145\/3019612.3019656. ISBN\u00a09781450344869. S2CID\u00a039112346.^ L\u00f3pez, Hugo A.; Nielson, Flemming; Nielson, Hanne Riis (2016). “Enforcing Availability in Failure-Aware Communicating Systems” (PDF). Formal Techniques for Distributed Objects, Components, and Systems. Lecture Notes in Computer Science. Vol.\u00a09688. pp.\u00a0195\u2013211. doi:10.1007\/978-3-319-39570-8_13. ISBN\u00a0978-3-319-39569-2. S2CID\u00a012872876.^ Giallorenzo, Saverio; Lanese, Ivan; Russo, Daniel (2018). “ChIP: A Choreographic Integration Process”. On the Move to Meaningful Internet Systems. OTM 2018 Conferences (PDF). Lecture Notes in Computer Science. Vol.\u00a011230. pp.\u00a022\u201340. doi:10.1007\/978-3-030-02671-4_2. ISBN\u00a0978-3-030-02670-7. S2CID\u00a053015580.^ Cruz-Filipe, Lu\u00eds; Montesi, Fabrizio (2020). “A core model for choreographic programming”. Theoretical Computer Science. 802: 38\u201366. doi:10.1016\/j.tcs.2019.07.005. S2CID\u00a0199122777.^ Cohen, Liron; Kaliszyk, Cezary (2021). Formalising a Turing-Complete Choreographic Language in Coq. Leibniz International Proceedings in Informatics (LIPIcs). Vol.\u00a0193. pp.\u00a015:1\u201315:18. doi:10.4230\/LIPIcs.ITP.2021.15. ISBN\u00a09783959771887. S2CID\u00a0231802115.^ Cruz-Filipe, Lu\u00eds; Montesi, Fabrizio; Peressotti, Marco (2021), Cerone, Antonio; \u00d6lveczky, Peter Csaba (eds.), “Certifying Choreography Compilation”, Theoretical Aspects of Computing \u2013 ICTAC 2021, Cham: Springer International Publishing, vol.\u00a012819, pp.\u00a0115\u2013133, arXiv:2102.10698, doi:10.1007\/978-3-030-85315-0_8, ISBN\u00a0978-3-030-85314-3, S2CID\u00a0231985665, retrieved 2022-03-07^ Pohjola, Johannes \u00c5man; G\u00f3mez-Londo\u00f1o, Alejandro; Shaker, James; Norrish, Michael (2022). Andronick, June; de Moura, Leonardo (eds.). “Kalas: A Verified, End-To-End Compiler for a Choreographic Language”. 13th International Conference on Interactive Theorem Proving (ITP 2022). Leibniz International Proceedings in Informatics (LIPIcs). Dagstuhl, Germany: Schloss Dagstuhl \u2013 Leibniz-Zentrum f\u00fcr Informatik. 237: 27:1\u201327:18. doi:10.4230\/LIPIcs.ITP.2022.27. ISBN\u00a0978-3-95977-252-5. S2CID\u00a0251322644.External links[edit]"},{"@context":"http:\/\/schema.org\/","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https:\/\/wiki.edu.vn\/en\/wiki10\/#breadcrumbitem","name":"Enzyklop\u00e4die"}},{"@type":"ListItem","position":2,"item":{"@id":"https:\/\/wiki.edu.vn\/en\/wiki10\/choreographic-programming-wikipedia\/#breadcrumbitem","name":"Choreographic programming – Wikipedia"}}]}]