paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Automated Testing of COBOL to Java Transformation

COBOL 到 Java 转换的自动化测试
FSE Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering2025匹配度 6/10 · 论文将符号执行用于验证 LLM 生成的 COBOL→Java 翻译代码的功能等价性,属于程序分析/测试与 LLM 结合的 PL+AI 交叉,且有工业落地背景;但它不涉及静态分析在 Agentic 程序中的应用,也不属于浮点或贝叶斯程序分析,更不是用 LLM 改进程序分析,因此与核心方向部分相关。引用 2 inbox
Sandeep Hans, Atul Kumar, Toshiaki Yasue, Kouichi Ono, Saravanan Krishnan, Devika Sondhi, Fumiko Satoh, Gerald Mitchell, Sachin Kumar, Diptikalyan Saha
crossref: 2026-09-12

AI 速览

一句话:提出基于符号执行的测试框架,自动验证 LLM 翻译所得 Java 代码与原始 COBOL 的功能等价性。

LLM 生成式技术已能翻译 COBOL 等遗留代码,但翻译结果不可完全信任,人工验证耗时费力。本文分享了为 IBM Watsonx Code Assistant for Z(WCA4Z)这一工业级 COBOL 到 Java 翻译工具开发测试框架的经验。该框架面向工业场景,自动测试翻译后 Java 代码与原始 COBOL 程序的功能等价性:利用符号执行为 COBOL 生成单元测试,对 mock 外部调用后转换为 JUnit 测试,再验证翻译后 Java 的语义等价性。该框架不仅能识别并修复检测到的差异,还能为改进 AI 翻译模型提供反馈。

问题
LLM 自动将 COBOL 翻译为 Java 的结果可能偏离原语义,人工验证翻译正确性耗时且劳动密集。
方法
为工业工具 WCA4Z 构建测试框架:用符号执行为 COBOL 生成单元测试,mock 外部调用并转换为 JUnit 测试,与翻译后 Java 做语义等价性验证。
评估
在工业场景中部署该框架,自动检测翻译差异以支持修复,并将结果反馈用于改进 LLM 翻译模型。
原文摘要(Abstract)

Recent advances in Large Language Model (LLM) based Generative AI techniques have made it feasible to translate enterprise-level code from legacy languages such as COBOL to modern languages such as Java or Python. While the results of LLM-based automatic transformation are encouraging, the resulting code cannot be trusted to correctly translate the original code, making manual validation of translated Java code from COBOL a necessary but time-consuming and labor-intensive process. In this paper, we share our experience of developing a testing framework for IBM Watsonx Code Assistant for Z (WCA4Z) [5], an industrial tool designed for COBOL to Java translation. The framework automates the process of testing the functional equivalence of the translated Java code against the original COBOL programs in an industry context. Our framework uses symbolic execution to generate unit tests for COBOL, mocking external calls and transforming them into JUnit tests to validate semantic equivalence with translated Java. The results not only help identify and repair any detected discrepancies but also provide feedback to improve the AI model.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot8963,
  title = {Automated Testing of COBOL to Java Transformation},
  author = {Sandeep Hans and Atul Kumar and Toshiaki Yasue and Kouichi Ono and Saravanan Krishnan and Devika Sondhi and Fumiko Satoh and Gerald Mitchell and Sachin Kumar and Diptikalyan Saha},
  booktitle = {FSE},
  year = {2025},
  doi = {10.1145/3696630.3728548}
}