COBOLAssist: Analyzing and Fixing Compilation Errors for LLM-Powered COBOL Code Generation
Anh T. V. Dau, Shin Hwei Tan, Jinqiu Yang, Nghi D. Q. Bui, Anh Tuan Nguyen

TL;DR
This paper presents COBOLAssist, a framework using LLMs to improve COBOL code correctness by iterative repairs guided by compilation feedback, significantly increasing compilation success rates.
Contribution
It introduces COBOLAssist, a novel technique for fixing COBOL compilation errors in LLM-generated code, with demonstrated effectiveness across multiple LLMs.
Findings
Compilation success rates increased from 29.5% to 64.38% for GPT-4o-mini.
Success rates rose from 41.8% to 95.89% for GPT-4o.
Functional correctness remains limited despite high compilation success.
Abstract
Legacy programming languages such as COBOL (Common Business-Oriented Language) remain critical in business computing. However, maintaining legacy COBOL systems is increasingly challenging due to a declining pool of skilled developers and the persistence of COBOL errors that require deep domain expertise to resolve. This paper investigates the challenges of COBOL compilation errors and introduces a framework leveraging large language models (LLMs) to address these issues. We first categorize the common compilation errors in LLM-generated COBOL code into three groups: incomplete code errors, syntax errors, and type-related errors. We further propose COBOLAssist, a technique to enhance code correctness through iterative repairs guided by compilation feedback. Our evaluation using five LLMs including GPT variants and mAInframer, shows a high prevalence of incorrect program structures and…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
