Computing Reviews

Static slicing in the presence of goto statements
Choi J., Ferrante J. ACM Transactions on Programming Languages and Systems16(4):1097-1113,1994.Type:Article
Date Reviewed: 07/01/95

Program slicing is a valuable technique for analyzing the behavior of a program. An executable slice is a subset of the statements of a program that exhibits the same execution behavior on a variable as the program does. Standard techniques for constructing a slice are based on the program dependence graph, which is a graphical representation of both data and control dependences among statements of the program.

The authors first show that the standard techniques do not yield a correct executable slice if the program contains arbitrary goto statements. They then show that executable slices can be constructed when goto statements are present by modifying the standard techniques. Two different methods are presented and illustrated. The first method produces a slice that is a subset of the original program but may be larger than necessary, containing statements that do not directly affect the variable under consideration. The second method introduces additional goto statements in the slice so that it is no longer a subprogram of the original but provides a more accurate minimal slice.

The authors make good use of examples to explain the problem and illustrate their techniques. They provide both formal and informal descriptions of the two methods along with correctness proofs. One may question the necessity of program slicing in the presence of goto statements. Among other applications, however, debugging tools are based on program slicing, and as long as goto statements appear in programs, the tools will be required to handle them.

Reviewer:  S. K. Andrianoff Review #: CR118719 (9507-0495)

Reproduction in whole or in part without permission is prohibited.   Copyright 2024 ComputingReviews.com™
Terms of Use
| Privacy Policy