arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.23283cs.PL
收藏

全为一,一为全:用于利用并行程序内部确定性的程序逻辑

All for One and One for All: Program Logics for Exploiting Internal Determinism in Parallel Programs

New York University(纽约大学)

Alexandre Moine, Sam Westrick, Joseph Tassarotti

AI总结:

本文提出schedule-independent safety属性及Musketeer和Angelic逻辑,用于验证内部确定性并行程序的正确性。

摘要:

非确定性使并行程序编写和推理变得困难。为避免这些挑战,研究者开发了内部确定性并行编程技术,其中并行计算的步骤以确定性方式执行。内部确定性有用,因为它允许程序员将程序视为按顺序执行。然而,目前尚不存在能够利用这一属性并简化对内部确定性程序形式推理的验证框架。\n为了捕捉内部确定性程序为何更容易推理的本质,本文定义了一个称为“schedule-independent safety”的属性。如果要证明程序在所有顺序下都是安全的,只需证明一个终止执行是安全的,则该程序满足schedule-independent safety。我们随后提出了一种分离逻辑,称为Musketeer,用于证明程序满足schedule-independent safety。一旦并行程序被证明满足schedule-independent safety,我们就可以使用一种称为Angelic的新逻辑来验证此类程序,该逻辑允许动态选择并验证程序的一个顺序执行。\n使用Musketeer,我们证明了MiniDet的正确性,这是一种强制内部确定性的仿射类型系统。MiniDet支持几种核心算法原语,这些原语在研究文献中已被识别,包括并发哈希集合的确定性版本。由于任何语法上正确类型的MiniDet程序都满足schedule-independent safety,我们可以通过Angelic来验证此类程序。\n本文所有结果均在Rocq中使用Iris分离逻辑框架进行了验证。

英文摘要:

Nondeterminism makes parallel programs challenging to write and reason about. To avoid these challenges, researchers have developed techniques for internally deterministic parallel programming, in which the steps of a parallel computation proceed in a deterministic way. Internal determinism is useful because it lets a programmer reason about a program as if it executed in a sequential order. However, no verification framework exists to exploit this property and simplify formal reasoning about internally deterministic programs. To capture the essence of why internally deterministic programs should be easier to reason about, this paper defines a property called schedule-independent safety. A program satisfies schedule-independent safety, if, to show that the program is safe across all orderings, it suffices to show that one terminating execution of the program is safe. We then present a separation logic called Musketeer for proving that a program satisfies schedule-independent safety. Once a parallel program has been shown to satisfy schedule-independent safety, we can verify it with a new logic called Angelic, which allows one to dynamically select and verify just one sequential ordering of the program. Using Musketeer, we prove the soundness of MiniDet, an affine type system for enforcing internal determinism. MiniDet supports several core algorithmic primitives for internally deterministic programming that have been identified in the research literature, including a deterministic version of a concurrent hash set. Because any syntactically well-typed MiniDet program satisfies schedule-independent safety, we can apply Angelic to verify such programs. All results in this paper have been verified in Rocq using the Iris separation logic framework.

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

↑