一句话:将依赖升级建模为状态路径探索,借助编译器反馈验证与回滚,在基准上达到 96.7% 完全修复率。
第三方依赖的 API 破坏性变更常导致客户端应用在升级后出现编译或运行时失败。已有自动化升级方法难以修复复杂问题:传统方法缺乏语义适应性,而仅靠提示词的 LLM 迁移方法容易产生幻觉,且无法应对多步级联的修复过程。本文提出 DepUpgrade,把依赖升级建模为状态路径探索问题:状态是迁移过程中客户端代码库的某一快照,状态之间的转移由编译器反馈验证,若出现回归则回滚;框架不再做单次生成,而是系统地搜索中间状态空间以抵达成功状态,具体分为三步——API 迁移知识抽取、修复任务构造与状态路径探索。作者在包含 123 个迁移任务的基准和 18 个真实项目上评估:基准上完全修复率达 96.7%,优于其他基线;真实项目中 15/18 被完全修复,1085 个初始编译错误仅剩 31 个未解决。
Third-party dependencies frequently introduce API breaking changes, and upgrading them causes compilation or runtime failures in client applications. Existing approaches have explored automating dependency upgrades, but struggle with fixing complex issues. This is mainly because traditional methods lack semantic adaptability, while recent prompt-only LLM-based migration approaches often suffer from hallucinations and fail to navigate multi-step, cascading repairs. To solve this problem, in this paper, we propose DepUpgrade, a framework that models dependency upgrade as a state-path exploration problem. A state is a snapshot of the client codebase at a particular point during migration. Transitions between states are validated via compiler feedback and rolled back if regressions occur. Instead of performing a single-pass generation, DepUpgrade systematically explores a search space of intermediate states with the goal of reaching a successful state. DepUpgrade achieves this goal in three steps: API migration knowledge extraction, repair task formulation and state-path exploration. We evaluate DepUpgrade on a benchmark of 123 migration tasks and 18 real-world projects. Experimental results demonstrate that our framework achieves an unprecedented 96.7% full repair rate on the benchmark, outperforming other baselines. On the real-world projects, DepUpgrade fully repairs 15 of the 18 projects and leaves 31 of the 1,085 initial compilation errors unresolved.
@inproceedings{paperbot12341,
title = {DepUpgrade: Automating Dependency Upgrade through State-Path Exploration},
author = {Xiangxi Ma and Yifan An and Wentong Tian and Xuanqi Wang and Qingao Dong and Xiang Gao and Hailong Sun},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3837442}
}