arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.27272cs.SEcs.AI
收藏

为COBOL到Java迁移验证可重复的入口重放见证

Certifying Repeatable Entry-Replay Witnesses for COBOL-to-Java Migration

American Express(美国运通)

Andras L. Ferenczi, Mariya Bessonov, Allwyn Ponnudurai, Chandrakanth R. Mamillapalli, Krishna K. Maddula, Krishna K. Lingamneni

AI总结:

该研究针对COBOL到Java迁移中合成测试数据生成的挑战,提出入口重放测试用例验证方法,在3万余行COBOL程序上生成849个测试用例,验证了代码一致性并检测到缺陷,但无法检测舍入精度类缺陷。

摘要:

为迁移后的COBOL应用生成用于对比测试的合成数据,是当前智能体迁移面临的重大挑战。我们此前的论文《用于遗留代码迁移确定性验证的智能体方法》提出了名为Locksmith Loop的确定性预言机,以推动此类迁移。我们现提出一种新方法:通过观察模拟外部交互的代理COBOL程序(借助时序外部操作磁带)的代码执行轨迹,对入口重放测试用例进行验证,从而生成合成端到端测试用例,实现高分支和段落覆盖率。我们将该方法应用于一个包含33429行代码的超大型COBOL程序,生成了849个合成端到端测试用例,覆盖2973/3806个源分支(78.1%)和989/1033个主AST段落(95.7%)。利用Locksmith Loop的预测一致性验证,生成的Java代码在所有849个经认证的合成端到端测试用例的指定观测点上与COBOL代理一致。在测试过程中,我们检测到61个缺陷并相应修复了Java生成器。为测试编码智能体是否会悄悄引入业务逻辑缺陷,我们在Java代码中植入了450个缺陷,包括删除写入操作、删除段落调用和修改舍入操作,以验证门控方法能检测到其中多少缺陷。该门控方法检测到47.6%的缺陷,包括已执行代码中所有被删除的写入操作和段落调用,但无法检测舍入和精度缺陷。

英文摘要:

Producing synthetic data for comparison testing a migrated COBOL application is a major challenge that agentic migrations face today. Our prior paper, the Agentic Method for Deterministic Validation of Legacy Code Migration, presents a deterministic oracle to facilitate such migrations, the Locksmith Loop. We now propose a novel method for achieving high branch and paragraph coverage through generated synthetic end-to-end test cases, by means of entry-replay test-case certification by observing the code execution trace on a surrogate COBOL program that mocks external interactions via a chronological external-operation tape. We applied our method to a very large COBOL program with 33,429 lines of code to generate 849 synthetic end-to-end test cases covering 2,973/3,806 source branches (78.1%) and 989/1,033 main-AST paragraphs (95.7%). Using the Locksmith Loop's projected-agreement validation, the generated Java code matched the COBOL surrogate on the specified observations across all 849 certified synthetic end-to-end test cases. During the campaign we detected 61 defects and fixed the Java generator accordingly. To test whether the coding agent could silently introduce business logic bugs, we seeded 450 defects into the Java code, such as deleted writes, deleted paragraph calls, and altered rounding, to verify how many of these would be detected by the gating methodology. The gate detected 47.6%, including all deleted writes and paragraph calls in executed code, but was unable to detect the rounding and precision defects.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑