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.”
Rajeev, A., Rastislav, B., Eric, D., Dana, F., Pranav, G., Garvit, J., Hadas, K.-G., Madhusudan, P., Martin Milo, M. K., Mukund, R., et al. (2015) · NATO Science for Peace and Security Series - D: Information and Communication Security · doi:10.3233/978-1-61499-495-4-1 · Cited by 200
Albarghouthi, A., Gulwani, S., & Kincaid, Z. (2013) · Lecture notes in computer science · doi:10.1007/978-3-642-39799-8_67 · Cited by 199 · cited 7×
“map f∗ x and the example [1, 2] 7→ [3, 4].”
BackgroundInfluentialBetter Quality in Synthesis through Quantitative Objectives
Bloem, R., Chatterjee, K., Henzinger, T. A., & Jobstmann, B. (2009) · Lecture Notes in Computer Science · doi:10.1007/978-3-642-02658-4_14 · Cited by 197 · cited 3×
“dropmins [[1,3,5],[5, 3, 2]] = [3, 5], [5, 3].”
A Machine Learning Framework for Programming by Example
Menon, A. K., Tamuz, O., Gulwani, S., Lampson, B., & Kalai, A. T. (2013) · International Conference on Machine Learning · Cited by 188
ICE: A Robust Framework for Learning Invariants
Garg, P., Löding, C., Madhusudan, P., & Neider, D. (2014) · Lecture Notes in Computer Science · doi:10.1007/978-3-319-08867-9_5 · Cited by 186 · cited 2×
“Several recent papers [9, 28] have studied the synthesis of program proofs from tests (which can be viewed as examples).”
BackgroundA Data Driven Approach for Algebraic Loop Invariants
Sharma, R., Gupta, S., Hariharan, B., Aiken, A., Liang, P., & Nori, A. V. (2013) · Lecture notes in computer science · doi:10.1007/978-3-642-37036-6_31 · Cited by 170 · cited 1×
“Several recent papers [9, 28] have studied the synthesis of program proofs from tests (which can be viewed as examples).”
BackgroundInductive functional programming using incremental program transformation
Olsson, R. (1995) · Artificial Intelligence · doi:10.1016/0004-3702(94)00042-y · Cited by 164
Spreadsheet table transformations from examples
Harris, W. R., & Gulwani, S. (2011) · ACM SIGPLAN Notices · doi:10.1145/1993316.1993536 · Cited by 158
Kunčak, V., Mayer, M., Piskač, R., & Suter, P. (2010) · ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) · doi:10.1145/1806596.1806632 · Cited by 151 · cited 2×
“Some others [19] do not need a template, but require a full logical specification of the target program.”
BackgroundSpreadsheet table transformations from examples
Harris, W. R., & Gulwani, S. (2011) · ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) · doi:10.1145/1993498.1993536 · Cited by 146 · cited 1×
“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.”
BackgroundComplete completion using types and weights
Gvero, T., Kuncak, V., Kuraj, I., & Piskac, R. (2013) · Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/2491956.2462192 · Cited by 131 · cited 2×
“In particular, several recent papers use type-guided search to auto-complete program expressions involving complex API calls [12, 23, 26].”
BackgroundMethodTemplate-based program verification and program synthesis
Srivastava, S., Gulwani, S., & Foster, J. S. (2012) · International Journal on Software Tools for Technology Transfer · doi:10.1007/s10009-012-0223-4 · Cited by 128 · cited 1×
“Many of these efforts [4, 30, 31] assume a programmer-provided “template” of the target program.”
BackgroundInductive Programming: A Survey of Program Synthesis Techniques
Kitzelmann, E. (2010) · Lecture notes in computer science · doi:10.1007/978-3-642-11931-6_3 · Cited by 128 · cited 1×
“Specifically, we build on the tradition of inductive programming [15, 18, 20], where the goal is to synthesize functional or logic programs from examples.”
Synthesizing Number Transformations from Input-Output Examples
Singh, R., & Gulwani, S. (2012) · Lecture notes in computer science · doi:10.1007/978-3-642-31424-7_44 · Cited by 121
Type-directed completion of partial expressions
Perelman, D., Gulwani, S., Ball, T., & Grossman, D. (2012) · ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) · doi:10.1145/2254064.2254098 · Cited by 120 · cited 1×
“In particular, several recent papers use type-guided search to auto-complete program expressions involving complex API calls [12, 23, 26].”
BackgroundSynthesizing geometry constructions
Gulwani, S., Korthikanti, V. A., & Tiwari, A. (2011) · ACM SIGPLAN Notices · doi:10.1145/1993316.1993505 · Cited by 107
Inductive Synthesis of Functional Programs: An Explanation Based Generalization Approach
Kitzelmann, E., & Schmid, U. (2006) · Journal of Machine Learning Research · doi:10.5555/1248547.1248562 · Cited by 106
A constraint-based approach to solving games on infinite graphs
Beyene, T. A., Chaudhuri, S., Popeea, C., & Rybalchenko, A. (2014) · ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL) · doi:10.1145/2535838.2535860 · Cited by 79 · cited 4×
“Consider the input-output examples [1, 2] 7→ [2, 3] and [2, 4] 7→ [3, 5] and the hypothesis λx.”
BackgroundInfluentialSelf-citationPerelman, D., Gulwani, S., Grossman, D., & Provost, P. (2014) · Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/2594291.2594297 · Cited by 70 · cited 2×
“[27] give a generic method called Test-Driven Synthesis (TDS) for constructing program synthesizers for user-defined domain-specific languages (DSLs).”
BackgroundMethodBridging boolean and quantitative synthesis using smoothed proof search
Chaudhuri, S., Clochard, M., & Solar-Lezama, A. (2014) · ACM SIGPLAN Notices · doi:10.1145/2535838.2535859 · Cited by 50 · cited 3×
“We assume the standard definition of free variables.”
BackgroundInfluentialSelf-citationAnalytical Inductive Functional Programming
Kitzelmann, E. (2009) · Lecture notes in computer science · doi:10.1007/978-3-642-00515-2_7 · Cited by 38 · cited 2×
“Example-guided synthesis has a long history in the artificial intelligence community [16, 22, 24].”
BackgroundKatayama, S. (2008) · Lecture notes in computer science · doi:10.1007/978-3-540-89197-0_21 · Cited by 35 · cited 1×
“Work here falls in two categories: those that inductively generalize examples into functions or relations [18], and those that search for implementations that fit the examples [14, 25].”
BackgroundA Combined Analytical and Search-Based Approach for the Inductive Synthesis of Functional Programs
Kitzelmann, E. (2010) · Künstliche Intell. · doi:10.1007/s13218-010-0071-x · Cited by 24
Optimal Guard Synthesis for Memory Safety
Dillig, T., Dillig, I., & Chaudhuri, S. (2014) · Lecture notes in computer science · doi:10.1007/978-3-319-08867-9_32 · Cited by 20 · cited 3×
“Consider the examples [1, 2, 3] 7→ [2] and [2, 8] 7→ [2, 8] and the hypothesis λx.”
ResultSelf-citationAbstraction-guided synthesis of synchronization
Vechev, M., Yahav, E., & Yorsh, G. (2012) · International Journal on Software Tools for Technology Transfer · doi:10.1007/s10009-012-0232-3 · Cited by 13 · cited 1×
“The last few years have seen a flurry of research on automated program synthesis [2, 10, 19, 30, 32].”
Background(2003) · Journal of Photochemistry and Photobiology A Chemistry · doi:10.1016/s1010-6030(03)00307-1 · Cited by 12
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-citationIn-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
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.