AI
New Framework Combines AI and Debugging Techniques to Improve COBOL-to-C Code Translation
Researchers propose SEDCoT, a hybrid approach that pairs language models with symbolic execution to automatically convert legacy COBOL programs into modern C code with better accuracy and readability.
Legacy COBOL systems continue to power critical operations in banking, insurance, and government, yet maintaining them grows harder as documentation fades and experienced developers retire. The challenge of modernizing this aging code has prompted researchers to develop smarter translation approaches that move COBOL programs into contemporary languages like C.
The Problem with Current Approaches#
Existing translation strategies fall into two camps, each with significant drawbacks. Rule-based transcompilers produce working code but generate output so convoluted that humans struggle to read and modify it. General-purpose large language models (LLMs) show promise but stumble on COBOL specifically—a low-resource language with unusual syntactic patterns that most widely-trained models have rarely encountered.
How SEDCoT Works#
Researchers have introduced SEDCoT, a framework that orchestrates multiple techniques to tackle this gap. The system starts by having an LLM generate an initial C translation of COBOL source code. It then deploys symbolic execution—a formal verification technique that explores multiple execution paths through a program—paired with LLM guidance to automatically construct test suites. When tests reveal correctness problems, the framework repairs the translated code iteratively. A final step applies delta debugging, a technique for progressively simplifying failing test cases into minimal counterexamples that make it easier to pinpoint and fix errors.
Superior Results#
Testing on a public COBOL-to-C benchmark showed that SEDCoT outperforms existing methods by at least 12% on correctness metrics. Importantly, the resulting translations are substantially more readable and maintainable than output from traditional rule-based systems, offering a meaningful advantage for long-term code upkeep.
Why It Matters#
As COBOL systems remain entrenched in critical infrastructure, having tools that can automate their migration to modern languages—while producing human-friendly code—could ease the burden on organizations managing legacy technology landscapes.

