Saved in:
Bibliographic Details
Main Authors: Tateishi, Takaaki, Katsuno, Yasuharu
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2512.06448
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912753135910912
author Tateishi, Takaaki
Katsuno, Yasuharu
author_facet Tateishi, Takaaki
Katsuno, Yasuharu
contents Modernizing legacy enterprise systems often involves translating PL/I programs into modern languages such as Java. This task becomes significantly more complex when PL/I macro procedures are involved. The PL/I macro procedures are considered string-manipulating programs that generate PL/I code, and they make automated translation more complex. Recently, large language models (LLMs) have been explored for automated code translation. However, LLM-based code translation struggles to translate the PL/I macro procedures to Java programs that reproduce the behavior of the plain PL/I code generated by the original PL/I macro procedures. This paper proposes a novel method called templatization, which uses symbolic execution to generate code templates (code with named placeholders) as an intermediate representation. In this approach, symbolic values are treated as parts of macro-generated code. By symbolically executing macro procedures and generating code templates, our approach facilitates LLMs to generate readable and maintainable Java code. Our preliminary experiment on ten PL/I macro procedures shows that the LLM-based translation through templatization successfully generates Java programs that reproduce the behavior of the macro-generated PL/I programs.
format Preprint
id arxiv_https___arxiv_org_abs_2512_06448
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Translating PL/I Macro Procedures into Java Using Automatic Templatization and Large Language Models
Tateishi, Takaaki
Katsuno, Yasuharu
Software Engineering
D.2.0
Modernizing legacy enterprise systems often involves translating PL/I programs into modern languages such as Java. This task becomes significantly more complex when PL/I macro procedures are involved. The PL/I macro procedures are considered string-manipulating programs that generate PL/I code, and they make automated translation more complex. Recently, large language models (LLMs) have been explored for automated code translation. However, LLM-based code translation struggles to translate the PL/I macro procedures to Java programs that reproduce the behavior of the plain PL/I code generated by the original PL/I macro procedures. This paper proposes a novel method called templatization, which uses symbolic execution to generate code templates (code with named placeholders) as an intermediate representation. In this approach, symbolic values are treated as parts of macro-generated code. By symbolically executing macro procedures and generating code templates, our approach facilitates LLMs to generate readable and maintainable Java code. Our preliminary experiment on ten PL/I macro procedures shows that the LLM-based translation through templatization successfully generates Java programs that reproduce the behavior of the macro-generated PL/I programs.
title Translating PL/I Macro Procedures into Java Using Automatic Templatization and Large Language Models
topic Software Engineering
D.2.0
url https://arxiv.org/abs/2512.06448