论文标题
无种族免费计划的线程本地语义和有效的静态分析
A Thread-Local Semantics and Efficient Static Analyses for Race Free Programs
论文作者
论文摘要
无数据竞赛(DRF)计划构成了一系列并发计划。在本文中,我们为设计和证明针对此类程序的数据流分析的正确性提供了一个框架。这些分析具有与早期文献中提出的“同步CFG”分析的精神。为了实现这一目标,我们首先为DRF程序(称为L-DRF)提出了一种新颖的具体语义,该语义本质上是线程 - 本质上 - 每个线程都以其自己的数据状态副本进行操作。我们表明,语义的抽象使我们能够将对DRF程序的分析减少到顺序分析。这有助于快速将现有的顺序分析移植到DRF程序的声音和可扩展分析。接下来,我们将L-DRF参数化,然后将程序变量分配到原子上访问的“区域”中。区域参数化语义的抽象对“区域竞赛”免费并发程序产生了更精确的分析。我们实例化了这些抽象,以设计无种族免费计划的有效关系分析,这是我们在称为Ratcop的原型工具中实施的。在基准上,Ratcop能够证明多达65%的断言,而我们的基线证明了25%。此外,在与最近同时进行的静态分析仪的比较研究中,Ratcop的数量级高达5个数量级。
Data race free (DRF) programs constitute an important class of concurrent programs. In this paper we provide a framework for designing and proving the correctness of data flow analyses that target this class of programs. These analyses are in the same spirit as the "sync-CFG" analysis proposed in earlier literature. To achieve this, we first propose a novel concrete semantics for DRF programs, called L-DRF, that is thread-local in nature---each thread operates on its own copy of the data state. We show that abstractions of our semantics allow us to reduce the analysis of DRF programs to a sequential analysis. This aids in rapidly porting existing sequential analyses to sound and scalable analyses for DRF programs. Next, we parameterize L-DRF with a partitioning of the program variables into "regions" which are accessed atomically. Abstractions of the region-parameterized semantics yield more precise analyses for "region-race" free concurrent programs. We instantiate these abstractions to devise efficient relational analyses for race free programs, which we have implemented in a prototype tool called RATCOP. On the benchmarks, RATCOP was able to prove up to 65% of the assertions, in comparison to 25% proved by our baseline. Moreover, in a comparative study with a recent concurrent static analyzer, RATCOP was up to 5 orders of magnitude faster.