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

  • Raghavan Komondoor
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7935)


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.


Abstract Interpretation Boolean Expression Store Structure Loop Body Access Path 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 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)MathSciNetzbMATHCrossRefGoogle Scholar
  2. 2.
    Canfora, G., Cimitile, A., De Lucia, A.: Conditioned program slicing. Information and Software Technology 40(11), 595–607 (1998)CrossRefGoogle Scholar
  3. 3.
    Consel, C., Khoo, S.: Parameterized partial evaluation. ACM Transactions on Programming Languages and Systems (TOPLAS) 15(3), 463–493 (1993)MathSciNetCrossRefGoogle Scholar
  4. 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. 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. 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. 7.
    Harman, M., Danicic, S.: Amorphous program slicing. In: Proc. Int. Workshop on Program Comprehension, pp. 70–79 (1997)Google Scholar
  8. 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. 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. 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)CrossRefGoogle Scholar
  11. 11.
    Komondoor, R.: Precise slicing in imperative programs via term-rewriting and abstract interpretation (2013),
  12. 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)CrossRefGoogle Scholar
  13. 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)CrossRefGoogle Scholar
  14. 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)CrossRefGoogle Scholar
  15. 15.
    Tip, F.: A survey of program slicing techniques. Journal of programming languages 3(3), 121–189 (1995)Google Scholar
  16. 16.
    Weiser, M.: Program slicing. In: Proc. Int. Conf. on Software Engg (ICSE), pp. 439–449 (1981)Google Scholar
  17. 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)CrossRefGoogle Scholar
  18. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Raghavan Komondoor
    • 1
  1. 1.Indian Institute of ScienceBangaloreIndia

Personalised recommendations