Automatic Repair of Infinite Loops

by Sebastian Lamelas and Martin Monperrus
Abstract: Research on automatic software repair is concerned with the development of systems that automatically detect and repair bugs. One well-known class of bugs is the infinite loop. Every computer programmer or user has, at least once, experienced this type of bug. We state the problem of repairing infinite loops in the context of test-suite based software repair: given a test suite with at least one failing test, generate a patch that makes all test cases pass. Consequently, repairing infinites loop means having at least one test case that hangs by triggering the infinite loop. Our system to automatically repair infinite loops is called Infinitel. We develop a technique to manipulate loops so that one can dynamically analyze the number of iterations of loops; decide to interrupt the loop execution; and dynamically examine the state of the loop on a per-iteration basis. Then, in order to synthesize a new loop condition, we encode this set of program states as a code synthesis problem using a technique based on Satisfiability Modulo Theory (SMT). We evaluate our technique on seven seeded-bugs and on seven real-bugs. Infinitel is able to repair all of them, within seconds up to one hour on a standard laptop configuration.
 View PDF
Open-access (on
Citations: [citations]
Other publications of Martin Monperrus

Cite it:

Sebastian Lamelas and Martin Monperrus, "Automatic Repair of Infinite Loops", hal-01144026, University of Lille, no. hal-01144026, 2015.
Automatic Repair of Infinite Loops

Bibtex Entry:

 title = {{Automatic Repair of Infinite Loops}},
 author = {Lamelas, Sebastian and Monperrus, Martin},
 url = {},
 type = {Technical Report},
 number = {hal-01144026},
 institution = {{University of Lille}},
 year = {2015},
Powered by bibtexbrowser
Tagged as: