一句话:提出 AutoLifter,通过分解方法消除语法限制,自动将分治类算法范式应用于程序合成。
将分治(D&C)等算法范式自动应用到实际任务时,已有方法多依赖基于语法的程序变换,对原程序施加较多限制。本文研究 D&C 及类似算法范式的自动应用,提出合成器 AutoLifter,避免依赖语法变换。核心挑战是待合成程序规模庞大;AutoLifter 通过两种与输入程序语法无关的分解方法——组件消除与变量消除——将整体问题可靠地划分为更简单的子任务,每个子任务只合成最终程序的一个子程序,从而可由现有合成器处理。作者在涉及六种算法范式的 96 个编程任务上评估,AutoLifter 解决 82/96 个任务,平均耗时 20.17 秒,显著优于已有方法。
Algorithmic paradigms such as divide-and-conquer (D&C) are proposed to guide developers in designing efficient algorithms, but it can still be difficult to apply algorithmic paradigms to practical tasks. To ease the usage of paradigms, many research efforts have been devoted to the automatic application of algorithmic paradigms. However, most existing approaches to this problem rely on syntax-based program transformations and thus put significant restrictions on the original program. In this article, we study the automatic application of D&C and several similar paradigms, denoted as D&C-like algorithmic paradigms, and aim to remove the restrictions from syntax-based transformations. To achieve this goal, we propose an efficient synthesizer, named AutoLifter , which does not depend on syntax-based transformations. Specifically, the main challenge of applying algorithmic paradigms is from the large scale of the synthesized programs, and AutoLifter addresses this challenge by applying two novel decomposition methods that do not depend on the syntax of the input program, component elimination and variable elimination , to soundly divide the whole problem into simpler subtasks, each synthesizing a sub-program of the final program and being tractable with existing synthesizers. We evaluate AutoLifter on 96 programming tasks related to six different algorithmic paradigms. AutoLifter solves 82/96 tasks with an average time cost of 20.17 s, significantly outperforming existing approaches.
@article{paperbot2673,
title = {Decomposition-based Synthesis for Applying Divide-and-Conquer-like Algorithmic Paradigms},
author = {Ruyi Ji and Yuwei Zhao and Yingfei Xiong and Di Wang and Lu Zhang and Zhenjiang Hu},
journal = {ACM Transactions on Programming Languages and Systems},
volume = {46},
number = {2},
year = {2024},
doi = {10.1145/3648440}
}