Source note3 min read
Agentic Method for Deterministic Validation of Legacy Code Migration
Source
arXiv
arxiv.org/abs/2607.28271v1
Source
- Source name: arXiv
- Source kind: paper
- Authors / organization: Andras Ferenczi, Jordan Docherty, Mariya Bessonov, Matthew Findlay, Krishna Lingamneni
- Venue: arXiv: cs.SE
- Published: 2026-07-30
- Collected: 2026-07-31
- URL: http://arxiv.org/abs/2607.28271v1
- PDF: https://arxiv.org/pdf/2607.28271v1
- DOI: UNKNOWN
Plain-Language Brief
The paper proposes a new method called 'Locksmith Loop' to simplify the testing process when migrating COBOL programs to Java. The method uses mocks, iterative agentic loops, and parity-preserving mutations to ensure correct functionality, even in complex situations where test data is limited or corner cases are difficult to validate.
What the Document Says
- The paper discusses the difficulty of migrating COBOL programs to Java due to limited test data and complicated corner cases.
- The authors propose a method called 'Locksmith Loop' to address these issues.
- This method involves preparing two runtime environments for both COBOL source and generated Java target, instrumented with mocks.
- An iterative agentic loop performs Witness Search over input mocks to explore program branches.
- Parity-preserving mutations are used during this process.
- When routing boundaries are reached, a Locked Paragraph is identified and an analyzer is used.
- The study was conducted on three COBOL-Java case studies spanning various programs with varying source lines.
- The Locksmith method improved coverage beyond input-search plateaus in all case studies.
- It reached nearly complete coverage on two open-source programs and 91.90% branch coverage on the internal production-like COBOL program.
- The generated Java was found to match the COBOL reference under deterministic parity checks in all accepted test cases.
- The authors claim that this is a novel approach for validating agentic coding output using a deterministic oracle.
Key Concepts Mentioned
- Legacy code migration
- COBOL programs
- Java
- Test data
- Corner cases
- Agentic test-synthesis method
- Locksmith Loop
- Witness Search
- Parity-preserving mutations
- Locked Paragraph
- Runtime environments
- Deterministic parity checks
Claims Made by the Document
- The Locksmith method improves coverage beyond input-search plateaus.
- It reaches nearly complete coverage on open-source programs and high branch coverage on production-like COBOL programs.
Evidence Used
- Results from three case studies involving COBOL-Java migration.
Methods / Approach
- Locksmith Loop
- Witness Search
- Parity-preserving mutations
- Deterministic parity checks
Limitations Stated by the Authors
- The study only evaluates the method on three specific case studies.
Limitations Noted by the Agent
Agent interpretation — not from the source.
- The text does not provide information about potential limitations due to the agent's role in this context.
- However, possible limitations could include assumptions made about the structure and behavior of COBOL programs, or the scalability of the Locksmith Loop method.
Open Questions
- How does the Locksmith Loop method perform on a wider range of COBOL-Java migration cases?
- What are the potential limitations and assumptions when applying this method to different types or sizes of COBOL programs?
Notes for Future Q&A
May include interpretation. Labeled where it does.
- The paper does not provide information about how well the Locksmith Loop method handles complex or unusual corner cases in COBOL programs.
Raw Abstract / Excerpt
Migration of legacy COBOL programs to Java requires extensive testing to ensure correct functionality. This effort is often complicated by the lack of test data and the difficulty of validating all corner cases. In this paper we propose a novel agentic test-synthesis method, the 'Locksmith Loop,' which is initiated 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, then 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 preventing deeper exploration. Across three COBOL-Java case studies, spanning two open-source programs and one internal production-like COBOL program and ranging from 430 to 4,114 source lines, Locksmith consistently improved coverage beyond input-search plateaus, reaching nearly complete coverage on the two 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. Through these findings we demonstrate, to the best of our knowledge, a novel approach for validating agentic coding output using a deterministic oracle.
