arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1903.07213cs.PL
收藏

迹加细关系的描述与推理

Specification and Inference of Trace Refinement Relations

Timos Antonopoulos, Eric Koskinen, Ton-Chanh Le

摘要:

现代软件是不断变化的。研究人员和实践者越来越意识到,如果验证工具通过组合和跨程序版本的分析来拥抱变化,那么它们可能会产生影响。关于程序之间相似性和差异性的推理可以追溯到Benton,他引入了基于状态的细化关系,Yang和其他人扩展了这种关系。然而,据我们所知,细化关系还没有被探索的痕迹。我们提出了一种新颖的理论,允许人们通过使用我们所谓的跟踪细化关系来对两个不同程序的片段如何随着时间的推移而表现出的相似性/差异进行组合推理。我们采取反应式的程序,并发现Kleene代数与测试(KAT)[Kozen]是一个自然的选择来描述的痕迹,因为它允许代数推理,并已内置的组成。我们的理论包括两个步骤的语义抽象从程序到KAT,然后我们的跟踪细化关系相关的行为(i)分类程序行为到跟踪类通过KAT相交和(ii)相关的原子事件/条件跨程序与KAT假设。接下来,我们描述一种合成算法,该合成算法通过探索两个程序的轨迹的子分区,迭代地将它们抽象为KAT表达式,通过自定义编辑距离算法发现关系,并应用上述策略(i)和(ii),来迭代地构建两个程序之间的轨迹细化关系。我们已经实现了这个算法{ \sc knotical},第一个工具能够合成跟踪细化关系。它使用InterProc和SymKAT在Ocaml中从头开始构建。我们已经证明,有用的关系,可以有效地生成一套37个基准,包括不断变化的数组程序,系统代码和Web服务器的片段。

英文摘要:

Modern software is constantly changing. Researchers and practitioners are increasingly aware that verification tools can be impactful if they embrace change through analyses that are compositional and span program versions. Reasoning about similarities and differences between programs goes back to Benton, who introduced state-based refinement relations, which were extended by Yang and others. However, to our knowledge, refinement relations have not been explored for traces. We present a novel theory that allows one to perform compositional reasoning about the similarities/differences between how fragments of two different programs behave over time through the use of what we call trace-refinement relations. We take a reactive view of programs and found Kleene Algebra with Tests (KAT) [Kozen] to be a natural choice to describe traces since it permits algebraic reasoning and has built-in composition. Our theory involves a two-step semantic abstraction from programs to KAT, and then our trace refinement relations correlate behaviors by (i) categorizing program behaviors into trace classes through KAT intersection and (ii) correlating atomic events/conditions across programs with KAT hypotheses. We next describe a synthesis algorithm that iteratively constructs trace-refinement relations between two programs by exploring sub-partitions of their traces, iteratively abstracting them as KAT expressions, discovering relationships through a custom edit-distance algorithm, and applying strategies (i) and (ii) above. We have implemented this algorithm as {\sc knotical}, the first tool capable of synthesizing trace-refinement relations. It built from the ground up in Ocaml, using InterProc and SymKAT. We have demonstrated that useful relations can be efficiently generated across a suite of 37 benchmarks that include changing fragments of array programs, systems code, and web servers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑