Choral:面向对象的编排式编程
Choral: Object-Oriented Choreographic Programming
AI总结:
本文提出首个基于主流抽象的编排式编程语言 Choral,通过引入分布式数据类型概念将编排式与面向对象编程相融合,实现了模块化角色代码生成,并凭借对象传递等特性成为首个高阶编排式语言。
摘要:
我们提出了 Choral,这是第一个基于主流抽象的编排式编程语言。Choral 的核心思想是一种新的数据类型概念,它允许表达数据分布在不同角色上。我们利用这一思想通过面向对象抽象来重构编排式编程范式。编排即为类,编排的实例是由各角色协作实现其状态和行为的对象。\nChoral 配备了一个编译器,在给定一个编排后,会为其每个角色生成实现。这些实现是纯 Java 库,其类型由 Choral 程序员控制。开发者随后可以在自己的程序中模块化地组合这些库,以便正确地参与编排。Choral 是首个提供此类模块化的编排式编程实现,这最终将逾十年的该范式研究与实际软件开发连接起来。\n编排式与面向对象编程的整合带来了其他强大优势,两种范式的特性相互受益,超越了简单的叠加。编排领域的高级抽象和静态检查可用于更简洁、正确地编写并发和分布式面向对象软件。通过面向对象抽象,我们获得了比以往更具表达力的编排语言。例如,对象传递使 Choral 成为首个高阶编排式编程语言,由此编排可参数化其他编排而无需任何中央协调。结合子类型和泛型,这使得 Choral 能够优雅地支持用户自定义的通信机制和中间件。
英文摘要:
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 own programs, in order 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. 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. We obtain a much more expressive choreographic language from object-oriented abstractions than in previous work. 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. Together with subtyping and generics, this allows Choral to elegantly support user-defined communication mechanisms and middleware.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。