论文标题
在有希望的2.0下验证的可决定性
The Decidability of Verification under Promising 2.0
论文作者
论文摘要
在PLDI'20中,Lee等人。引入了C ++并发的\ Emph {有希望的}语义PS 2.0,该语义捕获了大多数常见程序转换,同时满足DRF保证。 PS 2.0下的有限状态程序的可及性问题已经众所周知,只有发行声访问是无法确定的。因此,我们在本文中解决了在PS 2.0下运行的程序的可及性问题,并提供了放松的访问以及承诺。我们表明,即使在输入程序具有有限状态的情况下,这个问题也不确定。鉴于这种不可证明的结果,我们考虑PS 2.0的片段,只有放松的访问才能允许有限的承诺。我们表明,在这种限制下,可及性是可决定的,尽管非常昂贵:它是非递归的。鉴于具有有限数量的承诺和PS 2.0的RA片段的不确定性结果,我们考虑了可及性问题的有界版本。为此,我们既约束了承诺的数量和“视图转换”的数量,即过程可能会切换其全局内存的本地视图的次数。我们从PS 2.0下的输入程序提供了代码对代码转换,并提供了放松和发行的记忆访问以及承诺,并提供SC下的程序。这导致PS 2.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.