arXiv:2610.11073cs.SEOct 2026

Manuscript Offprint

arXiv:2610.11073

IRONPROOF: COBOL-to-Python Transpilation with SMT-Based Equivalence Checking

Dominik Blain

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

COBOL remains in production in financial institutions and government agencies, and translating it to a modern language risks changing what the programs compute. Large language models (LLMs) can translate code, but their output carries no guarantee of semantic equivalence, and a divergence on a few inputs can pass conventional testing.

We present IRONPROOF, an end-to-end pipeline that combines rule-based COBOL-to-Python transpilation with SMT-based formal equivalence verification using the Z3 theorem prover. Given a COBOL program, IRONPROOF parses the source into an intermediate representation covering common enterprise COBOL constructs, generates Python with Decimal-typed arithmetic and @dataclass working storage, then encodes both programs as Z3 formulas over shared symbolic inputs and checks whether any input witnesses a semantic divergence. If no divergence exists (UNSAT), IRONPROOF emits a machine-checkable equivalence certificate; if Z3 produces a counterexample (SAT), the tool can return it to an LLM in a correction loop, which this paper describes but does not evaluate.

We evaluate IRONPROOF on a benchmark of 2,345 COBOL programs drawn from the GnuCOBOL compiler test suite (1,632 programs), the NIST CCVS85 validation suite, open-source enterprise collections, and systematically generated construct variations. The parser accepts all 2,345 programs; our Python generator refuses 400 rather than emit Python it cannot stand behind. A program enters the checking path when its COBOL side yields at least one Z3-encodable output, and 782 do. Of these, 606 (77.5%) are proved equivalent, 101 are only partially verified, none is refuted, and 75 fail inside our own pipeline; the remaining 1,563 yield no encodable output (file I/O, embedded SQL, PERFORM loops, INSPECT) and are reported separately. Our failures stay in the denominator, since a rate that excludes them cannot fall. Two qualifications bound what these proofs mean. The first is provenance: on independently authored programs (GnuCOBOL, NIST, dscobol, community—not written by us) the rate is 52.6% (153 of 291), against 92.3% on programs we wrote. The second is the input domain. 37 of the 153 independent proofs are on programs that read input—a file, ACCEPT, parameters—that the encoder does not model, so each covers a single execution of a program that has many. Only 14 proofs quantify over an input that a proved output depends on, and 15 more have free inputs that no proved output depends on. The remaining 540 are on closed programs, which have one execution and are fully covered by it. On two public business-application corpora (AWS CardDemo and IBM GenApp, 75 programs), the encoder models no program end to end and 1 of 712 paragraphs. A baseline run in April 2026 against LLM-only translation found that the LLM failed on 57% of 94 independently authored programs, counting both Z3-confirmed semantic errors and translations our encoder could not verify. We also report PIC-bounded overflow detection, which flags truncation risks the unbounded encoding does not model. Finally, an earlier confrontation of the proofs with GnuCOBOL 3.2.0, on the pipeline of 2026-08-26, found that 24 of the 49 independently authored proved programs it could execute disagreed with the runtime on a variable inside the proof's own domain. These figures delimit what an emission-fidelity proof establishes.

CCS Concepts

• Software and its engineering → Software verification and validation; Compilers.