Synthesizing data structure transformations from input-output examples
The DOI matches its Crossref record; 36 of the 36 references it cites were found in a registry or an index.
Abstract
We present a method for example-guided synthesis of functional programs over recursive data structures. Given a set of input-output examples, our method synthesizes a program in a functional language with higher-order combinators like map and fold. The synthesized program is guaranteed to be the simplest program in the language to fit the examples. Our approach combines three technical ideas: inductive generalization, deduction, and enumerative search. First, we generalize the input-output examples into hypotheses about the structure of the target program. For each hypothesis, we use deduction to infer new input/output examples for the missing subexpressions. This leads to a new subproblem where the goal is to synthesize expressions within each hypothesis. Since not every hypothesis can be realized into a program that fits the examples, we use a combination of best-first enumeration and deduction to search for a hypothesis that meets our needs. We have implemented our method in a tool called λ2, and we evaluate this tool on a large set of synthesis problems involving lists, trees, and nested data structures. The experiments demonstrate the scalability and broad scope of λ2. A highlight is the synthesis of a program believed to be the world's earliest functional pearl.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Alur, R., Bodik, R., Juniwal, G., Martin, M. M. K., Raghothaman, M., Seshia, S. A., Singh, R., Solar-Lezama, A., Torlak, E., & Udupa, A. (2013) · 2013 Formal Methods in Computer-Aided Design · doi:10.1109/fmcad.2013.6679385 · Cited by 656
Combinatorial sketching for finite programs
Solar-Lezama, A., Tancau, L., Bodik, R., Seshia, S., & Saraswat, V. (2006) · Proceedings of the 12th international conference on Architectural support for programming languages and operating systems · doi:10.1145/1168857.1168907 · Cited by 635
Automating string processing in spreadsheets using input-output examples
Gulwani, S. (2011) · ACM SIGPLAN Notices · doi:10.1145/1925844.1926423 · Cited by 581
Your wish is my command: programming by example
(2001) · Choice Reviews Online · doi:10.5860/choice.39-0357 · Cited by 491
Automating string processing in spreadsheets using input-output examples
Gulwani, S. (2011) · Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages · doi:10.1145/1926385.1926423 · Cited by 446 · cited 3×
“Existing synthesis techniques that require only input-output examples are often restricted to programs over basic data types like numbers [29], strings [11], and tables [13], as opposed to recursive data structures.”
BackgroundJungloid mining: helping to navigate the API jungle
Mandelin, D., Xu, L., Bodík, R., & Kimelman, D. (2005) · ACM SIGPLAN Notices · doi:10.1145/1064978.1065018 · Cited by 388
Jungloid mining: helping to navigate the API jungle
Mandelin, D., Xu, L., Bodík, R., & Kimelman, D. (2005) · Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation · doi:10.1145/1065010.1065018 · Cited by 261
Dimensions in program synthesis
Gulwani, S. (2010) · Proceedings of the 12th international ACM SIGPLAN symposium on Principles and practice of declarative programming · doi:10.1145/1836089.1836091 · Cited by 238
Synthesis of loop-free programs
Gulwani, S., Jha, S., Tiwari, A., & Venkatesan, R. (2011) · ACM SIGPLAN Notices · doi:10.1145/1993316.1993506 · Cited by 237
FlashExtract: a framework for data extraction by examples
Le, V., & Gulwani, S. (2014) · Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/2594291.2594333 · Cited by 209 · cited 1×
“Also, Le and Gulwani [21] present a synthesis framework for DSLs called FlashExtract where programs are made from combinators such as map and filter.”
Research works printed but not linked: 7
- 10.5555/2958031.2958069 · doi:10.5555/2958031.2958069
- 10.1016/B978-0-08-011356-2.50006-9 · doi:10.1016/b978-0-08-011356-2.50006-9
- 10.1145/1291151.1291161 · doi:10.1145/1291151.1291161
- 10.5555/1998496.1998498 · doi:10.5555/1998496.1998498
- Lavrac N., WLP, 160
- Lieberman H., 2001, Morgan Kaufmann
- Menon A., 2013, ICML, 195
Cited by
Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language models
Srivastava, A., Rastogi, A., Rao, A., Shoeb, A. A. M., Abid, A., Fisch, A., Brown, A. R., Santoro, A., Gupta, A., Garriga-Alonso, A., et al. (2022) · arXiv · doi:10.48550/arxiv.2206.04615 · Cited by 569
CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation
Lu, S., Guo, D., Ren, S., Huang, J., Svyatkovskiy, A., Blanco, A., Clement, C., Drain, D., Jiang, D., Tang, D., et al. (2021) · arXiv · doi:10.48550/arxiv.2102.04664 · Cited by 536
Learning Explanatory Rules from Noisy Data
Evans, R., & Grefenstette, E. (2018) · Journal of Artificial Intelligence Research · doi:10.1613/jair.5714 · Cited by 426
SQLizer: query synthesis from natural language
Yaghmazadeh, N., Wang, Y., Dillig, I., & Dillig, T. (2017) · Proceedings of the ACM on Programming Languages · doi:10.1145/3133887 · Cited by 279
Self-citationFlashMeta: a framework for inductive program synthesis
Polozov, O., & Gulwani, S. (2015) · Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications · doi:10.1145/2814270.2814310 · Cited by 225
In-IDE Code Generation from Natural Language: Promise and Challenges
Xu, F. F., Vasilescu, B., & Neubig, G. (2021) · arXiv · doi:10.48550/arxiv.2101.11149 · Cited by 153
In-IDE Code Generation from Natural Language: Promise and Challenges
Xu, F. F., Vasilescu, B., & Neubig, G. (2022) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3487569 · Cited by 154
“Besides visual no-code or low-code programming interfaces, there has also been much progress on program synthesis [11, 28, 30, 105], which uses input-output examples, logic sketches, etc.”
BackgroundProgram synthesis using conflict-driven learning
Feng, Y., Martins, R., Bastani, O., & Dillig, I. (2018) · Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/3192366.3192382 · Cited by 111
“An alternative approach is to formulate synthesis as a search –rather than constraint-solving– problem and use logical specifications to prune the search space [8, 10, 23].”
BackgroundMethodInfluentialSelf-citationDreamCoder: bootstrapping inductive program synthesis with wake-sleep library learning
Ellis, K., Wong, C., Nye, M., Sablé-Meyer, M., Morales, L., Hewitt, L., Cary, L., Solar-Lezama, A., & Tenenbaum, J. B. (2021) · Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation · doi:10.1145/3453483.3454080 · Cited by 103
“We compare with two other baselines: Neural Program Synthesis, which trains RobustFill [13] on samples from the initial library; and Enumeration, which performs type-directed enumeration [17] for 24 hours per task, generating up to 400 million programs for each task.”
ResultSPoC: Search-based Pseudocode to Code
Kulal, S., Pasupat, P., Chandra, K., Lee, M., Padon, O., Aiken, A., & Liang, P. (2019) · arXiv · doi:10.48550/arxiv.1906.04908 · Cited by 103
“In contrast, program synthesis in the programming languages community emphasizes producing programs with the correct semantics, typically captured by a set of input-output test cases that the program must compute correctly [11, 10].”
BackgroundLearning programs by learning from failures
Cropper, A., & Morel, R. (2021) · Machine Learning · doi:10.1007/s10994-020-05934-z · Cited by 169
“Indeed, PL approaches rarely evaluate the ability of their systems to synthesise solutions that generalise, i.e. they do not measure predictive accuracy (Feser et al. 2015; Polikarpova et al. 2016; Albarghouthi et al. 2017; Feng et al. 2018; Raghothaman et al. 2020).”
BackgroundInductive Logic Programming At 30: A New Introduction
Cropper, A., & Dumančić, S. (2022) · Journal of Artificial Intelligence Research · doi:10.1613/jair.1.13507 · Cited by 186
“they do not measure predictive accuracy (Feser et al., 2015; Osera & Zdancewic, 2015; Albarghouthi et al., 2017).”
BackgroundSmith, C., & Albarghouthi, A. (2016) · Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/2908080.2908102 · Cited by 76
Top-Down Synthesis for Library Learning
Bowers, M., Olausson, T. X., Wong, L., Grand, G., Tenenbaum, J. B., Ellis, K., & Solar-Lezama, A. (2023) · Proceedings of the ACM on Programming Languages · doi:10.1145/3571234 · Cited by 33
“…construct program syntax trees by iteratively refining partially-completed programs that have unfinished holes , until a complete program that meets the specification is produced [Balog et al. 2016; Ellis et al. 2021; Feser et al. 2015; Nye et al. 2021; Polikarpova et al. 2016; Shah et al. 2020].”
InfluentialWang, Y., Wang, X., & Dillig, I. (2018) · Proceedings of the ACM on Programming Languages · doi:10.1145/3276525 · Cited by 17
“…from inputoutput examples using techniques such as constraint solving [So and Oh 2017; Solar-Lezama 2009], enumerative search [Alur et al. 2017; Feser et al. 2015], version space learning [Polozov and Gulwani 2015], stochastic search [Heule et al. 2016; Schkufza et al. 2013], and statistical…”
MethodSelf-citationLearning higher-order logic programs
Cropper, A., Morel, R., & Muggleton, S. (2020) · Machine Learning · doi:10.1007/s10994-019-05862-7 · Cited by 53
“The L2 system (Feser et al. 2015) synthesises recursive functional algorithms.”
MethodAutomatic synthesis of parallel unix commands and pipelines with KumQuat
Shen, J., Rinard, M., & Vasilakis, N. (2022) · Proceedings of the 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming · doi:10.1145/3503221.3508400 · Cited by 11
Is Programming by Example solved by LLMs?
Li, W.-D., & Ellis, K. (2024) · arXiv · doi:10.48550/arxiv.2406.08316 · Cited by 4
Metadata
- Authors
- Feser, J. K., Chaudhuri, S., & Dillig, I.
- Venue
- Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation
- Publisher
- ACM
- Published
- 2015-06-03
- Pages
- 229-239
- ISSN
- 1531-7102 (ISSN-L)
- OpenAlex
- W2093535699
- Cited by
- 251
- References
- 36
- FWCI
- 18.37
- Type
- conference paper
- Language
- en
- Open access
- closed
- Funders
- National Science Foundation (1162076)
- Defense Advanced Research Projects Agency (FA8750-14-2-0270)
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.