Affiliation:
1. University of Wisconsin, Madison, WI
2. University of Wisconsin, Madison, WI and Gramma Tech, Inc., Ithaca, NY
Abstract
This paper defines a new variant of program slicing, called
specialization slicing
, and presents an algorithm for the specialization-slicing problem that creates an optimal output slice. An algorithm for specialization slicing is
polyvariant
: for a given procedure р, the algorithm may create multiple specialized copies of р. In creating specialized procedures, the algorithm must decide for which patterns of formal parameters a given procedure should be specialized and which program elements should be included in each specialized procedure.
We formalize the specialization-slicing problem as a partitioning problem on the elements of the possibly
infinite
unrolled program. To manipulate possibly infinite sets of program elements, the algorithm makes use of automata-theoretic techniques originally developed in the model-checking community. The algorithm returns a
finite answer
that is optimal (with respect to a criterion defined in the article). In particular, (i) each element replicated by the specialization-slicing algorithm provides information about specialized patterns of program behavior that are intrinsic to the program, and (ii) the answer is of minimal size (i.e., among all possible answers with property (i), there is no smaller one).
The specialization-slicing algorithm provides a new way to create executable slices. Moreover, by combining specialization slicing with forward slicing, we obtain a method for removing unwanted features from a program. While it was previously known how to solve the feature-removal problem for single-procedure programs, it was not known how to solve it for programs with procedure calls.
Funder
Division of Computing and Communication Foundations
Air Force Research Laboratory
Office of Naval Research
Defense Advanced Research Projects Agency
U.S. Army Research Laboratory
Publisher
Association for Computing Machinery (ACM)
Cited by
7 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Slicing Unconditional Jumps with Unnecessary Control Dependencies;Logic-Based Program Synthesis and Transformation;2021
2. An automated change impact analysis approach for User Requirements Notation models;Journal of Systems and Software;2019-11
3. Hierarchical regression test case selection using slicing;International Journal of Computational Science and Engineering;2017
4. An improved algorithm for slicing machine code;ACM SIGPLAN Notices;2016-12-05
5. An improved algorithm for slicing machine code;Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications;2016-10-19