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

Promising 2.0下验证的可判定性

The Decidability of Verification under Promising 2.0

Parosh Aziz Abdulla, Mohamed Faouzi Atig, Adwait Godbole, Shankaranarayanan Krishna, Viktor Vafeiadis

摘要:

在PLDI'20中,Lee等人介绍了C++并发的\emph{promising }语义PS 2.0,它捕获了大多数常见的程序转换,同时满足DRF保证。PS 2.0下的有限状态程序的可达性问题,只有释放-获取访问已经知道是不可判定的。因此,我们解决,在本文中,可达性问题,在PS 2.0下运行的程序与宽松的访问承诺。我们表明,即使在输入程序具有有限状态的情况下,这个问题也是不可判定的。鉴于这种不可判定性的结果,我们认为PS 2.0的片段,只有宽松的访问允许有限数量的承诺。我们表明,在这种限制下,可达性是可判定的,虽然非常昂贵:它是非原始递归。鉴于这种高复杂性与有限数量的承诺和不可判定性结果的RA片段的PS 2.0,我们认为有界版本的可达性问题。为此,我们绑定了Promise的数量和“视图切换”,即进程可以切换全局内存的本地视图的次数。我们提供了一个从PS2.0下的输入程序到SC下的程序的代码到代码的翻译,其中包含了宽松的和释放获取的内存访问以及承诺。这导致了PS2.0下的有界可达性问题减少到SC下的有界上下文切换问题。我们已经实现了一个原型工具,并在一组基准测试上对其进行了测试,这表明程序中的许多错误可以使用小范围来发现。

英文摘要:

In PLDI'20, Lee et al. introduced the \emph{promising } semantics PS 2.0 of the C++ concurrency that captures most of the common program transformations while satisfying the DRF guarantee. The reachability problem for finite-state programs under PS 2.0 with only release-acquire accesses is already known to be undecidable. Therefore, we address, in this paper, the reachability problem for programs running under PS 2.0 with relaxed accesses together with promises. We show that this problem is undecidable even in the case where the input program has finite state. Given this undecidability result, we consider the fragment of PS 2.0 with only relaxed accesses allowing bounded number of promises. We show that under this restriction, the reachability is decidable, albeit very expensive: it is non-primitive recursive. Given this high complexity with bounded number of promises and the undecidability result for the RA fragment of PS 2.0, we consider a bounded version of the reachability problem. To this end, we bound both the number of promises and the "view-switches", i.e, the number of times the processes may switch their local views of the global memory. We provide a code-to-code translation from an input program under PS 2.0, with relaxed and release-acquire memory accesses along with promises, to a program under SC. This leads to a reduction of the bounded reachability problem under PS 2.0 to the bounded context-switching problem under SC. We have implemented a prototype tool and tested it on a set of benchmarks, demonstrating that many bugs in programs can be found using a small bound.

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

↑