skip to main content
10.1145/3385412.3386025acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections

Question selection for interactive program synthesis

Published:11 June 2020Publication History

ABSTRACT

Interactive program synthesis aims to solve the ambiguity in specifications, and selecting the proper question to minimize the rounds of interactions is critical to the performance of interactive program synthesis. In this paper we address this question selection problem and propose two algorithms. SampleSy approximates a state-of-the-art strategy proposed for optimal decision tree and has a short response time to enable interaction. EpsSy further reduces the rounds of interactions by approximating SampleSy with a bounded error rate. To implement the two algorithms, we further propose VSampler, an approach to sampling programs from a probabilistic context-free grammar based on version space algebra. The evaluation shows the effectiveness of both algorithms.

References

  1. [n. d.]. Supplementary Material. https://github.com/jiry17/IntSy.Google ScholarGoogle Scholar
  2. Micah Adler and Brent Heeringa. 2008. Approximating optimal binary decision trees. In Approximation, Randomization and Combinatorial Optimization. Algorithms and Techniques. Springer, 1–9.Google ScholarGoogle Scholar
  3. Rajeev Alur, Rastislav Bodík, Garvit Juniwal, Milo M. K. Martin, Mukund Raghothaman, Sanjit A. Seshia, Rishabh Singh, Armando Solar-Lezama, Emina Torlak, and Abhishek Udupa. 2013.Google ScholarGoogle Scholar
  4. Syntaxguided synthesis. In Formal Methods in Computer-Aided Design, FMCAD 2013, Portland, OR, USA, October 20-23, 2013. 1–8.Google ScholarGoogle Scholar
  5. Rajeev Alur, Arjun Radhakrishna, and Abhishek Udupa. 2017. Scaling Enumerative Program Synthesis via Divide and Conquer. In Tools and Algorithms for the Construction and Analysis of Systems - 23rd International Conference, TACAS 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22-29, 2017, Proceedings, Part I. 319–336. 10.1007/978-3-662-54577-5_18 Google ScholarGoogle ScholarCross RefCross Ref
  6. Shaon Barman, Rastislav Bodík, Satish Chandra, Emina Torlak, Arka Aloke Bhattacharya, and David Culler. 2015. Toward tool support for interactive synthesis. In 2015 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, Onward! 2015, Pittsburgh, PA, USA, October 25-30, 2015. 121–136.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Nikolaj Bjørner and Anh-Dung Phan. 2014.Google ScholarGoogle Scholar
  8. ν Z - Maximal Satisfaction with Z3. In 6th International Symposium on Symbolic Computation in Software Science, SCSS 2014, Gammarth, La Marsa, Tunisia, December 7-8, 2014. 1–9. http://www.easychair.org/publications/paper/200953Google ScholarGoogle Scholar
  9. Nikolaj Bjørner, Anh-Dung Phan, and Lars Fleckenstein. 2015.Google ScholarGoogle Scholar
  10. ν Z - An Optimizing SMT Solver. In Tools and Algorithms for the Construction and Analysis of Systems - 21st International Conference, TACAS 2015, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015, London, UK, April 11-18, 2015. Proceedings. 194–199. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Nader H. Bshouty. 1995. Exact Learning Boolean Functions via the Monotone Theory. Electronic Colloquium on Computational Complexity (ECCC) 2, 8 (1995). http://eccc.hpi-web.de/eccc-reports/1995/TR95- 008/index.htmlGoogle ScholarGoogle Scholar
  12. Nader H. Bshouty, Richard Cleve, Ricard Gavaldà, Sampath Kannan, and Christino Tamon. 1996. Oracles and Queries That Are Sufficient for Exact Learning. J. Comput. Syst. Sci. 52, 3 (1996), 421–433. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Venkatesan T Chakaravarthy, Vinayaka Pandit, Sambuddha Roy, Pranjal Awasthi, and Mukesh Mohania. 2007.Google ScholarGoogle Scholar
  14. Venkatesan T Chakaravarthy, Vinayaka Pandit, Sambuddha Roy, and Yogish Sabharwal. 2009. Approximating decision trees with multiway branches. In International Colloquium on Automata, Languages, and Programming. Springer, 210–221.Google ScholarGoogle Scholar
  15. Sanjoy Dasgupta. 2004. Analysis of a greedy active learning strategy. In Advances in Neural Information Processing Systems 17 [Neural Information Processing Systems, NIPS 2004, December 13-18, 2004, Vancouver, British Columbia, Canada]. 337–344. http://papers.nips.cc/paper/2636analysis-of-a-greedy-active-learning-strategyGoogle ScholarGoogle Scholar
  16. Leonardo De Moura and Nikolaj Bjørner. 2008. Z3: An efficient SMT solver. In International conference on Tools and Algorithms for the Construction and Analysis of Systems. Springer, 337–340.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Yu Feng, Ruben Martins, Osbert Bastani, and Isil Dillig. 2018.Google ScholarGoogle Scholar
  18. Program synthesis using conflict-driven learning. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2018, Philadelphia, PA, USA, June 18-22, 2018.Google ScholarGoogle Scholar
  19. 420–435.Google ScholarGoogle Scholar
  20. Yu Feng, Ruben Martins, Jacob Van Geffen, Isil Dillig, and Swarat Chaudhuri. [n. d.]. Component-based synthesis of table consolidation and transformation tasks from examples. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Question Selection for Interactive Program Synthesis PLDI ’20, June 15–20, 2020, London, UK Implementation, PLDI 2017, Barcelona, Spain, June 18-23, 2017.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Joel Galenson, Philip Reames, Rastislav Bodik, Bjorn Hartmann, and Koushik Sen. 2014. CodeHint: dynamic and interactive synthesis of code snippets. In 36th International Conference on Software Engineering, ICSE ’14, Hyderabad, India - May 31 - June 07, 2014. 653–663.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Sumit Gulwani. 2011. Automating string processing in spreadsheets using input-output examples. In Proceedings of the 38th ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, POPL 2011, Austin, TX, USA, January 26-28, 2011. 317–330.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Sumit Gulwani and Prateek Jain. 2017. Programming by Examples: PL meets ML. In APLAS.Google ScholarGoogle Scholar
  24. 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 2011, San Jose, CA, USA, June 4-8, 2011. 62–73.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Sumit Gulwani, Oleksandr Polozov, and Rishabh Singh. 2017. Program Synthesis. Foundations and Trends in Programming Languages 4, 1-2 (2017), 1–119.Google ScholarGoogle ScholarCross RefCross Ref
  26. Anupam Gupta, Viswanath Nagarajan, and R Ravi. 2017. Approximation algorithms for optimal decision trees and adaptive TSP problems. Mathematics of Operations Research 42, 3 (2017), 876–896.Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Tihomir Gvero, Viktor Kuncak, and Ruzica Piskac. 2011. Interactive Synthesis of Code Snippets. In Computer Aided Verification - 23rd International Conference, CAV 2011, Snowbird, UT, USA, July 14-20, 2011. Proceedings. 418–423.Google ScholarGoogle Scholar
  28. Susmit Jha, Sumit Gulwani, Sanjit A. Seshia, and Ashish Tiwari. 2010.Google ScholarGoogle Scholar
  29. Oracle-guided component-based program synthesis. In Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 1, ICSE 2010, Cape Town, South Africa, 1-8 May 2010. 215–224.Google ScholarGoogle Scholar
  30. Susmit Jha and Sanjit A. Seshia. 2017. A theory of formal synthesis via inductive learning. Acta Inf. 54, 7 (2017), 693–726.Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Mark Johnson. 1998. PCFG Models of Linguistic Tree Representations. Computational Linguistics 24, 4 (1998), 613–632.Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Sean Kandel, Andreas Paepcke, Joseph M. Hellerstein, and Jeffrey Heer. 2011. Wrangler: interactive visual specification of data transformation scripts. In Proceedings of the International Conference on Human Factors in Computing Systems, CHI 2011, Vancouver, BC, Canada, May 7-12, 2011. 3363–3372.Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Daniel Larraz, Albert Oliveras, Enric Rodríguez-Carbonell, and Albert Rubio. 2014. Minimal-Model-Guided Approaches to Solving Polynomial Constraints and Extensions. In Theory and Applications of Satisfiability Testing - SAT 2014 - 17th International Conference, Held as Part of the Vienna Summer of Logic, VSL 2014, Vienna, Austria, July 14-17, 2014. Proceedings. 333–350. Google ScholarGoogle ScholarCross RefCross Ref
  34. Hyafil Laurent and Ronald L Rivest. 1976. Constructing optimal binary decision trees is NP-complete. Information processing letters 5, 1 (1976), 15–17.Google ScholarGoogle Scholar
  35. Vu Le and Sumit Gulwani. 2014. FlashExtract: a framework for data extraction by examples. In ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’14, Edinburgh, United Kingdom - June 09 - 11, 2014. 542–553.Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Vu Le, Daniel Perelman, Oleksandr Polozov, Mohammad Raza, Abhishek Udupa, and Sumit Gulwani. 2017. Interactive Program Synthesis. CoRR abs/1703.03539 (2017).Google ScholarGoogle Scholar
  37. Woosuk Lee, Kihong Heo, Rajeev Alur, and Mayur Naik. 2018. Accelerating search-based program synthesis using learned probabilistic models. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2018, Philadelphia, PA, USA, June 18-22, 2018. 436–449. 3192366.3192410 Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Alan Leung, John Sarracino, and Sorin Lerner. 2015. Interactive parser synthesis by example. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, Portland, OR, USA, June 15-17, 2015. 565–574.Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Yi Li, Aws Albarghouthi, Zachary Kincaid, Arie Gurfinkel, and Marsha Chechik. 2014. Symbolic optimization with SMT solvers. In The 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’14, San Diego, CA, USA, January 20-21, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Fan Long and Martin Rinard. 2016.Google ScholarGoogle Scholar
  41. Automatic patch generation by learning correct code. In Proceedings of the 43rd Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages. 298–312. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Ruben Martins, Jia Chen, Yanju Chen, Yu Feng, and Isil Dillig. 2019.Google ScholarGoogle Scholar
  43. Trinity: An Extensible Synthesis Framework for Data Science. PVLDB 12, 12 (2019), 1914–1917.Google ScholarGoogle Scholar
  44. Mikaël Mayer, Gustavo Soares, Maxim Grechkin, Vu Le, Mark Marron, Oleksandr Polozov, Rishabh Singh, Benjamin G. Zorn, and Sumit Gulwani. 2015. User Interaction Models for Disambiguation in Programming by Example. In UIST. ACM, 291–301.Google ScholarGoogle Scholar
  45. Sergey Mechtaev, Alberto Griggio, Alessandro Cimatti, and Abhik Roychoudhury. 2018. Symbolic execution with existential second-order constraints. In Proceedings of the 2018 ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/SIGSOFT FSE 2018, Lake Buena Vista, FL, USA, November 04-09, 2018. 389–399. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. 3236049Google ScholarGoogle Scholar
  47. Hong Mei and Lu Zhang. 2018.Google ScholarGoogle Scholar
  48. Can big data bring a breakthrough for software automation? Sci. China Inf. Sci. 61, 5 (2018), 056101:1– 056101:3. Google ScholarGoogle ScholarCross RefCross Ref
  49. Saswat Padhi, Prateek Jain, Daniel Perelman, Oleksandr Polozov, Sumit Gulwani, and Todd D. Millstein. 2018. FlashProfile: a framework for synthesizing data profiles. PACMPL 2, OOPSLA (2018), 150:1–150:28.Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Phitchaya Mangpo Phothilimthana, Aditya Thakur, Rastislav Bodík, and Dinakar Dhurjati. 2016.Google ScholarGoogle Scholar
  51. Scaling up Superoptimization. In Proceedings of the Twenty-First International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS ’16, Atlanta, GA, USA, April 2-6, 2016. 297–310. 2872362.2872387 Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Oleksandr Polozov and Sumit Gulwani. 2015.Google ScholarGoogle Scholar
  53. 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, part of SPLASH 2015, Pittsburgh, PA, USA, October 25-30, 2015. 107–126.Google ScholarGoogle Scholar
  54. Zichao Qi, Fan Long, Sara Achour, and Martin Rinard. 2015. An Analysis of Patch Plausibility and Correctness for Generate-and-validate Patch Generation Systems (ISSTA 2015). 24–36.Google ScholarGoogle Scholar
  55. Greg Schohn and David Cohn. 2000. Less is More: Active Learning with Support Vector Machines. In Proceedings of the Seventeenth International Conference on Machine Learning (ICML 2000), Stanford University, Stanford, CA, USA, June 29 - July 2, 2000. 839–846.Google ScholarGoogle Scholar
  56. Roberto Sebastiani and Patrick Trentin. 2015. OptiMathSAT: A Tool for Optimization Modulo Theories. In Computer Aided Verification - 27th International Conference, CAV 2015, San Francisco, CA, USA, July 18-24, 2015, Proceedings, Part I. 447–454. 3-319-21690-4_27 Google ScholarGoogle ScholarCross RefCross Ref
  57. Roberto Sebastiani and Patrick Trentin. 2015.Google ScholarGoogle Scholar
  58. Pushing the Envelope of Optimization Modulo Theories with Linear-Arithmetic Cost Functions. In Tools and Algorithms for the Construction and Analysis of Systems - 21st International Conference, TACAS 2015, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015, London, UK, April 11-18, 2015. Proceedings. 335–349. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. Armando Solar-Lezama, Rodric M. Rabbah, Rastislav Bodík, and Kemal Ebcioglu. 2005. Programming by sketching for bit-streaming programs. In Proceedings of the ACM SIGPLAN 2005 Conference on Programming Language Design and Implementation, Chicago, IL, USA, June 12-15, 2005. 281–294. PLDI ’20, June 15–20, 2020, London, UK Ruyi Ji, Jingjing Liang, Yingfei Xiong, Lu Zhang, and Zhenjiang HuGoogle ScholarGoogle ScholarDigital LibraryDigital Library
  60. Armando Solar-Lezama, Liviu Tancau, Rastislav BodÃŋk, Sanjit A. Seshia, and Vijay A. Saraswat. 2006. Combinatorial sketching for finite programs. ACM SIGOPS Operating Systems Review 40, 5 (2006), 404.Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Armando Solarlezama. 2008. Program synthesis by sketching. Dissertations & Theses - Gradworks (2008).Google ScholarGoogle Scholar
  62. Chenglong Wang, Alvin Cheung, and Rastislav Bodík. 2017. Interactive Query Synthesis from Input-Output Examples. In Proceedings of the 2017 ACM International Conference on Management of Data, SIGMOD Conference 2017, Chicago, IL, USA, May 14-19, 2017. 1631–1634.Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. Yuepeng Wang, Xinyu Wang, and Isil Dillig. 2018. Relational program synthesis. PACMPL 2, OOPSLA (2018), 155:1–155:27.Google ScholarGoogle Scholar
  64. Yingfei Xiong, Jie Wang, Runfa Yan, Jiachen Zhang, Shi Han, Gang Huang, and Lu Zhang. 2017. Precise Condition Synthesis for Program Repair. In Proceedings of the 39th International Conference on Software Engineering, ICSE 2017, Buenos Aires, Argentina, May 20-28, 2017.Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Question selection for interactive 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
    • Published in

      cover image ACM Conferences
      PLDI 2020: Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation
      June 2020
      1174 pages
      ISBN:9781450376136
      DOI:10.1145/3385412

      Copyright © 2020 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 11 June 2020

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate406of2,067submissions,20%

      Upcoming Conference

      PLDI '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader