Code-Change Impact Analysis using Counterfactuals: Theory and Implementation

This article shows a novel program analysis framework based on Lewis' theory of counterfactuals. Using this framework we are capable of performing change-impact static analysis on a program's source code. In other words, we are able to prove the properties induced by changes to a given program before applying these changes. Our contribution is two-fold; we show how to use Lewis' logic of counterfactuals to prove that proposed changes to a program preserve its correctness. We report the development of an automated tool based on resolution and theorem proving for performing code change-impact analysis.

[1]  Alexander Schrijver,et al.  Theory of linear and integer programming , 1986, Wiley-Interscience series in discrete mathematics and optimization.

[2]  Brian Skyrms,et al.  Counterfactual Definiteness and Local Causation , 1982, Philosophy of Science.

[3]  Boris Beizer,et al.  Software testing techniques (2. ed.) , 1990 .

[4]  Alessandra Russo,et al.  Foundations of Logic-Based Trust Management , 2012, 2012 IEEE Symposium on Security and Privacy.

[5]  Frank Tip,et al.  Chianti: a tool for change impact analysis of java programs , 2004, OOPSLA.

[6]  Joseph Y. Halpern,et al.  What causes a system to satisfy a specification? , 2003, TOCL.

[7]  J. Pearl Causality: Models, Reasoning and Inference , 2000 .

[8]  Kathi Fisler,et al.  Verification and change-impact analysis of access-control policies , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[9]  Sriram K. Rajamani,et al.  SLAM and Static Driver Verifier: Technology Transfer of Formal Methods inside Microsoft , 2004, IFM.

[10]  Ehud Y. Shapiro Alternation and the Computational Complexity of Logic Programs , 1984, J. Log. Program..

[11]  Gabriel M. Kuper,et al.  Updating Logical Databases , 1986, Adv. Comput. Res..

[12]  Supratik Mukhopadhyay,et al.  Code-Change Impact Analysis Using Counterfactuals , 2011, 2011 IEEE 35th Annual Computer Software and Applications Conference.

[13]  Georg Gottlob,et al.  On the complexity of propositional knowledge base revision, updates, and counterfactuals , 1992, Artif. Intell..

[14]  Richard Jozsa,et al.  Counterfactual computation , 1999, Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences.

[15]  Alex Groce,et al.  SPECIAL S ECTION O N T OOLS A ND A LGORITHMS F OR THE C ONSTRUCTION A ND A NALYSIS O F S YSTEMS , 2005 .

[16]  Leon Sterling,et al.  The Art of Prolog - Advanced Programming Techniques, 2nd Ed , 1986 .

[17]  Bo Guo,et al.  Formal Change Impact Analyses of Extended Finite State Machines Using a Theorem Prover , 2008, 2008 Sixth IEEE International Conference on Software Engineering and Formal Methods.

[18]  Bo Guo,et al.  Using Change Impact Analysis to Select Tests for Extended Finite State Machines , 2009, 2009 Seventh IEEE International Conference on Software Engineering and Formal Methods.

[19]  Supratik Mukhopadhyay,et al.  Counterfactually reasoning about security , 2011, SIN '11.

[20]  Bernhard Nebel,et al.  Belief Revision and Default Reasoning: Syntax-Based Approaches , 1991, KR.