这论文搞了个Locksmith Loop来验证COBOL转Java,实测分支覆盖率能到91.9%,比随机测强多了。
论文提出Locksmith Loop,一种代理式测试合成方法,用于验证COBOL到Java的迁移正确性。该方法在商品硬件上同时运行COBOL源码和Java目标,通过Witness Search穿透分支并执行奇偶保留变异。在三个案例研究(两个开源程序和一个内部生产程序,规模从430到4,114行)中,Locksmith将分支覆盖率提升至接近完全,内部程序达到91.90%。生成的Java在所有接受测试用例中通过确定性奇偶校验。
Agentic Method for Deterministic Validation of Legacy Code Migration
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.