LLM-Assisted Translation of Legacy FORTRAN Codes to C++: A Cross-Platform Study
By: Nishath Rajiv Ranasinghe , Shawn M. Jones , Michal Kucer and more
Potential Business Impact:
Turns old science code into new code.
Large Language Models (LLMs) are increasingly being leveraged for generating and translating scientific computer codes by both domain-experts and non-domain experts. Fortran has served as one of the go to programming languages in legacy high-performance computing (HPC) for scientific discoveries. Despite growing adoption, LLM-based code translation of legacy code-bases has not been thoroughly assessed or quantified for its usability. Here, we studied the applicability of LLM-based translation of Fortran to C++ as a step towards building an agentic-workflow using open-weight LLMs on two different computational platforms. We statistically quantified the compilation accuracy of the translated C++ codes, measured the similarity of the LLM translated code to the human translated C++ code, and statistically quantified the output similarity of the Fortran to C++ translation.
Similar Papers
Beyond Code Pairs: Dialogue-Based Data Generation for LLM Code Translation
Programming Languages
Makes old computer code work on new systems.
REMODEL-LLM: Transforming C code to Java using LLMs
Software Engineering
Helps computers change old code to new code.
Leveraging LLMs for Automated Translation of Legacy Code: A Case Study on PL/SQL to Java Transformation
Software Engineering
Helps old computer code become new code.