Program Repair as a Game

  • Barbara Jobstmann
  • Andreas Griesmayer
  • Roderick Bloem
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3576)


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.


Model Check State Strategy Winning Strategy System Choice Deterministic Automaton 
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.


  1. [AL01]
    Alur, R., La Torre, S.: Deterministic generators and games for LTL fragments. In: Symposium on Logic in Computer Science (LICS 2001), pp. 291–302 (2001)Google Scholar
  2. [B+96]
    Brayton, R.K., et al.: VIS: A system for verification and synthesis. In: Alur, R., Henzinger, T.A. (eds.) CAV 1996. LNCS, vol. 1102, pp. 428–432. Springer, Heidelberg (1996)Google Scholar
  3. [BEGL99]
    Buccafurri, F., Eiter, T., Gottlob, G., Leone, N.: Enhancing model checking in verification by AI techniques. Artificial Intelligence 112, 57–104 (1999)zbMATHCrossRefMathSciNetGoogle Scholar
  4. [BNR03]
    Ball, T., Naik, M., Rajamani, S.K.: From symptom to cause: Localizing errors in counterexample traces. In: 30th Symposium on Principles of Programming Languages (POPL 2003), pp. 97–105 (2003)Google Scholar
  5. [BR01]
    Ball, T., Rajamani, S.K.: Automatically validating temporal safety properties of interfaces. In: Dwyer, M.B. (ed.) SPIN 2001. LNCS, vol. 2057, pp. 103–122. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  6. [CGP99]
    Clarke, E.M., Grumberg, O., Peled, D.A.: Model Checking. MIT Press, Cambridge (1999)Google Scholar
  7. [CKW05]
    Chen, R., Köb, D., Wotawa, F.: A comparison of fault explanation and localization. unpublished (2005)Google Scholar
  8. [FHW80]
    Fortune, S., Hopcroft, J., Wyllie, J.: The directed subgraph homeomorphism problem. Theoretical Computer Science 10, 111–121 (1980)zbMATHCrossRefMathSciNetGoogle Scholar
  9. [GPVW95]
    Gerth, R., Peled, D., Vardi, M.Y., Wolper, P.: Simple on-the-fly automatic verification of linear temporal logic. In: Protocol Specification, Testing, and Verification, pp. 3–18. Chapman & Hall, Boca Raton (1995)Google Scholar
  10. [Gro04]
    Groce, A.: Error explanation with distance metrics. In: Jensen, K., Podelski, A. (eds.) TACAS 2004. LNCS, vol. 2988, pp. 108–122. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  11. [GV03]
    Groce, A., Visser, W.: What went wrong: Explaining counterexamples. In: Ball, T., Rajamani, S.K. (eds.) SPIN 2003. LNCS, vol. 2648, pp. 121–135. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  12. [Har05]
    Harding, A.: Symbolic Strategy Synthesis For Games With LTL Winning Conditions. PhD thesis, University of Birmingham, Unpublished (2005)Google Scholar
  13. [HD93]
    Hu, A.J., Dill, D.: Reducing BDD size by exploiting functional dependencies. In: Proceedings of the Design Automation Conference, Dallas, TX, pp. 266–271 (June 1993)Google Scholar
  14. [HS96]
    Hachtel, G.D., Somenzi, F.: Logic Synthesis and Verification Algorithms. Kluwer Academic Publishers, Boston (1996)zbMATHGoogle Scholar
  15. [JRS02]
    Jin, H., Ravi, K., Somenzi, F.: Fate and free will in error traces. In: Katoen, J.-P., Stevens, P. (eds.) TACAS 2002. LNCS, vol. 2280, pp. 445–459. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  16. [KV98]
    Kupferman, O., Vardi, M.Y.: Freedom, weakness, and determinism: From linear-time to branching-time. In: Proc. 13th IEEE Symposium on Logic in Computer Science (June 1998)Google Scholar
  17. [Mai00]
    Maidl, M.: The common fragment of CTL and LTL. In: Proc. 41th Annual Symposium on Foundations of Computer Science, pp. 643–652 (2000)Google Scholar
  18. [MSW00]
    Mateis, C., Stumptner, M., Wotawa, F.: A value-based diagnosis model for Java programs. In: Proceedings of the Eleventh International Workshop on Principles of Diagnosis (2000)Google Scholar
  19. [PR89]
    Pnueli, A., Rosner, R.: On the synthesis of a reactive module. In: Proc. Symposium on Principles of Programming Languages (POPL), pp. 179–190 (1989)Google Scholar
  20. [RBS00]
    Ravi, K., Bloem, R., Somenzi, F.: A comparative study of symbolic algorithms for the computation of fair cycles. In: Johnson, S.D., Hunt Jr., W.A. (eds.) FMCAD 2000. LNCS, vol. 1954, pp. 143–160. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  21. [RW89]
    Ramadge, P.J.G., Wonham, W.M.: The control of discrete event systems. Proceedings of the IEEE 77, 81–98 (1989)CrossRefGoogle Scholar
  22. [SB00]
    Somenzi, F., Bloem, R.: Efficient Büchi automata from LTL formulae. In: Emerson, E.A., Sistla, A.P. (eds.) CAV 2000. LNCS, vol. 1855, pp. 248–263. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  23. [ST03]
    Sebastiani, R., Tonetta, S.: “more deterministic” vs. “smaller” büchi automata for efficient LTL model checking. In: Geist, D., Tronci, E. (eds.) CHARME 2003. LNCS, vol. 2860, pp. 126–140. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  24. [SW96]
    Stumptner, M., Wotawa, F.: A model-based approach to software debugging. In: Proceedings on the Seventh International Workshop on Principles of Diagnosis (1996)Google Scholar
  25. [Tho95]
    Thomas, W.: On the synthesis of strategies in infinite games. In: Mayr, E.W., Puech, C. (eds.) STACS 1995. LNCS, vol. 900, pp. 1–13. Springer, Heidelberg (1995)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Barbara Jobstmann
    • 1
  • Andreas Griesmayer
    • 1
  • Roderick Bloem
    • 1
  1. 1.Graz University of Technology 

Personalised recommendations