Recursive Program Synthesis

Input-output examples are a simple and accessible way of describing program behaviour. Program synthesis from input-output examples has the potential of extending the range of computational tasks achievable by end-users who have no programming knowledge, but can articulate their desired computations by describing input-output behaviour. In this paper, we present Escher, a generic and efficient algorithm that interacts with the user via input-output examples, and synthesizes recursive programs implementing intended behaviour. Escher is parameterized by the components (instructions) that can be used in the program, thus providing a generic synthesis algorithm that can be instantiated to suit different domains. To search through the space of programs, Escher adopts a novel search strategy that utilizes special data structures for inferring conditionals and synthesizing recursive procedures. Our experimental evaluation of Escher demonstrates its ability to efficiently synthesize a wide range of programs, manipulating integers, lists, and trees. Moreover, we show that Escher outperforms a state-of-the-art SAT-based synthesis tool from the literature.

[1]  Phillip D. Summers,et al.  A Methodology for LISP Program Construction from Examples , 1977, J. ACM.

[2]  Zohar Manna,et al.  A Deductive Approach to Program Synthesis , 1979, TOPL.

[3]  Tom M. Mitchell,et al.  Generalization as Search , 2002 .

[4]  Ehud Shapiro,et al.  Algorithmic Program Debugging , 1983 .

[5]  Pierre Wolper,et al.  Synthesis of Communicating Processes from Temporal Logic Specifications , 1981, TOPL.

[6]  Pierre Flener,et al.  Inductive Logic Program Synthesis with DIALOGS , 1996, Inductive Logic Programming Workshop.

[7]  Serap Yilmaz,et al.  INDUCTIVE SYNTHESIS OF RECURSIVE LOGIC PROGRAMS , 1997 .

[8]  Pierre Flener,et al.  Inductive Synthesis of Recursive Logic Programs: Achievements and Prospects , 1999, J. Log. Program..

[9]  H. Lieberman Your Wish is My Command: Programming By Example , 2001 .

[10]  Blai Bonet,et al.  Planning as heuristic search , 2001, Artif. Intell..

[11]  Pedro M. Domingos,et al.  Programming by Demonstration Using Version Space Algebra , 2003, Machine Learning.

[12]  Paolo Traverso,et al.  Automated Planning: Theory & Practice , 2004 .

[13]  Ute Schmid,et al.  Inductive Synthesis of Functional Programs: An Explanation Based Generalization Approach , 2006, J. Mach. Learn. Res..

[14]  Sanjit A. Seshia,et al.  Combinatorial sketching for finite programs , 2006, ASPLOS XII.

[15]  Sumit Gulwani,et al.  Oracle-guided component-based program synthesis , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[16]  Sumit Gulwani,et al.  Synthesizing geometry constructions , 2011, PLDI '11.

[17]  Sumit Gulwani,et al.  Spreadsheet table transformations from examples , 2011, PLDI '11.

[18]  Sumit Gulwani,et al.  Automating string processing in spreadsheets using input-output examples , 2011, POPL '11.

[19]  Sumit Gulwani,et al.  Synthesis of loop-free programs , 2011, PLDI '11.

[20]  Sumit Gulwani,et al.  Synthesis from Examples: Interaction Models and Algorithms , 2012, 2012 14th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing.

[21]  Sumit Gulwani,et al.  Synthesizing Number Transformations from Input-Output Examples , 2012, CAV.

[22]  Butler W. Lampson,et al.  A Machine Learning Framework for Programming by Example , 2013, ICML.