Toward Verified Library-Level Choreographic Programming with Algebraic Effects

Gan Shen, Lindsey Kuper
{"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.
实现具有代数效果的验证库级编舞编程
编排编程(CP)是一种将分布式应用程序编排为单个统一程序(称为编排)的范例,然后通过端点投影(EPP)将其编译为节点本地程序。最近,出现了库级 CP 框架,在这种框架中,编排程序和 EPP 被表述为现有宿主语言中的构造。然而,到目前为止,库级 CP 还缺乏坚实的理论基础。在本文中,我们建议使用代数效应对库级 CP 进行建模,这种抽象概括了现有 CP 库所采用的方法。代数效应让我们可以将编排器定义为具有用户定义效应的计算,而 EPP 则定义为特定位置的效应处理程序。代数效果还有助于推理正确性属性,例如 EPP 的健全性和完整性。我们介绍了一个基于代数效应的库级 CP 框架原型,它是在 Agda 证明助手中实现的,并讨论了我们正在开展的工作,即利用基于代数效应的方法来证明我们的库级 CP 实现的正确性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信