Equivalence by Canonicalization for Synthesis-Backed Refactoring
Justin Lubin, Jeremy Ferguson, Kevin Ye, Jacob Yim, Sarah E. Chasins
摘要
We present an enumerative program synthesis framework called component-based refactoring that can refactor "direct" style code that does not use library components into equivalent "combinator" style code that does use library components. This framework introduces a sound but incomplete technique to check the equivalence of direct code and combinator code called equivalence by canonicalization that does not rely on input-output examples or logical specifications. Moreover, our approach can repurpose existing compiler optimizations, leveraging decades of research from the programming languages community. We instantiated our new synthesis framework in two contexts: (i) higher-order functional combinators such as map and filter in the staticallytyped functional programming language Elm and (ii) high-performance numerical computing combinators provided by the NumPy library for Python. We implemented both instantiations in a tool called Cobbler and evaluated it on thousands of real programs to test the performance of the component-based refactoring framework in terms of execution time and output quality. Our work offers evidence that synthesis-backed refactoring can apply across a range of domains without specification beyond the input program.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
引用它的顶会 Paper1
它引用的 Paper20
- egg: Fast and extensible equality saturationMax Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt 等POPL 2021 · 170 次引用
- DreamCoder: bootstrapping inductive program synthesis with wake-sleep library learningKevin Ellis, Catherine Wong, Maxwell I. Nye, Mathias Sablé-Meyer 等PLDI 2021 · 97 次引用
- Synthesizing structured CAD models with equality saturation and inverse transformationsChandrakana Nandi, Max Willsey, Adam Anderson, James R. Wilcox 等PLDI 2020 · 65 次引用
- Constraint-Based Relational VerificationHiroshi Unno, Tachio Terauchi, Eric KoskinenCAV 2021 · 47 次引用
- Program synthesis by type-guided abstraction refinementZheng Guo, Michael James, David Justo, Jiaxiao Zhou 等POPL 2020 · 45 次引用
相关 Paper
- Specification-guided component-based synthesis from effectful librariesAshish Mishra, Suresh JagannathanOOPSLA 2022 · 7 次引用
- Program Skeletons for Automated Program TranslationBo Wang, Tianyu Li, Ruishi Li, Umang Mathur 等PLDI 2025 · 3 次引用
- HARP: holistic analysis for refactoring Python-based analytics programsWeijie Zhou, Yue Zhao, Guoqiang Zhang, Xipeng ShenICSE 2020 · 10 次引用
- Recursive Program Synthesis using ParamorphismsQiantan Hong, Alex AikenPLDI 2024 · 7 次引用
- Verified tensor-program optimization via high-level scheduling rewritesAmanda Liu, Gilbert Louis Bernstein, Adam Chlipala, Jonathan Ragan-KelleyPOPL 2022 · 25 次引用
