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

程序模式动态切片问题的计算复杂性

On the computational complexity of dynamic slicing problems for program schemas

Sebastian Danicic, Robert M. Hierons, Michael R. Laurence

摘要:

给定一个程序,可以通过删除零个或多个语句来获得商。程序切片领域关注的是计算程序的商,该商保留原始程序的部分行为。所有的程序切片算法都考虑了程序的结构属性,如控制依赖和数据依赖,而不是其函数和谓词的语义,因此实际上与程序模式一起工作。Korel和Laski的动态切片标准只要求程序行为是保留在原程序遵循特定路径的情况下,并且切片/商遵循此Path. In本文中,我们正式Korel和Laski的定义的动态切片适用于线性schemas,也制定了一个限制性较小的定义,其中通过原程序的路径不需要保留的切片。限制较少的定义具有导致较小切片的好处。对于这两个定义,我们计算复杂性界限的问题,建立一个给定的片的线性模式是否是一个动态片,是否线性模式有一个非平凡的动态片,并证明后一个问题是NP-困难的在这两种情况下。我们还给出了一个例子来证明最小动态切片(无论它们是否保持原始路径)不需要是唯一的。

英文摘要:

Given a program, a quotient can be obtained from it by deleting zero or more statements. The field of program slicing is concerned with computing a quotient of a program which preserves part of the behaviour of the original program. All program slicing algorithms take account of the structural properties of a program such as control dependence and data dependence rather than the semantics of its functions and predicates, and thus work, in effect, with program schemas. The dynamic slicing criterion of Korel and Laski requires only that program behaviour is preserved in cases where the original program follows a particular path, and that the slice/quotient follows this path. In this paper we formalise Korel and Laski's definition of a dynamic slice as applied to linear schemas, and also formulate a less restrictive definition in which the path through the original program need not be preserved by the slice. The less restrictive definition has the benefit of leading to smaller slices. For both definitions, we compute complexity bounds for the problems of establishing whether a given slice of a linear schema is a dynamic slice and whether a linear schema has a non-trivial dynamic slice and prove that the latter problem is NP-hard in both cases. We also give an example to prove that minimal dynamic slices (whether or not they preserve the original path) need not be unique.

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

↑