arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2004.14084cs.PLcs.LO
收藏

协调选择的编制

Compilation of Coordinated Choice

Yuki Nishida, Atsushi Igarashi

摘要:

最近,我们提出了协调的选择,这是不确定的选择配备了名称。协调选择的主要特征是它们在相同名称的选择之间同步不确定性决策。同步机制的动机是为了解决一个理论问题。因此,作为一种实用的程序设计语言,我们仍然希望像使用标准选择一样使用协调选择。换句话说,我们希望避免同步。现在,存在两个问题:(i)实际上,使用协调选择编写程序是一个有点复杂的工作,其中执行同步永远不会发生;和(ii)理论上,是否可以通过仅使用协调选择来编写任何使用标准选择的程序是未知的。本文定义了两个简单类型的lambda演算:带有标准选择的$λ^\parallel$和带有协调选择的$λ^{\parallelω}$,并给出了从前者到后者的编译规则.挑战在于显示编译的正确性,因为编译前后表达式之间的行为对应不能由编译规则直接定义。针对这一挑战,我们给出了一个$λ^{\parallelω}$的效果系统,它描述了执行同步从未发生的表达式。然后,我们证明了所有编译的表达式都可以由效果系统进行类型化。因此,我们可以很容易地证明正确性,因为正确性的主要关注点是同步是否发生。

英文摘要:

Recently, we have proposed coordinated choices, which are nondeterministic choices equipped with names. The main characteristic of coordinated choices is that they synchronize nondeterministic decision among choices of the same name. The motivation of the synchronization mechanism is to solve a theoretical problem. So, as a practical programming language, we still want to use coordinated choices like standard ones. In other words, we want to avoid synchronization. Now, there are two problems: (i) practically, it is a bit complicated work to write a program using coordinated choices in which execution synchronization never happens; and (ii) theoretically, it is unknown whether any programs using standard choices can be written by using only coordinated ones. In this paper, we define two simply typed lambda calculi called $λ^\parallel$ equipped with standard choices and $λ^{\parallelω}$ equipped with coordinated choices, and give compilation rules from the former into the latter. The challenge is to show the correctness of the compilation because behavioral correspondence between expressions before and after compiling cannot be defined directly by the compilation rules. For the challenge, we give an effect system for $λ^{\parallelω}$ that characterizes expressions in which execution synchronization never happens. Then, we show that all compiled expressions can be typed by the effect system. As a result, we can easily show the correctness because the main concern of the correctness is whether synchronization happens or not.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑