Jump to content

Program Developed for Fixing Software Bugs by Analyzing Other Programs


Recommended Posts

In general, it is a bad thing when a program crashes, which is why so much effort is invested to make sure it does not happen, but even then, things may be missed. To catch those remaining bugs, automated tools have been developed to identify problem spots in code, but now researchers at MIT have developed a system that will actually repair the problems. It does this by analyzing other programs and learning how they operate, without accessing their source code.

This new system, named CodePhage, works by first identifying inputs that cause crashes with the DIODE system the researchers previously developed, as well as safe inputs. CodePhage then feeds both the safe and crash-inducing inputs for one program, into another program that performs similar operations, but does not crash from these inputs, and generates the symbolic expressions for both inputs. Symbolic expressions are strings of symbols describing the logical constraints applied by operations. When the expression for the crash-inducing input deviates from the safe input, CodePhage stops the process and then looks at the original, crashing program to find locations where an input would meet most, but not all of the constraints described. It then inserts code into the original program to add the constraints for the donor program, and tests it with the crash-inducing input. If the program still crashes, CodePhage will move on to another location to add the constraints, until the bug is fixed.

The researchers tested CodePhage on seven open-source programs DIODE had previously found bugs in, and was able to fix all of those bugs, taking just two to ten minutes for each repair. Believe it or not, but even the researchers were surprised by how well it functions.

Source: MIT

Back to original news post

Share this post

Link to post
Share on other sites


  • Create New...