Conference paper Open Access

Programming with a Read-Eval-Synth Loop

Peleg, Hila; Gabay, Roi; Itzhaky, Shachar; Yahav, Eran

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 show the value of 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.

 

Files (5.7 GB)
Name Size
LICENSE
md5:75dfb51ec10fb442753011c2b54a5977
4.1 kB Download
README.md
md5:04aa611d440d404fd81d6f6fdb4be5c7
7.2 kB Download
RESL.zip
md5:71f2427f2da4ee610e4ed31b02fb2f67
5.7 GB Download
108
15
views
downloads
All versions This version
Views 108108
Downloads 1515
Data volume 34.1 GB34.1 GB
Unique views 103103
Unique downloads 1414

Share

Cite as