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.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
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.
References
Barros, J., da Cruz, D., Henriques, P., Pinto, J.: Assertion-based slicing and slice graphs. Formal Aspects of Computing 24(2), 217–248 (2012)
Canfora, G., Cimitile, A., De Lucia, A.: Conditioned program slicing. Information and Software Technology 40(11), 595–607 (1998)
Consel, C., Khoo, S.: Parameterized partial evaluation. ACM Transactions on Programming Languages and Systems (TOPLAS) 15(3), 463–493 (1993)
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)
Field, J., Ramalingam, G., Tip, F.: Parametric program slicing. In: Proc. Int. Symp. on Principles of Prog. Langs. (POPL), pp. 379–392 (1995)
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)
Harman, M., Danicic, S.: Amorphous program slicing. In: Proc. Int. Workshop on Program Comprehension, pp. 70–79 (1997)
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)
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)
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)
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
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)
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)
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)
Tip, F.: A survey of program slicing techniques. Journal of programming languages 3(3), 121–189 (1995)
Weiser, M.: Program slicing. In: Proc. Int. Conf. on Software Engg (ICSE), pp. 439–449 (1981)
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)
Zanardini, D.: The semantics of abstract program slicing. In: IEEE Int. Working Conf. on Source Code Analysis and Manipulation (SCAM), pp. 89–98 (2008)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)