MIT's new tool automatically rewrites the old code for new software

But don't be afraid, there must be a man's hand to finish.

Writing computer software requires many cut-and-paste steps. It is also only part of the normal workflow - find a solution on Google, copy from Stack Overflow (or another source) and include it in the code. The final step will include some editing, rewriting, debugging.

Earlier this month, a team of scientists at MIT's CSAIL Lab revealed a new system that automatically puts code from one program to another.

The tool called CodeCarbonCopy (CCC) works by comparing the execution of the two software, then updating the variable name, representing the data with the source code. For example, if the original program called x, CodeCarbonCpy will find and replace the variables in the new code with the name x.

The work sounds normal but requires a basic understanding of what each software really does, as a variable makes sense in a certain context and how the software uses it.

Similar to data representation. This is a very interesting issue. CCC resolves by giving each software an input file and see what each will do. The result is a representative symbol of each value that the two software computes.

Picture 1 of MIT's new tool automatically rewrites the old code for new software

Transfer code from this software to another software automatically by CCC

In addition, CCC is also capable of detecting the functionality in the code used by the core software that the original software capital does not use.

The MIT team has experimented with 8 times of transcoding between 6 software, including VLC, mtPaint and MPlayer. During 7 transfers, the function is successfully kept during the transfer. At the 8th time from mtPaint to bmp2tiff, CCC cannot work because there are some strange data structures.

There is an anecdote that still communicates among developers about automation, that is, we will soon outsource to programming machines. CCC will not have good news then. But now rest assured that the system still needs human intervention.

People will have to determine the code to be transferred from the original program and the function to be transferred. CCC also takes a lot of time to work, the longest time when testing is 12 minutes.

Update 24 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile