Superfusion: Eliminating Intermediate Data Structures via Inductive Synthesis
Ruyi Ji, Yuwei Zhao, Nadia Polikarpova, Yingfei Xiong, Zhenjiang Hu
Abstract
Intermediate data structures are a common cause of inefficiency in functional programming. Fusion attempts to eliminate intermediate data structures by combining adjacent data traversals into one; existing fusion techniques, however, are based on predefined rewrite rules and hence are limited in expressiveness.
In this work we explore a different approach to eliminating intermediate data structures, based on inductive program synthesis. We dub this approach superfusion (by analogy with superoptimization, which uses inductive synthesis for program optimization). Starting from a reference program annotated with data structures to be eliminated, superfusion first generates a sketch where program fragments operating on those data structures are replaced with holes; it then fills the holes with constant-time expressions such that the resulting program is equivalent to the reference. The main technical challenge here is scalability because optimized programs are often complex, making the search space intractably large for naive enumeration. To address this challenge, our key insight is to first synthesize a ghost function that describes the relationship between the original intermediate data structure and its compressed version; this function, although not used in the final program, serves to decompose the joint sketch filling problem into independent simpler problems for each hole.
We implement superfusion in a tool called SuFu and evaluate it on a dataset of 290 tasks collected from prior work on deductive fusion and program restructuring. The results show that SuFu solves 264 out of 290 tasks, exceeding the capabilities of rewriting-based fusion systems and achieving comparable performance with specialized approaches to program restructuring on their respective domains.
• Theory of computation → Design and analysis of algorithms.
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 0e55b562-086d-4d85-9d7a-54e1f21224b5Cited by top-tier papers1
Ask how each one uses itBuilds on11
- 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
- Solving constrained Horn clauses modulo algebraic data types and recursive functionsHari Govind V. K., Sharon Shoham, Arie GurfinkelPOPL 2022 · 26 citations
- Recursion synthesis with unrealizability witnessesAzadeh Farzan, Danya Lette, Victor NicoletPLDI 2022 · 19 citations
- Generalizable synthesis through unificationRuyi Ji, Jingtao Xia, Yingfei Xiong, Zhenjiang HuOOPSLA 2021 · 14 citations
- A formal foundation for symbolic evaluation with mergingSorawee Porncharoenwase, Luke Nelson, Xi Wang, Emina TorlakPOPL 2022 · 13 citations
Related papers
- Dataflow-based pruning for speeding up superoptimizationManasij Mukherjee, Pranav Kant, Zhengyang Liu, John RegehrOOPSLA 2020 · 21 citations
- Proving Functional Program Equivalence via Directed Lemma SynthesisYican Sun, Ruyi Ji, Jian Fang, Xuanlin Jiang et al.FM 2024 · 2 citations
- Recursive Program Synthesis using ParamorphismsQiantan Hong, Alex AikenPLDI 2024 · 7 citations
- Inductive Program Synthesis by Meta-Analysis-Guided Hole FillingDoyoon Lee, Woosuk Lee, Kwangkeun YiPOPL 2026
- Combining the top-down propagation and bottom-up enumeration for inductive program synthesisWoosuk LeePOPL 2021 · 34 citations
