Skip to content
conftrace_
2025 NAACL NAACL 2025

LLM-Assisted Translation of Legacy FORTRAN Codes to C++: A Cross-Platform Study

AbstractLarge Language Models (LLMs) are increasinglybeing leveraged for generating andtranslating scientific computer codes by bothdomain-experts and non-domain experts. Fortranhas served as one of the go to programminglanguages in legacy high-performance computing(HPC) for scientific discoveries. Despitegrowing adoption, LLM-based code translationof legacy code-bases has not been thoroughlyassessed or quantified for its usability.Here, we studied the applicability of LLMbasedtranslation of Fortran to C++ as a step towardsbuilding an agentic-workflow using openweightLLMs on two different computationalplatforms. We statistically quantified the compilationaccuracy of the translated C++ codes,measured the similarity of the LLM translatedcode to the human translated C++ code, andstatistically quantified the output similarity ofthe Fortran to C++ translation.

🌉 Interdisciplinary Bridge - Artificial Intelligence and Computer Science

More from NAACL 2025

All NAACL 2025 papers →