Alice or Bob?: Process polymorphism in choreographies

IF 1.1 3区 计算机科学 Q4 COMPUTER SCIENCE, SOFTWARE ENGINEERING
EVA GRAVERSEN, ANDREW K. HIRSCH, FABRIZIO MONTESI
{"title":"Alice or Bob?: Process polymorphism in choreographies","authors":"EVA GRAVERSEN, ANDREW K. HIRSCH, FABRIZIO MONTESI","doi":"10.1017/s0956796823000114","DOIUrl":null,"url":null,"abstract":"We present PolyChor<jats:inline-formula> <jats:alternatives> <jats:inline-graphic xmlns:xlink=\"http://www.w3.org/1999/xlink\" mime-subtype=\"png\" xlink:href=\"S0956796823000114_inline1.png\" /> <jats:tex-math> $\\lambda$ </jats:tex-math> </jats:alternatives> </jats:inline-formula>, a language for higher-order functional <jats:italic>choreographic programming</jats:italic>—an emerging paradigm for concurrent programming. In choreographic programming, programmers write the desired cooperative behaviour of a system of processes and then compile it into an implementation for each process, a translation called <jats:italic>endpoint projection</jats:italic>. Unlike its predecessor, Chor<jats:inline-formula> <jats:alternatives> <jats:inline-graphic xmlns:xlink=\"http://www.w3.org/1999/xlink\" mime-subtype=\"png\" xlink:href=\"S0956796823000114_inline2.png\" /> <jats:tex-math> $\\lambda$ </jats:tex-math> </jats:alternatives> </jats:inline-formula>, PolyChor<jats:inline-formula> <jats:alternatives> <jats:inline-graphic xmlns:xlink=\"http://www.w3.org/1999/xlink\" mime-subtype=\"png\" xlink:href=\"S0956796823000114_inline3.png\" /> <jats:tex-math> $\\lambda$ </jats:tex-math> </jats:alternatives> </jats:inline-formula> has both type and <jats:italic>process</jats:italic> polymorphism inspired by System F<jats:inline-formula> <jats:alternatives> <jats:inline-graphic xmlns:xlink=\"http://www.w3.org/1999/xlink\" mime-subtype=\"png\" xlink:href=\"S0956796823000114_inline4.png\" /> <jats:tex-math> $_\\omega$ </jats:tex-math> </jats:alternatives> </jats:inline-formula>. That is, PolyChor<jats:inline-formula> <jats:alternatives> <jats:inline-graphic xmlns:xlink=\"http://www.w3.org/1999/xlink\" mime-subtype=\"png\" xlink:href=\"S0956796823000114_inline5.png\" /> <jats:tex-math> $\\lambda$ </jats:tex-math> </jats:alternatives> </jats:inline-formula> is the first (higher-order) functional choreographic language which gives programmers the ability to write generic choreographies and determine the participants at runtime. This novel combination of features also allows PolyChor<jats:inline-formula> <jats:alternatives> <jats:inline-graphic xmlns:xlink=\"http://www.w3.org/1999/xlink\" mime-subtype=\"png\" xlink:href=\"S0956796823000114_inline6.png\" /> <jats:tex-math> $\\lambda$ </jats:tex-math> </jats:alternatives> </jats:inline-formula> processes to communicate <jats:italic>distributed values</jats:italic>, leading to a new and intuitive way to write delegation. While some of the functional features of PolyChor<jats:inline-formula> <jats:alternatives> <jats:inline-graphic xmlns:xlink=\"http://www.w3.org/1999/xlink\" mime-subtype=\"png\" xlink:href=\"S0956796823000114_inline7.png\" /> <jats:tex-math> $\\lambda$ </jats:tex-math> </jats:alternatives> </jats:inline-formula> give it a weaker correspondence between the semantics of choreographies and their endpoint-projected concurrent systems than some other choreographic languages, we still get the hallmark end result of choreographic programming: projected programmes are deadlock-free by design.","PeriodicalId":15874,"journal":{"name":"Journal of Functional Programming","volume":"9 1","pages":""},"PeriodicalIF":1.1000,"publicationDate":"2024-01-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Functional Programming","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.1017/s0956796823000114","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

We present PolyChor $\lambda$ , a language for higher-order functional choreographic programming—an emerging paradigm for concurrent programming. In choreographic programming, programmers write the desired cooperative behaviour of a system of processes and then compile it into an implementation for each process, a translation called endpoint projection. Unlike its predecessor, Chor $\lambda$ , PolyChor $\lambda$ has both type and process polymorphism inspired by System F $_\omega$ . That is, PolyChor $\lambda$ is the first (higher-order) functional choreographic language which gives programmers the ability to write generic choreographies and determine the participants at runtime. This novel combination of features also allows PolyChor $\lambda$ processes to communicate distributed values, leading to a new and intuitive way to write delegation. While some of the functional features of PolyChor $\lambda$ give it a weaker correspondence between the semantics of choreographies and their endpoint-projected concurrent systems than some other choreographic languages, we still get the hallmark end result of choreographic programming: projected programmes are deadlock-free by design.
爱丽丝还是鲍勃?编排图中的进程多态性
我们介绍 PolyChor $\lambda$ ,这是一种用于高阶函数式编排编程的语言--一种新兴的并发编程范式。在编排式编程中,程序员编写进程系统所需的合作行为,然后将其编译成每个进程的实现,这种转换称为端点投影。与它的前身 Chor $\lambda$ 不同,PolyChor $\lambda$ 在 System F $_\omega$ 的启发下具有类型和进程多态性。也就是说,PolyChor $\lambda$ 是第一种(高阶)功能编排语言,它使程序员能够编写通用编排,并在运行时确定参与者。这种新颖的功能组合还允许 PolyChor $\lambda$ 进程交流分布式值,从而为编写委托提供了一种新的直观方式。虽然与其他一些编排语言相比,PolyChor $\lambda$ 的一些功能特性使其在编排语义与端点投射并发系统之间的对应关系较弱,但我们仍然得到了编排编程的标志性最终结果:投射程序在设计上是无死锁的。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Journal of Functional Programming
Journal of Functional Programming 工程技术-计算机:软件工程
CiteScore
1.70
自引率
0.00%
发文量
9
审稿时长
>12 weeks
期刊介绍: Journal of Functional Programming is the only journal devoted solely to the design, implementation, and application of functional programming languages, spanning the range from mathematical theory to industrial practice. Topics covered include functional languages and extensions, implementation techniques, reasoning and proof, program transformation and synthesis, type systems, type theory, language-based security, memory management, parallelism and applications. The journal is of interest to computer scientists, software engineers, programming language researchers and mathematicians interested in the logical foundations of programming.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信