paperbot · PL 论文追踪

全部论文 待读 收藏

P2 SOAR: A Synthesis Approach for Data Science API Refactoring

SOAR:一种面向数据科学 API 重构的合成方法
ICSE 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)2021匹配度 3/10 · 该论文属于程序合成与 API 自动重构,涉及数据科学库和深度学习模型代码,与用户关注的 PL 与 AI 交叉(尤其是静态分析、LLM/Agent、浮点或贝叶斯程序分析)仅有较弱的邻近关系。它既未使用 LLM/Agent,也不聚焦静态分析或形式化验证,因此不匹配核心研究方向。引用 40 inbox
Ansong Ni, Daniel Ramos, Aidan Z. H. Yang, Inês Lynce, Vasco Manquinho, Ruben Martins, Claire Le Goues
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:无需训练数据,利用库文档与程序合成自动重构数据科学 API,并用解释器错误信息剪枝搜索空间。

开源数据科学库及其版本快速增加,开发者常需手动迁移 API,耗时且易错。已有自动 API 重构依赖成对训练数据的统计学习,但新库或新版本往往缺乏此类数据。SOAR 无需训练数据,仅利用库发布时已有的文档学习 API 表示与库间映射,并用程序合成自动推断 API 参数配置和所需胶水代码;它还用运行重构代码时的解释器错误信息生成逻辑约束以剪枝搜索空间。评估显示,SOAR 对深度学习模型基准(最多 44 层)重构成功率为 80%,平均耗时 97.23 秒;对数据整理基准成功率为 90%,平均耗时 17.31 秒。

问题
数据科学库和版本激增,API 手动重构耗时易错;已有自动方法依赖成对训练数据,难以适用于新库或新版本。
方法
SOAR 仅用库发布时已有的文档学习 API 表示与映射,通过程序合成推断 API 参数配置和胶水代码,并利用解释器错误信息生成逻辑约束来剪枝搜索。
评估
在深度学习模型和数据整理基准上评估,SOAR 分别成功重构 80% 和 90%,平均运行时间为 97.23 秒和 17.31 秒。
原文摘要(Abstract)

With the growth of the open-source data science community, both the number of data science libraries and the number of versions for the same library are increasing rapidly. To match the evolving APIs from those libraries, open-source organizations often have to exert manual effort to refactor the APIs used in the code base. Moreover, due to the abundance of similar open-source libraries, data scientists working on a certain application may have an abundance of libraries to choose, maintain and migrate between. The manual refactoring between APIs is a tedious and error-prone task. Although recent research efforts were made on performing automatic API refactoring between different languages, previous work relies on statistical learning with collected pairwise training data for the API matching and migration. Using large statistical data for refactoring is not ideal because such training data will not be available for a new library or a new version of the same library. We introduce Synthesis for Open-Source API Refactoring (SOAR), a novel technique that requires no training data to achieve API migration and refactoring. SOAR relies only on the documentation that is readily available at the release of the library to learn API representations and mapping between libraries. Using program synthesis, SOAR automatically computes the correct configuration of arguments to the APIs and any glue code required to invoke those APIs. SOAR also uses the interpreter's error messages when running refactored code to generate logical constraints that can be used to prune the search space. Our empirical evaluation shows that SOAR can successfully refactor 80% of our benchmarks corresponding to deep learning models with up to 44 layers with an average run time of 97.23 seconds, and 90% of the data wrangling benchmarks with an average run time of 17.31 seconds.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{NiRYLMMG21,
  title = {SOAR: A Synthesis Approach for Data Science API Refactoring},
  author = {Ansong Ni and Daniel Ramos and Aidan Z. H. Yang and Inês Lynce and Vasco Manquinho and Ruben Martins and Claire Le Goues},
  booktitle = {ICSE},
  year = {2021},
  doi = {10.1109/icse43902.2021.00023}
}