skip to main content
research-article
Public Access
Artifacts Available
Artifacts Evaluated & Functional

Accelerating search-based program synthesis using learned probabilistic models

Published:11 June 2018Publication History
Skip Abstract Section

Abstract

A key challenge in program synthesis concerns how to efficiently search for the desired program in the space of possible programs. We propose a general approach to accelerate search-based program synthesis by biasing the search towards likely programs. Our approach targets a standard formulation, syntax-guided synthesis (SyGuS), by extending the grammar of possible programs with a probabilistic model dictating the likelihood of each program. We develop a weighted search algorithm to efficiently enumerate programs in order of their likelihood. We also propose a method based on transfer learning that enables to effectively learn a powerful model, called probabilistic higher-order grammar, from known solutions in a domain. We have implemented our approach in a tool called Euphony and evaluate it on SyGuS benchmark problems from a variety of domains. We show that Euphony can learn good models using easily obtainable solutions, and achieves significant performance gains over existing general-purpose as well as domain-specific synthesizers.

Skip Supplemental Material Section

Supplemental Material

p436-lee.webm

References

  1. Miltiadis Allamanis, Earl T. Barr, Christian Bird, and Charles Sutton. 2015. Suggesting Accurate Method and Class Names. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2015). Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Miltiadis Allamanis and Charles Sutton. 2014. Mining Idioms from Source Code. In Proceedings of the 22Nd ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE 2014). Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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. Syntaxguided synthesis. In Formal Methods in Computer-Aided Design (FM-CAD ’13).Google ScholarGoogle Scholar
  4. 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
  5. M. Balog, A. L. Gaunt, M. Brockschmidt, S. Nowozin, and D. Tarlow. 2017. DeepCoder: Learning to Write Programs. In 5th International Conference on Learning Representations (ICLR ’17).Google ScholarGoogle Scholar
  6. Pavol Bielik, Veselin Raychev, and Martin Vechev. 2016. PHOG: Probabilistic Model for Code. In Proceedings of the 33rd International Conference on International Conference on Machine Learning (ICML’16). Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Jacob Devlin, Jonathan Uesato, Surya Bhupatiraju, Rishabh Singh, Abdel-rahman Mohamed, and Pushmeet Kohli. 2017. RobustFill: Neural Program Learning under Noisy I/O. In Proceedings of the 34th International Conference on Machine Learning (ICML ’17). 990–998.Google ScholarGoogle Scholar
  8. Hassan Eldib, Meng Wu, and Chao Wang. 2016. Synthesis of FaultAttack Countermeasures for Cryptographic Circuits. In 28th International Conference on Computer Aided Verification (CAV ’16).Google ScholarGoogle Scholar
  9. Exceljet. 2017. https://exceljet.net .Google ScholarGoogle Scholar
  10. Jonathan Frankle, Peter-Michael Osera, David Walker, and Steve Zdancewic. 2016. Example-directed Synthesis: A Type-theoretic Interpretation. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’16). Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 (POPL ’11). Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Sumit Gulwani, Susmit Jha, Ashish Tiwari, and Ramarathnam Venkatesan. 2011. Synthesis of Loop-free Programs. In Proceedings of the 32Nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’11). Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. P. E. Hart, N. J. Nilsson, and B. Raphael. 1968. A Formal Basis for the Heuristic Determination of Minimum Cost Paths. IEEE Transactions on Systems Science and Cybernetics 4, 2 (July 1968).Google ScholarGoogle ScholarCross RefCross Ref
  14. Abram Hindle, Earl T. Barr, Zhendong Su, Mark Gabel, and Premkumar Devanbu. 2012. On the Naturalness of Software. In Proceedings of the 34th International Conference on Software Engineering (ICSE ’12). Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Jeevana Priya Inala, Rohit Singh, and Armando Solar-Lezama. 2016. Synthesis of Domain Specific CNF Encoders for Bit-Vector Solvers. In International Conference on Theory and Applications of Satisfiability Testing (SAT ’16). 302–320.Google ScholarGoogle Scholar
  16. 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 (ICSE ’10). Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Donald E. Knuth. 1997. The Art of Computer Programming, Volume 1 (3rd Ed.): Fundamental Algorithms. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 (ICSE ’16). Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Aditya Krishna Menon, Omer Tamuz, Sumit Gulwani, Butler Lampson, and Adam Tauman Kalai. 2013. A Machine Learning Framework for Programming by Example. In Proceedings of the 30th International Conference on International Conference on Machine Learning (ICML’13). Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Peter-Michael Osera and Steve Zdancewic. 2015. Type-and-exampledirected Program Synthesis. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’15). Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Sinno Jialin Pan, Ivor W. Tsang, James T. Kwok, and Qiang Yang. 2009. Domain Adaptation via Transfer Component Analysis. In Proceedings of the 21st International Joint Conference on Artificial Intelligence (IJCAI’ 09). Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Sinno Jialin Pan and Qiang Yang. 2010. A Survey on Transfer Learning. IEEE Transactions on Knowledge and Data Engineering 22, 10 (October 2010). Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Emilio Parisotto, Abdel-rahman Mohamed, Rishabh Singh, Lihong Li, Dengyong Zhou, and Pushmeet Kohli. 2017. Neuro-Symbolic Program Synthesis. In Proceedings of the International Conference on Learning Representations (ICLR ’17).Google ScholarGoogle Scholar
  24. 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 (PLDI ’16). Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Yewen Pu, Karthik Narasimhan, Armando Solar-Lezama, and Regina Barzilay. 2016. sk_p: a neural program corrector for MOOCs. In Companion Proceedings of the 2016 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity (SPLASH ’16). Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Veselin Raychev, Pavol Bielik, and Martin Vechev. 2016. Probabilistic Model for Code with Decision Trees. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2016). Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Andrew Reynolds, Morgan Deters, Viktor Kuncak, Cesare Tinelli, and Clark W. Barrett. 2015. Counterexample-Guided Quantifier Instantiation for Synthesis in SMT. In Proceedings of 27th International Conference on Computer Aided Verification (CAV ’15).Google ScholarGoogle Scholar
  28. Stackoverflow. 2017. https://stackoverflow.com .Google ScholarGoogle Scholar
  29. SyGuS 2016 Competition. 2016. http://sygus.seas.upenn.edu/ SyGuS-COMP2017.html .Google ScholarGoogle Scholar
  30. 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 (PLDI ’13). Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Xinyu Wang, Isil Dillig, and Rishabh Singh. 2017. Program Synthesis using Abstraction Refinement. CoRR abs/1710.07740 (2017). arXiv: 1710.07740Google ScholarGoogle Scholar

Index Terms

  1. Accelerating search-based program synthesis using learned probabilistic models

        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!