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

并发程序的正确性见证:用幽灵弥合语义鸿沟(扩展版)

Correctness Witnesses for Concurrent Programs: Bridging the Semantic Divide with Ghosts (Extended Version)

Julian Erhard, Manuel Bentele, Matthias Heizmann, Dominik Klumpp, Simmo Saan, Frank Schüssele, Michael Schwarz, Helmut Seidl, Sarah Tilscher, Vesal Vojdani

AI总结:

本文提出一种基于幽灵的并发程序正确性见证格式,使交错语义与线程模块化语义下的见证有效性一致,并在SV-COMP基准上验证了其可行性。

摘要:

静态分析器通常是复杂的工具,因此自身也容易包含缺陷。为了增强对此类工具判定结果的信任,见证(witness)以一种可交换的格式编码判定背后的关键推理步骤,使其他工具能够独立验证这些推理。对于并发程序的正确性,目前尚无公认的见证格式——这在很大程度上是由于分析器所考虑的语义之间存在鸿沟,从交错(interleaving)语义到线程模块化(thread-modular)方法,使得交换信息变得困难。我们提出一种格式,利用众所周知的幽灵(ghosts)概念,将工具对程序所做出的断言嵌入到一个带有幽灵的修改后的程序中,使得见证的有效性可以通过分析该程序来判定。因此,见证在交错语义和线程模块化语义下的有效性是一致的。此外,由抽象解释器计算出的线程模块化不变量可以自然地使用幽灵语句在新格式中表达。我们通过为SV-COMP基准套件中的一部分并发程序生成此类幽灵见证,并将其传递给模型检查器来评估该方法。模型检查器能够确认其中75%的见证——这表明幽灵见证能够弥合交错方法与线程模块化方法之间的语义鸿沟。

英文摘要:

Static analyzers are typically complex tools and thus prone to contain bugs themselves. To increase the trust in the verdict of such tools, witnesses encode key reasoning steps underlying the verdict in an exchangeable format, enabling independent validation of the reasoning by other tools. For the correctness of concurrent programs, no agreed-upon witness format exists -- in no small part due to the divide between the semantics considered by analyzers, ranging from interleaving to thread-modular approaches, making it challenging to exchange information. We propose a format that leverages the well-known notion of ghosts to embed the claims a tool makes about a program into a modified program with ghosts, such that the validity of a witness can be decided by analyzing this program. Thus, the validity of witnesses with respect to the interleaving and the thread-modular semantics coincides. Further, thread-modular invariants computed by an abstract interpreter can naturally be expressed in the new format using ghost statements. We evaluate the approach by generating such ghost witnesses for a subset of concurrent programs from the SV-COMP benchmark suite, and pass them to a model checker. It can confirm 75% of these witnesses -- indicating that ghost witnesses can bridge the semantic divide between interleaving and thread-modular approaches.

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

↑