Search papers, labs, and topics across Lattice.
This paper introduces SEDCoT, a novel framework for translating COBOL code into C by leveraging large language models (LLMs) combined with symbolic execution and delta debugging. The approach addresses the challenges of COBOL's low-resource nature and distinct logic patterns, which hinder traditional transcompilers and LLMs from achieving high correctness. Evaluation on a public COBOL-to-C dataset shows that SEDCoT outperforms existing methods by at least 12% and produces more readable translations, significantly enhancing the maintainability of legacy code.
SEDCoT achieves a 12% improvement in translation accuracy over existing methods while enhancing the readability of COBOL code translations into C.
COBOL remains critical across banking, insurance, and government infrastructure. However, maintenance is increasingly challenging due to outdated technologies, sparse documentation, and developer retirement, necessitating code translation into modern languages like C. Traditional rule-based transcompilers yield outputs that are difficult to read and maintain, while general-purpose large language models (LLMs) achieve suboptimal correctness because COBOL is a low-resource language with distinct logic patterns. To bridge this gap, we propose SEDCoT, a novel COBOL-to-C translation framework. SEDCoT first leverages LLMs for initial translation, then combines symbolic execution with LLM guidance to generate test suites and iteratively repair semantic discrepancies. Finally, it integrates delta debugging to minimize failing tests into succinct counterexamples, accelerating automated code repair. Evaluating SEDCoT on a public COBOL-to-C dataset demonstrates that it outperforms state-of-the-art baselines by at least 12% while producing translations with substantially higher readability than rule-based alternatives.