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

📅 2025-02-11
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge of automating refactoring in Haskell codebases by proposing the first LLM-based multi-agent refactoring framework tailored for functional programming. The framework integrates static and dynamic analysis, cyclomatic complexity assessment, and runtime performance monitoring to enable end-to-end context-aware refactoring, formal verification, and regression testing—ensuring correctness, scalability, and paradigm alignment. Evaluation across multiple real-world Haskell projects demonstrates average reductions in cyclomatic complexity (13.64%–47.06%), memory allocation (4.17%–41.73%), and up to 50% improvement in execution efficiency. Its core contribution is the first LLM-driven multi-agent refactoring paradigm explicitly designed to support higher-order functions, immutable data structures, and lazy evaluation—thereby bridging a critical research gap in intelligent refactoring for functional languages.

Technology Category

Application Category

📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

Automate Haskell code refactoring using LLMs
Optimize code quality via multi-agent systems
Enhance functional programming scalability and correctness
Innovation

Methods, ideas, or system contributions that make the work stand out.

LLMs multi-agent system refactoring
Specialized agents for Haskell code
Metrics-driven refactoring improvements
🔎 Similar Papers
No similar papers found.