In computer programming, static slicing is a software maintenance technique used to identify all program code that can in any way affect the value of a given variable. The following paragraph informally describes this computation.
Based on the original definition of Weiser, informally, a static program slice S consists of all statements in program P that may affect the value of variable v at some point p. The slice is defined for a slicing criterion C=(x,V), where x is a statement in program P and V is a subset of variables in P. A static slicing includes all the statements that affect variable v for a set of all possible inputs at the point of interest. Static slices are computed by finding consecutive sets of indirectly relevant statements, according to data and control dependencies.
See also
References
- Mark Weiser. "Program slicing". Proceedings of the 5th International Conference on Software Engineering, pages 439–449, IEEE Computer Society Press, March 1981.