LooPy: interactive program synthesis with control structures
Kasra Ferdowsifard, Shraddha Barke, Hila Peleg, Sorin Lerner, Nadia Polikarpova
Abstract
One vision for program synthesis, and specifically for programming by example (PBE), is an interactive programmer's assistant, integrated into the development environment. To make program synthesis practical for interactive use, prior work on Small-Step Live PBE has proposed to limit the scope of synthesis to small code snippets, and enable the users to provide local specifications for those snippets. This paradigm, however, does not work well in the presence of loops. We present LooPy, a synthesizer integrated into a live programming environment, which extends Small-Step Live PBE to work inside loops and scales it up to synthesize larger code snippets, while remaining fast enough for interactive use. To allow users to effectively provide examples at various loop iterations, even when the loop body is incomplete, LooPy makes use of live execution , a technique that leverages the programmer as an oracle to step over incomplete parts of the loop. To enable synthesis of loop bodies at interactive speeds, LooPy introduces Intermediate State Graph , a new data structure, which compactly represents a large space of code snippets composed of multiple assignment statements and conditionals. We evaluate LooPy empirically using benchmarks from competitive programming and previous synthesizers, and show that it can solve a wide variety of synthesis tasks at interactive speeds. We also perform a small qualitative user study which shows that LooPy's block-level specifications are easy for programmers to provide.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2583d0a7-df97-4a0e-bceb-08b9069c6e80Cited by top-tier papers9
- Grounded Copilot: How Programmers Interact with Code-Generating ModelsShraddha Barke, Michael B. James, Nadia PolikarpovaOOPSLA 2023 · 408 citations
- Exploring the Learnability of Program Synthesizers by Novice ProgrammersDhanya Jayagopal, Justin Lubin, Sarah E. ChasinsUIST 2022 · 40 citations
- WebRobot: web robotic process automation using interactive programming-by-demonstrationRui Dong, Zhicheng Huang, Ian Iong Lam, Yan Chen et al.PLDI 2022 · 24 citations
- LExecutor: Learning-Guided ExecutionBeatriz Souza, Michael PradelFSE 2023 · 16 citations
- Lorgnette: Creating Malleable Code ProjectionsCamille Gobert, Michel Beaudouin-LafonUIST 2023 · 13 citations
Builds on6
- Wrex: A Unified Programming-by-Example Interaction for Synthesizing Readable Code for Data ScientistsIan Drosos, Titus Barik, Philip J. Guo, Robert DeLine et al.CHI 2020 · 110 citations
- Projection Boxes: On-the-fly Reconfigurable Visualization for Live ProgrammingSorin LernerCHI 2020 · 52 citations
- Small-Step Live Programming by ExampleKasra Ferdowsifard, Allen Ordookhanians, Hila Peleg, Sorin Lerner et al.UIST 2020 · 40 citations
- Just-in-time learning for bottom-up enumerative synthesisShraddha Barke, Hila Peleg, Nadia PolikarpovaOOPSLA 2020 · 33 citations
- Digging for fold: synthesis-aided API discovery for HaskellMichael B. James, Zheng Guo, Ziteng Wang, Shivani Doshi et al.OOPSLA 2020 · 19 citations
Related papers
- Programming with a read-eval-synth loopHila Peleg, Roi Gabay, Shachar Itzhaky, Eran YahavOOPSLA 2020 · 15 citations
- Representing Partial Programs with Blended Abstract SemanticsMaxwell I. Nye, Yewen Pu, Matthew Bowers, Jacob Andreas et al.ICLR 2021 · 23 citations
- Focused Live Programming with Loop SeedsSorin LernerUIST 2020 · 6 citations
- Interactive Program Synthesis by Augmented ExamplesTianyi Zhang, London Lowmanstone, Xinyu Wang, Elena L. GlassmanUIST 2020 · 57 citations
- Semantics-guided synthesisJinwoo Kim, Qinheping Hu, Loris D'Antoni, Thomas W. RepsPOPL 2021 · 31 citations
