skip to main content

Bottom-up synthesis of recursive functional programs using angelic execution

Published:12 January 2022Publication History
Skip Abstract Section

Abstract

We present a novel bottom-up method for the synthesis of functional recursive programs. While bottom-up synthesis techniques can work better than top-down methods in certain settings, there is no prior technique for synthesizing recursive programs from logical specifications in a purely bottom-up fashion. The main challenge is that effective bottom-up methods need to execute sub-expressions of the code being synthesized, but it is impossible to execute a recursive subexpression of a program that has not been fully constructed yet. In this paper, we address this challenge using the concept of angelic semantics. Specifically, our method finds a program that satisfies the specification under angelic semantics (we refer to this as angelic synthesis), analyzes the assumptions made during its angelic execution, uses this analysis to strengthen the specification, and finally reattempts synthesis with the strengthened specification. Our proposed angelic synthesis algorithm is based on version space learning and therefore deals effectively with many incremental synthesis calls made during the overall algorithm. We have implemented this approach in a prototype called Burst and evaluate it on synthesis problems from prior work. Our experiments show that Burst is able to synthesize a solution to 94% of the benchmarks in our benchmark suite, outperforming prior work.

Skip Supplemental Material Section

Supplemental Material

Auxiliary Presentation Video

This is a presentation video for Bottom-Up Synthesis of Recursive Functional Programs using Angelic Execution.

References

  1. Aws Albarghouthi, Sumit Gulwani, and Zachary Kincaid. 2013. Recursive Program Synthesis. In Computer Aided Verification, Natasha Sharygina and Helmut Veith (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 934–950. isbn:978-3-642-39799-8 https://doi.org/10.1007/978-3-642-39799-8_67 Google ScholarGoogle ScholarCross RefCross Ref
  2. Rajeev Alur, Pavol Černý, and Arjun Radhakrishna. 2015. Synthesis Through Unification. In Computer Aided Verification, Daniel Kroening and Corina S. Păsăreanu (Eds.). Springer International Publishing, Cham. 163–179. isbn:978-3-319-21668-3 https://doi.org/10.1007/978-3-319-21668-3_10 Google ScholarGoogle Scholar
  3. Daniel W. Barowy, Sumit Gulwani, Ted Hart, and Benjamin Zorn. 2015. FlashRelate: Extracting Relational Data from Semi-Structured Spreadsheets Using Examples. SIGPLAN Not., 50, 6 (2015), jun, 218–228. issn:0362-1340 https://doi.org/10.1145/2813885.2737952 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Broy and M. Wirsing. 1981. On the algebraic specification of nondeterministic programming languages. In CAAP ’81, Egidio Astesiano and Corrado Böhm (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 162–179. isbn:978-3-540-38716-9 https://doi.org/10.1007/3-540-10828-9_61 Google ScholarGoogle ScholarCross RefCross Ref
  5. Hubert Comon, Max Dauchet, Rémi Gilleron, Florent Jacquemard, Denis Lugiez, Christof Löding, Sophie Tison, and Marc Tommasi. 2008. Tree Automata Techniques and Applications. https://hal.inria.fr/hal-03367725Google ScholarGoogle Scholar
  6. Peter J. Downey, Ravi Sethi, and Robert Endre Tarjan. 1980. Variations on the Common Subexpression Problem. J. ACM, 27, 4 (1980), Oct., 758–771. issn:0004-5411 https://doi.org/10.1145/322217.322228 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. John K. Feser, Swarat Chaudhuri, and Isil Dillig. 2015. Synthesizing Data Structure Transformations from Input-Output Examples. SIGPLAN Not., 50, 6 (2015), June, 229–239. issn:0362-1340 https://doi.org/10.1145/2813885.2737977 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Jonathan Frankle, Peter-Michael Osera, David Walker, and Steve Zdancewic. 2016. Example-Directed Synthesis: A Type-Theoretic Interpretation. SIGPLAN Not., 51, 1 (2016), Jan., 802–815. issn:0362-1340 https://doi.org/10.1145/2914770.2837629 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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). Association for Computing Machinery, New York, NY, USA. 317–330. isbn:9781450304900 https://doi.org/10.1145/1926385.1926423 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Sumit Gulwani, Oleksandr Polozov, and Rishabh Singh. 2017. Program Synthesis. Foundations and Trends® in Programming Languages, 4, 1-2 (2017), 1–119. issn:2325-1107 https://doi.org/10.1561/2500000010 Google ScholarGoogle ScholarCross RefCross Ref
  11. 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 (PLDI 2020). Association for Computing Machinery, New York, NY, USA. 1159–1174. isbn:9781450376136 https://doi.org/10.1145/3385412.3386027 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Shachar Itzhaky, Hila Peleg, Nadia Polikarpova, Reuben N. S. Rowe, and Ilya Sergey. 2021. Cyclic Program Synthesis. In Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI 2021). Association for Computing Machinery, New York, NY, USA. 944–959. isbn:9781450383912 https://doi.org/10.1145/3453483.3454087 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Emanuel Kitzelmann, Ute Schmid, Roland Olsson, and Leslie Pack Kaelbling. 2006. Inductive synthesis of functional programs: An explanation based generalization approach. Journal of Machine Learning Research, 7, 2 (2006).Google ScholarGoogle Scholar
  14. Etienne Kneuss, Ivan Kuraj, Viktor Kuncak, and Philippe Suter. 2013. Synthesis modulo Recursive Functions. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA ’13). Association for Computing Machinery, New York, NY, USA. 407–426. isbn:9781450323741 https://doi.org/10.1145/2509136.2509555 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Tessa Lau, Pedro Domingos, and Daniel S. Weld. 2003. Learning Programs from Traces Using Version Space Algebra. In Proceedings of the 2nd International Conference on Knowledge Capture (K-CAP ’03). Association for Computing Machinery, New York, NY, USA. 36–43. isbn:1581135831 https://doi.org/10.1145/945645.945654 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 (PLDI ’14). Association for Computing Machinery, New York, NY, USA. 542–553. isbn:9781450327848 https://doi.org/10.1145/2594291.2594333 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Woosuk Lee. 2021. Combining the Top-down Propagation and Bottom-up Enumeration for Inductive Program Synthesis. Proc. ACM Program. Lang., 5, POPL (2021), Article 54, Jan., 28 pages. https://doi.org/10.1145/3434335 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Fan Long and Martin Rinard. 2015. Staged Program Repair with Condition Synthesis. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2015). Association for Computing Machinery, New York, NY, USA. 166–178. isbn:9781450336758 https://doi.org/10.1145/2786805.2786811 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Justin Lubin, Nick Collins, Cyrus Omar, and Ravi Chugh. 2020. Program Sketching with Live Bidirectional Evaluation. Proc. ACM Program. Lang., 4, ICFP (2020), Article 109, Aug., 29 pages. https://doi.org/10.1145/3408991 Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Parthasarathy Madhusudan. 2011. Synthesizing Reactive Programs. In Computer Science Logic (CSL’11) - 25th International Workshop/20th Annual Conference of the EACSL, Marc Bezem (Ed.) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 12). Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany. 428–442. isbn:978-3-939897-32-3 issn:1868-8969 https://doi.org/10.4230/LIPIcs.CSL.2011.428 Google ScholarGoogle Scholar
  21. 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). Association for Computing Machinery, New York, NY, USA. 691–701. isbn:9781450339001 https://doi.org/10.1145/2884781.2884807 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Anders Miltner, Adrian Trejo Nuñez, Ana Brendel, Swarat Chaudhuri, and Isil Dillig. 2021. Bottom-up Synthesis of Recursive Functional Programs using Angelic Execution. arxiv:2107.06253.Google ScholarGoogle Scholar
  23. Augustus Odena, Kensen Shi, David Bieber, Rishabh Singh, and Charles Sutton. 2020. BUSTLE: Bottom-up program-Synthesis Through Learning-guided Exploration. arXiv preprint arXiv:2007.14381.Google ScholarGoogle Scholar
  24. 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 (PLDI ’15). Association for Computing Machinery, New York, NY, USA. 619–630. isbn:9781450334686 https://doi.org/10.1145/2737924.2738007 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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). Association for Computing Machinery, New York, NY, USA. 522–538. isbn:9781450342612 https://doi.org/10.1145/2908080.2908093 Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 (OOPSLA 2015). Association for Computing Machinery, New York, NY, USA. 107–126. isbn:9781450336895 https://doi.org/10.1145/2814270.2814310 Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 (ICSE ’17). IEEE Press, 404–415. isbn:9781538638682 https://doi.org/10.1109/ICSE.2017.44 Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Kensen Shi, Jacob Steinhardt, and Percy Liang. 2019. FrAngel: Component-Based Synthesis with Control Structures. Proc. ACM Program. Lang., 3, POPL (2019), Article 73, jan, 29 pages. https://doi.org/10.1145/3290386 Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Phillip D. Summers. 1977. A Methodology for LISP Program Construction from Examples. J. ACM, 24, 1 (1977), jan, 161–175. issn:0004-5411 https://doi.org/10.1145/321992.322002 Google ScholarGoogle ScholarDigital LibraryDigital Library
  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). Association for Computing Machinery, New York, NY, USA. 287–296. isbn:9781450320146 https://doi.org/10.1145/2491956.2462174 Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Xinyu Wang, Isil Dillig, and Rishabh Singh. 2017. Program Synthesis Using Abstraction Refinement. Proc. ACM Program. Lang., 2, POPL (2017), Article 63, Dec., 30 pages. https://doi.org/10.1145/3158151 Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Xinyu Wang, Isil Dillig, and Rishabh Singh. 2017. Synthesis of Data Completion Scripts Using Finite Tree Automata. Proc. ACM Program. Lang., 1, OOPSLA (2017), Article 62, Oct., 26 pages. https://doi.org/10.1145/3133886 Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Yuepeng Wang, Xinyu Wang, and Isil Dillig. 2018. Relational Program Synthesis. Proc. ACM Program. Lang., 2, OOPSLA (2018), Article 155, Oct., 27 pages. https://doi.org/10.1145/3276525 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Bottom-up synthesis of recursive functional programs using angelic execution

        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!