skip to main content
research-article

FlashMeta: a framework for inductive program synthesis

Published:23 October 2015Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle Scholar
  2. 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 ScholarGoogle Scholar
  3. D. W. Barowy, S. Gulwani, T. Hart, and B. Zorn. FlashRelate: Extracting relational data from semi-structured spreadsheets using examples. In PLDI, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle Scholar
  5. J. Feser, S. Chaudhuri, and I. Dillig. Synthesizing data structure transformations from input-output examples. In PLDI, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. Gulwani. Dimensions in program synthesis. In PPDP, pages 13–24. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. Gulwani. Automating string processing in spreadsheets using input-output examples. In POPL, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. W. R. Harris and S. Gulwani. Spreadsheet table transformations from examples. In PLDI, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. A. R. Hoare. Algorithm 65: Find. Commun. ACM, 4(7): 321–322, July 1961. ISSN 0001-0782.. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. W. Hodges. A shorter model theory. Cambridge university press, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. E. Hopcroft. Introduction to automata theory, languages, and computation. Pearson Education India, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle Scholar
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. C. Johnson. Yacc: Yet another compiler-compiler, volume 32. Bell Laboratories Murray Hill, NJ, 1975.Google ScholarGoogle Scholar
  15. S. Katayama. Systematic search for lambda expressions. Trends in functional programming, 6:111–126, 2005.Google ScholarGoogle Scholar
  16. D. Kini and S. Gulwani. FlashNormalize: Programming by examples for text normalization. IJCAI, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarCross RefCross Ref
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. V. Kuncak, M. Mayer, R. Piskac, and P. Suter. Software synthesis procedures. CACM, 55(2):103–111, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarCross RefCross Ref
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. V. Le and S. Gulwani. FlashExtract: A framework for data extraction by examples. In PLDI, page 55. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. H. Lieberman. Your wish is my command: Programming by example. Morgan Kaufmann, 2001.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. E. Lu and R. Bodik. Quicksilver: Automatic synthesis of relational queries. Master’s thesis, EECS Department, University of California, Berkeley, May 2013.Google ScholarGoogle Scholar
  25. Z. Manna and R. Waldinger. A deductive approach to program synthesis. TOPLAS, 2(1):90–121, 1980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. T. M. Mitchell. Generalization as search. Artificial intelligence, 18(2):203–226, 1982.Google ScholarGoogle ScholarCross RefCross Ref
  28. P.-M. Osera and S. Zdancewic. Type-and-example-directed program synthesis. In PLDI, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. P. Panchekha, A. Sanchez-Stern, J. R. Wilcox, and Z. Tatlock. Automatically improving accuracy for floating point expressions. PLDI, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarCross RefCross Ref
  31. E. Schkufza, R. Sharma, and A. Aiken. Stochastic superoptimization. In ACM SIGARCH Computer Architecture News, volume 41, pages 305–316. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. R. Singh and S. Gulwani. Synthesizing number transformations from input-output examples. In Computer Aided Verification, pages 634–651. Springer, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. R. Singh and S. Gulwani. Learning semantic string transformations from examples. VLDB, 5(8):740–751, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. R. Singh and S. Gulwani. Predicting a correct program in programming by example. CAV, 2015.Google ScholarGoogle ScholarCross RefCross Ref
  35. A. Solar-Lezama. Program synthesis by sketching. ProQuest, 2008.Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. E. Torlak and R. Bodik. Growing solver-aided languages with Rosette. In Onward!, pages 135–152. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. FlashMeta: a framework for inductive program synthesis

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!