Skip to main content

Program Slicing Techniques with Support for Unconditional Jumps

  • Conference paper
  • First Online:
Formal Methods and Software Engineering (ICFEM 2022)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Codesonar SAST: https://www.grammatech.com/codesonar-sast-java.

  2. 2.

    Codesonar: https://www.grammatech.com/codesonar-cc.

  3. 3.

    e-Knife: https://mist.dsic.upv.es/e-knife.

References

  1. Allen, F.E.: Control flow analysis. SIGPLAN Not. 5(7), 1–19 (1970)

    Article  Google Scholar 

  2. 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

    Chapter  Google Scholar 

  3. 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)

    Google Scholar 

  4. 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

    Chapter  Google Scholar 

  5. 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

  6. 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

  7. 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)

    Article  MATH  Google Scholar 

  8. Galindo, C., Pérez, S., Silva, J.: Data dependencies in object-oriented programs. In: 11th Workshop on Tools for Automatic Program Analysis (2020)

    Google Scholar 

  9. Galindo, C., Pérez, S., Silva, J.: Program slicing with exception handling. In: 11th Workshop on Tools for Automatic Program Analysis (2020)

    Google Scholar 

  10. 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

  11. Horwitz, S., Reps, T., Binkley, D.: Interprocedural slicing using dependence graphs. ACM Trans. Program. Lang. Syst. 12(1), 26–60 (1990)

    Article  Google Scholar 

  12. 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)

    Google Scholar 

  13. 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

  14. 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

  15. 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

    Chapter  Google Scholar 

  16. 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

  17. 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

  18. 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

  19. 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

  20. Silva, J.: A vocabulary of program slicing-based techniques. ACM Comput. Surv. 44(3), 1–41 (2012)

    Article  MATH  Google Scholar 

  21. Sintaha, M., Nashid, N., Mesbah, A.: Katana: dual slicing-based context for learning bug fixes (2022)

    Google Scholar 

  22. 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

    Article  Google Scholar 

  23. Tip, F.: A survey of program slicing techniques. J. Program. Lang. 3(3), 121–189 (1995)

    Google Scholar 

  24. 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)

    Google Scholar 

  25. 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)

    Google Scholar 

  26. 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

  27. 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

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sergio Pérez .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics