Imagine telling a computer what you want â "turn full names into Last, First-initial" â and having it write the how for you, the actual code, correct on every case. That's the dream of program synthesis: programs that write programs, from a specification or just a handful of examples.
The obvious approach is to search: try candidate programs until one fits. But the space of all programs is infinite â there are always longer, weirder programs to consider. Searching blindly never ends, and in full generality, deciding whether a correct program even exists is undecidable, a relative of the halting problem.
And yet â you've probably used program synthesis. When a spreadsheet's Flash Fill guesses your formatting after two examples, or an AI assistant writes a function from a comment, that's synthesis, made practical by shrinking the search to a clever, restricted space.
Comments
Loading comments...