skip to main content

Semantics-guided synthesis

Published:04 January 2021Publication History
Skip Abstract Section

Abstract

This paper develops a new framework for program synthesis, called semantics-guided synthesis (SemGuS), that allows a user to provide both the syntax and the semantics for the constructs in the language. SemGuS accepts a recursively defined big-step semantics, which allows it, for example, to be used to specify and solve synthesis problems over an imperative programming language that may contain loops with unbounded behavior. The customizable nature of SemGuS also allows synthesis problems to be defined over a non-standard semantics, such as an abstract semantics. In addition to the SemGuS framework, we develop an algorithm for solving SemGuS problems that is capable of both synthesizing programs and proving unrealizability, by encoding a SemGuS problem as a proof search over Constrained Horn Clauses: in particular, our approach is the first that we are aware of that can prove unrealizabilty for synthesis problems that involve imperative programs with unbounded loops, over an infinite syntactic search space. We implemented the technique in a tool called MESSY, and applied it to SyGuS problems (i.e., over expressions), synthesis problems over an imperative programming language, and synthesis problems over regular expressions.

References

  1. Rajeev Alur, Rastislav Bodik, Garvit Juniwal, Milo MK 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), 2013. IEEE, 1-8.Google ScholarGoogle Scholar
  2. Rajeev Alur, Dana Fisman, Rishabh Singh, and Armando Solar-Lezama. 2017a. Sygus-comp 2017 : Results and analysis. arXiv preprint arXiv:1711.11438 ( 2017 ).Google ScholarGoogle Scholar
  3. Rajeev Alur, Arjun Radhakrishna, and Abhishek Udupa. 2017b. Scaling enumerative program synthesis via divide and conquer. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems. Springer, 319-336.Google ScholarGoogle ScholarCross RefCross Ref
  4. Clark Barrett, Christopher L Conway, Morgan Deters, Liana Hadarean, Dejan Jovanović, Tim King, Andrew Reynolds, and Cesare Tinelli. 2011. Cvc4. In International Conference on Computer Aided Verification. Springer, 171-177.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Régis Blanc, Ashutosh Gupta, Laura Kovács, and Bernhard Kragl. 2013. Tree interpolation in vampire. In International Conference on Logic for Programming Artificial Intelligence and Reasoning. Springer, 173-181.Google ScholarGoogle ScholarCross RefCross Ref
  6. Edmund Clarke, Daniel Kroening, and Karen Yorav. 2003. Behavioral consistency of C and Verilog programs using bounded model checking. In Proceedings 2003. Design Automation Conference (IEEE Cat. No. 03CH37451). IEEE, 368-371.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Patrick Cousot and Radhia Cousot. 1992. Abstract interpretation frameworks. Journal of logic and computation 2, 4 ( 1992 ), 511-547.Google ScholarGoogle ScholarCross RefCross Ref
  8. Leonardo De Moura and Nikolaj Bjørner. 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/ETAPS'08). Springer-Verlag, Berlin, Heidelberg, 337-340. http://dl.acm.org/citation.cfm?id= 1792734. 1792766Google ScholarGoogle ScholarCross RefCross Ref
  9. John K Feser, Swarat Chaudhuri, and Isil Dillig. 2015. Synthesizing data structure transformations from input-output examples. ACM SIGPLAN Notices 50, 6 ( 2015 ), 229-239.Google ScholarGoogle Scholar
  10. Sumit Gulwani. 2011. Automating string processing in spreadsheets using input-output examples. ACM Sigplan Notices 46, 1 ( 2011 ), 317-330.Google ScholarGoogle Scholar
  11. Qinheping Hu, Jason Breck, John Cyphert, Loris D'Antoni, and Thomas Reps. 2019. Proving unrealizability for syntax-guided synthesis. In International Conference on Computer Aided Verification. Springer, 335-352.Google ScholarGoogle ScholarCross RefCross Ref
  12. 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. 1128-1142.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Qinheping Hu and Loris D'Antoni. 2018. Syntax-guided synthesis with quantitative syntactic objectives. In International Conference on Computer Aided Verification. Springer, 386-403.Google ScholarGoogle ScholarCross RefCross Ref
  14. S.C. Johnson. 1975. YACC: Yet Another Compiler-Compiler. Technical Report Comp. Sci. Tech. Rep. 32. Bell Laboratories.Google ScholarGoogle Scholar
  15. Jinwoo Kim, Qinheping Hu, Loris D'Antoni, and Thomas Reps. 2020. Semantics-Guided Synthesis. arXiv preprint arXiv: 2008. 09836 ( 2020 ).Google ScholarGoogle Scholar
  16. Anvesh Komuravelli, Arie Gurfinkel, and Sagar Chaki. 2016. SMT-based model checking for recursive programs. Formal Methods in System Design 48, 3 ( 2016 ), 175-205.Google ScholarGoogle Scholar
  17. N. Lavrač and S. Džeroski. 1994. Inductive Logic Programming: Techniques and Applications. Ellis Horwood.Google ScholarGoogle Scholar
  18. 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. 70-80.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Kenneth L McMillan and Andrey Rybalchenko. 2013. Solving constrained Horn clauses using interpolation. Tech. Rep. MSR-TR-2013-6 ( 2013 ).Google ScholarGoogle Scholar
  20. S. Muggleton. 1991. Inductive logic programming. New Generation Comp. 8, 4 ( 1991 ), 295-317.Google ScholarGoogle Scholar
  21. Rong Pan, Qinheping Hu, Gaowei Xu, and Loris D'Antoni. 2019. Automatic repair of regular expressions. Proceedings of the ACM on Programming Languages 3, OOPSLA ( 2019 ), 1-29.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Phitchaya Mangpo Phothilimthana, Archibald Samuel Elliott, An Wang, Abhinav Jangda, Bastian Hagedorn, Henrik Barthels, Samuel J Kaufman, Vinod Grover, Emina Torlak, and Rastislav Bodik. 2019. Swizzle inventor: data movement synthesis for GPU kernels. In Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems. 65-78.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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. 107-126.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. J.R. Quinlan. 1990. Learning logical definitions from Relations. Mach. Learn. 5 ( 1990 ), 239-266.Google ScholarGoogle Scholar
  25. Andrew Reynolds, Haniel Barbosa, Andres Nötzli, Clark Barrett, and Cesare Tinelli. 2019. CVC4SY for SyGuS-COMP 2019. arXiv preprint arXiv: 1907. 10175 ( 2019 ).Google ScholarGoogle Scholar
  26. Andrew Reynolds, Morgan Deters, Viktor Kuncak, Cesare Tinelli, and Clark Barrett. 2015. Counterexample-guided quantifier instantiation for synthesis in SMT. In International Conference on Computer Aided Verification. Springer, 198-216.Google ScholarGoogle ScholarCross RefCross Ref
  27. Sunbeom So and Hakjoo Oh. 2017. Synthesizing Imperative Programs from Examples Guided by Static Analysis. In Static Analysis-24th International Symposium, SAS 2017, New York, NY, USA, August 30-September 1, 2017, Proceedings. 364-381. https://doi.org/10.1007/978-3-319-66706-5_18 Google ScholarGoogle ScholarCross RefCross Ref
  28. Armando Solar-Lezama. 2013. Program sketching. STTT 15, 5-6 ( 2013 ), 475-495. https://doi.org/10.1007/s10009-012-0249-7 Saurabh Srivastava, Sumit Gulwani, and Jefrey S. Foster. 2010. From program verification to program synthesis. In Proceedings of the 37th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2010, Madrid, Spain, January 17-23, 2010. 313-326. https://doi.org/10.1145/1706299.1706337 Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Emina Torlak and Rastislav Bodík. 2014. A lightweight symbolic virtual machine for solver-aided host languages. In ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '14, Edinburgh, United Kingdom-June 09-11, 2014. 530-541. https://doi.org/10.1145/2594291.2594340 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Xinyu Wang, Greg Anderson, Isil Dillig, and Kenneth L McMillan. 2018a. Learning Abstractions for Program Synthesis. In International Conference on Computer Aided Verification. Springer, 407-426.Google ScholarGoogle Scholar
  31. Xinyu Wang, Isil Dillig, and Rishabh Singh. 2017. Program synthesis using abstraction refinement. Proceedings of the ACM on Programming Languages 2, POPL ( 2017 ), 1-30.Google ScholarGoogle Scholar
  32. Xinyu Wang, Isil Dillig, and Rishabh Singh. 2018b. Program Synthesis Using Abstraction Refinement. PACMPL 2, POPL ( 2018 ), 63 : 1-63 : 30.Google ScholarGoogle Scholar

Index Terms

  1. Semantics-guided 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!