Skip to main content

Precise Slicing in Imperative Programs via Term-Rewriting and Abstract Interpretation

  • Conference paper
Static Analysis (SAS 2013)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7935))

Included in the following conference series:

Abstract

We propose a new approach for producing precise constrained slices of programs in a language such as C. We build upon a previous approach for this problem, which is based on term-rewriting, which primarily targets loop-free fragments and is fully precise in this setting. We incorporate abstract interpretation into term-rewriting, using a given arbitrary abstract lattice, resulting in a novel technique for slicing loops whose precision is linked to the power of the given abstract lattice. We address pointers in a first-class manner, including when they are used within loops to traverse and update recursive data structures. Finally, we illustrate the comparative precision of our slices over those of previous approaches using representative examples.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Barros, J., da Cruz, D., Henriques, P., Pinto, J.: Assertion-based slicing and slice graphs. Formal Aspects of Computing 24(2), 217–248 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  2. Canfora, G., Cimitile, A., De Lucia, A.: Conditioned program slicing. Information and Software Technology 40(11), 595–607 (1998)

    Article  Google Scholar 

  3. Consel, C., Khoo, S.: Parameterized partial evaluation. ACM Transactions on Programming Languages and Systems (TOPLAS) 15(3), 463–493 (1993)

    Article  MathSciNet  Google Scholar 

  4. Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proc. ACM Symp. on Principles of Programming Languages (POPL), pp. 238–252 (1977)

    Google Scholar 

  5. Field, J., Ramalingam, G., Tip, F.: Parametric program slicing. In: Proc. Int. Symp. on Principles of Prog. Langs. (POPL), pp. 379–392 (1995)

    Google Scholar 

  6. Giacobazzi, R., Mastroeni, I.: Abstract non-interference: Parameterizing non-interference by abstract interpretation. In: Proc. ACM Symp. on Principles of Programming Languages (POPL), pp. 186–197 (2004)

    Google Scholar 

  7. Harman, M., Danicic, S.: Amorphous program slicing. In: Proc. Int. Workshop on Program Comprehension, pp. 70–79 (1997)

    Google Scholar 

  8. Harman, M., Hierons, R., Fox, C., Danicic, S., Howroyd, J.: Pre/post conditioned slicing. In: Proc. Int. Conf. on Software Maintenance (ICSM), pp. 138–147 (2001)

    Google Scholar 

  9. Hong, H., Lee, I., Sokolsky, O.: Abstract slicing: A new approach to program slicing based on abstract interpretation and model checking. In: IEEE Int. Workshop on Source Code Analysis and Manipulation (SCAM), pp. 25–34 (2005)

    Google Scholar 

  10. Jaffar, J., Murali, V., Navas, J.A., Santosa, A.E.: Path-sensitive backward slicing. In: Miné, A., Schmidt, D. (eds.) SAS 2012. LNCS, vol. 7460, pp. 231–247. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  11. Komondoor, R.: Precise slicing in imperative programs via term-rewriting and abstract interpretation (2013), http://www.csa.iisc.ernet.in/~raghavan/slicing-loops-TR2013.pdf

  12. Puebla, G., Albert, E., Hermenegildo, M.V.: Abstract interpretation with specialized definitions. In: Yi, K. (ed.) SAS 2006. LNCS, vol. 4134, pp. 107–126. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  13. Sagiv, S., Reps, T.W., Wilhelm, R.: Solving shape-analysis problems in languages with destructive updating. ACM Trans. Program. Lang. Syst. 20(1), 1–50 (1998)

    Article  Google Scholar 

  14. Snelting, G., Robschink, T., Krinke, J.: Efficient path conditions in dependence graphs for software safety analysis. ACM Trans. Softw. Eng. Methodol. 15(4), 410–457 (2006)

    Article  Google Scholar 

  15. Tip, F.: A survey of program slicing techniques. Journal of programming languages 3(3), 121–189 (1995)

    Google Scholar 

  16. Weiser, M.: Program slicing. In: Proc. Int. Conf. on Software Engg (ICSE), pp. 439–449 (1981)

    Google Scholar 

  17. Xu, B., Qian, J., Zhang, X., Wu, Z., Chen, L.: A brief survey of program slicing. SIGSOFT Softw. Eng. Notes 30(2), 1–36 (2005)

    Article  Google Scholar 

  18. Zanardini, D.: The semantics of abstract program slicing. In: IEEE Int. Working Conf. on Source Code Analysis and Manipulation (SCAM), pp. 89–98 (2008)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Komondoor, R. (2013). Precise Slicing in Imperative Programs via Term-Rewriting and Abstract Interpretation. In: Logozzo, F., Fähndrich, M. (eds) Static Analysis. SAS 2013. Lecture Notes in Computer Science, vol 7935. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38856-9_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-38856-9_15

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-38855-2

  • Online ISBN: 978-3-642-38856-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics