当前位置: X-MOL 学术ACM Trans. Program. Lang. Syst. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Chocola
ACM Transactions on Programming Languages and Systems ( IF 1.5 ) Pub Date : 2021-01-28 , DOI: 10.1145/3427201
Janwillem Swalens 1 , Joeri De Koster 1 , Wolfgang De Meuter 1
Affiliation  

Programmers often combine different concurrency models in a single program, in each part of the program using the model that fits best. Many programming languages, such as Clojure, Scala, and Java, cater to this need by supporting different concurrency models. However, existing programming languages often combine concurrency models in an ad hoc way, and the semantics of the combinations are not always well defined. This article studies the combination of three concurrency models: futures, transactions, and actors. We show that a naive combination of these models invalidates the guarantees they normally provide, thereby breaking the assumptions of programmers. Hence, we present Chocola : a unified language of futures, transactions, and actors that maintains the guarantees of all three models wherever possible, even when they are combined. We describe and formalize the semantics of this language and prove the guarantees it provides. We also provide an implementation as an extension of Clojure and demonstrated that it can improve the performance of three benchmark applications for relatively little effort from the developer.

中文翻译:

巧克力

程序员经常在单个程序中组合不同的并发模型,在程序的每个部分中使用最适合的模型。许多编程语言,如 Clojure、Scala 和 Java,通过支持不同的并发模型来满足这一需求。然而,现有的编程语言经常以一种特别的方式组合并发模型,并且组合的语义并不总是很好定义。本文研究三种并发模型的组合:期货、交易和参与者。我们表明,这些模型的简单组合会使它们通常提供的保证无效,从而打破程序员的假设。因此,我们提出巧克力:期货、交易和参与者的统一语言,尽可能保持所有三种模型的保证,即使它们组合在一起。我们描述并形式化了这种语言的语义,并证明了它提供的保证。我们还提供了一个实现作为 Clojure 的扩展,并展示了它可以提高三个基准应用程序的性能,而开发人员只需付出相对较少的努力。
更新日期:2021-01-28
down
wechat
bug