Refactoring is an important part of software development and maintenance. However, this process is still labor intensive, as it requires programmers to analyze the codebases in detail to avoid introducing new defects. In this paper, we introduce a Large Language Model (LLM)-based multi-agent system to automate the refactoring process for Haskell-based code. The objective of this research is to evaluate the effectiveness of LLM-based agents in performing structured and semantically accurate refactoring of Haskell code. Our proposed multi-agent system is based on specialized agents with distinct roles. We conducted evaluations using different open-source Haskell codebases. The results of the experiments show that the proposed LLM-based multi-agent system achieved an average reduction of 11.03% in code complexity and a 22.46% improvement in overall code quality. These results highlight the capability of the LLM-based multi-agent system to manage refactoring tasks targeted toward functional programming paradigms. Our findings suggest that integrating LLM-based multi-agent systems into the refactoring of functional programming languages can enhance maintainability and support automated development workflows. The source code of our proposed system and the metrics results are publicly available on GitHub ( https://github.com/GPT-Laboratory/Intelligent-Haskell-Code-Refactoring ).

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

LLM-Based Multi-agent System for Intelligent Refactoring of Haskell Code

  • Shahbaz Siddeeq,
  • Muhammad Waseem,
  • Zeeshan Rasheed,
  • Md Mahade Hasan,
  • Jussi Rasku,
  • Mika Saari,
  • Henri Terho,
  • Kalle Mäkelä,
  • Kai-Kristian Kemell,
  • Pekka Abrahamsson

摘要

Refactoring is an important part of software development and maintenance. However, this process is still labor intensive, as it requires programmers to analyze the codebases in detail to avoid introducing new defects. In this paper, we introduce a Large Language Model (LLM)-based multi-agent system to automate the refactoring process for Haskell-based code. The objective of this research is to evaluate the effectiveness of LLM-based agents in performing structured and semantically accurate refactoring of Haskell code. Our proposed multi-agent system is based on specialized agents with distinct roles. We conducted evaluations using different open-source Haskell codebases. The results of the experiments show that the proposed LLM-based multi-agent system achieved an average reduction of 11.03% in code complexity and a 22.46% improvement in overall code quality. These results highlight the capability of the LLM-based multi-agent system to manage refactoring tasks targeted toward functional programming paradigms. Our findings suggest that integrating LLM-based multi-agent systems into the refactoring of functional programming languages can enhance maintainability and support automated development workflows. The source code of our proposed system and the metrics results are publicly available on GitHub ( https://github.com/GPT-Laboratory/Intelligent-Haskell-Code-Refactoring ).