Abstract
Program slicing is an important operation that can be used as the basis for programming tools that help programmers understand, debug, maintain, and test their code. This paper extends previous work on program slicing by providing a new definition of “correct” slices, by introducing a representation for C-style switch statements, and by defining a new way to compute control dependences and to slice a programdependence graph so as to compute more precise slices of programs that include jumps and switches. Experimental results show that the new approach to slicing can sometimes lead to a significant improvement in slice precision.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
H. Agrawal. On slicing programs with jump statements. In Proc. ACM Conf. on Programming Language Design and Implementation (PLDI), pages 302–312, June 1994.
T. Ball and S. Horwitz. Slicing programs with arbitrary control flow. In Lecture Notes in Computer Science, volume 749, New York, NY, November 1993. Springer-Verlag.
J. Choi and J. Ferrante. Static slicing in the presence of goto statements. ACM Trans. on Programming Languages and Systems, 16(4):1097–1113, July 1994.
J. Ferrante, K. Ottenstein, and J. Warren. The program dependence graph and its use in optimization. ACM Trans. on Programming Languages and Systems, 9(3):319–349, July 1987.
M. Harman and S. Danicic. A new algorithm for slicing unstructured programs. Jrnl. of Software Maintenance, 10(6):415–441, Nov./Dec. 1998.
S. Kumar and S. Horwitz. Better slicing of programs with jumps and switches. Technical Report TR-1429, Computer Sciences, University of Wisconsin-Madison, 2001.
K. Ottenstein and L. Ottenstein. The program dependence graph in a software development environment. In Proc. ACM SIGSOFT/SIGPLAN Software Engineering Symp. on Practical Software Development Environments, pages 177–184, 1984.
A. Podgurski and L. Clarke. A formal model of program dependences and its implications for software testing, debugging, and maintenance. IEEE Trans. on Software Engineering, 16(9):965–979, September 1990.
S. Schoenig and M. Ducassé. A backward slicing algorithm for Prolog. In Lecture Notes in Computer Science, volume 1145, pages 317–331, New York, NY, 1996. Springer-Verlag.
S. Sinha, M. Harrold, and G. Rothermel. System-dependence-graph-based slicing of programs with arbitrary interprocedural control flow. In Int. Conf. on Software Engineering, pages 432–441, May 1999.
M. Weiser. Program slicing. IEEE Trans. on Software Engineering, SE-10(4):352–357, July 1984.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kumar, S., Horwitz, S. (2002). Better Slicing of Programs with Jumps and Switches. In: Kutsche, RD., Weber, H. (eds) Fundamental Approaches to Software Engineering. FASE 2002. Lecture Notes in Computer Science, vol 2306. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45923-5_7
Download citation
DOI: https://doi.org/10.1007/3-540-45923-5_7
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-43353-8
Online ISBN: 978-3-540-45923-1
eBook Packages: Springer Book Archive