Program Synthesis from Examples by Source Code Search
Imagine the situation where the user provides the examples
Input |
Output |
(2,3) |
5 |
(1,1,1) |
3 |
(1,2,3) |
6 |
and wants the computer to automatically come up with a program that sums up the elements of a given input list. The general problem of synthesizing code from examples of input and output pairs is extremely difficult. However, a huge number of basic programs has already been implemented, and often not just once, but a lot of times. And even better, the internet provides access to millions of lines of code that contain such implementations. The question is just how to find the needed implementation. The topic of this thesis is to write down an internet search engine that for a given set of input-output pairs searches for a corresponding implementation on the internet.