Skip to content

LLM-based Multi-Agent System for Intelligent Refactoring of Haskell Code

Jun 2025 · International Conference on Product Focused Software Process Improvement · Vol abs/2506.19481, pp. 408-418 · 5 citations · 42 references
Computer Science

TL;DR

Results highlight the ability of LLM-based multi-agent in managing refactoring tasks targeted toward functional programming paradigms and hint that LLM-based multi-agent systems integration into the refactoring of functional programming languages can enhance maintainability and support automated development workflows.

Abstract

Refactoring is a constant activity in software development and maintenance. Scale and maintain software systems are based on code refactoring. However, this process is still labor intensive, as it requires programmers to analyze the codebases in detail to avoid introducing new defects. In this research, we put forward a large language model (LLM)-based multi-agent system to automate the refactoring process on Haskell code. The objective of this research is to evaluate the effect of LLM-based agents in performing structured and semantically accurate refactoring on Haskell code. Our proposed multi-agent system based on specialized agents with distinct roles, including code analysis, refactoring execution, verification, and debugging. To test the effectiveness and practical applicability of the multi-agent system, we conducted evaluations using different open-source Haskell codebases. The results of the experiments carried out showed that the proposed LLM-based multi-agent system could average 11.03% decreased complexity in code, an improvement of 22.46% in overall code quality, and increase performance efficiency by an average of 13.27%. Furthermore, memory allocation was optimized by up to 14.57%. These results highlight the ability of LLM-based multi-agent in managing refactoring tasks targeted toward functional programming paradigms. Our findings hint that LLM-based multi-agent systems integration into the refactoring of functional programming languages can enhance maintainability and support automated development workflows.

Read PDF

Similar papers

Review Aug 2026

Developing LLM-based Multi-Agent Systems in Software Engineering: A Mixed-Method Experience Report

A comprehensive overview of the existing tools and frameworks for implementing MAS in software engineering and a set of lessons learned and challenges that can help researchers and practitioners to select a suitable MAS framework according to their needs are provided.

Maria Sâmyla Serafim de Oliveira, M. Ibiyo, Marco Gianrusso et al. · 0 citations
Book Open access Aug 2026

StarVerus: LLM-Powered Multi-Agent Collaboration for Industrial Rust Code Verification Automation

A multi-agent collaborative framework, StarVerus, to automate the verification of industrial Rust code and introduces a planner-repairer-actor-rewriter multi-agent paradigm to further enhance the proof repair capabilities.

Chao Jiang, Ding Wang, Dugang Liu et al. · 0 citations
Conference Jul 2026

MASTEST: A LLM-Based Multi-Agent System For Testing RESTful APIs

Testing RESTful API is increasingly complicated but indispensable to quality assurance of cloud-native applications. This paper reports a multi-agent system called MASTEST that combines LLM-based intelligent agents and programmed agents to automate REST API testing. They form a complete tool chain covering the whole workflow of REST API test with API specification in the OpenAPI Swagger format as the input. It also incorporates human testers in the process to review and correct LLM generated test artefacts to control the quality of testing activities. MASTEST is evaluated on two LLMs, GPT-4o and DeepSeek V3.1 Reasoner with five public APIs. Its performances on various testing activities are measured by a wide range of metrics, including adequacy and coverage metrics, the syntax and data type correctness of generated test scripts, the usability of LLM generated test cases and scripts, as well as the bug detection ability. Experiment results demonstrated that both DeepSeek and GPT-4o achieved a high overall performance but had strengths and weaknesses on different testing activities. MASTEST generated test cases achieved 94% and 98% unit test coverage and 79% and 78% system test coverage for GPT-4o and DeepSeek respectively in comparison with human designed test cases. The generated test scripts maintained 100% syntax correctness and only required minimal manual edits for semantic correctness. The generated test scripts contain assertions on the expected status code as well as contents in the response messages. They are highly capable of detecting bugs in the REST APIs. Experiment data shows that the bug detection rates are between 2.13 to 4.50 per operation. These findings indicate that MASTEST is highly efficient and effective.

Xiaoke Han, Hong Zhu · 1 citation · ⚡1
#computer vision Review Aug 2026

REFINE: A Multi-Agent LLM Approach for Evidence-Guided Code Refactoring

This work introduces REFINE (Refactoring with Evidence-aware Flow for Integrated ageNtic Execution), a tool-agnostic, evidence-aware multi-agent approach for generating Java file-level refactoring candidates that achieves a higher median code-smell reduction with smaller edits and fewer public-method removals.

Muhammad Waseem, Aakash Ahmad, Pekka Abrahamsson · 0 citations
Review Open access Aug 2026

AgentCodeReview: Implementation and Comprehensive Benchmark Evaluation of a Multi-Agent Framework for Explainable Code Review and Automated Bug Repair

The AgentCodeReview system is presented, a multi-agent system that is able to conduct explainable code review and automated bug repair by leveraging software engineering agents with different code review tasks and its utility and extensibility to the field of explainable AI in software quality assurance are demonstrated.

B. N, T. L. Manasa · 0 citations
Open access Aug 2026

A Multi-Agent LLM Framework for Automated Software Testing

A multi-agent testing framework in which requirement analysis, test-case generation, sandboxed execution, and defect detection are delegated to four distinct agents, and in which detection rests on a composite rule combining the execution signal with the semantic judgment of a dedicated diagnostic agent.

Yuxuan Li · 0 citations

Related blog posts

MIT News · Artificial Intelligence Jun 3, 2026

MIT researchers teach AI models to interpret charts

The new ChartNet training dataset could improve the accuracy of vision-language models that help analyze business trends or interpret scientific figures.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.