
MIT students' software package automatically corrects the work of programs

At a conference on the development and implementation of programming languages, a team of computer experts from the Massachusetts Institute of Technology (MIT) presented a system with amazing features . According to them, this software package automatically finds errors in programs, and corrects them, substituting in their place pieces that are suitable for functionality from other programs. At the same time, the system does not need to get acquainted with the source code of the program being corrected for operation - it only needs an executable file.
The virtuoso programmers named their program CodePhage (codephage). The developers explain that their system "analyzes the execution of the program and characterizes the types of security checks that it conducts." After that, the codeophage can take the same checks from other donor programs, even if they are written in other programming languages, and feed them to the recipient program. How donors are selected for this, the developers did not specify.
“There are already a lot of open source programs - there are millions of projects in the repositories, and many of them meet similar specifications,” says Stelios Sidiroglu-Duskos, under whose leadership CodePhage was developed. - Even if the programs are essentially different, they can often find components with similar functionality. With the help of CodePhage, someday it will be possible to create such a hybrid system that includes the best components from all available implementations. ”
To start the search for errors, the magic code-phage needs a little - a set of input data at which the program under study crashes, and another at which it does not crash. Then the codephage automatically starts the donor program with these data sets, and records its work. For example, if the recipient program can open files of a certain format, but stumbles on some file, then CodePhage records everything that the “correct” donor program does with this file, in particular, what checks it performs. After that, the codephage analyzes how the operation of the donor program differs from the operation of the recipient program, and corrects the recipient accordingly.
The developers claim that their program has successfully fixed the incorrectly working programs, and are optimistic about the future, in which the programmers will not have to write those pieces of code whose functionality has already been implemented by someone.
“The technology of borrowing code from another program with similar functionality and correcting a malfunctioning program with it is certainly cool,” said Emery Berger, an IT professor at another University of Massachusetts in Amherst who commented on the work of specialists. “To be honest, I'm surprised that she even works.”