当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
The Reads-From Equivalence for the TSO and PSO Memory Models
arXiv - CS - Programming Languages Pub Date : 2020-11-23 , DOI: arxiv-2011.11763
Truc Lam Bui, Krishnendu Chatterjee, Tushar Gautam, Andreas Pavlogiannis, Viktor Toman

The verification of concurrent programs remains an open challenge due to the non-determinism in inter-process communication. Instead of exploring concrete executions, stateless model-checking (SMC) techniques partition the execution space into equivalence classes, and explore each class as opposed to each execution. For the relaxed memory models of TSO and PSO (total/partial store order), the standard equivalence has been Shasha-Snir traces, seen as an extension of the classic Mazurkiewicz equivalence from SC (sequential consistency) to TSO and PSO. The reads-from (RF) equivalence was recently shown to be coarser than the Mazurkiewicz equivalence, leading to impressive scalability improvements for SMC under SC. The generalization of RF to TSO and PSO requires to overcome two challenges, namely, verifying execution consistency and SMC algorithm. We address these two fundamental problems in this work. Our first set of contributions is on the problem of verifying TSO- and PSO-consistent executions given a reads-from map, VTSO-rf and VPSO-rf, respectively. The problem has been heavily studied under SC due to its numerous applications, but little is known for TSO and PSO. For an execution of $n$ events over $k$ threads and $d$ variables, we establish novel bounds that scale as $n^{k+1}$ for TSO and as $n^{k+1}\cdot \min(n^{k^2}, 2^{k\cdot d})$ for PSO. Our second contribution is an algorithm for SMC under TSO and PSO using the RF equivalence. Our algorithm is exploration-optimal, in the sense that it is guaranteed to explore each class of the RF partitioning exactly once, and spends polynomial time per class when $k$ is bounded. Our experimental evaluation shows that the RF equivalence is often exponentially coarser than Shasha-Snir traces, and our SMC algorithm scales much better than state-of-the-art tools based on Shasha-Snir traces.

中文翻译:

TSO和PSO内存模型的读取等效

由于进程间通信的不确定性,并发程序的验证仍然是一个开放的挑战。无状态模型检查(SMC)技术不是探索具体的执行,而是将执行空间划分为等效类,并探索与每个执行相对的每个类。对于TSO和PSO(全部/部分存储顺序)的宽松内存模型,标准等效项是Shasha-Snir迹线,被视为经典的Mazurkiewicz等效项从SC(顺序一致性)到TSO和PSO的扩展。最近显示的读(RF)等效要比Mazurkiewicz等效要粗糙,从而导致SC下SMC的可伸缩性得到了显着改善。将RF推广到TSO和PSO需要克服两个挑战,即验证执行一致性和SMC算法。我们在这项工作中解决了这两个基本问题。我们的第一组贡献是关于分别从读取映射VTSO-rf和VPSO-rf验证TSO和PSO一致的执行的问题。由于存在大量应用,因此在SC下已对该问题进行了大量研究,但对于TSO和PSO知之甚少。对于在$ k $个线程和$ d $变量上执行$ n $个事件,我们建立了新颖的范围,对于TSO,该范围的缩放范围为$ n ^ {k + 1} $,而缩放范围为$ n ^ {k + 1} \ cdot \ min(n ^ {k ^ 2},2 ^ {k \ cdot d})$ for PSO。我们的第二个贡献是使用射频等效技术在TSO和PSO下针对SMC的算法。我们的算法是探索最优的,从某种意义上讲,它可以确保探索每个类的RF分区仅一次,并且在$ k $有界时花​​费每个类的多项式时间。
更新日期:2020-11-25
down
wechat
bug