Inductive Synthesis of Structurally Recursive Functional Programs from Non-recursive Expressions
Woosuk Lee, Hangyeol Cho
Abstract
We present a novel approach to synthesizing recursive functional programs from input-output examples. Synthesizing a recursive function is challenging because recursive subexpressions should be constructed while the target function has not been fully defined yet. We address this challenge by using a new technique we call block-based pruning. A block refers to a recursion- and conditional-free expression (i.e., straight-line code) that yields an output from a particular input. We first synthesize as many blocks as possible for each input-output example, and then we explore the space of recursive programs, pruning candidates that are inconsistent with the blocks. Our method is based on an efficient version space learning, thereby effectively dealing with a possibly enormous number of blocks. In addition, we present a method that uses sampled input-output behaviors of library functions to enable a goal-directed search for a recursive program using the library. We have implemented our approach in a system called Trio and evaluated it on synthesis tasks from prior work and on new tasks. Our experiments show that Trio outperforms prior work by synthesizing a solution to 98% of the benchmarks in our benchmark suite.
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 feafb3c7-bc87-4f50-bcd9-0d078e629df7Cited by top-tier papers8
- Trace-Guided Inductive Synthesis of Recursive Functional ProgramsYongwei Yuan, Arjun Radhakrishna, Roopsha SamantaPLDI 2023 · 17 citations
- Recursive Program Synthesis using ParamorphismsQiantan Hong, Alex AikenPLDI 2024 · 7 citations
- Relational Synthesis of Recursive Programs via Constraint Annotated Tree AutomataAnders Miltner, Ziteng Wang, Swarat Chaudhuri, Isil DilligCAV 2024 · 2 citations
- Programming By Scaffolded Demonstration with PerpendAngela Bi, Eric Rawn, Justin Lubin, Sarah E. ChasinsCHI 2026 · 2 citations
- Equivalence by Canonicalization for Synthesis-Backed RefactoringJustin Lubin, Jeremy Ferguson, Kevin Ye, Jacob Yim et al.PLDI 2024 · 2 citations
Builds on5
- DreamCoder: bootstrapping inductive program synthesis with wake-sleep library learningKevin Ellis, Catherine Wong, Maxwell I. Nye, Mathias Sablé-Meyer et al.PLDI 2021 · 97 citations
- Bottom-up synthesis of recursive functional programs using angelic executionAnders Miltner, Adrian Trejo Nuñez, Ana Brendel, Swarat Chaudhuri et al.POPL 2022 · 38 citations
- Combining the top-down propagation and bottom-up enumeration for inductive program synthesisWoosuk LeePOPL 2021 · 34 citations
- Cyclic program synthesisShachar Itzhaky, Hila Peleg, Nadia Polikarpova, Reuben N. S. Rowe et al.PLDI 2021 · 26 citations
- Counterexample-Guided Partial Bounding for Recursive Function SynthesisAzadeh Farzan, Victor NicoletCAV 2021 · 13 citations
Related papers
- Distance-Guided Search in Program Synthesis with Imperfect LLM SolutionsHangyeol Cho, Jaehyung Lee, Woosuk LeeICSE 2026
- Inductive Program Synthesis via Iterative Forward-Backward Abstract InterpretationYongho Yoon, Woosuk Lee, Kwangkeun YiPLDI 2023 · 15 citations
- Inductive Program Synthesis Guided by Observational Program SimilarityJohn K. Feser, Isil Dillig, Armando Solar-LezamaOOPSLA 2023 · 6 citations
- Automating Pruning in Top-Down Enumeration for Program Synthesis Problems with Monotonic SemanticsKeith J. C. Johnson, Rahul Krishnan, Thomas W. Reps, Loris D'AntoniOOPSLA 2024 · 2 citations
- Combining Functional and Automata Synthesis to Discover Causal Reactive ProgramsRia Das, Joshua B. Tenenbaum, Armando Solar-Lezama, Zenna TavaresPOPL 2023 · 4 citations
