Skip to content

Agentic Method for Deterministic Validation of Legacy Code Migration

Jul 2026 · arXiv.org · Vol abs/2607.28271 · 0 citations · 37 references
Computer Science

TL;DR

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.

Abstract

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.

View source

Similar papers

Preprint Aug 2026

Validating LLM-Modernized Scientific Software Through Differential Fault Injection

A harness instruments the shared self-consistent-field driver of GAMESS at twelve sites and applies identical, deterministic faults to the original and LLM-modernized implementations, isolating the converted integral kernels.

Evan Coleman, Yuzhong Shen, M. Sosonkina et al. · 0 citations
Jul 2026

Metamorphic Testing of Transpilers via Mutation Consistency of Programs

The proposed metamorphic testing technique can effectively reveal faults that would remain undetected with pure fuzzing, and is introduced as a novel metamorphic testing technique tailored to transpilers.

Enea Raffaele Ilario Papaleo, Luca Guglielmo, G. Denaro · 0 citations
Preprint Aug 2026

CodeMechanic: Bug-Property-Guided Program Mitigation

This work presents CodeMechanic, a bug-property-guided system for generating constrained mit- igations for spatial memory corruption that combines a two-dimensional static and dynamic context extractor with in-prompt debugging knowledge and stepwise val- idation to limit the effect of LLM errors.

Han Zheng, Rafaila Galanopoulou, Ilia Shumailov et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.