基于数据记录的可扩展并发程序语义区分
Datalog-based Scalable Semantic Diffing of Concurrent Programs
摘要:
当修改演进程序以解决与线程同步相关的问题时,需要确认改变是正确的,即,它不会引入意外的行为。然而,手动比较两个程序以识别语义差异是劳动密集型的并且容易出错,而基于模型检验的技术在计算上是昂贵的。为了填补这一空白,我们开发了一种快速的近似静态分析来计算两个程序的同步差异。该方法是快速的,因为它不依赖于重量级模型检验技术,而是利用基于多项式时间数据日志的程序分析框架来计算差分数据流边缘,即,一个程序允许的边缘,而另一个程序不允许。虽然使用近似,我们的方法是足够准确的,由于精心设计的数据流推理规则和迭代增加所需的数据流边缘表示的差异。我们已经实现了我们的方法,并在大量的多线程C程序上对其进行了评估,以确认其通常在几秒钟内产生与人类获得的相同差异的能力;相比之下,基于模型检验的现有技术需要几分钟甚至几小时,因此可能会慢10倍到1000倍。
英文摘要:
When an evolving program is modified to address issues related to thread synchronization, there is a need to confirm the change is correct, i.e., it does not introduce unexpected behavior. However, manually comparing two programs to identify the semantic difference is labor intensive and error prone, whereas techniques based on model checking are computationally expensive. To fill the gap, we develop a fast and approximate static analysis for computing synchronization differences of two programs. The method is fast because, instead of relying on heavy-weight model checking techniques, it leverages a polynomial-time Datalog-based program analysis framework to compute differentiating data-flow edges, i.e., edges allowed by one program but not the other. Although approximation is used our method is sufficiently accurate due to careful design of the Datalog inference rules and iterative increase of the required data-flow edges for representing a difference. We have implemented our method and evaluated it on a large number of multithreaded C programs to confirm its ability to produce, often within seconds, the same differences obtained by human; in contrast, prior techniques based on model checking take minutes or even hours and thus can be 10x to 1000x slower.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。