HeadlinesBriefing favicon HeadlinesBriefing.com

Agentic Deterministic Validation of Legacy Code Migration

Hacker News •
×

Migration of legacy COBOL programs to Java requires extensive testing to ensure correct functionality, often hindered by limited test data and the difficulty of validating all corner cases. This paper proposes a novel agentic test‑synthesis method, the Locksmith Loop, which begins by preparing two runtime environments: the COBOL source and the generated Java target are each instrumented with mocks and executed off‑mainframe on commodity hardware.

An iterative agentic loop performs Witness Search over input mocks to penetrate program branches, followed by parity‑preserving mutations. When routing boundaries are reached, an analyzer identifies a Locked Paragraph, a condition that prevents deeper exploration.

Across three COBOL‑Java case studies—two open‑source programs and one internal production‑like COBOL program, spanning 430 to 4,114 source lines—Locksmith consistently improved coverage beyond input‑search plateaus, reaching nearly complete coverage on the open‑source programs and 91.90% branch coverage on the internal production‑like COBOL program. The generated Java matched the COBOL reference under deterministic parity checks in all accepted test cases.

These findings demonstrate, to the best of our knowledge, a novel approach for validating agentic coding output using a deterministic oracle.