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

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.

[1]  Mark Harman,et al.  Pre/post conditioned slicing , 2001, Proceedings IEEE International Conference on Software Maintenance. ICSM 2001.

[2]  M. Eliantonio,et al.  Private Parties and the Annulment Procedure: Can the Gap in the European System of Judicial Protection Be Closed? , 2010 .

[3]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[4]  Thomas A. Alspaugh,et al.  An architectural pattern for non-functional dependability requirements , 2005, ACM SIGSOFT Softw. Eng. Notes.

[5]  Reinhard Wilhelm,et al.  Solving shape-analysis problems in languages with destructive updating , 1998, TOPL.

[6]  Frank Tip,et al.  A survey of program slicing techniques , 1994, J. Program. Lang..

[7]  Gregor Snelting,et al.  Efficient path conditions in dependence graphs for software safety analysis , 2006, TSEM.

[8]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[9]  Manuel V. Hermenegildo,et al.  Abstract Interpretation with Specialized Definitions , 2006, SAS.

[10]  Siau-Cheng Khoo,et al.  Parameterized partial evaluation , 1991, PLDI '91.

[11]  Baowen Xu,et al.  A brief survey of program slicing , 2005, SOEN.

[12]  Insup Lee,et al.  Abstract slicing: a new approach to program slicing based on abstract interpretation and model checking , 2005, Fifth IEEE International Workshop on Source Code Analysis and Manipulation (SCAM'05).

[13]  Aniello Cimitile,et al.  Conditioned program slicing , 1998, Inf. Softw. Technol..

[14]  Pedro Rangel Henriques,et al.  Assertion-based Slicing and Slice Graphs , 2010, SEFM.

[15]  Frank Tip,et al.  Parametric program slicing , 1995, POPL '95.

[16]  Jorge A. Navas,et al.  Path-Sensitive Backward Slicing , 2012, SAS.

[17]  Damiano Zanardini,et al.  The Semantics of Abstract Program Slicing , 2008, 2008 Eighth IEEE International Working Conference on Source Code Analysis and Manipulation.

[18]  Mark Harman,et al.  Amorphous program slicing , 2003, J. Syst. Softw..

[19]  Roberto Giacobazzi,et al.  Abstract non-interference: parameterizing non-interference by abstract interpretation , 2004, POPL.