arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.24446cs.SE
收藏

用于修复破坏性更新的AST转换规则的智能体生成

Agentic Generation of AST Transformation Rules for Fixing Breaking Updates

KTH Royal Institute of Technology(瑞典皇家理工学院);Université de Montréal(蒙特利尔大学)

Frank Reyes, Benoit Baudry, Martin Monperrus

AI总结:

提出BigBag框架,通过智能体生成可复用的API级AST转换规则,修复依赖更新导致的编译错误,在BUMP基准上实现78.6%的修复率和跨项目33.3%的修复率。

摘要:

现代软件项目依赖于不断演化的第三方库,这些库会引入破坏性API更改,导致客户端代码在依赖更新后无法编译。当同一库更新破坏多个项目时,现有修复方法生成项目特定的补丁,无法复用,每个受影响的项目需要独立修复。我们提出BigBag,一个智能体框架,生成修复转换:结构化的可执行程序,在API级别编码修复逻辑,并转移到被同一更新破坏的任何客户端。我们在BUMP基准的157个编译失败破坏性依赖更新上评估BigBag,结合四种大语言模型和两种AST转换引擎(Spoon和JavaParser)的八种配置。最佳配置达到94.3%的可编译转换率和78.6%的修复率。生成的转换可跨项目转移,实现总体33.3%的跨项目修复率,对于所有客户端统一调用受影响API元素的破坏性更新,修复率达到80%以上。这些结果表明,可复用修复转换的智能体生成是实现破坏性更新可扩展修复的可行方法。

英文摘要:

Modern software projects depend on third-party libraries that evolve continuously, introducing breaking API changes that prevent client code from compiling after a dependency update. When the same library update breaks multiple projects, existing repair approaches generate project-specific patches that cannot be reused, requiring each affected project to be repaired independently. We present BigBag, an agentic framework that generates fixing transformations: structured, executable programs that encode the repair logic at the API level and transfer to any client broken by the same update. We evaluate BigBag on 157 compilation failure breaking dependency updates from the BUMP benchmark, across eight configurations combining four large language models and two AST transformation engines (Spoon and JavaParser). The best configuration achieves a compilable transformation rate of 94.3% and a fix rate of 78.6%. Generated transformations transfer across projects, achieving a cross-project fix rate of 33.3% overall and 80% or above for breaking updates where all clients invoke the affected API element uniformly. These results show that agentic generation of reusable fixing transformations is a viable approach to scalable repair of breaking updates.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑