基于代数效应的已验证库级编排编程研究
Toward Verified Library-Level Choreographic Programming with Algebraic Effects
AI总结:
针对库级编排编程缺乏坚实理论基础的问题,提出用代数效应建模该范式的方法,实现了基于Agda的原型框架,并正推进其正确性证明工作。
摘要:
编排编程(Choreographic Programming,CP)是一种将分布式应用编写为单一统一程序(称为编排)的范式,随后通过端点投影(Endpoint Projection,EPP)将其编译为节点本地程序。近年来,库级CP框架应运而生,在这类框架中,编排和EPP被表示为现有宿主语言中的构造。然而,截至目前,库级CP仍缺乏坚实的理论基础。\n 在本文中,我们提出利用代数效应(algebraic effects)对库级CP进行建模,这是一种对现有CP库所采用方法进行泛化的抽象机制。代数效应使我们能够将编排定义为带有用户自定义效应的计算,将EPP定义为特定于位置的效应处理器。代数效应还有助于对正确性属性(如EPP的可靠性和完备性)进行推理。我们展示了一个基于代数效应的库级CP框架原型,该原型在Agda证明助手中实现,并讨论了我们正在开展的工作:利用基于代数效应的方法来证明我们的库级CP实现的正确性。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。