Abstract
Inductive synthesis, or programming-by-examples (PBE) is gaining prominence with disruptive applications for automating repetitive tasks in end-user programming. However, designing, developing, and maintaining an effective industrial-quality inductive synthesizer is an intellectual and engineering challenge, requiring 1-2 man-years of effort. Our novel observation is that many PBE algorithms are a natural fall-out of one generic meta-algorithm and the domain-specific properties of the operators in the underlying domain-specific language (DSL). The meta-algorithm propagates example-based constraints on an expression to its subexpressions by leveraging associated witness functions, which essentially capture the inverse semantics of the underlying operator. This observation enables a novel program synthesis methodology called data-driven domain-specific deduction (D4), where domain-specific insight, provided by the DSL designer, is separated from the synthesis algorithm. Our FlashMeta framework implements this methodology, allowing synthesizer developers to generate an efficient synthesizer from the mere DSL definition (if properties of the DSL operators have been modeled). In our case studies, we found that 10+ existing industrial-quality mass-market applications based on PBE can be cast as instances of D4. Our evaluation includes reimplementation of some prior works, which in FlashMeta become more efficient, maintainable, and extensible. As a result, FlashMeta-based PBE tools are deployed in several industrial products, including Microsoft PowerShell 3.0 for Windows 10, Azure Operational Management Suite, and Microsoft Cortana digital assistant.
- R. Alur, R. Bodik, G. Juniwal, M. M. Martin, M. Raghothaman, S. A. Seshia, R. Singh, A. Solar-Lezama, E. Torlak, and A. Udupa. Syntax-guided synthesis. In FMCAD, pages 1– 17. IEEE, 2013.Google Scholar
- E. Andersen, S. Gulwani, and Z. Popovi´c. Programming by demonstration framework applied to procedural math problems. Technical Report MSR-TR-2014-61, Microsoft Research, 2014.Google Scholar
- D. W. Barowy, S. Gulwani, T. Hart, and B. Zorn. FlashRelate: Extracting relational data from semi-structured spreadsheets using examples. In PLDI, 2015. Google Scholar
Digital Library
- T. Celik, E. J. Etemad, D. Glazman, I. Hickson, P. Linss, and J. Williams. Selectors level 3. W3C recommendation. World Wide Web Consortium, page 76, 2011.Google Scholar
- J. Feser, S. Chaudhuri, and I. Dillig. Synthesizing data structure transformations from input-output examples. In PLDI, 2015. Google Scholar
Digital Library
- S. Gulwani. Dimensions in program synthesis. In PPDP, pages 13–24. ACM, 2010. Google Scholar
Digital Library
- S. Gulwani. Automating string processing in spreadsheets using input-output examples. In POPL, 2011. Google Scholar
Digital Library
- W. R. Harris and S. Gulwani. Spreadsheet table transformations from examples. In PLDI, 2011. Google Scholar
Digital Library
- C. A. R. Hoare. Algorithm 65: Find. Commun. ACM, 4(7): 321–322, July 1961. ISSN 0001-0782.. Google Scholar
Digital Library
- W. Hodges. A shorter model theory. Cambridge university press, 1997. Google Scholar
Digital Library
- J. E. Hopcroft. Introduction to automata theory, languages, and computation. Pearson Education India, 1979. Google Scholar
Digital Library
- T. Hottelier and R. Bodik. Synthesis of layout engines from relational constraints. Technical Report UCB/EECS-2014-181, University of California at Berkeley, 2014.Google Scholar
- S. Jha, S. Gulwani, S. A. Seshia, and A. Tiwari. Oracle-guided component-based program synthesis. In ICSE, volume 1, pages 215–224. IEEE, 2010. Google Scholar
Digital Library
- S. C. Johnson. Yacc: Yet another compiler-compiler, volume 32. Bell Laboratories Murray Hill, NJ, 1975.Google Scholar
- S. Katayama. Systematic search for lambda expressions. Trends in functional programming, 6:111–126, 2005.Google Scholar
- D. Kini and S. Gulwani. FlashNormalize: Programming by examples for text normalization. IJCAI, 2015. Google Scholar
Digital Library
- E. Kitzelmann. A combined analytical and search-based approach for the inductive synthesis of functional programs. KI-Künstliche Intelligenz, 25(2):179–182, 2011.Google Scholar
Cross Ref
- A. S. Koksal, Y. Pu, S. Srivastava, R. Bodik, J. Fisher, and N. Piterman. Synthesis of biological models from mutation experiments. In POPL, 2013. Google Scholar
Digital Library
- V. Kuncak, M. Mayer, R. Piskac, and P. Suter. Software synthesis procedures. CACM, 55(2):103–111, 2012. Google Scholar
Digital Library
- Y. Kuniyoshi, M. Inaba, and H. Inoue. Learning by watching: Extracting reusable task knowledge from visual observation of human performance. IEEE Transactions on Robotics and Automation, 10(6):799–822, 1994.Google Scholar
Cross Ref
- T. A. Lau, P. Domingos, and D. S. Weld. Version space algebra and its application to programming by demonstration. In ICML, pages 527–534, 2000. Google Scholar
Digital Library
- V. Le and S. Gulwani. FlashExtract: A framework for data extraction by examples. In PLDI, page 55. ACM, 2014. Google Scholar
Digital Library
- H. Lieberman. Your wish is my command: Programming by example. Morgan Kaufmann, 2001.Google Scholar
Digital Library
- E. Lu and R. Bodik. Quicksilver: Automatic synthesis of relational queries. Master’s thesis, EECS Department, University of California, Berkeley, May 2013.Google Scholar
- Z. Manna and R. Waldinger. A deductive approach to program synthesis. TOPLAS, 2(1):90–121, 1980. Google Scholar
Digital Library
- M. Mayer, G. Soares, M. Grechkin, V. Le, M. Marron, O. Polozov, R. Singh, B. Zorn, and S. Gulwani. User interaction models for disambiguation in programming by example. UIST, 2015.Google Scholar
Digital Library
- T. M. Mitchell. Generalization as search. Artificial intelligence, 18(2):203–226, 1982.Google Scholar
Cross Ref
- P.-M. Osera and S. Zdancewic. Type-and-example-directed program synthesis. In PLDI, 2015. Google Scholar
Digital Library
- P. Panchekha, A. Sanchez-Stern, J. R. Wilcox, and Z. Tatlock. Automatically improving accuracy for floating point expressions. PLDI, 2015. Google Scholar
Digital Library
- M. Püschel, J. M. Moura, J. R. Johnson, D. Padua, M. M. Veloso, B. W. Singer, J. Xiong, F. Franchetti, A. Gaˇcic, Y. Voronenko, et al. SPIRAL: Code generation for DSP transforms. Proceedings of the IEEE, 93(2):232–275, 2005.Google Scholar
Cross Ref
- E. Schkufza, R. Sharma, and A. Aiken. Stochastic superoptimization. In ACM SIGARCH Computer Architecture News, volume 41, pages 305–316. ACM, 2013. Google Scholar
Digital Library
- R. Singh and S. Gulwani. Synthesizing number transformations from input-output examples. In Computer Aided Verification, pages 634–651. Springer, 2012. Google Scholar
Digital Library
- R. Singh and S. Gulwani. Learning semantic string transformations from examples. VLDB, 5(8):740–751, 2012. Google Scholar
Digital Library
- R. Singh and S. Gulwani. Predicting a correct program in programming by example. CAV, 2015.Google Scholar
Cross Ref
- A. Solar-Lezama. Program synthesis by sketching. ProQuest, 2008.Google Scholar
Digital Library
- E. Torlak and R. Bodik. Growing solver-aided languages with Rosette. In Onward!, pages 135–152. ACM, 2013. Google Scholar
Digital Library
- A. Udupa, A. Raghavan, J. V. Deshmukh, S. Mador-Haim, M. M. Martin, and R. Alur. Transit: specifying protocols with concolic snippets. In PLDI, pages 287–296. ACM, 2013. Google Scholar
Digital Library
- K. Yessenov, S. Tulsiani, A. Menon, R. C. Miller, S. Gulwani, B. Lampson, and A. Kalai. A colorful approach to text processing by example. In UIST, pages 495–504. ACM, 2013. Google Scholar
Digital Library
- L. Zhang, C. F. Madigan, M. H. Moskewicz, and S. Malik. Efficient conflict driven learning in a boolean satisfiability solver. In ICCAD, pages 279–285. IEEE Press, 2001. Google Scholar
Digital Library
- Y. Zheng, X. Zhang, and V. Ganesh. Z3-str: A Z3-based string solver for web application analysis. In FSE, pages 114–124. ACM, 2013. Google Scholar
Digital Library
Index Terms
FlashMeta: a framework for inductive program synthesis
Recommendations
FlashMeta: a framework for inductive program synthesis
OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsInductive synthesis, or programming-by-examples (PBE) is gaining prominence with disruptive applications for automating repetitive tasks in end-user programming. However, designing, developing, and maintaining an effective industrial-quality inductive ...
Synthesizing data structure transformations from input-output examples
PLDI '15We present a method for example-guided synthesis of functional programs over recursive data structures. Given a set of input-output examples, our method synthesizes a program in a functional language with higher-order combinators like map and fold. The ...
Algorithmic program synthesis: introduction
Program synthesis is a process of producing an executable program from a specification. Algorithmic synthesis produces the program automatically, without an intervention from an expert. While classical compilation falls under the definition of ...






Comments