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

以 Rely-Guarantee 风格推导开发并发程序的定律

Deriving Laws for Developing Concurrent Programs in a Rely-Guarantee Style

Ian J. Hayes, Larissa A. Meinicke, Patrick A. Meiring

AI总结:

本文提出了一种基于 Rely-Guarantee 风格的共享内存并发算法精化理论,通过广谱语言编码规约条件并推导出综合精化定律,支持细粒度并发且在 Isabelle/HOL 中完成形式化证明。

摘要:

本文提出了一种从规约精化共享内存并发算法的理论。我们用 Jones 的 rely 和 guarantee 条件扩充了前置和后置条件规约,所有这些都被编码为广谱语言中的命令。程序组件使用后置条件规约的部分正确性或完全正确性版本进行规约。对共享数据结构的操作和原子机器操作(如 compare-and-swap)使用原子规约命令进行规约。上述所有构造均基于少量原始命令和少数运算符的简单核心语言来定义。理论中推导出了一套将此类规约精化为代码的综合定律集合。该方法支持细粒度并发,避免了对表达式求值和赋值命令的原子性假设。该理论已在 Isabelle/HOL 中形式化,且精化定律及支持引理已在 Isabelle/HOL 中得到证明。

英文摘要:

This paper presents a theory for the refinement of shared-memory concurrent algorithms from specifications. We augment pre and post condition specifications with Jones' rely and guarantee conditions, all of which are encoded as commands within a wide-spectrum language. Program components are specified using either partial or total correctness versions of postcondition specifications. Operations on shared data structures and atomic machine operations (e.g. compare-and-swap) are specified using an atomic specification command. All the above constructs are defined in terms of a simple core language, based on a small set of primitive commands and a handful of operators. A comprehensive set of laws for refining such specifications to code is derived in the theory. The approach supports fine-grained concurrency, avoiding atomicity assumptions on expression evaluation and assignment commands. The theory has been formalised in Isabelle/HOL, and the refinement laws and supporting lemmas have been proven in Isabelle/HOL.

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

↑