Learning Abstractions for Program Synthesis

Many example-guided program synthesis techniques use abstractions to prune the search space. While abstraction-based synthesis has proven to be very powerful, a domain expert needs to provide a suitable abstract domain, together with the abstract transformers of each DSL construct. However, coming up with useful abstractions can be non-trivial, as it requires both domain expertise and knowledge about the synthesizer. In this paper, we propose a new technique for learning abstractions that are useful for instantiating a general synthesis framework in a new domain. Given a DSL and a small set of training problems, our method uses tree interpolation to infer reusable predicate templates that speed up synthesis in a given domain. Our method also learns suitable abstract transformers by solving a certain kind of second-order constraint solving problem in a data-driven way. We have implemented the proposed method in a tool called ATLAS and evaluate it in the context of the BLAZE meta-synthesizer. Our evaluation shows that (a) ATLAS can learn useful abstract domains and transformers from few training problems, and (b) the abstractions learned by ATLAS allow BLAZE to achieve significantly better results compared to manually-crafted abstractions.

[1]  Kenneth L. McMillan,et al.  Applications of Craig Interpolants in Model Checking , 2005, TACAS.

[2]  Laura Kovács,et al.  Tree Interpolation in Vampire , 2013, LPAR.

[3]  Isil Dillig,et al.  Automated Migration of Hierarchical Data to Relational Tables using Programming-by-Example , 2017, Proc. VLDB Endow..

[4]  Isil Dillig,et al.  Synthesis of data completion scripts using finite tree automata , 2017, Proc. ACM Program. Lang..

[5]  Isil Dillig,et al.  Component-based synthesis of table consolidation and transformation tasks from examples , 2016, PLDI.

[6]  Amir Pnueli,et al.  Automatic Deductive Verification with Invisible Invariants , 2001, TACAS.

[7]  Rastislav Bodík,et al.  Jungloid mining: helping to navigate the API jungle , 2005, PLDI '05.

[8]  Shuvendu K. Lahiri,et al.  Constructing Quantified Invariants via Predicate Abstraction , 2004, VMCAI.

[9]  Thomas A. Henzinger,et al.  The software model checker Blast , 2007, International Journal on Software Tools for Technology Transfer.

[10]  Roman Manevich,et al.  TVLA: A system for generating abstract interpreters , 2004, IFIP Congress Topical Sessions.

[11]  Ranjit Jhala,et al.  Interpolant-Based Transition Relation Approximation , 2007, Log. Methods Comput. Sci..

[12]  Sumit Gulwani,et al.  FIDEX: filtering spreadsheet data using examples , 2016, OOPSLA.

[13]  Thomas A. Henzinger,et al.  The software model checker B last : Applications to software engineering , 2007 .

[14]  Florian Lonsing,et al.  SAT-based methods for circuit synthesis , 2014, 2014 Formal Methods in Computer-Aided Design (FMCAD).

[15]  Hakjoo Oh,et al.  Synthesizing Imperative Programs from Examples Guided by Static Analysis , 2017, SAS.

[16]  Isil Dillig,et al.  Program synthesis using abstraction refinement , 2017, Proc. ACM Program. Lang..

[17]  Alvin Cheung,et al.  Synthesizing highly expressive SQL queries from input-output examples , 2017, PLDI.

[18]  Armando Solar-Lezama,et al.  Program synthesis from polymorphic refinement types , 2015, PLDI.

[19]  Zachary Kincaid,et al.  Strategy synthesis for linear arithmetic games , 2017, Proc. ACM Program. Lang..

[20]  Shmuel Sagiv,et al.  TVLA: A System for Implementing Static Analyses , 2000, SAS.

[21]  Thomas W. Reps,et al.  A Method for Symbolic Computation of Abstract Operations , 2012, CAV.

[22]  Ruzica Piskac,et al.  Complete completion using types and weights , 2013, PLDI.

[23]  Isil Dillig,et al.  Component-based synthesis for complex APIs , 2017, POPL.

[24]  Kenneth L. McMillan,et al.  Interpolation and SAT-Based Model Checking , 2003, CAV.

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

[26]  Ashish Tiwari,et al.  Program Synthesis Using Dual Interpretation , 2015, CADE.

[27]  Isil Dillig,et al.  Synthesizing data structure transformations from input-output examples , 2015, PLDI.

[28]  Thomas W. Reps,et al.  Symbolic Implementation of the Best Transformer , 2004, VMCAI.

[29]  Thomas W. Reps,et al.  Automating Abstract Interpretation , 2016, VMCAI.

[30]  Sumit Gulwani,et al.  Transforming spreadsheet data types using examples , 2016, POPL.

[31]  Ashish Tiwari,et al.  Look for the Proof to Find the Program: Decorated-Component-Based Program Synthesis , 2017, CAV.

[32]  Marsha Chechik,et al.  Ufo: A Framework for Abstraction- and Interpolation-Based Software Verification , 2012, CAV.

[33]  Rishabh Singh,et al.  BlinkFill: Semi-supervised Programming By Example for Syntactic String Transformations , 2016, Proc. VLDB Endow..