skip to main content
research-article
Free Access

Semantic Correctness of Dependence-based Slicing for Interprocedural, Possibly Nonterminating Programs

Published:04 January 2021Publication History
Skip Abstract Section

Abstract

Existing proofs of correctness for dependence-based slicing methods are limited either to the slicing of intraprocedural programs [2, 39], or the proof is only applicable to a specific slicing method [4, 41]. We contribute a general proof of correctness for dependence-based slicing methods such as Weiser [50, 51], or Binkley et al. [7, 8], for interprocedural, possibly nonterminating programs. The proof uses well-formed weak and strong control closure relations, which are the interprocedural extensions of the generalised weak/strong control closure provided by Danicic et al. [13], capturing various nonterminating-insensitive and nontermination-sensitive control-dependence relations that have been proposed in the literature. Thus, our proof framework is valid for a whole range of existing control-dependence relations.

We have provided a definition of semantically correct (SC) slice. We prove that SC slices agree with Weiser slicing, that deterministic SC slices preserve termination, and that nondeterministic SC slices preserve the nondeterministic behavior of the original programs.

References

  1. Matthew Allen and Susan Horwitz. 2003. Slicing Java programs that throw and catch exceptions. SIGPLAN Not. 38, 10 (June 2003), 44--54. DOI:https://doi.org/10.1145/966049.777394Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Torben Amtoft. 2007. Correctness of Practical Slicing for Modern Program Structures. Technical Report. Department of Computing and Information Sciences, Kansas State University.Google ScholarGoogle Scholar
  3. Torben Amtoft. 2008. Slicing for modern program structures: A theory for eliminating irrelevant loops. Info. Process. Lett. 106, 2 (2008), 45--51.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Thomas Ball and Susan Horwitz. 1993. Slicing programs with arbitrary control-flow. In Proceedings of the 1st International Workshop on Automated and Algorithmic Debugging (AADEBUG’93). Springer-Verlag, London, 206--222. Retrieved from http://dl.acm.org/citation.cfm?id=646902.710193.Google ScholarGoogle ScholarCross RefCross Ref
  5. Richard W. Barraclough, David Binkley, Sebastian Danicic, Mark Harman, Robert M. Hierons, Ákos Kiss, Mike Laurence, and Lahcen Ouarbya. 2010. A trajectory-based strict semantics for program slicing. Theor. Comput. Sci. 411, 11–13 (2010), 1372--1386.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. David Binkley. 1993. Precise executable interprocedural slices. ACM Lett. Program. Lang. Syst. 2, 1–4 (Mar. 1993), 31--45. DOI:https://doi.org/10.1145/176454.176473Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Dave Binkley, Sebastian Danicic, Tibor Gyimóthy, Mark Harman, Ákos Kiss, and Bogdan Korel. 2006. A formalisation of the relationship between forms of program slicing. Sci. Comput. Program. 62, 3 (Oct. 2006), 228--252. DOI:https://doi.org/10.1016/j.scico.2006.04.007Google ScholarGoogle Scholar
  8. Dave Binkley, Sebastian Danicic, Tibor Gyimóthy, Mark Harman, Ákos Kiss, and Bogdan Korel. 2006. Theoretical foundations of dynamic program slicing. Theor. Comput. Sci. 360, 1 (Aug. 2006), 23--41.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. David W. Binkley and Keith Brian Gallagher. 1996. Program slicing. Adv. Comput. 43 (1996), 1--50. DOI:https://doi.org/10.1016/S0065-2458(08)60641-5Google ScholarGoogle Scholar
  10. Robert Cartwright and Matthias Felleisen. 1989. The semantics of program dependence. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’89), Richard L. Wexelblat (Ed.). ACM, 13--27.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Chaturvedi and D. Binkley. 2018. Web service slicing: Intra and inter-operational analysis to test changes. IEEE Trans. Serv. Comput. (2018), 1--1. DOI:https://doi.org/10.1109/TSC.2018.2821157Google ScholarGoogle Scholar
  12. Patrick Cousot and Radhia Cousot. 1977. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proceedings of the 4th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL’77). ACM, New York, NY, 238--252. DOI:https://doi.org/10.1145/512950.512973Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. Danicic, R. Barraclough, M. Harman, J. D. Howroyd, Á. Kiss, and M. Laurence. 2011. A unifying theory of control dependence and its application to arbitrary program structures. Theor. Comput. Sci. 412, 49 (2011), 6809--6842.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Sebastian Danicic, Mark Harman, John Howroyd, and Lahcen Ouarbya. 2007. A non-standard semantics for program slicing and dependence analysis. J. Logic Alg. Program. 72, 2 (2007), 191--206. DOI:https://doi.org/10.1016/j.jlap.2007.02.010Google ScholarGoogle ScholarCross RefCross Ref
  15. Jakob Engblom. 1999. Why SpecInt95 should not be used to benchmark embedded systems tools. In Proceedings of the ACM SIGPLAN Workshop on Languages, Compilers, and Tools for Embedded Systems (LCTES’99), Y. Annie Liu and Reinhard Wilhelm (Eds.). ACM, 96--103. DOI:https://doi.org/10.1145/314403.314470Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Jeanne Ferrante, Karl J. Ottenstein, and Joe D. Warren. 1987. The program dependence graph and its use in optimization. ACM Trans. Program. Lang. Syst. 9, 3 (July 1987), 319--349. DOI:https://doi.org/10.1145/24039.24041Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Roberto Giacobazzi and Isabella Mastroeni. 2003. Non-standard semantics for program slicing. Higher-Order Symbol. Comput. 16, 4 (2003), 297--339.Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. David Harel. 1981. On the total correctness of nondeterministic programs. Theor. Comput. Sci. 13, 2 (1981), 175--192.Google ScholarGoogle ScholarCross RefCross Ref
  19. John Hatcliff, James C. Corbett, Matthew B. Dwyer, Stefan Sokolowski, and Hongjun Zheng. 1999. A formal study of slicing for multi-threaded programs with JVM concurrency primitives. In Proceedings of the 6th International Symposium on Static Analysis (SAS’99). Springer-Verlag, London, 1--18. Retrieved from http://dl.acm.org/citation.cfm?id=647168.718134.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. Horwitz, T. Reps, and D. Binkley. 1988. Interprocedural slicing using dependence graphs. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’88). ACM, New York, NY, 35--46. DOI:https://doi.org/10.1145/53990.53994Google ScholarGoogle Scholar
  21. C. R. Chou J. C. Hawang, and M. W. Du. 1988. Finding program slices for recursive procedures. In Proceedings of the 12th Annual International Computer Software and Applications Conference (COMPSAC’88). Chicago, 220--227.Google ScholarGoogle Scholar
  22. Daniel Jackson and Eugene J. Rollins. 1994. A new model of program dependences for reverse engineering. In Proceedings of the 2nd ACM SIGSOFT Symposium on Foundations of Software Engineering (SIGSOFT’94). ACM, New York, NY, 2--10. DOI:https://doi.org/10.1145/193173.195281Google ScholarGoogle Scholar
  23. Andreas Johnsen, Kristina Lundqvist, Paul Pettersson, and Kaj Hänninen. 2014. Regression verification of AADL models through slicing of system dependence graphs. In Proceedings of the 10th International ACM Sigsoft Conference on the Quality of Software Architectures. ACM, 103--112. Retrieved from http://www.es.mdh.se/publications/3535-.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Husni Khanfar and Björn Lisper. 2016. Enhanced PCB based slicing. In Proceedings of the 5th International Valentin Turchin Workshop on Metacomputation.Google ScholarGoogle Scholar
  25. Husni Khanfar, Björn Lisper, and Abu Naser Masud. 2015. Static backward program slicing for safety critical systems. In Proceedings of the 20th International Conference on Reliable Software Technologies. 50--65.Google ScholarGoogle ScholarCross RefCross Ref
  26. Björn Lisper, Abu Naser Masud, and Husni Khanfar. 2015. Static backward demand-driven slicing. In Proceedings of the Workshop on Partial Evaluation and Program Manipulation (PEPM’15). ACM, New York, NY, 115--126.Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. P. Loyall and S. A. Mathisen. 1993. Using dependence analysis to support the software maintenance process. In Proceedings of the Conference on Software Maintenance. 282--291.Google ScholarGoogle Scholar
  28. James Robert Lyle. 1984. Evaluating Variations on Program Slicing for Debugging (Data-flow, Ada). Ph.D. Dissertation. College Park, MD.Google ScholarGoogle Scholar
  29. C. Mao. 2009. Slicing web service-based software. In Proceedings of the IEEE International Conference on Service-Oriented Computing and Applications (SOCA’09). 1--8. DOI:https://doi.org/10.1109/SOCA.2009.5410460Google ScholarGoogle ScholarCross RefCross Ref
  30. Ward Martin, Zedan Hussein, Ladkau Matthias, and Natelberg Stefan. 2008. Conditioned semantic slicing for abstraction; industrial experiment. Software: Pract. Exper. 38, 12 (2008), 1273--1304. DOI:https://doi.org/10.1002/spe.869Google ScholarGoogle ScholarCross RefCross Ref
  31. Isabella Mastroeni and Damiano Zanardini. 2017. Abstract program slicing: An abstract interpretation-based approach to program slicing. ACM Trans. Comput. Logic 18, 1, Article 7 (Feb. 2017), 58 pages. DOI:https://doi.org/10.1145/3029052Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Härmel Nestra. 2005. Transfinite semantics in program slicing. In Proceedings of the Estonian Academy of Sciences (Engineering’05). 313--328.Google ScholarGoogle ScholarCross RefCross Ref
  33. Hanne Riis Nielson and Flemming Nielson. 2007. Semantics with Applications: An Appetizer (Undergraduate Topics in Computer Science). Springer-Verlag, Secaucus, NJ.Google ScholarGoogle Scholar
  34. Karl J. Ottenstein and Linda M. Ottenstein. 1984. The program dependence graph in a software development environment. SIGSOFT Softw. Eng. Notes 9, 3 (Apr. 1984), 177--184. DOI:https://doi.org/10.1145/390010.808263Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Keshav Pingali and Gianfranco Bilardi. 1997. Optimal control dependence computation and the roman chariots problem. ACM Trans. Program. Lang. Syst. 19, 3 (May 1997), 462--491.Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. A. Podgurski and L. A. Clarke. 1990. A formal model of program dependences and its implications for software testing, debugging, and maintenance. IEEE Trans. Softw. Eng. 16, 9 (Sept. 1990), 965--979.Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Reese T. Prosser. 1959. Applications of Boolean matrices to the analysis of flow diagrams. In Proceedings of the Eastern Joint IRE-AIEE-ACM Computer Conference (IRE-AIEE-ACM’59). ACM, New York, NY, 133--138.Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Venkatesh Prasad Ranganath, Torben Amtoft, Anindya Banerjee, John Hatcliff, and Matthew B. Dwyer. 2005. A new foundation for control dependence and slicing for modern program structures. In Proceedings of the European Symposium on Programming (LNCS’05), Vol. 3444. Springer-Verlag, 77--93.Google ScholarGoogle Scholar
  39. Venkatesh Prasad Ranganath, Torben Amtoft, Anindya Banerjee, John Hatcliff, and Matthew B. Dwyer. 2007. A new foundation for control dependence and slicing for modern program structures. ACM Trans. Program. Lang. Syst. 29, 5, Article 27 (Aug. 2007).Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Thomas Reps, Susan Horwitz, and Mooly Sagiv. 1995. Precise interprocedural dataflow analysis via graph reachability. In Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’95). ACM, New York, NY, 49--61. DOI:https://doi.org/10.1145/199448.199462Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Thomas W. Reps and Wuu Yang. 1989. The semantics of program slicing and program integration. In Proceedings of the International Joint Conference on Theory and Practice of Software Development (TAPSOFT’89), Volume 2: Advanced Seminar on Foundations of Innovative Software Development II and Colloquium on Current Issues in Programming Languages (CCIPL’89) (Lecture Notes in Computer Science). Springer, 360--374.Google ScholarGoogle Scholar
  42. Hyoung Seok Hong, Insup Lee, and Oleg Sokolsky. 2005. Abstract slicing: A new approach to program slicing based on abstract interpretation and model checking. In Proceedings of the 5th IEEE International Workshop on Source Code Analysis and Manipulation (SCAM’05). IEEE Computer Society, Washington, DC, 25--34. DOI:https://doi.org/10.1109/SCAM.2005.2Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Josep Silva. 2012. A vocabulary of program slicing-based techniques. ACM Comput. Surv. 44, 3, Article 12 (June 2012), 41 pages. DOI:https://doi.org/10.1145/2187671.2187674Google ScholarGoogle Scholar
  44. Saurabh Sinha, Mary Jean Harrold, and Gregg Rothermel. 2001. Interprocedural control dependence. ACM Trans. Softw. Eng. Methodol. 10, 2 (Apr. 2001), 209--254.Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Martin Ward and Hussein Zedan. 2007. Slicing as a program transformation. ACM Trans. Program. Lang. Syst. 29, 2, Article 7 (Apr. 2007). DOI:https://doi.org/10.1145/1216374.1216375Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Martin P. Ward. 2001. The formal transformation approach to source code analysis and manipulation. In Proceedings of the 1st IEEE International Workshop on Source Code Analysis and Manipulation (SCAM’01). IEEE Computer Society, 187--195. DOI:https://doi.org/10.1109/SCAM.2001.972680Google ScholarGoogle ScholarCross RefCross Ref
  47. Martin P. Ward. 2003. Slicing the SCAM Mug: A case study in semantic slicing. In Proceedings of the 3rd IEEE International Workshop on Source Code Analysis and Manipulation (SCAM’03). IEEE Computer Society, 88--97. DOI:https://doi.org/10.1109/SCAM.2003.1238035Google ScholarGoogle ScholarCross RefCross Ref
  48. Martin P. Ward and Hussein Zedan. 2017. The formal semantics of program slicing for nonterminating computations. J. Softw.: Evol. Process 29, 1 (2017).Google ScholarGoogle ScholarCross RefCross Ref
  49. Mark Weiser. 1981. Program slicing. In Proceedings of the 5th International Conference on Software Engineering (ICSE’81). IEEE Press, Piscataway, NJ, 439--449. Retrieved from http://dl.acm.org/citation.cfm?id=800078.802557.Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Mark Weiser. 1984. Program slicing. IEEE Trans. Softw. Eng. 10, 4 (1984), 352--357.Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Mark David Weiser. 1979. Program Slices: Formal, Psychological, and Practical Investigations of an Automatic Program Abstraction Method. Ph.D. Dissertation. Ann Arbor, MI.Google ScholarGoogle Scholar

Index Terms

  1. Semantic Correctness of Dependence-based Slicing for Interprocedural, Possibly Nonterminating Programs

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        HTML Format

        View this article in HTML Format .

        View HTML Format
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!