arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2502.07928cs.SE
收藏

基于LLM的多智能体系统实现Haskell应用重构的分布式方法

Distributed Approach to Haskell Based Applications Refactoring with LLMs Based Multi-Agent Systems

Shahbaz Siddeeq, Zeeshan Rasheed, Malik Abdul Sami, Mahade Hasan, Muhammad Waseem, Jussi Rasku, Mika Saari, Kai-Kristian Kemell, Pekka Abrahamsson

AI总结:

该研究提出基于LLM的多智能体系统以自动化Haskell代码库重构,系统含上下文分析等专用智能体,通过圈复杂度等指标优化,实验显示代码库圈复杂度降13.64%-47.06%、内存分配及运行效率提升,解决函数式编程重构挑战。

摘要:

我们提出一种基于大型语言模型(LLMs)的多智能体系统,以自动化重构Haskell代码库。该多智能体系统由执行上下文分析、重构、验证和测试等任务的专用智能体组成。重构改进使用圈复杂度、运行时间和内存分配等指标。在Haskell代码库上进行的实验评估表明代码质量有所提升:两个代码库的圈复杂度分别降低13.64%和47.06%;内存分配分别改进4.17%和41.73%,运行时效率最多提高50%。这些指标突显了系统在保持正确性和可扩展性的同时优化Haskell函数式范式的能力。结果显示多个代码库的复杂度降低且性能增强。基于LLMs的多智能体系统集成实现了精确的任务执行和智能体间协作,解决了函数式编程中的重构挑战。本方法旨在通过分布式模块化系统解决函数式编程语言的重构难题。

英文摘要:

We present a large language models (LLMs) based multi-agent system to automate the refactoring of Haskell codebases. The multi-agent system consists of specialized agents performing tasks such as context analysis, refactoring, validation, and testing. Refactoring improvements are using metrics such as cyclomatic complexity, run-time, and memory allocation. Experimental evaluations conducted on Haskell codebases demonstrate improvements in code quality. Cyclomatic complexity was reduced by 13.64% and 47.06% in the respective codebases. Memory allocation improved by 4.17% and 41.73%, while runtime efficiency increased by up to 50%. These metrics highlight the systems ability to optimize Haskells functional paradigms while maintaining correctness and scalability. Results show reductions in complexity and performance enhancements across codebases. The integration of LLMs based multi-agent system enables precise task execution and inter-agent collaboration, addressing the challenges of refactoring in functional programming. This approach aims to address the challenges of refactoring functional programming languages through distributed and modular systems.

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

↑