论文标题

高阶功能的动态符号执行

Dynamic Symbolic Execution of Higher-Order Functions

论文作者

You, Shu-Hung, Findler, Robert Bruce, Dimoulas, Christos

论文摘要

随着程序规模的增加,一般测试的有效性会恶化。一个有希望的方法是模块化测试程序,例如,按每个功能或班级测试。 las,这个想法以现代语言的现代编程语言打入了障碍,组成部分期望功能,对象甚至类作为输入。问题的症结在于,现有的一般性测试技术无法忠实地捕获高阶程序及其输入之间的复杂相互作用,以便以SMT求解器可以使用的一阶公式将其提炼。在本文中,我们迈出了解决问题的第一步。我们提供了一种设计,语义和原型,用于同意高阶功能的一致测试。受到高阶符号执行的工作的启发,我们的模型构造了具有规范形状的高阶函数的输入。这使Consolic Tester能够跟踪高阶函数的控制流路径的哪些部分取决于其输入的形状,哪些不取决于哪些。 Concolic测试仪编码不依赖输入形状作为一阶公式的碎片。随后,类似于一阶一致性测试仪,它利用SMT求解器产生另一个具有相同形状的输入,但它探索了高阶函数的另一个控制流路径。作为一个单独的维度,Coneroloc Tester迭代探索了输入的规范形状,并研究了高阶函数可以与输入相互作用的所有方式,以搜索错误。为了验证我们的设计,我们证明,如果高阶功能具有错误,我们的Consolic Tester最终将构建一个触发错误的输入。使用我们的设计作为蓝图,我们实现了一个原型Controtype Consester,并确认它在文献中发现了各种高阶程序中的错误。

The effectiveness of concolic testing deteriorates as the size of programs increases. A promising way out is to test programs modularly, e.g., on a per function or class basis. Alas, this idea hits a roadblock in modern programming languages In modern languages, components expect functions, objects, and even classes as inputs. The crux of the problem is that existing concolic testing techniques cannot faithfully capture the complex interactions between a higher-order program and its inputs in order to distill it in a first-order formula that an SMT solver can work with. In this paper, we take the first step towards solving the problem; we offer a design, semantics, and prototype for concolic testing of higher-order functions. Inspired by work on higher-order symbolic execution, our model constructs inputs for higher-order functions with a canonical shape. This enables the concolic tester to keep track of which pieces of the control-flow path of the higher-order function depend on the shape of its input and which do not. The concolic tester encodes the pieces that do not depend on the shape of the input as a first-order formula. Subsequently, similar to a first-order concolic tester, it leverages an SMT solver to produce another input with the same shape but that explores a different control-flow path of the higher-order function. As a separate dimension, the concolic tester iteratively explores the canonical shapes for the input and, investigating all the ways a higher-order function can interact with its input, searching for bugs. To validate our design, we prove that if a higher-order function has a bug, our concolic tester will eventually construct an input that triggers the bug. Using our design as a blueprint, we implement a prototype concolic tester and confirm that it discovers bugs in a variety of higher-order programs from the literature.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源