Program slicing is a software engineering technique that helps to isolate specific parts of a program that are relevant to a particular task. By slicing away the unused parts of the code, the relationships between different parts of a program can be better understood and bugs or performance issues can be more easily identified and fixed.

Different Approaches

Program slicing can be either static or dynamic, depending on whether the slices are based on the actual execution of the program or on a static analysis of the code. In static slicing, a slice is created based on a pre-determined set of criteria such as the program’s control flow, data flow, or def-use chains. On the other hand, dynamic slicing is performed by executing the program and collecting information about the values of variables and the execution of statements.

Relevant slicing is a more recent development in program slicing that combines the advantages of both static and dynamic slicing. In relevant slicing, a slice is created that is both statically and dynamically relevant to a particular program execution. This approach helps to reduce the number of irrelevant statements in the slice, making it easier to understand and debug the code.

Drawbacks of Different Slicing Approaches

There are some drawbacks to each of the slicing approaches. For example, static slicing can be limited by the accuracy of the data used to create the slice and can be sensitive to changes in the code. Dynamic slicing can be time-consuming and requires accurate and up-to-date information about the program. Relevant slicing is a relatively new approach and still has some limitations in terms of the types of programs that can be sliced and the need for specialized tools.

Recent Results of Program Slicing

In recent years, program slicing has become an increasingly popular technique in software engineering, with numerous studies being conducted to improve the accuracy and efficiency of slicing algorithms. For example, researchers have developed new algorithms for creating slices that are more accurate and up-to-date, and have explored new approaches for creating slices that are both static and dynamically relevant.

References

Korel, B., & Laski, J. (1990). Dynamic slicing of computer programs. Journal of Systems and Software, 13(3), 187-195. DOI: 10.1016/0164-1212(90)90094-3

Korel, B., & Rilling, J. (1998). Dynamic program slicing methods. Information and Software Technology, 40(11-12), 647-659. DOI: 10.1016/S0950-5849(98)00089-5

Binkley, D. W., & Gallagher, K. B. (1996). Program slicing. Advances in computers, 43, 1-50. DOI: 10.1016/S0065-2458(08)60641-5

De Lucia, A. (2001, November). Program slicing: Methods and applications. In Proceedings First IEEE International Workshop on Source Code Analysis and Manipulation (pp. 142-149). IEEE. DOI: 10.1109/SCAM.2001.972675

Weiser, M. (1984). Program slicing. IEEE Transactions on software engineering, (4), 352-357. DOI: 10.1109/TSE.1984.5010248

Harman, M., & Hierons, R. (2001). An overview of program slicing. software focus, 2(3), 85-92. DOI: 10.1002/swf.41

Gyimóthy, T., Beszédes, A., & Forgács, I. (1999). An efficient relevant slicing method for debugging. ACM SIGSOFT Software Engineering Notes, 24(6), 303-321. DOI: 10.1145/318774.319248

Wang, T., & Roychoudhury, A. (2008). Dynamic slicing on Java bytecode traces. ACM Transactions on Programming Languages and Systems (TOPLAS), 30(2), 1-49. DOI:

Tip, F. (1994). A survey of program slicing techniques (p. 58). Amsterdam: Centrum voor Wiskunde en Informatica. DOI: 10.5555/869354