一句话:提出 CombyInferPy,从库源码历史推断 Comby 重写规则,自动修复数据科学库 API 的破坏性变更。
数据科学库更新频繁,新版本常包含破坏性变更,导致现有代码无法编译或运行。由于更新大型项目的源代码十分困难,开发者往往滞留于旧版本。本文提出 CombyInferPy,一种自动分析和修复库 API 破坏性变更的工具。它从库源码历史中推断规则,以 Comby 模板(一种结构化代码搜索与替换工具)的形式表示,进而自动转换代码。初步结果表明,CombyInferPy 能更新 pandas 库的 Python 代码;利用其推断的 Comby 规则,可自动修复若干失败的测试和警告。这说明该思路在帮助开发者更新库方面具有前景。
Data science libraries are updated frequently, and new version releases commonly include breaking changes. These are updates that cause existing code to not compile or run. Developers often use older versions of libraries because it is challenging to update the source code of large projects. We propose CombyInferPy, a new tool to automatically analyze and fix breaking changes in library APIs. CombyInferPy infers rules from the history of library source code in the form of Comby templates, a structural code search and replace tool that can automatically transform code. Preliminary results indicate CombyInferPy can update the pandas library Python code. Using the Comby rules inferred by CombyInferPy, we can automatically fix several failing tests and warnings. This shows this approach is promising to help developers update libraries.
DOI 原文 ·
@inproceedings{paperbot7356,
title = {Automatically Fixing Breaking Changes of Data Science Libraries},
author = {Hailie Mitchell},
booktitle = {ASE},
year = {2022},
doi = {10.1145/3551349.3559507}
}