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

新花边和砷:冒险在弱记忆与程序逻辑

New Lace and Arsenic: adventures in weak memory with a program logic

Richard Bornat, Jade Alglave, Matthew Parkinson

摘要:

我们描述了弱记忆(也称为松弛记忆)的程序逻辑。该逻辑基于线程内的霍尔逻辑,并且在线程之间依赖/保证。它是通过例子提出的,给出了许多弱记忆石蕊测试的证据。它扩展到一致性,但还没有同步分配(比较和交换,加载逻辑/存储条件)。它处理条件和循环,但还没有数组或堆。该逻辑在线程内使用一个版本的霍尔逻辑,在线程之间使用一个版本的依赖/保证,具有五个稳定性规则来处理各种类型的并行性(外部、内部、无传播和两种飞行中并行性)。存在调节传播的$\mathbb{B}$和$\mathbb{U}$模态,以及处理全局相干性(每个位置的SC)的时间模态$\mathsf{since}$、$\mathbb{S}\mathsf{ofar}$和$\mathbb{O}\mathsf{uat}$。逻辑是通过例子。证明和反证约30弱记忆的例子,包括许多石蕊测试在各种伪装,详细处理。有一个版本的令牌环的证明。在第2版中:澄清了与放牧猫的通信。简化了稳定性规则:特别是sat和x= x测试已从外部稳定性检查中删除。嵌入被简化,并且与逻辑的机制具有更透明的关系。U、Sofar和Ouat的定义已经有了很大的改变。对解雇方式和处理办法的说明已作修改。许多证据被重建。逻辑的全面总结是一个附录。

英文摘要:

We describe a program logic for weak memory (also known as relaxed memory). The logic is based on Hoare logic within a thread, and rely/guarantee between threads. It is presented via examples, giving proofs of many weak-memory litmus tests. It extends to coherence but not yet to synchronised assignment (compare-and-swap, load-logical/store-conditional). It deals with conditionals and loops but not yet arrays or heap. The logic uses a version of Hoare logic within threads, and a version of rely/guarantee between threads, with five stability rules to handle various kinds of parallelism (external, internal, propagation-free and two kinds of in-flight parallelism). There are $\mathbb{B}$ and $\mathbb{U}$ modalities to regulate propagation, and temporal modalities $\mathsf{since}$, $\mathbb{S}\mathsf{ofar}$ and $\mathbb{O}\mathsf{uat}$ to deal with global coherence (SC per location). The logic is presented by example. Proofs and unproofs of about thirty weak-memory examples, including many litmus tests in various guises, are dealt with in detail. There is a proof of a version of the token ring. In version 2: The correspondence with Herding Cats has been clarified. The stability rules have been simplified: in particular the sat and x= x tests have been eliminated from external stability checks. The embedding is simplified and has a more transparent relation to the mechanisms of the logic. Definitions of U, Sofar and Ouat have been considerably altered. The description of modalities and the treatment of termination has been reworked. Many proofs are reconstructed. A comprehensive summary of the logic is an appendix.

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

↑