Neural Code Translation of Legacy Code: APL to C#

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Ramadan, Abdulrahman, Borchani, Hanen, Lilholm, Iben, Almind, Mikkel, Engsig-Karup, Allan Peter
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916011644551168
author Ramadan, Abdulrahman
Borchani, Hanen
Lilholm, Iben
Almind, Mikkel
Engsig-Karup, Allan Peter
author_facet Ramadan, Abdulrahman
Borchani, Hanen
Lilholm, Iben
Almind, Mikkel
Engsig-Karup, Allan Peter
contents Automatic translation between programming languages remains a challenging problem, particularly when the source language is highly concise and specialized. This paper investigates the translation of APL into C# using large language models. The task is difficult due to APL's sparse syntax, the scarcity of large-scale parallel corpora, and the requirement for specialized knowledge to interpret APL programs. To address these challenges, we introduce a novel framework for APL-to-C# translation by comparing three guided strategies, namely natural language description-mediated, retrieval-augmented, and iterative refinement, against a baseline direct translation model. We constructed multiple datasets of functionally equivalent code pairs spanning various levels of complexity, and to rigorously assess translation quality, we developed an automated evaluation pipeline that verifies both syntactic compilation and functional execution of the generated C# code. Our results demonstrate that neural code translation can successfully bridge the gap between APL and C# for a wide range of programs, and that incorporating additional context and guidance significantly improves model performance.
format Preprint
id arxiv_https___arxiv_org_abs_2605_13896
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Neural Code Translation of Legacy Code: APL to C#
Ramadan, Abdulrahman
Borchani, Hanen
Lilholm, Iben
Almind, Mikkel
Engsig-Karup, Allan Peter
Software Engineering
Programming Languages
Automatic translation between programming languages remains a challenging problem, particularly when the source language is highly concise and specialized. This paper investigates the translation of APL into C# using large language models. The task is difficult due to APL's sparse syntax, the scarcity of large-scale parallel corpora, and the requirement for specialized knowledge to interpret APL programs. To address these challenges, we introduce a novel framework for APL-to-C# translation by comparing three guided strategies, namely natural language description-mediated, retrieval-augmented, and iterative refinement, against a baseline direct translation model. We constructed multiple datasets of functionally equivalent code pairs spanning various levels of complexity, and to rigorously assess translation quality, we developed an automated evaluation pipeline that verifies both syntactic compilation and functional execution of the generated C# code. Our results demonstrate that neural code translation can successfully bridge the gap between APL and C# for a wide range of programs, and that incorporating additional context and guidance significantly improves model performance.
title Neural Code Translation of Legacy Code: APL to C#
topic Software Engineering
Programming Languages
url https://arxiv.org/abs/2605.13896