Mistral AI

Modernizing complex legacy code with AI agents.

Read the original on Mistral AI →

Mistral AI assisted a European energy operator in modernizing a substantial legacy codebase by migrating 40,000 lines of Fortran 77 to C++. The project showcases the practical application of AI agents in refactoring complex code, detailing the process and key lessons learned. It serves as a case study for similar modernization efforts in the industry.

Machine-generated by The Flow from the publisher's headline and feed description — not written or checked by a human. The full article lives at Mistral AI.

arXiv AI
Oct 28

From Legacy Fortran to Portable Kokkos: An Autonomous Agentic AI Workflow

The paper introduces an autonomous AI workflow that uses specialized large language model agents to translate legacy Fortran code into performance‑portable Kokkos C++ programs. The pipeline handles translation, validation, compilation, execution, testing, debugging, and optimization, and has been shown to modernize benchmark kernels across heterogeneous GPU‑accelerated hardware. Experiments demonstrate that paid OpenAI models can produce optimized Kokkos code for only a few dollars, outperforming Fortran baselines, while open‑source models often fail to generate functional code.

By Sparsh Gupta, Kamalavasan Kamalakkannan, Maxim Moraru, Galen Shipman, Patrick Diehl