Significantly Improving a Tool for Automatically Completing Programs

Though I would never describe myself as a programmer, I do have some experience and know how irritating it can be to find I missed one section of code. To help with that, researchers at MIT developed Sketch, which has the ability to fill in missing could, in some situations. Now researchers at MIT have improved Sketch's efficiency, making tasks that were previously impossible for it take just milliseconds.

Sketch operates by treating the program it is analyzing as a search problem. When it comes to a spot missing code, it considers and tests the possible variations of what could fill the void. When the program is too complex though, the number of variations can grow too large for Sketch to handle. In these cases Sketch will eventually time out or give up on finding the solution. What the recent work adds is the ability for a developer to describe the criteria of the missing code. This way Sketch only has to find code that satisfies the criteria, and then move on without checking every possible variation.

By shrinking the number of variations to test, the researchers found Sketch was able to complete previously impossible analyses in milliseconds. As impressive as that sounds, it will be a long time before Sketch would be of great use to professional developers, but for some very specialized tasks, it could be very useful.