paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Inferring and applying type changes

推断并应用类型变更
ICSE Proceedings of the 44th International Conference on Software Engineering2022匹配度 2/10 · 该论文研究从开源项目版本历史中推断类型变更重写规则并用于自动化重构,属于软件工程/程序合成与重构工具方向;未涉及 LLM/Agent、ML 系统静态分析、浮点程序分析或贝叶斯程序分析等用户核心交叉方向。引用 16 inbox
Ameya Ketkar, Oleg Smirnov, Nikolaos Tsantalis, Danny Dig, Timofey Bryksin
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:TC-Infer 从开源项目版本历史中推断类型变更的重写规则,并用于自动化重构,大幅提升类型变更的准确率。

开发者常需修改程序元素的类型并同步更新所有引用,以提升性能、安全性或可维护性,但手工操作繁琐、易错。现有类型变更工具依赖开发者手工编写规则,规则编写困难且需反复试错。为此,作者提出 TC-Infer:它从开源项目的版本历史中自动推断出捕获所需适配的重写规则(以 Comby 语言表达),再将这些规则作为现有类型变更工具的输入。评估方面,作者在包含 40 万次提交的语料库上,为 605 个流行类型变更推断出 4,931 条规则;结果显示,TC-Infer 能为 93% 的最流行类型变更模式推导出重写规则,且规则应用效果显著(精度 99.2%、召回 93.4%)。作者还发布了 IntelliTC——一个面向 IntelliJ IDEA 的交互式、可配置重构插件,以推进现有工具链。

问题
开发者频繁修改程序元素类型并更新全部引用,手工操作繁琐易错;而现有类型变更工具要求开发者手工编码适配规则,规则编写困难且往往需要多次试错。
方法
提出 TC-Infer,从开源项目版本历史中自动推断捕获类型变更所需适配的重写规则,并以 Comby 语言表达,作为现有类型变更工具的输入;同时发布 IntelliTC 插件以支持交互式重构。
评估
在 40 万次提交的语料库上,为 605 个流行类型变更推断出 4,931 条规则;93% 的最流行类型变更模式可成功推断出规则,规则应用达到 99.2% 精度和 93.4% 召回率。
原文摘要(Abstract)

Developers frequently change the type of a program element and update all its references to increase performance, security, or maintainability. Manually performing type changes is tedious, error-prone, and it overwhelms developers. Researchers and tool builders have proposed advanced techniques to assist developers when performing type changes. A major obstacle in using these techniques is that the developer has to manually encode rules for defining the type changes. Handcrafting such rules is difficult and often involves multiple trial-error iterations. Given that open-source repositories contain many examples of type-changes, if we could infer the adaptations, we would eliminate the burden on developers. We introduce TC-Infer, a novel technique that infers rewrite rules that capture the required adaptations from the version histories of open source projects. We then use these rules (expressed in the Comby language) as input to existing type change tools. To evaluate the effectiveness of TC-Infer, we use it to infer 4,931 rules for 605 popular type changes in a corpus of 400K commits. Our results show that TC-Infer deduced rewrite rules for 93% of the most popular type change patterns. Our results also show that the rewrite rules produced by TC-Infer are highly effective at applying type changes (99.2% precision and 93.4% recall). To advance the existing tooling we released IntelliTC, an interactive and configurable refactoring plugin for IntelliJ IDEA to perform type changes.

链接与引用

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

BibTeX
@inproceedings{KetkarSTDB22,
  title = {Inferring and applying type changes},
  author = {Ameya Ketkar and Oleg Smirnov and Nikolaos Tsantalis and Danny Dig and Timofey Bryksin},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510115}
}