Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3180155.3180189acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Programming not only by example

Published: 27 May 2018 Publication History

Abstract

Recent years have seen great progress in automated synthesis techniques that can automatically generate code based on some intent expressed by the programmer, but communicating this intent remains a major challenge. When the expressed intent is coarse-grained (for example, restriction on the expected type of an expression), the synthesizer often produces a long list of results for the programmer to choose from, shifting the heavy-lifting to the user. An alternative approach, successfully used in end-user synthesis, is programming by example (PBE), where the user leverages examples to interactively and iteratively refine the intent. However, using only examples is not expressive enough for programmers, who can observe the generated program and refine the intent by directly relating to parts of the generated program.
We present a novel approach to interacting with a synthesizer using a granular interaction model. Our approach employs a rich interaction model where (i) the synthesizer decorates a candidate program with debug information that assists in understanding the program and identifying good or bad parts, and (ii) the user is allowed to provide feedback not only on the expected output of a program but also on the program itself. After identifying a program as (partially) correct or incorrect, the user can also explicitly indicate the good or bad parts, to allow the synthesizer to accept or discard parts of the program instead of discarding the program as a whole.
We show the value of our approach in a controlled user study. Our study shows that participants have a strong preference for granular feedback instead of examples and can provide granular feedback much faster.

References

[1]
Aws Albarghouthi, Sumit Gulwani, and Zachary Kincaid. 2013. Recursive program synthesis. In International Conference on Computer Aided Verification. Springer, 934--950.
[2]
Rajeev Alur, Rastislav Bodik, Garvit Juniwal, Milo MK Martin, Mukund Raghothaman, Sanjit A Seshia, Rishabh Singh, Armando Solar-Lezama, Em-ina Torlak, and Abhishek Udupa. 2015. Syntax-guided synthesis. Dependable Software Systems Engineering 40 (2015), 1--25.
[3]
Rajeev Alur, Dana Fisman, Rishabh Singh, and Armando Solar-Lezama. 2016. SyGuS-Comp 2016: Results and Analysis. arXiv preprint arXiv:1611.07627 (2016).
[4]
Rajeev Alur, Arjun Radhakrishna, and Abhishek Udupa. 2017. Scaling Enumer-ative Program Synthesis via Divide and Conquer. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems. Springer, 319--336.
[5]
Tobias Anton. 2005. XPath-Wrapper Induction by generalizing tree traversal patterns. In Lernen, Wissensentdeckung und Adaptivitt (LWA) 2005, GI Workshops, Saarbrcken. 126--133.
[6]
Shaon Barman, Rastislav Bodik, Satish Chandra, Emina Torlak, Arka Bhat-tacharya, 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!). ACM, 121--136.
[7]
L. Blaine, L. Gilham, J. Liu, D. Smith, and S. Westfold. 1998. Planware - Domain-Specific Synthesis of High-Performance Schedulers. In Proceedings of the 13th IEEE International Conference on Automated Software Engineering (ASE '98). IEEE Computer Society, Washington, DC, USA, 270--. http://dl.acm.org/citation.cfm?id=521138.786844
[8]
Rastislav Bodik, Satish Chandra, Joel Galenson, Doug Kimelman, Nicholas Tung, Shaon Barman, and Casey Rodarmor. 2010. Programming with angelic nondeter-minism. In ACM Sigplan Notices, Vol. 45. ACM, 339--352.
[9]
Rezaul Chowdhury, Pramod Ganapathi, Jesmin Jahan Tithi, Charles Bachmeier, Bradley C. Kuszmaul, Charles E. Leiserson, Armando Solar-Lezama, and Yuan Tang. 2016. AUTOGEN: Automatic Discovery of Cache-oblivious Parallel Recursive Algorithms for Solving Dynamic Programs. In Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP '16). ACM, New York, NY, USA, Article 10, 12 pages.
[10]
Yu Feng, Ruben Martins, Yuepeng Wang, Isil Dillig, and Thomas Reps. 2017. Component-Based Synthesis for Complex APIs. In Proceedings of the 44th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2017.
[11]
John K Feser, Swarat Chaudhuri, and Isil Dillig. 2015. Synthesizing data structure transformations from input-output examples. In ACM SIGPLAN Notices, Vol. 50. ACM, 229--239.
[12]
Joel Galenson, Philip Reames, Rastislav Bodik, Björn Hartmann, and Koushik Sen. 2014. Codehint: Dynamic and interactive synthesis of code snippets. In Proceedings of the 36th International Conference on Software Engineering. ACM, 653--663.
[13]
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). ACM, New York, NY, USA, 317--330.
[14]
Sumit Gulwani. 2012. Synthesis from examples: Interaction models and algorithms. In Symbolic and Numeric Algorithms for Scientific Computing (SYNASC), 2012 14th International Symposium on. IEEE, 8--14.
[15]
Tihomir Gvero, Viktor Kuncak, Ivan Kuraj, and Ruzica Piskac. 2013. Complete completion using types and weights. In ACM SIGPLAN Notices, Vol. 48. ACM, 27--38.
[16]
Daqing Hou and David M Pletcher. 2011. An evaluation of the strategies of sorting, filtering, and grouping api methods for code completion. In Software Maintenance (ICSM), 2011 27th IEEE International Conference on. IEEE, 233--242.
[17]
Shachar Itzhaki, Rohit Singh, Armando Solar-Lezama, Kuat Yessenov, Yongquan Lu, Charles Leiserson, and Rezaul Chowdhury. 2016. Deriving Divide-and-Conquer Dynamic Programming Algorithms using Solver-Aided Transformations. In international conference companion on Object oriented programming systems languages and applications. To appear.
[18]
Shachar Itzhaky, Sumit Gulwani, Neil Immerman, and Mooly Sagiv. 2010. A Simple Inductive Synthesis Methodology and Its Applications. SIGPLAN Not. 45, 10 (Oct. 2010), 36--46.
[19]
Shachar Itzhaky, Rohit Singh, Armando Solar-Lezama, Kuat Yessenov, Yongquan Lu, Charles Leiserson, and Rezaul Chowdhury. 2016. Deriving divide-and-conquer dynamic programming algorithms using solver-aided transformations. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM, 145--164.
[20]
Jürgen Landauer and Masahito Hirakawa. 1995. Visual AWK: A Model for Text Processing by Demonstration. In vl. 267--274.
[21]
Tessa Lau, Steven A Wolfman, Pedro Domingos, and Daniel S Weld. 2001. Learning repetitive text-editing procedures with SMARTedit. Your Wish Is My Command: Giving Users the Power to Instruct Their Software (2001), 209--226.
[22]
Vu Le and Sumit Gulwani. 2014. FlashExtract: a framework for data extraction by examples. In Proceedings of the 35th Conference on Programming Language Design and Implementation, Michael F. P. O'Boyle and Keshav Pingali (Eds.). ACM, 55.
[23]
Feng Liu, Nayden Nedev, Nedyalko Prisadnikov, Martin Vechev, and Eran Yahav. 2012. Dynamic synthesis for relaxed memory models. ACM SIGPLAN Notices 47, 6 (2012), 429--440.
[24]
Adi Omari, Sharon Shoham, and Eran Yahav. 2016. Cross-supervised synthesis of web-crawlers. In Proceedings of the 38th International Conference on Software Engineering, ICSE 2016, Austin, TX, USA, May 14--22, 2016. 368--379.
[25]
Peter-Michael Osera and Steve Zdancewic. 2015. Type-and-example-directed program synthesis. In ACM SIGPLAN Notices, Vol. 50. ACM, 619--630.
[26]
Robert Paige. 1990. Symbolic finite differencing-part I. In European Symposium on Programming. Springer, 36--56.
[27]
Daniel Perelman, Sumit Gulwani, Thomas Ball, and Dan Grossman. 2012. Type-directed completion of partial expressions. In ACM SIGPLAN Notices, Vol. 47. ACM, 275--286.
[28]
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. ACM, 522--538.
[29]
Oleksandr Polozov and Sumit Gulwani. 2015. Flashmeta: A framework for inductive program synthesis. ACM SIGPLAN Notices 50, 10 (2015), 107--126.
[30]
Veselin Raychev, Martin Vechev, and Eran Yahav. 2014. Code completion with statistical language models. In ACM SIGPLAN Notices, Vol. 49. ACM, 419--428.
[31]
Calvin Smith and Aws Albarghouthi. 2016. MapReduce program synthesis. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 326--340.
[32]
Armando Solar-Lezama. 2008. Program synthesis by sketching. ProQuest.
[33]
Armando Solar-Lezama, Christopher Grant Jones, and Rastislav Bodik. 2008. Sketching concurrent data structures. In ACM SIGPLAN Notices, Vol. 43. ACM, 136--148.
[34]
Armando Solar-Lezama, Liviu Tancau, Rastislav Bodik, Sanjit Seshia, and Vijay Saraswat. 2006. Combinatorial sketching for finite programs. ACM SIGOPS Operating Systems Review 40, 5 (2006), 404--415.
[35]
Abhishek Udupa, Arun Raghavan, Jyotirmoy V Deshmukh, Sela Mador-Haim, Milo MK Martin, and Rajeev Alur. 2013. TRANSIT: specifying protocols with concolic snippets. ACM SIGPLAN Notices 48, 6 (2013), 287--296.
[36]
Martin Vechev, Eran Yahav, and Greta Yorsh. 2010. Abstraction-Guided Synthesis of Synchronization. In <b>POPL'10:</b> 37th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages. 327--338.
[37]
Martin T Vechev, Eran Yahav, and David F Bacon. 2006. Correctness-preserving derivation of concurrent garbage collection algorithms. In ACM SIGPLAN Notices, Vol. 41. ACM, 341--353.
[38]
Martin T Vechev, Eran Yahav, David F Bacon, and Noam Rinetzky. 2007. CGC-Explorer: a semi-automated search procedure for provably correct concurrent collectors. In ACM SIGPLAN Notices, Vol. 42. ACM, 456--467.
[39]
Chenglong Wang, Alvin Cheung, and Rastislav Bodik. 2017. Synthesizing highly expressive SQL queries from input-output examples. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 452--466.
[40]
Ian H Witten and Dan Mo. 1993. TELS: Learning text editing tasks from examples. In Watch what I do. MIT Press, 183--203.
[41]
Shanchan Wu, Jerry Liu, and Jian Fan. 2015. Automatic Web Content Extraction by Combination of Learning and Grouping. In Proceedings of the 24th International Conference on World Wide Web. ACM, 1264--1274.

Cited By

View all
  • (2024)Assessing Live Programming for Program ComprehensionProceedings of the 2024 on Innovation and Technology in Computer Science Education V. 110.1145/3649217.3653547(520-526)Online publication date: 3-Jul-2024
  • (2023)Explainable Program Synthesis by Localizing SpecificationsProceedings of the ACM on Programming Languages10.1145/36228747:OOPSLA2(2171-2195)Online publication date: 16-Oct-2023
  • (2023)Grounded Copilot: How Programmers Interact with Code-Generating ModelsProceedings of the ACM on Programming Languages10.1145/35860307:OOPSLA1(85-111)Online publication date: 6-Apr-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE '18: Proceedings of the 40th International Conference on Software Engineering
May 2018
1307 pages
ISBN:9781450356381
DOI:10.1145/3180155
  • Conference Chair:
  • Michel Chaudron,
  • General Chair:
  • Ivica Crnkovic,
  • Program Chairs:
  • Marsha Chechik,
  • Mark Harman
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].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 27 May 2018

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article

Funding Sources

  • European Union

Conference

ICSE '18
Sponsor:

Acceptance Rates

Overall Acceptance Rate 276 of 1,856 submissions, 15%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)25
  • Downloads (Last 6 weeks)0
Reflects downloads up to 04 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Assessing Live Programming for Program ComprehensionProceedings of the 2024 on Innovation and Technology in Computer Science Education V. 110.1145/3649217.3653547(520-526)Online publication date: 3-Jul-2024
  • (2023)Explainable Program Synthesis by Localizing SpecificationsProceedings of the ACM on Programming Languages10.1145/36228747:OOPSLA2(2171-2195)Online publication date: 16-Oct-2023
  • (2023)Grounded Copilot: How Programmers Interact with Code-Generating ModelsProceedings of the ACM on Programming Languages10.1145/35860307:OOPSLA1(85-111)Online publication date: 6-Apr-2023
  • (2023)Comparative Synthesis: Learning Near-Optimal Network Designs by QueryProceedings of the ACM on Programming Languages10.1145/35711977:POPL(91-120)Online publication date: 11-Jan-2023
  • (2023)Everybody’s Got ML, Tell Me What Else You Have: Practitioners’ Perception of ML-Based Security Tools and Explanations2023 IEEE Symposium on Security and Privacy (SP)10.1109/SP46215.2023.10179321(2068-2085)Online publication date: May-2023
  • (2023)Using Reactive Synthesis: An End-to-End Exploratory Case StudyProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00071(742-754)Online publication date: 14-May-2023
  • (2022)Exploring the Learnability of Program Synthesizers by Novice ProgrammersProceedings of the 35th Annual ACM Symposium on User Interface Software and Technology10.1145/3526113.3545659(1-15)Online publication date: 29-Oct-2022
  • (2022)INTENT: Interactive Tensor Transformation SynthesisProceedings of the 35th Annual ACM Symposium on User Interface Software and Technology10.1145/3526113.3545653(1-16)Online publication date: 29-Oct-2022
  • (2022)Expectation vs. Experience: Evaluating the Usability of Code Generation Tools Powered by Large Language ModelsExtended Abstracts of the 2022 CHI Conference on Human Factors in Computing Systems10.1145/3491101.3519665(1-7)Online publication date: 27-Apr-2022
  • (2021)Gauss: program synthesis by reasoning over graphsProceedings of the ACM on Programming Languages10.1145/34855115:OOPSLA(1-29)Online publication date: 15-Oct-2021
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media