skip to main content

Combining the top-down propagation and bottom-up enumeration for inductive program synthesis

Published:04 January 2021Publication History
Skip Abstract Section

Abstract

We present an effective method for scalable and general-purpose inductive program synthesis. There have been two main approaches for inductive synthesis: enumerative search, which repeatedly enumerates possible candidate programs, and the top-down propagation (TDP), which recursively decomposes a given large synthesis problem into smaller subproblems. Enumerative search is generally applicable but limited in scalability, and the TDP is efficient but only works for special grammars or applications. In this paper, we synergistically combine the two approaches. We generate small program subexpressions via enumerative search and put them together into the desired program by using the TDP. Enumerative search enables to bring the power of TDP into arbitrary grammars, and the TDP helps to overcome the limited scalability of enumerative search. We apply our approach to a standard formulation, syntax-guided synthesis (SyGuS), thereby supporting a broad class of inductive synthesis problems. We have implemented our approach in a tool called Duet and evaluate it on SyGuS benchmark problems from various domains. We show that Duet achieves significant performance gains over existing general-purpose as well as domain-specific synthesizers.

References

  1. Rajeev Alur, Rastislav Bodik, Garvit Juniwal, Milo M. K. Martin, Mukund Raghothaman, Sanjit A. Seshia, Rishabh Singh, Armando Solar-Lezama, Emina Torlak, and Abhishek Udupa. 2013. Syntax-guided synthesis. In Formal Methods in Computer-Aided Design (FMCAD '13).Google ScholarGoogle ScholarCross RefCross Ref
  2. Rajeev Alur, Arjun Radhakrishna, and Abhishek Udupa. 2017. Scaling Enumerative Program Synthesis via Divide and Conquer. In Proceedings of 23rd International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS '17).Google ScholarGoogle ScholarCross RefCross Ref
  3. Clark W. Barrett, Aaron Stump, and Cesare Tinelli. 2010. The SMT-LIB Standard Version 2.0.Google ScholarGoogle Scholar
  4. Benjamin Caulfield, Markus N. Rabe, Sanjit A. Seshia, and Stavros Tripakis. 2015. What's Decidable about Syntax-Guided Synthesis ? arXiv: 1510.08393 [cs.LO]Google ScholarGoogle Scholar
  5. Leonardo De Moura and Nikolaj Bjorner. 2008. Z3: An Eficient SMT Solver. In Proceedings of the Theory and Practice of Software, 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (Budapest, Hungary) ( TACAS'08). Springer-Verlag, Berlin, Heidelberg, 337-340.Google ScholarGoogle ScholarCross RefCross Ref
  6. Richard Durbin, Sean R. Eddy, Anders Krogh, and Graeme Mitchison. 1998. Biological Sequence Analysis: Probabilistic Models of Proteins and Nucleic Acids. Cambridge University Press. https://doi.org/10.1017/CBO9780511790492 Google ScholarGoogle ScholarCross RefCross Ref
  7. Hassan Eldib, Meng Wu, and Chao Wang. 2016. Synthesis of Fault-Attack Countermeasures for Cryptographic Circuits. In 28th International Conference on Computer Aided Verification (CAV '16).Google ScholarGoogle Scholar
  8. Yu Feng, Ruben Martins, Osbert Bastani, and Isil Dillig. 2018. Program Synthesis Using Conflict-Driven Learning. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation (Philadelphia, PA, USA) ( PLDI 2018 ). Association for Computing Machinery, New York, NY, USA, 420-435. https://doi.org/10.1145/ 3192366.3192382 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Yu Feng, Ruben Martins, Jacob Van Gefen, Isil Dillig, and Swarat Chaudhuri. 2017. Component-based Synthesis of Table Consolidation and Transformation Tasks from Examples. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (Barcelona, Spain) ( PLDI 2017 ).Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. John K. Feser, Swarat Chaudhuri, and Isil Dillig. 2015. Synthesizing Data Structure Transformations from Input-Output Examples. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (Portland, OR, USA) ( PLDI'15). Association for Computing Machinery, New York, NY, USA, 229-239. https://doi.org/10. 1145/2737924.2737977 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Jonathan Frankle, Peter-Michael Osera, David Walker, and Steve Zdancewic. 2016. Example-directed Synthesis: A Typetheoretic Interpretation. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (St. Petersburg, FL, USA) ( POPL '16).Google ScholarGoogle Scholar
  12. Sumit Gulwani. 2011. Automating String Processing in Spreadsheets Using Input-output Examples. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Austin, Texas, USA) ( POPL '11).Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Sumit Gulwani. 2016. Programming by Examples (and its Applications in Data Wrangling). In Verification and Synthesis of Correct and Secure Systems. IOS Press. https://www.microsoft.com/en-us/research/publication/programming-examplesapplications-data-wrangling/Google ScholarGoogle Scholar
  14. Sumit Gulwani, Vijay Anand Korthikanti, and Ashish Tiwari. 2011. Synthesizing Geometry Constructions. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (San Jose, California, USA) ( PLDI '11). Association for Computing Machinery, New York, NY, USA, 50-61. https://doi.org/10.1145/1993498.1993505 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Sumit Gulwani, Alex Polozov, and Rishabh Singh. 2017. Program Synthesis. Vol. 4. NOW. 1-119 pages. https://www. microsoft.com/en-us/research/publication/program-synthesis/Google ScholarGoogle Scholar
  16. Qinheping Hu, John Cyphert, Loris D'Antoni, and Thomas Reps. 2020. Exact and Approximate Methods for Proving Unrealizability of Syntax-Guided Synthesis Problems. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (London, UK) (PLDI' 2020 ). Association for Computing Machinery, New York, NY, USA, 1128-1142. https://doi.org/10.1145/3385412.3385979 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Kangjing Huang, Xiaokang Qiu, Peiyuan Shen, and Yanjun Wang. 2020. Reconciling Enumerative and Deductive Program Synthesis. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (London, UK) ( PLDI 2020 ). Association for Computing Machinery, New York, NY, USA, 1159-1174. https://doi.org/10. 1145/3385412.3386027 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Susmit Jha, Sumit Gulwani, Sanjit A. Seshia, and Ashish Tiwari. 2010. Oracle-guided Component-based Program Synthesis. In Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering (Cape Town, South Africa) (ICSE '10).Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Dileep Kini and Sumit Gulwani. 2015. FlashNormalize: Programming by Examples for Text Normalization. In Proceedings of the 24th International Conference on Artificial Intelligence (Buenos Aires, Argentina) (IJCAI'15). AAAI Press, 776-783.Google ScholarGoogle Scholar
  20. Vu Le and Sumit Gulwani. 2014. FlashExtract: A Framework for Data Extraction by Examples. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (Edinburgh, United Kingdom) ( PLDI '14).Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. DongKwon Lee, Woosuk Lee, Hakjoo Oh, and Kwangkeun Yi. 2020. Optimizing Homomorphic Evaluation Circuits by Program Synthesis and Term Rewriting. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (London, UK) ( PLDI 2020 ). Association for Computing Machinery, New York, NY, USA, 503-518. https://doi.org/10.1145/3385412.3385996 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Mina Lee, Sunbeom So, and Hakjoo Oh. 2016. Synthesizing Regular Expressions from Examples for Introductory Automata Assignments. In Proceedings of the 2016 ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences (Amsterdam, Netherlands) ( GPCE 2016 ). Association for Computing Machinery, New York, NY, USA, 70-80. https://doi.org/10.1145/2993236.2993244 Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Woosuk Lee, Kihong Heo, Rajeev Alur, and Mayur Naik. 2018. Accelerating Search-Based Program Synthesis Using Learned Probabilistic Models. SIGPLAN Not. 53, 4 ( June 2018 ), 436-449. https://doi.org/10.1145/3296979.3192410 Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Sergey Mechtaev, Jooyong Yi, and Abhik Roychoudhury. 2016. Angelix: Scalable Multiline Program Patch Synthesis via Symbolic Analysis. In Proceedings of the 38th International Conference on Software Engineering (Austin, Texas) ( ICSE '16).Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Saul B. Needleman and Christian D. Wunsch. 1970. A general method applicable to the search for similarities in the amino acid sequence of two proteins. Journal of Molecular Biology 48, 3 ( 1970 ), 443-453. https://doi.org/10.1016/ 0022-2836 ( 70 ) 90057-4 Google ScholarGoogle ScholarCross RefCross Ref
  26. Peter-Michael Osera and Steve Zdancewic. 2015. Type-and-example-directed Program Synthesis. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (Portland, OR, USA) ( PLDI '15).Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Past SyGuS Competition. 2020. https://sygus.org/comp/.Google ScholarGoogle Scholar
  28. Phitchaya Mangpo Phothilimthana, Aditya Thakur, Rastislav Bodik, and Dinakar Dhurjati. 2016. Scaling up Superoptimization. In Proceedings of the Twenty-First International Conference on Architectural Support for Programming Languages and Operating Systems (Atlanta, Georgia, USA) ( ASPLOS'16). Association for Computing Machinery, New York, NY, USA, 297-310. https://doi.org/10.1145/2872362.2872387 Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Nadia Polikarpova, Ivan Kuraj, and Armando Solar-Lezama. 2016. Program Synthesis from Polymorphic Refinement Types. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation (Santa Barbara, CA, USA) ( PLDI '16).Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Oleksandr Polozov and Sumit Gulwani. 2015. FlashMeta: A Framework for Inductive Program Synthesis. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (Pittsburgh, PA, USA) ( OOPSLA 2015 ). Association for Computing Machinery, New York, NY, USA, 107-126. https: //doi.org/10.1145/2814270.2814310 Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Mohammad Raza and Sumit Gulwani. 2020. Web Data Extraction Using Hybrid Program Synthesis: A Combination of Top-down and Bottom-up Inference. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data (Portland, OR, USA) ( SIGMOD '20). Association for Computing Machinery, New York, NY, USA, 1967-1978. https://doi.org/10.1145/3318464.3380608 Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Reudismam Rolim, Gustavo Soares, Loris D'Antoni, Oleksandr Polozov, Sumit Gulwani, Rohit Gheyi, Ryo Suzuki, and Björn Hartmann. 2017. Learning Syntactic Program Transformations from Examples. In Proceedings of the 39th International Conference on Software Engineering (Buenos Aires, Argentina) (ICSE'17). IEEE Press, 404-415. https://doi.org/10.1109/ ICSE. 2017.44 Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Sunbeom So and Hakjoo Oh. 2017. Synthesizing Imperative Programs from Examples Guided by Static Analysis. In Static Analysis, Francesco Ranzato (Ed.). Springer International Publishing, Cham, 364-381.Google ScholarGoogle Scholar
  34. Armando Solar-Lezama, Liviu Tancau, Rastislav Bodik, Sanjit Seshia, and Vijay Saraswat. 2006. Combinatorial Sketching for Finite Programs. In Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems (San Jose, California, USA) (ASPLOS XII).Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Abhishek Udupa, Arun Raghavan, Jyotirmoy V. Deshmukh, Sela Mador-Haim, Milo M.K. Martin, and Rajeev Alur. 2013. TRANSIT: Specifying Protocols with Concolic Snippets. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (Seattle, Washington, USA) ( PLDI '13).Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Xinyu Wang, Isil Dillig, and Rishabh Singh. 2017. Program Synthesis Using Abstraction Refinement. Proc. ACM Program. Lang. 2, POPL, Article 63 ( Dec. 2017 ), 30 pages. https://doi.org/10.1145/3158151 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Combining the top-down propagation and bottom-up enumeration 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!