Programming-by-Example with Nested Examples

Tomer Katz, Hila Peleg

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

As program synthesizers become integrated into IDEs, programmers combine synthesized code and manually-written code within the same project. When documenting the provenance of synthesized code, this can result in a larger segment of example-specified code encompassing a smaller one. In this state, the programmer can decide to re-run the synthesizer, either to refactor the code or to automatically correct manually-written code. State of the art Programming by Example synthesizers cannot handle this nested specification: synthesis will only consider the outer-most block, discarding any code or additional specification inside. Moreover, the outer-most scope contains less specifications, but describes more functionality, which can easily result in the synthesizer either timing out or overfitting. To address this information loss we propose a technique that can be used to re-synthesize code from previously documented nested specifications, preserving the information that the internal specifications contain. We then evaluated our implementation on 12 benchmarks based on SyGus competition benchmarks, and show that the technique allows the user to re-synthesize larger code segments while adding fewer examples compared to just using the specification from the outer-most block.

Original languageEnglish
Title of host publicationProceedings - 2023 IEEE Symposium on Visual Languages and Human-Centric Computing, VL/HCC 2023
Pages280-282
Number of pages3
ISBN (Electronic)9798350329469
DOIs
StatePublished - 2023
Event2023 IEEE Symposium on Visual Languages and Human-Centric Computing, VL/HCC 2023 - Washington, United States
Duration: 2 Oct 20236 Oct 2023

Publication series

NameProceedings of IEEE Symposium on Visual Languages and Human-Centric Computing, VL/HCC

Conference

Conference2023 IEEE Symposium on Visual Languages and Human-Centric Computing, VL/HCC 2023
Country/TerritoryUnited States
CityWashington
Period2/10/236/10/23

All Science Journal Classification (ASJC) codes

  • Computational Theory and Mathematics
  • Human-Computer Interaction
  • Software

Fingerprint

Dive into the research topics of 'Programming-by-Example with Nested Examples'. Together they form a unique fingerprint.

Cite this