Microsoft Research335 тыс
Следующее
Опубликовано 6 сентября 2016, 18:47
The automatic repair of programs has been a longstanding goal in software engineering, yet debugging remains a largely manual process. We introduce a fully automated method for locating and repairing bugs in software. The approach works on off-the-shelf legacy applications and does not require formal specifications, program annotations or special coding practices. Once a program fault is discovered, an extended form of genetic programming is used to evolve program variants until one is found that both retains required functionality and also avoids the defect in question. Standard test cases are used to exercise the fault and to encode program requirements. After a successful repair has been discovered, it is minimized into a standard patch using structural differencing algorithms and delta debugging; that patch can then be presented to developers. We describe the proposed method and report results from an initial set of experiments demonstrating that it can successfully repair a dozen different C programs totaling over 140,000 lines in under 300 seconds, on average. We also describe how the automatic repair mechanism can be combined with anomaly intrusion detection to produce a closed-loop repair system, and we measure the effects of repair quality and false positives on server throughput.