arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2611.06328cs.SE
收藏

EvoCodeAgent:基于架构-代码协同演化与经验引导修复的项目级代码生成

EvoCodeAgent: Project-Level Code Generation via Architecture-Code Co-Evolution and Experience-Guided Repair

School of Computer Science and Engineering, State Key Laboratory of Complex & Critical Software Environment, Beihang University(北京航空航天大学计算机学院,复杂环境软件国家重点实验室)

Qianhui Zhao, Li Zhang, Fang Liu

AI总结:

本文针对项目级代码生成中架构与实现偏差、经验难复用等问题,提出以状态为中心的EvoCodeAgent框架,在DevBench等基准上较基线实现最高53.5%的单元测试通过率提升。

摘要:

项目级代码生成旨在从高层需求自动合成完整的软件仓库,生成具有良好结构模块与一致跨文件依赖的连贯多文件系统。尽管大语言模型(LLM)在需求理解与代码合成方面具备强大能力,但现有方法仍存在若干关键局限:其一,诸多方法依赖静态架构设计,无法在迭代生成过程中自适应调整,致使架构与实现间的偏差不断扩大;其二,这些方法缺乏在迭代间积累与复用经验的机制,导致错误反复出现且效率降低;其三,它们往往依赖基于LLM的中间产物独立评估,该评估在长上下文推理下透明度有限且存在潜在不可靠性。为应对这些挑战,本文提出EvoCodeAgent,一种面向项目级代码生成的以状态为中心的框架。EvoCodeAgent维护一个由结构化项目需求初始化的演化架构状态,持续协调架构与代码骨架的预测关系及从生成代码中提取的已实现关系;它还利用基于工具的验证证据支持可靠的状态更新,并从先前的修订尝试中抽象出可复用的修复经验以指导后续生成。在不同规模的项目级基准(包括DevBench与CodeProjectEval)上开展的大量实验表明,EvoCodeAgent的性能始终优于基线方法;在GPT-5设置下,其单元测试通过率分别达到60.48%与27.73%,较最强基线实现了最高53.5%的提升。

英文摘要:

Project-level code generation aims to automatically synthesize complete software repositories from high-level requirements, producing coherent multi-file systems with well-structured modules and consistent cross-file dependencies. Despite the strong capabilities of large language models (LLMs) in specification understanding and code synthesis, existing approaches still exhibit several critical limitations. First, many methods rely on static architectural designs that cannot adapt during iterative generation, leading to a growing misalignment between architecture and implementation. Second, they lack mechanisms to accumulate and reuse experience across iterations, resulting in recurring errors and reduced efficiency. Third, they often depend on standalone LLM-based evaluation of intermediate artifacts, which suffer from limited transparency and potential unreliability under long-context reasoning. To address these challenges, we propose EvoCodeAgent, a state-centric framework for project-level code generation. EvoCodeAgent maintains an evolving architectural state initialized from structured project specifications and continuously reconciles predicted relations from architecture and skeletons with realized relations extracted from generated code. It further uses tool-grounded verification evidence to support reliable state updates and abstracts reusable repair experiences from previous revision attempts to guide subsequent generation. Extensive experiments on project-level benchmarks of different scales, including DevBench and CodeProjectEval, demonstrate that EvoCodeAgent consistently outperforms baseline approaches. Under the GPT-5 setting, it achieves unit test pass rates of 60.48% and 27.73%, respectively, yielding up to a 53.5% improvement over the strongest baseline.

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

↑