研究人员开发了一种名为"Locksmith Loop"的人工智能驱动测试合成方法,用于识别遗留COBOL程序迁移至Java过程中产生的缺陷[1]。该方法通过在商用硬件上建立双环境,同时运行COBOL源代码和生成的Java目标代码,利用迭代式AI循环进行输入搜索和变异测试,以发现迁移过程中引入的漏洞[1]。
研究团队在三个案例中验证了这一方法的有效性[1]。在规模为430至4,114行源代码的两个开源COBOL-Java程序上,该方法达到近完全覆盖;在内部生产级COBOL程序的测试中,实现了91.90%的分支覆盖率[1]。该研究的核心创新在于采用确定性预言器来验证AI编码输出的正确性[1]。相关研究论文于2026年7月30日发表[1]。
Researchers have unveiled an AI-driven testing methodology called "Locksmith Loop" designed to validate the migration of legacy COBOL programs to Java.[1] The approach operates dual environments running both the original COBOL source code and the AI-generated Java target code on commercial hardware, employing iterative AI cycles for input search and mutation testing.[1]
The research, published on July 30, 2026, evaluated the method across three case studies involving COBOL-Java programs ranging from 430 to 4,114 lines of source code.[1] On two open-source programs, the Locksmith Loop methodology achieved near-complete coverage, while on an internal production-level COBOL program it attained a branch coverage rate of 91.90%.[1] The technique incorporates deterministic oracles to verify AI coding outputs, addressing the challenge of ensuring correctness during automated legacy code conversion.[1]