Leveraging program equivalence for adaptive program repair: Models and first results

Westley Weimer, Zachary P. Fry, Stephanie Forrest

2013 · 271 citations · 54 references

Concepts

TL;DR

Software bugs remain a compelling problem, and while automated program repair has shown promise in reducing costs, its success and repair cost vary across bugs. The paper focuses on generate‑and‑validate repair methods that enumerate candidate repairs and use test cases to define correct behavior. The authors formalize repair cost as the number of test executions and use this model to devise a deterministic algorithm that computes a patch quotient space relative to an approximate semantic equivalence relation. The new algorithm dramatically reduces the repair search space using syntactic and dataflow analysis, demonstrates that generate‑and‑validate repair is a dual of mutation testing, and achieves an order‑of‑magnitude fewer test evaluations and over three times monetary efficiency on 105 real‑world bugs.

Abstract

Software bugs remain a compelling problem. Automated program repair is a promising approach for reducing cost, and many methods have recently demonstrated positive results. However, success on any particular bug is variable, as is the cost to find a repair. This paper focuses on generate-and-validate repair methods that enumerate candidate repairs and use test cases to define correct behavior. We formalize repair cost in terms of test executions, which dominate most test-based repair algorithms. Insights from this model lead to a novel deterministic repair algorithm that computes a patch quotient space with respect to an approximate semantic equivalence relation. This allows syntactic and dataflow analysis techniques to dramatically reduce the repair search space. Generate-and-validate program repair is shown to be a dual of mutation testing, suggesting several possible cross-fertilizations. Evaluating on 105 real-world bugs in programs totaling 5MLOC and involving 10,000 tests, our new algorithm requires an order-of-magnitude fewer test evaluations than the previous state-of-the-art and is over three times more efficient monetarily.

References

54