Sound static analysis can prove the absence of data races by establishing that no two conflicting memory accesses can occur at the same time. We repurpose the concept of digests -- summaries of computational histories originally introduced to bring tunable concurrency-sensitivity to thread-modular value analysis by abstract interpretation, extending this idea to race detection: We use digests to capture the conditions under which conflicting accesses may not happen in parallel. To formalize this, we give a definition of data races in the thread-modular local trace semantics and show how exclusion criteria for potential conflicts can be expressed as digests. We report on our implementation of digest-driven data race detection in the static analyzer Goblint, and evaluate it on the SV-COMP benchmark suite. Combining the lockset digest with digests reasoning on thread ids and thread joins increases the number of correctly solved tasks by more than a factor of five compared to lockset reasoning alone.
翻译:可靠的静态分析可以通过证明不存在两个冲突的内存访问同时发生来验证数据竞争的缺失。我们重新利用摘要(digests)的概念——最初为通过抽象解释实现可调并发敏感性的线程模块化值分析而引入的计算历史摘要,将这一思想扩展至竞争检测:我们使用摘要来捕获冲突访问可能不会并行发生的条件。为形式化这一方法,我们在线程模块化局部迹语义中给出了数据竞争的定义,并展示了如何将潜在冲突的排除准则表达为摘要。我们报告了在静态分析器Goblint中实现摘要驱动数据竞争检测的情况,并在SV-COMP基准测试套件上进行了评估。结合锁集摘要与基于线程ID和线程合并的摘要推理,相比仅使用锁集推理,正确解决的任务数量增加了五倍以上。