高效、可移植、普查多态的编舞编程
Efficient, Portable, Census-Polymorphic Choreographic Programming
AI总结:
本文针对库级编舞编程的局限,提出conclaves与多重定位值、端点投影作为依赖注入及普查多态三项技术,并在Haskell、Rust和TypeScript中实现,以提升效率与可移植性。
摘要:
编舞编程(CP)是一种实现分布式系统的范式,它使用单个全局程序来定义所有参与者的动作和交互。库级CP实现(如HasChor)能很好地与主流编程语言集成,但存在若干局限:其条件语句需要额外的通信;需要特定的宿主语言特性(如单子);并且缺乏对实现现实分布式应用至关重要的编程模式的支持。我们针对库级CP做出三项贡献以专门应对这些挑战。首先,我们提出并形式化了“conclaves”和“多重定位值”,它们能在库级CP中实现高效的条件语句而无需冗余通信。其次,我们提出将端点投影作为依赖注入,这是一种设计模式,能在不支持单子的宿主语言中实现库级CP。第三,我们提出普查多态性,这是一种在编舞中抽象参与者数量的技术。我们通过在Haskell、Rust和TypeScript中的实现来展示这些贡献。
英文摘要:
Choreographic programming (CP) is a paradigm for implementing distributed systems that uses a single global program to define the actions and interactions of all participants. Library-level CP implementations, like HasChor, integrate well with mainstream programming languages but have several limitations: Their conditionals require extra communication; they require specific host-language features (e.g., monads); and they lack support for programming patterns that are essential for implementing realistic distributed applications. We make three contributions to library-level CP to specifically address these challenges. First, we propose and formalize conclaves and multiply-located values, which enable efficient conditionals in library-level CP without redundant communication. Second, we propose end-point projection as dependency injection, a design pattern that enables library-level CP in host languages without support for monads. Third, we propose census polymorphism, a technique for abstracting over the number of participants in a choreography. We demonstrate these contributions via implementations in Haskell, Rust, and TypeScript.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。