论文标题
等待Godot:无状态模型检查,避免执行什么都没有发生
Awaiting for Godot: Stateless Model Checking that Avoids Executions where Nothing Happens
论文作者
论文摘要
无状态模型检查(SMC)是一种并发程序的验证技术,该技术通过探索所有可能的线程计划来检查安全性违反安全性。当与动态部分订单降低(DPOR)结合在一起时,它非常有效,该级别降低(DPOR)在调度上引入了等效性,并且需要在每个等价类中探索一个。即使使用DPOR,SMC也经常花费不必要的努力来探索纯粹的循环迭代,即对程序状态没有影响。我们介绍了在具有纯回路迭代的程序上使SMC与DPOR更有效的技术。第一个是一个静态程序分析,用于检测循环纯度和相关的程序转换,称为部分环纯度消除,它插入假设语句以阻止纯回路迭代。随后,其中一些假设变成了等待的陈述,这些陈述完全消除了许多假设的执行。最后,我们提出了标准DPOR等效性的扩展,通过削弱事件之间的冲突关系获得。所有这些技术都纳入了一种新的DPOR算法中,最佳Dpor-Await可以同时处理等待和较弱的冲突关系,从某种意义上说,它可以在每个等价类中探索一个执行,并且还可以诊断为牲畜。我们在Nidhugg中的实施表明,这些技术可以大大加快对SMC工具目前具有挑战性的并发程序的分析,这既可以探索它们的完整交织集,甚至用于检测其中的并发错误。
Stateless Model Checking (SMC) is a verification technique for concurrent programs that checks for safety violations by exploring all possible thread schedulings. It is highly effective when coupled with Dynamic Partial Order Reduction (DPOR), which introduces an equivalence on schedulings and need explore only one in each equivalence class. Even with DPOR, SMC often spends unnecessary effort in exploring loop iterations that are pure, i.e., have no effect on the program state. We present techniques for making SMC with DPOR more effective on programs with pure loop iterations. The first is a static program analysis to detect loop purity and an associated program transformation, called Partial Loop Purity Elimination, that inserts assume statements to block pure loop iterations. Subsequently, some of these assumes are turned into await statements that completely remove many assume-blocked executions. Finally, we present an extension of the standard DPOR equivalence, obtained by weakening the conflict relation between events. All these techniques are incorporated into a new DPOR algorithm, Optimal-DPOR-Await, which can handle both awaits and the weaker conflict relation, is optimal in the sense that it explores exactly one execution in each equivalence class, and can also diagnose livelocks. Our implementation in Nidhugg shows that these techniques can significantly speed up the analysis of concurrent programs that are currently challenging for SMC tools, both for exploring their complete set of interleavings, but even for detecting concurrency errors in them.