Automated Testing of COBOL to Java Transformation
- URL: http://arxiv.org/abs/2504.10548v1
- Date: Mon, 14 Apr 2025 04:53:30 GMT
- Title: Automated Testing of COBOL to Java Transformation
- Abstract summary: We develop a testing framework for IBM Watsonx Code Assistant for Z (WCA4Z) [5], an industrial tool designed for Java translation.<n>Our framework uses symbolic execution to generate unit tests for mocking external calls and transforming them into JUnit tests to validate semantic equivalence with translated Java.
- Score: 5.395038658302793
- License: http://creativecommons.org/licenses/by-nc-nd/4.0/
- 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.
Related papers
- Agentic Method for Deterministic Validation of Legacy Code Migration [0.0]
"Locksmith Loop" is initiated by preparing two runtime environments.<n>"Locksmith Loop" performs Witness Search over input mocks to penetrate program branches, followed by parity-preserving mutations.<n> Locksmith consistently improved coverage beyond input-search plateaus.
arXiv Detail & Related papers (2026-07-30T14:25:23Z) - SEDCoT: Enhancing LLM-Based COBOL Code Translation via Symbolic Execution and Delta Debugging [49.898541267264115]
Maintenance is increasingly challenging due to outdated technologies, sparse documentation, and developer retirement.<n>Traditional rule-based transcompilers yield outputs that are difficult to read and maintain.<n>We propose SEDCoT, a novel-to-C translation framework.
arXiv Detail & Related papers (2026-07-05T03:07:10Z) - COBOL-Coder: Domain-Adapted Large Language Models for COBOL Code Generation and Translation [10.733306714499067]
Existing large language models (LLMs) struggle to generate and translate code correctly.<n>We introduce an automated data curation pipeline that combines compiler-guided validation with multi-stage similarity-based filtering.<n>Code-Coder achieves up to 73.95 percent compilation success rate and 49.33 Pass-1 onEval, compared to 41.8 percent and 16.4 for GPT-4o.
arXiv Detail & Related papers (2026-04-05T06:12:49Z) - Evaluating perturbation robustnessof generative systems that use COBOL code inputs [1.3327839779221817]
Systems incorporating large language models (LLMs) as a component are known to be sensitive (i.e., non-robust) to minor input variations.<n>Here, we present a framework to evaluate robustness of systems using code as input.
arXiv Detail & Related papers (2025-11-23T15:16:08Z) - Quality Evaluation of COBOL to Java Code Transformation [0.22499166814992438]
We present an automated evaluation system for assessing code translation within IBM's watsonx Code Assistant for Z (WCA4Z)<n>The system addresses key challenges in evaluating LLM-based translators, including model opacity and the complexity of translation quality assessment.
arXiv Detail & Related papers (2025-07-31T09:06:20Z) - Automated Validation of COBOL to Java Transformation [5.162381960073761]
We propose a framework and a tool to help validate the equivalence of and translated Java.<n>The results can also help repair the code if there are some issues and provide feedback to the AI model to improve.
arXiv Detail & Related papers (2025-04-14T06:13:32Z) - Generating executable oracles to check conformance of client code to requirements of JDK Javadocs using LLMs [21.06722050714324]
This paper focuses on automation of test oracles for clients of widely used Java libraries, e.g., java.lang and java.util packages.
We use large language models as an enabling technology to embody our insight into a framework for test oracle automation.
arXiv Detail & Related papers (2024-11-04T04:24:25Z) - Leveraging Large Language Models for Code Translation and Software Development in Scientific Computing [0.9668407688201359]
generative artificial intelligence (GenAI) is poised to transform productivity in scientific computing.<n>We developed a tool, CodeScribe, which combines prompt engineering with user supervision to establish an efficient process for code conversion.<n>We also address the challenges of AI-driven code translation and highlight its benefits for enhancing productivity in scientific computing.
arXiv Detail & Related papers (2024-10-31T16:48:41Z) - CRUXEval-X: A Benchmark for Multilingual Code Reasoning, Understanding and Execution [50.7413285637879]
The CRUXEVAL-X code reasoning benchmark contains 19 programming languages.
It comprises at least 600 subjects for each language, along with 19K content-consistent tests in total.
Even a model trained solely on Python can achieve at most 34.4% Pass@1 in other languages.
arXiv Detail & Related papers (2024-08-23T11:43:00Z) - CAT-LM: Training Language Models on Aligned Code And Tests [19.526181671936243]
Testing is an integral part of the software development process. Yet, writing tests is time-consuming and therefore often neglected.
We propose the Aligned Code And Tests Language Model (CAT-LM), a GPT-style language model with 2.7 Billion parameters, trained on a corpus of Python and Java projects.
arXiv Detail & Related papers (2023-10-02T19:52:22Z) - Neuro-symbolic Zero-Shot Code Cloning with Cross-Language Intermediate
Representation [13.881954273779403]
We define a neuro-symbolic approach to address the task of finding semantically similar clones for the codes of the legacy programming language, without training data.
We fine-tune UnixCoder, the best-performing model for cross-programming language search, for the Code Cloning task with the SBT IRs of C code-pairs, available in the CodeNet dataset.
With this fine-tuned UnixCoder, we get a performance improvement of 12.85 MAP@2 over the pre-trained UniXCoder model, in a zero-shot setting, on the test split synthesized from the CodeNet
arXiv Detail & Related papers (2023-04-26T07:41:26Z) - LEVER: Learning to Verify Language-to-Code Generation with Execution [64.36459105535]
We propose LEVER, a simple approach to improve language-to-code generation by learning to verify the generated programs with their execution results.
Specifically, we train verifiers to determine whether a program sampled from the LLMs is correct or not based on the natural language input, the program itself and its execution results.
LEVER consistently improves over the base code LLMs(4.6% to 10.9% with code-davinci) and achieves new state-of-the-art results on all of them.
arXiv Detail & Related papers (2023-02-16T18:23:22Z) - Interactive Code Generation via Test-Driven User-Intent Formalization [60.90035204567797]
Large language models (LLMs) produce code from informal natural language (NL) intent.
It is hard to define a notion of correctness since natural language can be ambiguous and lacks a formal semantics.
We describe a language-agnostic abstract algorithm and a concrete implementation TiCoder.
arXiv Detail & Related papers (2022-08-11T17:41:08Z) - ReACC: A Retrieval-Augmented Code Completion Framework [53.49707123661763]
We propose a retrieval-augmented code completion framework, leveraging both lexical copying and referring to code with similar semantics by retrieval.
We evaluate our approach in the code completion task in Python and Java programming languages, achieving a state-of-the-art performance on CodeXGLUE benchmark.
arXiv Detail & Related papers (2022-03-15T08:25:08Z) - AVATAR: A Parallel Corpus for Java-Python Program Translation [77.86173793901139]
Program translation refers to migrating source code from one language to another.
We present AVATAR, a collection of 9,515 programming problems and their solutions written in two popular languages, Java and Python.
arXiv Detail & Related papers (2021-08-26T05:44:20Z) - Zero-Shot Cross-lingual Semantic Parsing [56.95036511882921]
We study cross-lingual semantic parsing as a zero-shot problem without parallel data for 7 test languages.
We propose a multi-task encoder-decoder model to transfer parsing knowledge to additional languages using only English-Logical form paired data.
Our system frames zero-shot parsing as a latent-space alignment problem and finds that pre-trained models can be improved to generate logical forms with minimal cross-lingual transfer penalty.
arXiv Detail & Related papers (2021-04-15T16:08:43Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.