paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Automated Validation of COBOL to Java Transformation

COBOL 到 Java 转换的自动验证
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 5/10 · 论文用符号执行生成测试来验证 LLM 生成的 COBOL→Java 翻译语义等价,属于程序分析辅助 LLM 代码生成的交叉方向,与“PL→AI”有部分重合;但它聚焦遗留代码翻译与测试验证,不涉及 Agentic 程序、浮点程序分析、贝叶斯程序分析,也不是用 LLM 改进静态分析/形式化验证。引用 1 inbox
Atul Kumar, Diptikalyan Saha, Toshiaki Yasue, Kohichi Ono, Saravanan Krishnan, Sandeep Hans, Fumiko Satoh, Gerald Mitchell, Sachin Kumar
crossref: 2026-09-12

AI 速览

一句话:提出基于符号执行的测试生成框架,自动验证 COBOL 到 Java 翻译的语义等价性。

基于大语言模型的生成式技术已可将 COBOL 等遗留企业代码翻译为 Java 或 Python 等现代语言,但自动转换结果的可信度无法保证。本文提出一个框架与工具,用于验证原始 COBOL 程序与翻译后 Java 程序之间的等价性。该方法采用基于符号执行的测试生成技术,自动为源 COBOL 程序生成单元测试,并对测试中涉及的外部资源调用进行 mock;随后生成等价的 JUnit 测试用例及等价 mock,通过运行这些测试检查两个程序的语义等价性。验证结果还可用于修复翻译代码中的问题,并为 AI 模型提供反馈以改进后续转换。作者实现了相应工具并提供了演示视频。

问题
LLM 驱动的遗留代码自动转换虽然前景可观,但翻译得到的 Java 代码无法直接信任,缺乏自动验证其与原始 COBOL 程序语义等价的手段。
方法
基于符号执行自动为 COBOL 源程序生成单元测试,并 mock 外部资源调用;再生成等价的 JUnit 测试用例与等价 mock,运行后比对原程序与翻译程序的语义行为。
评估
实现了配套框架与工具,并通过演示视频展示;利用自动生成的等价测试用例检查 COBOL 与 Java 程序的语义等价性,同时支持问题修复与对 AI 模型的反馈。
原文摘要(Abstract)

Recent advances in Large Language Model (LLM) based Generative AI techniques have made it feasible to translate enterpriselevel 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. We propose a framework and a tool to help validate the equivalence of COBOL and translated Java. The results can also help repair the code if there are some issues and provide feedback to the AI model to improve. We have developed a symbolic-execution-based test generation to automatically generate unit tests for the source COBOL programs which also mocks the external resource calls. We generate equivalent JUnit test cases with equivalent mocking as COBOL and run them to check semantic equivalence between original and translated programs. Demo Video: https://youtu.be/aqF_agNP-lU

链接与引用

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

BibTeX
@inproceedings{paperbot8276,
  title = {Automated Validation of COBOL to Java Transformation},
  author = {Atul Kumar and Diptikalyan Saha and Toshiaki Yasue and Kohichi Ono and Saravanan Krishnan and Sandeep Hans and Fumiko Satoh and Gerald Mitchell and Sachin Kumar},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3695365}
}