Abstract
The System Dependence Graph is a data structure often used in software analysis, and in particular in program slicing. Multiple optimizations and extensions have been created to give support to common language features, such as unconditional jumps (PPDG) and object-oriented features (JSysDG). In this paper we show that, unfortunately, the solutions proposed for different problems are incompatible when they are combined, producing incorrect results. We identify and showcase the incompatibilities generated by the combination of different techniques, and propose specific solutions for every incompatibility described. Finally, we present an implementation in which the issues found have been addressed, producing correct slices in all cases.
This work has been partially supported by grant PID2019-104735RB-C41 funded by MCIN/AEI/10.13039/501100011033, by the Generalitat Valenciana under grant Prometeo/2019/098 (DeepTrust), and by TAILOR, a project funded by EU Horizon 2020 research and innovation programme under GA No 952215. Sergio Pérez was partially supported by Universitat Politècnica de València under FPI grant PAID-01-18. Carlos Galindo was partially supported by the Spanish Ministerio de Universidades under grant FPU20/03861.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Codesonar SAST: https://www.grammatech.com/codesonar-sast-java.
- 2.
Codesonar: https://www.grammatech.com/codesonar-cc.
- 3.
e-Knife: https://mist.dsic.upv.es/e-knife.
References
Allen, F.E.: Control flow analysis. SIGPLAN Not. 5(7), 1–19 (1970)
Ball, T., Horwitz, S.: Slicing programs with arbitrary control-flow. In: Fritzson, P.A. (ed.) AADEBUG 1993. LNCS, vol. 749, pp. 206–222. Springer, Heidelberg (1993). https://doi.org/10.1007/BFb0019410
Cheda, D., Silva, J., Vidal, G.: Static slicing of rewrite systems. In: Proceedings of the 15th International Workshop on Functional and (Constraint) Logic Programming (WFLP 2006), pp. 123–136. Elsevier ENTCS 177 (2007)
Cheng, J.: Slicing concurrent programs. In: Fritzson, P.A. (ed.) AADEBUG 1993. LNCS, vol. 749, pp. 223–240. Springer, Heidelberg (1993). https://doi.org/10.1007/BFb0019411
Cheng, J.: Dependence analysis of parallel and distributed programs and its applications. In: Proceedings of the Advances in Parallel and Distributed Computing, pp. 370–377 (1997). https://doi.org/10.1109/APDC.1997.574057
DeMillo, R.A., Pan, H., Spafford, E.H.: Critical slicing for software fault localization. SIGSOFT Softw. Eng. Notes 21(3), 121–134 (1996). https://doi.org/10.1145/226295.226310. https://doi.acm.org/10.1145/226295.226310
Ferrante, J., Ottenstein, K.J., Warren, J.D.: The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9(3), 319–349 (1987)
Galindo, C., Pérez, S., Silva, J.: Data dependencies in object-oriented programs. In: 11th Workshop on Tools for Automatic Program Analysis (2020)
Galindo, C., Pérez, S., Silva, J.: Program slicing with exception handling. In: 11th Workshop on Tools for Automatic Program Analysis (2020)
Horwitz, S., Reps, T., Binkley, D.: Interprocedural slicing using dependence graphs. In: Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language Design and Implementation, PLDI 1988, New York, NY, USA, pp. 35–46. ACM (1988). https://doi.org/10.1145/53990.53994. https://doi.acm.org/10.1145/53990.53994
Horwitz, S., Reps, T., Binkley, D.: Interprocedural slicing using dependence graphs. ACM Trans. Program. Lang. Syst. 12(1), 26–60 (1990)
Kinloch, D.A., Munro, M.: Understanding C programs using the combined C graph representation. In: Proceedings 1994 International Conference on Software Maintenance, pp. 172–180 (1994)
Krinke, J.: Static slicing of threaded programs. SIGPLAN Not. 33(7), 35–42 (1998). https://doi.org/10.1145/277633.277638. https://doi.acm.org/10.1145/277633.277638
Krinke, J., Snelting, G.: Validation of measurement software as an application of slicing and constraint solving. Inf. Softw. Technol. 40(11), 661–675 (1998). https://doi.org/10.1016/S0950-5849(98)00090-1. https://www.sciencedirect.com/science/article/pii/S0950584998000901
Kumar, S., Horwitz, S.: Better slicing of programs with jumps and switches. In: Kutsche, R.-D., Weber, H. (eds.) FASE 2002. LNCS, vol. 2306, pp. 96–112. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45923-5_7
Larsen, L., Harrold, M.J.: Slicing object-oriented software. In: Proceedings of the 18th International Conference on Software Engineering, ICSE 1996, Washington, DC, USA, pp. 495–505. IEEE Computer Society (1996). https://dl.acm.org/citation.cfm?id=227726.227837
Liang, D., Harrold, M.J.: Slicing objects using system dependence graphs. In: Proceedings of the International Conference on Software Maintenance, ICSM 1998, Washington, DC, USA, pp. 358–367. IEEE Computer Society (1998). https://dl.acm.org/citation.cfm?id=850947.853342
Majumdar, A., Drape, S.J., Thomborson, C.D.: Slicing obfuscations: design, correctness, and evaluation. In: Proceedings of the 2007 ACM Workshop on Digital Rights Management, DRM 2007, New York, NY, USA, pp. 70–81. ACM (2007). https://doi.org/10.1145/1314276.1314290. https://doi.acm.org/10.1145/1314276.1314290
Ochoa, C., Silva, J., Vidal, G.: Lightweight program specialization via dynamic slicing. In: Proceedings of the 2005 ACM SIGPLAN Workshop on Curry and Functional Logic Programming, WCFLP 2005, New York, NY, USA, pp. 1–7. ACM (2005). https://doi.org/10.1145/1085099.1085101. https://doi.acm.org/10.1145/1085099.1085101
Silva, J.: A vocabulary of program slicing-based techniques. ACM Comput. Surv. 44(3), 1–41 (2012)
Sintaha, M., Nashid, N., Mesbah, A.: Katana: dual slicing-based context for learning bug fixes (2022)
Soremekun, E., Kirschner, L., Böhme, M., Zeller, A.: Locating faults with program slicing: an empirical analysis. Empir. Softw. Eng. 26(3), 1–45 (2021). https://doi.org/10.1007/s10664-020-09931-7
Tip, F.: A survey of program slicing techniques. J. Program. Lang. 3(3), 121–189 (1995)
Walkinshaw, N., Roper, M., Wood, M.: The Java system dependence graph. In: Proceedings Third IEEE International Workshop on Source Code Analysis and Manipulation, pp. 55–64 (2003)
Weiser, M.: Program slicing. In: Proceedings of the 5th International Conference on Software Engineering (ICSE 1981), Piscataway, NJ, USA, pp. 439–449. IEEE Press (1981)
Zhang, Z., Li, Y., Guo, Y., Chen, X., Liu, Y.: Dynamic slicing for deep neural networks. In: Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/FSE 2020, New York, NY, USA, pp. 838–850. Association for Computing Machinery (2020). https://doi.org/10.1145/3368089.3409676
Zhao, J., Cheng, J., Ushijima, K.: Static slicing of concurrent object-oriented programs. In: Proceedings of 20th International Computer Software and Applications Conference: COMPSAC 1996, pp. 312–320 (1996). https://doi.org/10.1109/CMPSAC.1996.544182
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Galindo, C., Pérez, S., Silva, J. (2022). Program Slicing Techniques with Support for Unconditional Jumps. In: Riesco, A., Zhang, M. (eds) Formal Methods and Software Engineering. ICFEM 2022. Lecture Notes in Computer Science, vol 13478. Springer, Cham. https://doi.org/10.1007/978-3-031-17244-1_8
Download citation
DOI: https://doi.org/10.1007/978-3-031-17244-1_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-17243-4
Online ISBN: 978-3-031-17244-1
eBook Packages: Computer ScienceComputer Science (R0)