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

利用动态分析生成析取不变量

Using Dynamic Analysis to Generate Disjunctive Invariants

ThanhVu Nguyen, Deepak Kapur, Westley Weimer, Stephanie Forrest

摘要:

程序不变量对于缺陷检测、程序验证和程序修复是非常重要的。然而,现有的技术对重要的不变量类,如析取,表达条件语句的语义的支持有限。我们提出了一种方法来产生析取不变量的数值域,这是不可表达的,使用经典的凸多面体。利用动态分析,将问题转化为非标准的“最大-加”和“最小-加”代数,我们的方法在程序跟踪点上构造外壳。重要的是,我们引入和推断这样的不变量,平衡表达能力对计算成本的非凸形状在高维的弱类。现有的动态推理技术往往产生虚假的不变量,适合一些程序跟踪,但不推广。与洞察力,生成动态不变量是很容易的,我们建议验证这些不变量静态使用k-归纳SMT定理证明,使我们能够验证不变量,不是经典归纳。涉及非线性算术和抽象数组的困难内核的结果表明,这种混合方法有效地生成和证明正确的程序不变量。

英文摘要:

Program invariants are important for defect detection, program verification, and program repair. However, existing techniques have limited support for important classes of invariants such as disjunctions, which express the semantics of conditional statements. We propose a method for generating disjunctive invariants over numerical domains, which are inexpressible using classical convex polyhedra. Using dynamic analysis and reformulating the problem in non-standard "max-plus" and "min-plus" algebras, our method constructs hulls over program trace points. Critically, we introduce and infer a weak class of such invariants that balances expressive power against the computational cost of generating nonconvex shapes in high dimensions. Existing dynamic inference techniques often generate spurious invariants that fit some program traces but do not generalize. With the insight that generating dynamic invariants is easy, we propose to verify these invariants statically using k-inductive SMT theorem proving which allows us to validate invariants that are not classically inductive. Results on difficult kernels involving nonlinear arithmetic and abstract arrays suggest that this hybrid approach efficiently generates and proves correct program invariants.

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

↑