paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Compositional Semantics for Shared-Variable Concurrency

共享变量并发的组合语义
PLDI 8(PLDI)2024匹配度 2/10 · 论文研究共享变量并发的组合式指称语义与全抽象性,属于程序语言形式语义/并发理论,与画像关注的 LLM/Agent、静态分析、浮点程序分析和贝叶斯程序分析均无直接交集;仅 Coq 机械化与形式验证兴趣有很弱的关联。引用 3 inbox
Mikhail Svyatlovskiy, Shai Mermelstein, Ori Lahav
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:为共享变量并发提出基于轨迹的指称语义,在标准单变量原语下获得无循环程序的全抽象性,并机器化验证。

本文重新审视顺序一致性内存下并发语言的组合语义,目标是指称相等当且仅当代码片段在所有上下文中行为相同。Brookes 的经典指称语义依赖不实用的全内存原子读-改-写指令。作者针对仅含标准单变量原语的语言,提出基于轨迹的指称语义:轨迹记录程序写动作和环境预期的写,并用闭包算子实现抽象。论文证明其 adequacy;对无循环代码证明全抽象性;若加入全内存原子读,则含循环程序也全抽象。所有结果已在 Coq 中机器化验证。

问题
在顺序一致性共享内存模型下,为并发语言定义组合/指称语义,使得两个代码片段的指称相等当且仅当它们在所有程序上下文中可互换。
方法
提出基于轨迹的指称语义,轨迹记录程序自身写动作与环境预期写,并使用闭包算子刻画上下文行为与抽象;与 Brookes 语义不同,不需要全内存原子读-改-写作为基本原语。
评估
证明语义 adequacy,对无循环片段证明全抽象性;加入全内存原子读后对循环程序获得全抽象性;这些结果均在 Coq 中机器化验证。
原文摘要(Abstract)

We revisit the fundamental problem of defining a compositional semantics for a concurrent programming language under sequentially consistent memory with the aim of equating the denotations of pieces of code if and only if these pieces induce the same behavior under all program contexts. While the denotational semantics presented by Brookes [Information and Computation 127, 2 (1996)] has been considered a definitive solution, we observe that Brookes’s full abstraction result crucially relies on the availability of an impractical whole-memory atomic read-modify-write instruction. In contrast, we consider a language with standard primitives, which apply to a single variable. For that language, we propose an alternative denotational semantics based on traces that track program write actions together with the writes expected from the environment, and equipped with several closure operators to achieve necessary abstraction. We establish the adequacy of the semantics, and demonstrate full abstraction for the case that the analyzed code segment is loop-free. Furthermore, we show that by including a whole-memory atomic read in the language, one obtains full abstraction for programs with loops. To gain confidence, our results are fully mechanized in Coq.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{SvyatlovskiyML24,
  title = {Compositional Semantics for Shared-Variable Concurrency},
  author = {Mikhail Svyatlovskiy and Shai Mermelstein and Ori Lahav},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {PLDI},
  year = {2024},
  doi = {10.1145/3656399}
}