LLM-Driven Migration of Legacy Scientific Software

Many scientific and high-performance computing (HPC) software still live in legacy languages such as Fortran, which are robust and performant, but hard to maintain, modernize, or extend. This project aims to build a semi-automated modernization pipeline that uses open‐weight large language models (LLMs) such as Llama coupled with a human‐in-the-loop verification system to translate legacy scientific software into a more maintainable modern language (e.g. C++ or Rust).

Objectives


The project would include:

  1. Selecting nontrivial legacy scientific programs (e.g. a numerical solver from fluid dynamics or computational physics) implemented in old programming languages such as Fortran.
  2. Designing prompt templates and iterative agentic strategies (e.g. error-based feedback loops) for LLMs to translate and refine the code, leveraging compilation results and error messages to guide corrections.
  3. Building an evaluation scaffold that measures (a) syntactic similarity (e.g. via CodeBLEU), (b) compilation success rate, (c) semantic output equivalence (within numerical tolerances), and (d) maintainability of the translated code (readability, modularity).
  4. Having a human reviewer step in to correct, annotate, or improve translations and feed corrections back to the LLM loop.

The outcome would be a proof-of-concept modernization tool plus a case study showing how LLMs can accelerate the modernization of legacy scientific software while maintaining rigorous correctness and developer oversight.

Motivations


Scientific discovery has long relied on legacy codes written in languages such as Fortran, which remain highly optimized but increasingly difficult to maintain, extend, or integrate with modern software ecosystems. As researchers demand greater flexibility, scalability, and interoperability in their computational tools, the modernization of these codes becomes critical. However, manual migration is labor-intensive, error-prone, and often requires expertise in both legacy and modern programming paradigms. Recent advances in large language models (LLMs) open up new opportunities to accelerate this process by providing automated or semi-automated translation and refactoring support. By exploring LLM-assisted modernization, this project addresses an urgent need in scientific computing: preserving the decades of domain knowledge embedded in legacy software while making it accessible, maintainable, and extensible for the next generation of scientific research.

Qualifications


Minimum Qualifications:
  • basic knowledge of coding in C++, Python
  • Using version control systems (Git) and working on Linux-based operating systems.  

Preferred Qualifications:

Recommended: 
CS361, CS362, CS475


Details


Project Partner:

Manish Motwani

NDA/IPA:

No Agreement Required

Number Groups:

1

Project Status:

Accepting Applicants

Keywords:
Software EngineeringSystem DesignSystem TestingResearchArtificial Intelligence AI
Card Image Capstone