paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Choral: Object-oriented Choreographic Programming

Choral:面向对象的编排编程
TOPLAS 46(1)2024匹配度 1/10 · 该论文属于编程语言设计与编译方向,核心是面向对象编排编程语言 Choral 及其代码生成,与用户关注的 LLM/Agent 静态分析、浮点程序分析、贝叶斯程序分析等方向没有直接交集。引用 17 inbox
Saverio Giallorenzo, Fabrizio Montesi, Marco Peressotti
crossref: 2026-09-10

AI 速览

一句话:提出首个面向对象编排编程语言 Choral,将编排编译为各角色的纯 Java 库以实现模块化分布式开发。

编排描述并发与分布式系统中各角色的协作方式,但已有编排编程语言缺乏主流抽象与模块化。Choral 引入可表达数据分布于不同角色的新数据类型,并以面向对象抽象重构编排编程:编排是类,其实例是由角色协作实现状态与行为的对象。其编译器为每个编排生成各角色的纯 Java 库,类型由程序员控制,可模块化组合并正确参与编排。该工作首次结合编排与面向对象编程:用编排的高层抽象和静态检查更简洁、正确地编写并发分布式软件;同时借助对象传递获得高阶编排,并支持基于数据位置的方法重载、子类型与泛型,以支持自定义通信机制与中间件。

问题
并发与分布式系统需要协调多参与者,但现有编排编程语言缺乏主流抽象和模块化,难以连接实际软件开发。
方法
Choral 用面向对象抽象重构编排编程,引入可表达数据分布的新数据类型,将编排建模为类,并由编译器为每个角色生成纯 Java 库。
评估
论文通过实现 Choral 编译器并说明其生成各角色 Java 库、支持高阶编排与数据位置特化等语言能力来展示可行性;摘要未报告实验或基准评估。
原文摘要(Abstract)

Choreographies are coordination plans for concurrent and distributed systems, which define the roles of the involved participants and how they are supposed to work together. In the paradigm of choreographic programming, choreographies are programs that can be compiled into executable implementations. In this article, we present Choral, the first choreographic programming language based on mainstream abstractions. The key idea in Choral is a new notion of data type, which allows for expressing that data is distributed over different roles. We use this idea to reconstruct the paradigm of choreographic programming through object-oriented abstractions. Choreographies are classes, and instances of choreographies are objects with states and behaviours implemented collaboratively by roles. Choral comes with a compiler that, given a choreography, generates an implementation for each of its roles. These implementations are libraries in pure Java, whose types are under the control of the Choral programmer. Developers can then modularly compose these libraries in their programs, to participate correctly in choreographies. Choral is the first incarnation of choreographic programming offering such modularity, which finally connects more than a decade of research on the paradigm to practical software development. The integration of choreographic and object-oriented programming yields other powerful advantages, where the features of one paradigm benefit the other in ways that go beyond the sum of the parts. On the one hand, the high-level abstractions and static checks from the world of choreographies can be used to write concurrent and distributed object-oriented software more concisely and correctly. On the other hand, we obtain a much more expressive choreographic language from object-oriented abstractions than in previous work. This expressivity allows for writing more reusable and flexible choreographies. For example, object passing makes Choral the first higher-order choreographic programming language, whereby choreographies can be parameterised over other choreographies without any need for central coordination. We also extend method overloading to a new dimension: specialisation based on data location. Together with subtyping and generics, this allows Choral to elegantly support user-defined communication mechanisms and middleware.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2679,
  title = {Choral: Object-oriented Choreographic Programming},
  author = {Saverio Giallorenzo and Fabrizio Montesi and Marco Peressotti},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {46},
  number = {1},
  year = {2024},
  doi = {10.1145/3632398}
}