{"title":"Toward Verified Library-Level Choreographic Programming with Algebraic Effects","authors":"Gan Shen, Lindsey Kuper","doi":"arxiv-2407.06509","DOIUrl":null,"url":null,"abstract":"Choreographic programming (CP) is a paradigm for programming distributed\napplications as single, unified programs, called choreographies, that are then\ncompiled to node-local programs via endpoint projection (EPP). Recently,\nlibrary-level CP frameworks have emerged, in which choreographies and EPP are\nexpressed as constructs in an existing host language. So far, however,\nlibrary-level CP lacks a solid theoretical foundation. In this paper, we propose modeling library-level CP using algebraic effects,\nan abstraction that generalizes the approach taken by existing CP libraries.\nAlgebraic effects let us define choreographies as computations with\nuser-defined effects and EPP as location-specific effect handlers. Algebraic\neffects also lend themselves to reasoning about correctness properties, such as\nsoundness and completeness of EPP. We present a prototype of a library-level CP\nframework based on algebraic effects, implemented in the Agda proof assistant,\nand discuss our ongoing work on leveraging the algebraic-effects-based approach\nto prove the correctness of our library-level CP implementation.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-07-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2407.06509","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Choreographic programming (CP) is a paradigm for programming distributed
applications as single, unified programs, called choreographies, that are then
compiled to node-local programs via endpoint projection (EPP). Recently,
library-level CP frameworks have emerged, in which choreographies and EPP are
expressed as constructs in an existing host language. So far, however,
library-level CP lacks a solid theoretical foundation. In this paper, we propose modeling library-level CP using algebraic effects,
an abstraction that generalizes the approach taken by existing CP libraries.
Algebraic effects let us define choreographies as computations with
user-defined effects and EPP as location-specific effect handlers. Algebraic
effects also lend themselves to reasoning about correctness properties, such as
soundness and completeness of EPP. We present a prototype of a library-level CP
framework based on algebraic effects, implemented in the Agda proof assistant,
and discuss our ongoing work on leveraging the algebraic-effects-based approach
to prove the correctness of our library-level CP implementation.