Program Repair as a Game

We present a conservative method to automatically fix faults in a finite state program by considering the repair problem as a game. The game consists of the product of a modified version of the program and an automaton representing the LTL specification. Every winning finite state strategy for the game corresponds to a repair. The opposite does not hold, but we show conditions under which the existence of a winning strategy is guaranteed. A finite state strategy corresponds to a repair that adds variables to the program, which we argue is undesirable. To avoid extra state, we need a memoryless strategy. We show that the problem of finding a memoryless strategy is NP-complete and present a heuristic. We have implemented the approach symbolically and present initial evidence of its usefulness.

[1]  Alex Groce,et al.  Error explanation with distance metrics , 2004, International Journal on Software Tools for Technology Transfer.

[2]  Edmund M. Clarke,et al.  Model Checking , 1999, Handbook of Automated Reasoning.

[3]  M. Maidi The common fragment of CTL and LTL , 2000, Proceedings 41st Annual Symposium on Foundations of Computer Science.

[4]  Franz Wotawa,et al.  A comparison of fault explanation and localization , 2005 .

[5]  Kavita Ravi,et al.  A Comparative Study of Symbolic Algorithms for the Computation of Fair Cycles , 2000, FMCAD.

[6]  Alex Groce,et al.  What Went Wrong: Explaining Counterexamples , 2003, SPIN.

[7]  John E. Hopcroft,et al.  The Directed Subgraph Homeomorphism Problem , 1978, Theor. Comput. Sci..

[8]  Kavita Ravi,et al.  Fate and free will in error traces , 2004, International Journal on Software Tools for Technology Transfer.

[9]  Amir Pnueli,et al.  On the synthesis of a reactive module , 1989, POPL '89.

[10]  Roberto Sebastiani,et al.  "More Deterministic" vs. "Smaller" Büchi Automata for Efficient LTL Model Checking , 2003, CHARME.

[11]  Georg Gottlob,et al.  Enhancing Model Checking in Verification by AI Techniques , 1999, Artif. Intell..

[12]  Franz Wotawa,et al.  A Value-Based Diagnosis Model for Java Programs , 2000 .

[13]  George J. Milne,et al.  Correct Hardware Design and Verification Methods , 2003, Lecture Notes in Computer Science.

[14]  Rajeev Alur,et al.  Deterministic generators and games for LTL fragments , 2001, Proceedings 16th Annual IEEE Symposium on Logic in Computer Science.

[15]  Wolfgang Thomas,et al.  On the Synthesis of Strategies in Infinite Games , 1995, STACS.

[16]  Fabio Somenzi,et al.  Efficient Büchi Automata from LTL Formulae , 2000, CAV.

[17]  Alan J. Hu,et al.  Reducing BDD Size by Exploiting Functional Dependencies , 1993, 30th ACM/IEEE Design Automation Conference.

[18]  Fabio Somenzi,et al.  Logic synthesis and verification algorithms , 1996 .

[19]  Orna Kupferman,et al.  Freedom, weakness, and determinism: from linear-time to branching-time , 1998, Proceedings. Thirteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.98CB36226).

[20]  Mayur Naik,et al.  From symptom to cause: localizing errors in counterexample traces , 2003, POPL '03.

[21]  Jim Alves-Foss,et al.  Higher Order Logic Theorem Proving and its Applications 8th International Workshop, Aspen Grove, Ut, Usa, September 11-14, 1995 : Proceedings , 1995 .

[22]  Markus Stumptner,et al.  A model-based approach to software debugging , 1996 .

[23]  Sriram K. Rajamani,et al.  Automatically validating temporal safety properties of interfaces , 2001, SPIN '01.

[24]  Pierre Wolper,et al.  Simple on-the-fly automatic verification of linear temporal logic , 1995, PSTV.

[25]  Monika Maidl,et al.  The Common Fragment of CTL and LTL , 2000, FOCS.

[26]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.

[27]  Carl A. Sunshine,et al.  Protocol Specification, Testing and Verification - Guest Editorial , 1982, Comput. Networks.

[28]  Jana Kosecka,et al.  Control of Discrete Event Systems , 1992 .