paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Automated Verification of Parametric Channel-Based Process Communication

参数化基于通道的进程通信的自动验证
OOPSLA 8(OOPSLA2)2024匹配度 3/10 · 论文研究 Go 参数化通道通信的部分死锁自动验证,属于静态分析与形式化验证方向,与用户对程序分析/验证的一般兴趣有交集;但它不涉及 LLM/Agent、ML 系统、浮点程序分析或贝叶斯程序分析,也不是将 LLM 用于改进验证,因此与用户当前核心研究画像匹配度较低。引用 2 inbox
Georgian-Vlad Saioc, Julien Lange, Anders Møller
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出将 Go 参数化通道通信片段翻译为核心语言并编码为 Dafny 程序,自动验证无部分死锁并推断前置条件。

并发消息传递程序常面临部分死锁问题,可能导致长运行系统内存泄漏。现有针对 Go 的静态分析工具在真实企业代码中过于不精确,难以处理参数化进程通信,即通道通信操作数或通道容量在运行时才确定的情况。本文提出一种自动验证方法:将 Go 程序片段翻译为足以表达真实参数化通信模式的核心语言,再编码为带有后置条件的 Dafny 程序,以强制验证部分死锁自由性。当片段仅在并发参数满足特定条件时才无部分死锁,方法还能推断合适的前置条件。实验在一个真实代码库的 583 个现有技术无法处理的片段上进行,成功验证 145 个片段无部分死锁,并为另外 228 个片段推断出周边代码需满足的非平凡前置条件。

问题
Go 并发消息传递程序中,部分死锁难以检测,且现有静态分析对通道操作数或容量在运行时决定的参数化通信不够精确。
方法
将 Go 片段翻译为可表达参数化通信模式的核心语言,并编码为带后置条件的 Dafny 程序来验证部分死锁自由;必要时推断并发参数需满足的前置条件。
评估
在包含 583 个现有技术无法处理片段的真实代码库上评估,验证了 145 个片段无部分死锁,并为 228 个片段推断出非平凡前置条件。
原文摘要(Abstract)

A challenge of writing concurrent message passing programs is ensuring the absence of partial deadlocks, which can cause severe memory leaks in long running systems. Several static analysis techniques have been proposed for automatically detecting partial deadlocks in Go programs. For a large enterprise code base, we found these tools too imprecise to reason about process communication that is parametric, i.e., where the number of channel communication operations or the channel capacities are determined at runtime. We present a novel approach to automatically verify the absence of partial deadlocks in Go program fragments with such parametric process communication. The key idea is to translate Go fragments to a core language that is sufficiently expressive to represent real-world parametric communication patterns and can be encoded into Dafny programs annotated with postconditions enforcing partial deadlock freedom. In situations where a fragment is partial deadlock free only when the concurrency parameters satisfy certain conditions, a suitable precondition can often be inferred. Experimental results on a real-world code base containing 583 program fragments that are beyond the reach of existing techniques have shown that the approach can verify the absence of partial deadlocks in 145 cases. For an additional 228 cases, a nontrivial precondition is inferred that the surrounding code must satisfy to ensure partial deadlock freedom.

链接与引用

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

BibTeX
@article{SaiocLM24,
  title = {Automated Verification of Parametric Channel-Based Process Communication},
  author = {Georgian-Vlad Saioc and Julien Lange and Anders Møller},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA2},
  year = {2024},
  doi = {10.1145/3689784}
}