Program slicing reduces a program to a smaller version that retains a chosen computation, referred to as a slicing criterion. One recent multi-lingual slicing approach, observation-based slicing (ORBS), speculatively deletes parts of the program and then executes the code. If the behavior of the slicing criteria is unchanged, the speculative deletion is made permanent. While this makes ORBS language agnostic, it can lead to the production of some non-intuitive slices. One particular challenge is when the execution environment plays a role. For example, ORBS will delete the line "a = 0" if the memory location assigned to a contains zero before executing the statement, since deletion will not affect the value of a and thus the slicing criterion. Consequently, slices can differ between execution environments due to factors such as initialization and call stack reuse. The technique considered, nVORBS, attempts to ameliorate this problem by validating a candidate slice in n different execution environments. We conduct an empirical study to collect initial insights into how often the execution environment leads to slice differences. Specifically, we compare and contrast the slices produced by seven different instantiations of nVORBS. Looking forward, the technique can be seen as a variation on metamorphic testing, and thus suggests how ideas from metamorphic testing might be used to improve dynamic program analysis.
翻译:将程序切片降为较小版本, 保留选择的计算, 称为切片标准 。 最近一种多语言切片方法, 观测切片( ORBS), 投机性地删除程序的部分, 然后执行代码 。 如果切片标准的行为没有改变, 投机性删除是永久性的 。 这让 ORBS 语言具有不可知性, 可能导致生成一些非直观的切片 。 一个特殊的挑战是执行环境发挥作用。 例如, ORBS 将删除“ a = 0 ” 的线条线, 如果指定在执行语句前的内存位置为零, 因为删除不会影响一个程序的价值, 从而删除程序执行代码 。 因此, 切片环境之间可能会因初始化和调用堆放再利用等因素而出现差异 。 所考虑的技术, nVORBS, 试图通过验证在 n 不同的执行环境中的候选切片片段来缓解这一问题。 我们进行一项实验性研究, 以初步了解执行环境如何经常导致切片断差异 。 具体地, 我们比较和对比一个切片状变制方案, 如何通过7个不同的正位测试,, 来观察进化方案,, 如何改进和进化方案, 如何改进前变制变。