Certifying Repeatable Entry-Replay Witnesses for COBOL-to-Java Migration
- Source
- arxiv.org
- Author
- Andras L. Ferenczi, Mariya Bessonov, Allwyn Ponnudurai, Chandrakanth R. Mamillapalli, Krishna K. Maddula, Krishna K. Lingamneni
- Date

Context
Migrating a COBOL system to Java with a raises an awkward question: what do you compare the Java against when the old system has little documentation and no usable test data? This paper's answer is to run the original COBOL as the reference. In the full paper, the authors compile it with GnuCOBOL and replace its outside dependencies, such as database calls, message queues and subprogram calls, with mocks fed by a chronological tape: an ordered list of external operations, each paired with the outcome to return. A test case, which they call a witness, is a set of entry values plus that tape. It only counts once it has been freshly replayed on the COBOL surrogate and shown to run stably and follow the tape, and the resulting certificate is invalidated if the surrogate, or witness changes.
Applied to a 33,429-line , the method produced 849 certified synthetic cases covering 78.1% of source branches and 95.7% of main paragraphs, according to the abstract. The Java code produced by their generator matched the COBOL surrogate on all of them, but only on a defined set of observations: return code and abend status, normalized display output, the order paragraphs were first reached, normalized external calls, the tape entries consumed, and the final data and program . Along the way the campaign surfaced 61 defects that led to fixes in the Java generator.
The more telling experiment asks whether the gate would notice an agent quietly breaking business logic. The authors seeded 450 defects into the Java. The gate caught 47.6%, including every deleted write and deleted paragraph call in code the cases actually executed, but none of the rounding and precision changes; the paper attributes this to witnesses that rarely exercise value boundaries. It also lists its own limits: only successful runs were certified, so error paths were excluded; GnuCOBOL may behave differently from the original mainframe compiler; and the authors say the method does not guarantee production functional parity and claim no quantified improvement over their earlier Locksmith Loop work. The program, fixtures and generated code are confidential, so the results cannot be independently rerun.
- To generate comparison tests for COBOL-to-Java migration, the authors run a surrogate COBOL program that mocks external systems with a chronological tape of recorded operations, then certify test cases by observing its execution trace.
- On a 33,429-line COBOL program they produced 849 synthetic end-to-end tests covering 78.1% of source branches and 95.7% of main paragraphs; the generated Java matched the surrogate on all 849, and the campaign surfaced 61 generator defects.
- When 450 defects were seeded into the Java, the gate caught 47.6%: every deleted write and deleted paragraph call in executed code, but none of the rounding and precision changes, a blind spot for validating agent-written migrations.
- Agent mode — A mode in which one agent can inspect, edit, run commands, and iterate toward an outcome.
- Harness — The software that sends a model its context, recognizes tool calls, runs or refuses them, returns results and keeps the record.
- Program — A set of instructions stored so that a computer can run it.
- State — Information describing a system at a particular moment, such as its current text, settings or saved records.
articleIdentifying Latent Declarative Representations of Code for Assisting Repository MigrationShraddha Surana, Ashwin Srinivasan, Michael Bain
articleSpec2COBOLRot: An Agentic-AI Degradation Loop for Realistic COBOL Corpus GenerationJean-Baptiste Espinasse (DiverSe), Djamel Eddine Khelladi (DiverSe, CNRS, IRISA, KHORA), Mathieu Acher (INSA Rennes, IRISA, DiverSe)
articleLegacy System Modernization with Coding Agents: A Case StudyIago da Silva Rodrigues Alves, Cristiano Politowski, Jo\~ao Eduardo Montandon