Mistral AI described the migration of 40 000 lines of legacy Fortran code to C++ using AI agents
Mistral AI helped a European energy company migrate a reservoir simulator containing 40 000 lines of Fortran 77 to C++ using AI agents. The key was a verification harness for numerical parity and a structured team of agents with human supervision.
Mistral AI helped a European energy company migrate 40 000 lines of Fortran 77 code to C++. This was a physics-intensive reservoir simulator without a test suite or central documentation. According to Mistral AI, it required not only translating the syntax but also architectural refactoring from a procedural paradigm to an object-oriented one (OOP) and integrating the scientific framework PetSc.
According to the company, before the migration itself, the team first built a verification harness that compares the numerical agreement of outputs between the original and migrated code – including checkpoints in intermediate calculations identified by engineers from the client company. In parallel, more than a hundred agents were deployed using Vibe CLI. Using document libraries and Mistral OCR, they processed scattered documentation (old PDF files and code comments) and mapped it back to the code.
The company described three approaches to deploying agents for the migration itself. According to the company, a fully autonomous approach (one agent per subroutine) led only to a mechanical rewrite of Fortran syntax into C++ without actual modernization. A structured team of agents (planner, programmer, tester, quality reviewer) improved code quality, but the agents got stuck on more complex errors without any way to intervene. The final solution involved a human directing the workflow of these agent roles and migrating the codebase module by module.
The source article goes on to describe details of the migration agent workflow itself, but this part of the text was not available. You can find the details in the source article.
Why it matters
The case demonstrates a concrete, documented methodology for deploying AI agents to migrate extensive scientific/industrial legacy code without tests or documentation – a common problem in decades-old systems whose original authors have left. For companies with similar codebases (energy, science, industry), it provides guidance on how to reduce migration risk using a verification harness and a structured agent workflow with human supervision; for developers, it is instructive that full agent autonomy alone does not lead to actual code modernization.
Two audiences, two different impacts
What this means
For individuals
For developers working with AI agents on code migration, it is instructive that full agent autonomy led only to a syntactic rewrite without actual modernization, while a structured team of agents with a human checkpoint produced a better result.
For a business
Companies with extensive legacy codebases (scientific, industrial and financial systems in languages such as Fortran) now have a documented approach and a provider for migration using AI agents, reducing dependence on departing authors of the original code and opening a path to modernization without a test suite or documentation.
DevelopmentCheck the original
Event sources
only one source so far · 1 publisher, 0 independent. We count feeds from the same owner only once.