Modernizing Legacy Code with AI

Modernizing Legacy Code with AI

Using LLMs to Transform Fortran to C++ through Intelligent Dialogue

Fortran2CPP introduces a breakthrough approach for automatically translating legacy Fortran code to modern C++ using a dual-agent LLM architecture and multi-turn dialogue.

  • Creates high-quality parallel datasets despite limited training data
  • Implements a Questioner-Solver system where specialized LLMs collaborate to identify and resolve translation issues
  • Achieves superior translation quality compared to existing methods through iterative refinement
  • Enables modernization of critical HPC applications without manual recoding

This research provides engineering teams with a practical solution to the costly challenge of maintaining legacy high-performance computing systems, offering a pathway to extend the life of valuable scientific code while leveraging modern language features.

Fortran2CPP: Automating Fortran-to-C++ Translation using LLMs via Multi-Turn Dialogue and Dual-Agent Integration

82 | 323