Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

Programming with a read-eval-synth loop

Published: 13 November 2020 Publication History

Abstract

A frequent programming pattern for small tasks, especially expressions, is to repeatedly evaluate the program on an input as its editing progresses. The Read-Eval-Print Loop (REPL) interaction model has been a successful model for this programming pattern. We present the new notion of Read-Eval-Synth Loop (RESL) that extends REPL by providing in-place synthesis on parts of the expression marked by the user. RESL eases programming by synthesizing parts of a required solution. The underlying synthesizer relies on a partial solution from the programmer and a few examples.
RESL hinges on bottom-up synthesis with general predicates and sketching, generalizing programming by example. To make RESL practical, we present a formal framework that extends observational equivalence to non-example specifications.
We evaluate RESL by conducting a controlled within-subjects user-study on 19 programmers from 8 companies, where programmers are asked to solve a small but challenging set of competitive programming problems. We find that programmers using RESL solve these problems with far less need to edit the code themselves and by browsing documentation far less. In addition, they are less likely to leave a task unfinished and more likely to be correct.

Supplementary Material

Auxiliary Presentation Video (oopsla20main-p125-p-video.mp4)
A frequent programming pattern for small tasks, especially expressions, is to repeatedly evaluate the program on an input as its editing progresses. The Read-Eval-Print Loop (REPL) interaction model has been a successful model for this programming pattern. We present the new notion of Read-Eval-Synth Loop (RESL) that extends REPL by providing in-place synthesis on parts of the expression marked by the user. RESL eases programmingby synthesizing parts of a required solution. The underlying synthesizer relies on a partial solution from theprogrammer and a few examples. RESL hinges on bottom-up synthesis with general predicates and sketching, generalizing programming by example. To make RESL practical, we present a formal framework that extends observational equivalence to non-example specifications.

Cited By

View all
  • (2024)Efficient Bottom-Up Synthesis for Programs with Local VariablesProceedings of the ACM on Programming Languages10.1145/36328948:POPL(1540-1568)Online publication date: 5-Jan-2024
  • (2024)Validating AI-Generated Code with Live ProgrammingProceedings of the 2024 CHI Conference on Human Factors in Computing Systems10.1145/3613904.3642495(1-8)Online publication date: 11-May-2024
  • (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 Proceedings of the ACM on Programming Languages
Proceedings of the ACM on Programming Languages  Volume 4, Issue OOPSLA
November 2020
3108 pages
EISSN:2475-1421
DOI:10.1145/3436718
Issue’s Table of Contents
This work is licensed under a Creative Commons Attribution-NoDerivatives International 4.0 License.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 13 November 2020
Published in PACMPL Volume 4, Issue OOPSLA

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. program synthesis
  2. read-eval-print loops
  3. specification predicates

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)253
  • Downloads (Last 6 weeks)47
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Efficient Bottom-Up Synthesis for Programs with Local VariablesProceedings of the ACM on Programming Languages10.1145/36328948:POPL(1540-1568)Online publication date: 5-Jan-2024
  • (2024)Validating AI-Generated Code with Live ProgrammingProceedings of the 2024 CHI Conference on Human Factors in Computing Systems10.1145/3613904.3642495(1-8)Online publication date: 11-May-2024
  • (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)Programming-by-Example with Nested Examples2023 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC)10.1109/VL-HCC57772.2023.00053(280-282)Online publication date: 3-Oct-2023
  • (2023)COLDECO: An End User Spreadsheet Inspection Tool for AI-Generated Code2023 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC)10.1109/VL-HCC57772.2023.00017(82-91)Online publication date: 3-Oct-2023
  • (2023)Program Synthesis Using Example PropagationPractical Aspects of Declarative Languages10.1007/978-3-031-24841-2_2(20-36)Online publication date: 8-Jan-2023
  • (2022)Synthesizing analytical SQL queries from computation demonstrationProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523712(168-182)Online publication date: 9-Jun-2022
  • (2022)An Integrative Human-Centered Architecture for Interactive Programming Assistants2022 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC)10.1109/VL/HCC53370.2022.9833110(1-5)Online publication date: 12-Sep-2022
  • (2021)LooPy: interactive program synthesis with control structuresProceedings of the ACM on Programming Languages10.1145/34855305:OOPSLA(1-29)Online publication date: 15-Oct-2021

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media