arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.13007cs.SEcs.AI
收藏

ArchAgent: 基于LLM的可扩展遗留软件架构恢复

ArchAgent: Scalable Legacy Software Architecture Recovery with LLMs

HiThink Research(慧思研究);University of Science and Technology of China(中国科学技术大学)

Rusheng Pan, Bingcheng Mao, Tianyi Ma, Zhenhua Ling

AI总结:

ArchAgent通过结合静态分析、自适应分段和LLM合成,实现大规模遗留软件架构的高效恢复与多视图业务对齐。

摘要:

从大规模遗留软件中恢复准确的架构受到架构漂移、缺失关系和大型语言模型(LLMs)有限上下文的阻碍。我们提出了ArchAgent,一个可扩展的基于代理的框架,结合静态分析、自适应代码分段和LLM驱动的合成,从跨仓库代码库中重建多视图、业务对齐的架构。ArchAgent引入了可扩展的图表生成与上下文修剪,并整合跨仓库数据以识别业务关键模块。对典型大型GitHub项目的评估显示显著优于现有基准。消融研究证实依赖上下文提高了生产级仓库生成架构的准确性,而一个真实世界案例研究展示了从遗留项目中有效恢复关键业务逻辑。数据集可在https://github.com/panrusheng/arch-eval-benchmark获取。

英文摘要:

Recovering accurate architecture from large-scale legacy software is hindered by architectural drift, missing relations, and the limited context of Large Language Models (LLMs). We present ArchAgent, a scalable agent-based framework that combines static analysis, adaptive code segmentation, and LLM-powered synthesis to reconstruct multiview, business-aligned architectures from cross-repository codebases. ArchAgent introduces scalable diagram generation with contextual pruning and integrates cross-repository data to identify business-critical modules. Evaluations of typical large-scale GitHub projects show significant improvements over existing benchmarks. An ablation study confirms that dependency context improves the accuracy of generated architectures of production-level repositories, and a real-world case study demonstrates effective recovery of critical business logics from legacy projects. The dataset is available at https://github.com/panrusheng/arch-eval-benchmark.

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

↑