{"@context":"https://schema.org","@type":"NewsArticle","generatedAt":"2026-09-09T23:20:34.380Z","headline":"Mistral 复盘用 AI Agent 迁移 40000 行 Fortran 77 到 C++ 的经验","description":"Mistral 帮助一家欧洲能源运营商将 40000 行 Fortran 77 储层模拟器迁移到 C++，并复盘了方法与经验。","url":"https://www.aioga.com/news/cmtugpn561cgnrofplpzs3udv/","mainEntityOfPage":"https://www.aioga.com/news/cmtugpn561cgnrofplpzs3udv/","datePublished":"2026-09-09T18:59:11.000Z","dateModified":"2026-09-09T18:59:11.000Z","inLanguage":"zh-CN","publisher":{"@type":"NewsMediaOrganization","name":"Aioga","url":"https://www.aioga.com"},"citation":["https://mistral.ai/news/legacy-code-modernization","https://aihot.news/items/cmtugpn561cgnrofplpzs3udv"],"canonicalUrl":"https://www.aioga.com/news/cmtugpn561cgnrofplpzs3udv/","directAnswer":{"@type":"Answer","text":"Mistral AI称，其帮助一家欧洲能源运营商将一套4万行Fortran 77储层模拟器迁移至C++，并公开复盘了迁移方法与经验。","url":"https://www.aioga.com/news/cmtugpn561cgnrofplpzs3udv/","dateCreated":"2026-09-09T18:59:11.000Z","author":{"@type":"Organization","@id":"https://www.aioga.com/authors/aioga-editorial/#editorial-team","name":"Aioga Editorial Team","url":"https://www.aioga.com/authors/aioga-editorial/"}},"evidence":[{"@type":"CreativeWork","name":"Mistral AI：News（网页） source article","url":"https://mistral.ai/news/legacy-code-modernization","datePublished":"2026-09-09T18:59:11.000Z","provider":{"@type":"Organization","name":"Mistral AI：News（网页）","url":"https://mistral.ai/news/legacy-code-modernization"}},{"@type":"CreativeWork","name":"AIHot archive record","url":"https://aihot.news/items/cmtugpn561cgnrofplpzs3udv","datePublished":"2026-09-09T18:59:11.000Z","provider":{"@type":"Organization","name":"AIHot","url":"https://aihot.news/items/cmtugpn561cgnrofplpzs3udv"}}],"aggregationSource":"Mistral AI：News（网页）","originalPublisher":{"name":"Mistral AI：News（网页）","url":"https://mistral.ai/news/legacy-code-modernization"},"geoDeepAnswer":null,"article":{"id":"cmtugpn561cgnrofplpzs3udv","slug":"cmtugpn561cgnrofplpzs3udv","url":"https://www.aioga.com/news/cmtugpn561cgnrofplpzs3udv/","title":"Mistral 复盘用 AI Agent 迁移 40000 行 Fortran 77 到 C++ 的经验","title_en":"","summary":"Mistral 帮助一家欧洲能源运营商将 40000 行 Fortran 77 储层模拟器迁移到 C++，并复盘了方法与经验。","source":"Mistral AI：News（网页）","sourceUrl":"https://mistral.ai/news/legacy-code-modernization","aiHotUrl":"https://aihot.news/items/cmtugpn561cgnrofplpzs3udv","publishedAt":"2026-09-09T18:59:11.000Z","category":"行业动态","score":72,"selected":true,"articleBody":["Build, test, and run AI agents and apps.","Train, align, and evaluate custom AI models.","Coding agents in the terminal, IDE, and background.","Frontier-scale infrastructure for training and inference.","Modernizing complex legacy code with AI agents.","Mistral raises €3B to make sovereign, open-weight AI the technology frontier","Mistral helped a European energy operator migrate 40,000 lines of Fortran 77 to C++. Learn how it was done, and the lessons to carry forward.","Legacy scientific codebases accumulate over decades, and when original authors leave, the knowledge embedded in the code becomes hard to recover. Moreover, using languages with no active developer ecosystem means missing out on the opportunity to build on top of others’ work. Mistral helped a European energy operator migrate 40,000 lines of Fortran 77 to C++, a physics-intensive reservoir simulator with no test suite and no centralized documentation.","Translating syntax from one language to another is a largely solved task. Asking any recent model to translate a snippet from a non-completely-obscure language to another, will likely converge to an acceptable outcome in few iterations. However, migrating a full system from a procedural language to object-oriented C++ creates the need for architectural refactors that make the task non-trivial.","Fortran 77 was standardized in 1977, as the name may suggest, and code written in it reflects those constraints directly: no modules, no namespaces, no structured types. State lives in COMMON blocks—global memory shared across the entire program. Variables are implicitly typed by their first letter, so a misspelled name silently creates a new variable instead of raising a compiler error.","For a simple but illustrative example, take the following implementation of a first-degree Taylor expansion. Inputs and outputs are globals in a COMMON block, and IC is an integer only because its name starts with a letter between I and N. Variable names are quite cryptic, as their length is capped to 6 characters.","In C++, one will be able to leverage explicit types, write object-oriented code, and return a value returned instead of a global write:","The scattered COMMON arrays become a single GasProperties parameter and the grid loop moved out to the caller, so there's no line-for-line correspondence to check, which is what makes verifying the migration hard.","These structural differences, plus the requirement to integrate modern scientific computing frameworks such as PetSc, raised a few important questions even before starting the migration:","How to prove the migrated codebase matches the legacy one numerically","How to split the migration into manageable chunks","How to best use autonomous agents to speed up the process","Before letting agents loose, we needed a way to prove the two codebases agreed. Here, \"agreement\" meant numerical equality of the outputs—both the final results and a set of critical intermediate points flagged by the client's reservoir engineers.","subroutines allowing to export the state of the Fortran codebase","a test framework to load the checkpoints into C++","Skill.md：http://Skill.md files to steer agents into using them correctly","In the migration workflows, agents successfully instrumented the Fortran codebase to dump state snapshots and used the C++ test framework to verify correctness of migrated modules.","Building this part of the harness first was a net-positive investment for the project: it made long agent runs safer, and numerical parity is an easy-to-verify and compelling argument to show a piece of code has been successfully migrated. We believe this should be one of the first steps for any code modernization engagement.","The example below illustrates this. We first inserted a line into the Fortran code to dump the value of the RHOG variable (42.71834 in this run), and then used that same value as the reference checkpoint when testing the migrated C++ module.","The project’s documentation was scattered across old PDFs and comments buried in the Fortran itself, and one of the largest side-wins of the whole effort was reconciling this documentation and moving it next to the code.","Luckily, procedural code like Fortran has a convenient property: the whole program can be drawn as a single caller-callee tree. We generated that tree by parsing the codebase with a custom parser, then used Vibe CLI：https://mistral.ai/products/vibe/ to spawn over a hundred agents to document it. Each agent could pull in the relevant PDFs through document libraries and Mistral OCR：https://mistral.ai/solutions/document-ai/.","Starting from the leaves of the tree and working upward, each node spawned a subagent to document it and open a PR to the original repository. A reviewer agent running in a loop on a cron schedule looked for newly opened PRs, reviewing them and scheduling fix tasks when necessary.","On our first attempt, we gave agents full autonomy: one agent per Fortran subroutine, each translating its function to C++ independently over the course of a week. The result was functional, but it couldn't be called code modernization. COMMON blocks became global structs, one-to-one. GOTO-driven control flow stayed intact instead of being restructured into loops or early returns. It looked like Fortran retyped in C++ syntax rather than modernized code.","In the second attempt, we addressed this by giving agents structure instead of just autonomy: a planner, a coder, a tester and a code quality reviewer working together on each module. Code quality improved substantially over the first attempt. But the source code's complexity caught up with the agents eventually. They would hit a bug, attempt a few fixes, and stall, with no one available to intervene.","We landed on a middle ground: a human operating a workflow of coder, tester, and reviewer agents, migrating the codebase module by module. This preserved the code quality of the second attempt while adding a human checkpoint to unblock agents when they got stuck. The next section covers this workflow in detail.","With the codebase documented and the parity harness in place, the remaining fun bit was tuning how much autonomy we could hand the agents while still getting mergeable code out. We tried both extremes, from fully autonomous runs to closely supervised manual sessions. The structured workflow below is where we landed for this use case.","Working with the client's reservoir engineers, we used the caller-callee tree to identify independent modules—self-contained subtrees of manageable size (empirically, less than ~10’000 lines of Fortran). Each module ran through the same workflow:","Generate the target C++ architecture.","Review it with a reservoir engineer.","On approval, break it into a task queue.","Run an implementation sub-workflow per task: plan → implement → test → repeat.","A human reviews the resulting PRs and requests changes until they merge.","The first sprint covered core functionality: 40,000 of 300,000 lines. The Fortran codebase was self-contained and runnable, which is a favorable starting condition. Migrations that depend on external systems, lack a runnable baseline, or encode physics documented nowhere would bring additional challenges not discussed in this post.","Three lessons from this project should carry over to any large legacy migration.","Build the parity harness before you write migration code—numerical agreement is the cheapest, most convincing proof that a module is done.","Get the documentation in order before you lean on the agents, because you can't migrate code nobody can read.","And at this scale, structured workflows with human review gates beat both full autonomy and hand-driven manual sessions.","Mistral's Applied AI team is a group of engineers building full-stack solutions around Mistral models and Enterprise platform. We ship high-stakes, domain-specific solution to solve some of the world’s hardest problems.","If this is the kind of work you want to be involved in, apply to join our team：https://mistral.ai/careers/."],"articleImages":[{"sourceUrl":"https://mistral.ai/cms-media/api/media/file/2a1ffaf3-f171-460b-be1b-fc734aa776aa.svg","alt":"2a1ffaf3-f171-460b-be1b-fc734aa776aa","afterParagraph":3,"url":"/media/articles/cmtugpn561cgnrofplpzs3udv/e32e6b666122f9f7.jpg"},{"sourceUrl":"https://mistral.ai/cms-media/api/media/file/icon-m-microphone.svg","alt":"","afterParagraph":3,"url":"/media/articles/cmtugpn561cgnrofplpzs3udv/c42626ebf983a308.jpg"}],"mediaStatus":"ok","articleBodyZh":["构建、测试并运行AI代理和应用。","训练、对齐并评估定制的人工智能模型。","在终端、IDE 和后台编写代理代码。","前沿规模的培训和推理基础设施。","用AI代理现代化复杂遗留代码。","Mistral筹集30亿欧元，将主权开放权重人工智能打造为技术前沿","Mistral帮助一家欧洲能源运营商将4万条Fortran 77迁移到C++。了解其做法及后续经验教训。","遗留的科学代码库积累数十年，原作者离开后，代码中蕴含的知识变得难以恢复。此外，使用缺乏活跃开发生态系统的语言意味着错失在他人成果基础上构建的机会。Mistral帮助一家欧洲能源运营商将4万行Fortran 77迁移到C++，这是一个物理密集型的储量模拟器，没有测试套件，也没有集中文档。","将语法从一种语言翻译到另一种语言是一个基本已解决的任务。要求任何近期模型将一个非完全晦涩语言的片段翻译到另一种语言，通常在几次迭代后会收敛到可接受的结果。然而，将完整系统从过程式语言迁移到面向对象的C++，就需要架构重构，使这项任务变得非简单。","Fortran 77 于1977年被标准化，正如其名称所示，其代码直接反映了这些约束：无模块、无命名空间、无结构类型。状态存在于COMMON块中——全局内存，在整个程序中共享。变量以首字母隐式类型，因此拼写错误的名称会无声地生成新变量，而不会引发编译器错误。","举一个简单但有说明意义的例子，看看以下一级泰勒展开的实现。输入和输出是 COMMON 块中的全局，IC 之所以是整数，仅因为它的名称以 I 和 N 之间的字母开头。变量名相当隐晦，因为它们的长度限制在 6 个字符。","在 C++ 中，可以利用显式类型，编写面向对象的代码，并返回一个值，而不是全局写入：","分散的 COMMON 数组变成了单一的 GasProperties 参数，并且网格循环被移到了调用者中，因此没有逐行对应可供检查，这就是验证迁移的难点所在。","这些结构上的差异，加上需要整合现代科学计算框架（如 PetSc），在开始迁移之前就提出了一些重要问题：","如何证明迁移后的代码库在数值上与遗留代码一致","如何将迁移拆分成可管理的阶段","如何最好地利用自主代理加速过程","在放开代理之前，我们需要一种方法证明两个代码库是一致的。在这里，“一致”意味着输出的数值相等——包括最终结果和由客户的油藏工程师标记的一组关键中间点。","允许导出 Fortran 代码库状态的子程序","用于将检查点加载到 C++ 中的测试框架","Skill.md：http://Skill.md 文件，用于引导代理正确使用它们","在迁移工作流程中，代理成功地对 Fortran 代码库进行了仪器化以转储状态快照，并使用 C++ 测试框架验证迁移模块的正确性。","首先构建这部分测试工具对项目来说是一个净正收益的投资：它使长时间运行的代理更安全，并且数值一致性是一个容易验证且有说服力的论据，能够表明一段代码已成功迁移。我们认为，这应该是任何代码现代化工作中最早采取的步骤之一。","下面的示例说明了这一点。我们首先在 Fortran 代码中插入一行以转储 RHOG 变量的值（此运行中为 42.71834），然后在测试迁移后的 C++ 模块时，将该值用作参考检查点。","项目的文档散布在旧的 PDF 文件和隐藏在 Fortran 代码中的注释中，而整个工作中最大的附带收益之一就是将这些文档整理并移到代码旁边。","幸运的是，像 Fortran 这样的过程式代码有一个方便的特性：整个程序可以绘制成一个单一的调用者-被调用者树。我们通过自定义解析器解析代码库生成了这棵树，然后使用 Vibe CLI：https://mistral.ai/products/vibe/ 派出了一百多个代理来进行文档记录。每个代理都可以通过文档库和 Mistral OCR：https://mistral.ai/solutions/document-ai/ 获取相关的 PDF 文档。","从树的叶节点开始向上，每个节点都会生成一个子代理来记录文档并向原始仓库提交 PR。一个以 cron 调度循环运行的审查代理会查找新创建的 PR，审查它们，并在必要时安排修复任务。","在第一次尝试中，我们赋予代理完全自治权：每个 Fortran 子程序对应一个代理，每个代理在一周内独立将其函数翻译为 C++。结果是功能可用的，但不能称之为代码现代化。COMMON 块变成了全局结构体，一对一映射。基于 GOTO 的控制流保持不变，并没有重构为循环或提前返回。它看起来像是用 C++ 语法重新打字的 Fortran，而不是现代化的代码。","在第二次尝试中，我们通过给代理提供结构而不仅仅是自治权来解决这个问题：在每个模块上，一名规划者、一名编码者、一名测试者和一名代码质量审查者共同工作。代码质量相较第一次尝试有了大幅提升。但源代码的复杂性最终还是让代理跟不上。他们会遇到一个 bug，尝试几次修复，然后停滞，没有人可以介入。","我们找到了中间方案：由人类操作一个由编码者、测试者和审查者代理组成的工作流程，逐模块迁移代码库。这保留了第二次尝试中的代码质量，同时增加了一个人类检查点，在代理遇到障碍时进行干预。下一节将详细介绍此工作流程。","在代码库记录完成并且对等测试框架建立后，剩下的有趣部分是调整在仍能输出可合并代码的情况下，可以赋予代理的自治程度。我们尝试了两种极端情况，从完全自主运行到密切监督的手动操作。下面的结构化工作流程就是我们针对该用例最终采用的方法。","与客户的油藏工程师合作时，我们使用呼叫者-被调用者树来识别独立模块——自包含的、可管理大小的子树（经验上，小于约 10,000 行 Fortran 代码）。每个模块都经过相同的工作流程：","生成目标 C++ 架构。","请与一名油藏工程师一起审阅。","经批准后，将其分解为任务队列。","针对每个任务运行实施子工作流程：计划 → 实施 → 测试 → 重复。","由人工审查生成的 PR 并请求修改，直到合并。","第一轮迭代涵盖了核心功能：从 300,000 行中实现了 40,000 行。Fortran 代码库是自包含且可运行的，这是一个有利的起点。依赖外部系统、缺乏可运行基线或包含未记录物理原理的迁移，将带来本文未讨论的额外挑战。","这个项目的三个经验教训应适用于任何大型遗留系统迁移。","在编写迁移代码之前，先构建对等测试工具——数值一致性是证明模块完成的最便宜、最有说服力的方法。","在依赖代理之前先整理文档，因为你无法迁移无人能读的代码。","在这个规模下，带有人类审查关卡的结构化工作流，比完全自动化或手工操作更有效。","Mistral 的应用 AI 团队是一群围绕 Mistral 模型和企业平台构建全栈解决方案的工程师。我们提供高风险、领域特定的解决方案，以解决一些全球最难的问题。","如果这是你想参与的工作类型，请申请加入我们的团队：https://mistral.ai/careers/。"],"translationStatus":"translated","bodyOrigin":"source-page","editorial":{"summary":"Mistral AI称，其帮助一家欧洲能源运营商将一套4万行Fortran 77储层模拟器迁移至C++，并公开复盘了迁移方法与经验。","background":"该模拟器面向物理密集型储层模拟，原有代码积累多年，且缺少测试套件和集中式文档。原作者离开后，代码中的知识更难恢复。","viewpoint":"Aioga 判断：该案例的核心不只是语言迁移，也在于处理缺少测试与文档的遗留科学代码；但现有材料不足以证明其适用于所有类似项目。","implications":"可能影响：AI代理参与遗留代码现代化时，需要关注测试、文档和领域知识恢复；单一案例不代表迁移质量、成本或效率已得到普遍验证。","nextStep":"后续观察：应关注Mistral披露的具体代理流程、验证方法和迁移结果，以及项目中如何处理物理模型一致性与缺少测试套件的问题。","evidenceRefs":["title","summary","articleBody","source"],"status":"published","aiGenerated":true,"autoApproved":true,"generatedBy":"aioga-editorial:gpt-5.6-sol","reviewedBy":"aioga-editorial-review:gpt-5.6-sol","generatedAt":"2026-09-09T19:28:15.630Z","sourceHash":"28863b8654abaaf5","review":{"approved":true,"groundedness":95,"clarity":92,"duplicationRisk":8,"blockingIssues":[],"notes":["“原有代码积累多年”与来源所述“积累数十年”一致，但如需更精确可改为“积累数十年”。","“Aioga 判断”和“可能影响”均明确标注为分析或审慎推断，未将观点冒充为来源事实。"]},"validation":{"passed":true,"mode":"ai-auto","revisions":0,"checks":["schema","length","source-attribution","editorial-labels","inference-boundary","low-source-overlap","no-html","independent-ai-review"]}},"tags":["行业动态","Mistral AI：News（网页）"],"translations":{"zh-CN":{"title":"Mistral 复盘用 AI Agent 迁移 40000 行 Fortran 77 到 C++ 的经验","summary":"Mistral 帮助一家欧洲能源运营商将 40000 行 Fortran 77 储层模拟器迁移到 C++，并复盘了方法与经验。","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral 复盘用 AI Agent 迁移 40000 行 Fortran 77 到 C++ 的经验 - Aioga AI资讯","description":"Mistral 帮助一家欧洲能源运营商将 40000 行 Fortran 77 储层模拟器迁移到 C++，并复盘了方法与经验。","url":"https://www.aioga.com/news/cmtugpn561cgnrofplpzs3udv/","articleBody":["构建、测试并运行AI代理和应用。","训练、对齐并评估定制的人工智能模型。","在终端、IDE 和后台编写代理代码。","前沿规模的培训和推理基础设施。","用AI代理现代化复杂遗留代码。","Mistral筹集30亿欧元，将主权开放权重人工智能打造为技术前沿","Mistral帮助一家欧洲能源运营商将4万条Fortran 77迁移到C++。了解其做法及后续经验教训。","遗留的科学代码库积累数十年，原作者离开后，代码中蕴含的知识变得难以恢复。此外，使用缺乏活跃开发生态系统的语言意味着错失在他人成果基础上构建的机会。Mistral帮助一家欧洲能源运营商将4万行Fortran 77迁移到C++，这是一个物理密集型的储量模拟器，没有测试套件，也没有集中文档。","将语法从一种语言翻译到另一种语言是一个基本已解决的任务。要求任何近期模型将一个非完全晦涩语言的片段翻译到另一种语言，通常在几次迭代后会收敛到可接受的结果。然而，将完整系统从过程式语言迁移到面向对象的C++，就需要架构重构，使这项任务变得非简单。","Fortran 77 于1977年被标准化，正如其名称所示，其代码直接反映了这些约束：无模块、无命名空间、无结构类型。状态存在于COMMON块中——全局内存，在整个程序中共享。变量以首字母隐式类型，因此拼写错误的名称会无声地生成新变量，而不会引发编译器错误。","举一个简单但有说明意义的例子，看看以下一级泰勒展开的实现。输入和输出是 COMMON 块中的全局，IC 之所以是整数，仅因为它的名称以 I 和 N 之间的字母开头。变量名相当隐晦，因为它们的长度限制在 6 个字符。","在 C++ 中，可以利用显式类型，编写面向对象的代码，并返回一个值，而不是全局写入：","分散的 COMMON 数组变成了单一的 GasProperties 参数，并且网格循环被移到了调用者中，因此没有逐行对应可供检查，这就是验证迁移的难点所在。","这些结构上的差异，加上需要整合现代科学计算框架（如 PetSc），在开始迁移之前就提出了一些重要问题：","如何证明迁移后的代码库在数值上与遗留代码一致","如何将迁移拆分成可管理的阶段","如何最好地利用自主代理加速过程","在放开代理之前，我们需要一种方法证明两个代码库是一致的。在这里，“一致”意味着输出的数值相等——包括最终结果和由客户的油藏工程师标记的一组关键中间点。","允许导出 Fortran 代码库状态的子程序","用于将检查点加载到 C++ 中的测试框架","Skill.md：http://Skill.md 文件，用于引导代理正确使用它们","在迁移工作流程中，代理成功地对 Fortran 代码库进行了仪器化以转储状态快照，并使用 C++ 测试框架验证迁移模块的正确性。","首先构建这部分测试工具对项目来说是一个净正收益的投资：它使长时间运行的代理更安全，并且数值一致性是一个容易验证且有说服力的论据，能够表明一段代码已成功迁移。我们认为，这应该是任何代码现代化工作中最早采取的步骤之一。","下面的示例说明了这一点。我们首先在 Fortran 代码中插入一行以转储 RHOG 变量的值（此运行中为 42.71834），然后在测试迁移后的 C++ 模块时，将该值用作参考检查点。","项目的文档散布在旧的 PDF 文件和隐藏在 Fortran 代码中的注释中，而整个工作中最大的附带收益之一就是将这些文档整理并移到代码旁边。","幸运的是，像 Fortran 这样的过程式代码有一个方便的特性：整个程序可以绘制成一个单一的调用者-被调用者树。我们通过自定义解析器解析代码库生成了这棵树，然后使用 Vibe CLI：https://mistral.ai/products/vibe/ 派出了一百多个代理来进行文档记录。每个代理都可以通过文档库和 Mistral OCR：https://mistral.ai/solutions/document-ai/ 获取相关的 PDF 文档。","从树的叶节点开始向上，每个节点都会生成一个子代理来记录文档并向原始仓库提交 PR。一个以 cron 调度循环运行的审查代理会查找新创建的 PR，审查它们，并在必要时安排修复任务。","在第一次尝试中，我们赋予代理完全自治权：每个 Fortran 子程序对应一个代理，每个代理在一周内独立将其函数翻译为 C++。结果是功能可用的，但不能称之为代码现代化。COMMON 块变成了全局结构体，一对一映射。基于 GOTO 的控制流保持不变，并没有重构为循环或提前返回。它看起来像是用 C++ 语法重新打字的 Fortran，而不是现代化的代码。","在第二次尝试中，我们通过给代理提供结构而不仅仅是自治权来解决这个问题：在每个模块上，一名规划者、一名编码者、一名测试者和一名代码质量审查者共同工作。代码质量相较第一次尝试有了大幅提升。但源代码的复杂性最终还是让代理跟不上。他们会遇到一个 bug，尝试几次修复，然后停滞，没有人可以介入。","我们找到了中间方案：由人类操作一个由编码者、测试者和审查者代理组成的工作流程，逐模块迁移代码库。这保留了第二次尝试中的代码质量，同时增加了一个人类检查点，在代理遇到障碍时进行干预。下一节将详细介绍此工作流程。","在代码库记录完成并且对等测试框架建立后，剩下的有趣部分是调整在仍能输出可合并代码的情况下，可以赋予代理的自治程度。我们尝试了两种极端情况，从完全自主运行到密切监督的手动操作。下面的结构化工作流程就是我们针对该用例最终采用的方法。","与客户的油藏工程师合作时，我们使用呼叫者-被调用者树来识别独立模块——自包含的、可管理大小的子树（经验上，小于约 10,000 行 Fortran 代码）。每个模块都经过相同的工作流程：","生成目标 C++ 架构。","请与一名油藏工程师一起审阅。","经批准后，将其分解为任务队列。","针对每个任务运行实施子工作流程：计划 → 实施 → 测试 → 重复。","由人工审查生成的 PR 并请求修改，直到合并。","第一轮迭代涵盖了核心功能：从 300,000 行中实现了 40,000 行。Fortran 代码库是自包含且可运行的，这是一个有利的起点。依赖外部系统、缺乏可运行基线或包含未记录物理原理的迁移，将带来本文未讨论的额外挑战。","这个项目的三个经验教训应适用于任何大型遗留系统迁移。","在编写迁移代码之前，先构建对等测试工具——数值一致性是证明模块完成的最便宜、最有说服力的方法。","在依赖代理之前先整理文档，因为你无法迁移无人能读的代码。","在这个规模下，带有人类审查关卡的结构化工作流，比完全自动化或手工操作更有效。","Mistral 的应用 AI 团队是一群围绕 Mistral 模型和企业平台构建全栈解决方案的工程师。我们提供高风险、领域特定的解决方案，以解决一些全球最难的问题。","如果这是你想参与的工作类型，请申请加入我们的团队：https://mistral.ai/careers/。"]},"en":{"title":"Mistral reviewed the experience of migrating 40,000 lines of Fortran 77 to C++ using an AI Agent","summary":"Mistral helped a European energy operator migrate a 40,000-row Fortran 77 reservoir simulator to C++, reviewing methods and experience.","category":"Industry","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral reviewed the experience of migrating 40,000 lines of Fortran 77 to C++ using an AI Agent - Aioga AI News","description":"Mistral helped a European energy operator migrate a 40,000-row Fortran 77 reservoir simulator to C++, reviewing methods and experience.","url":"https://www.aioga.com/en/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:22:37.573Z"},"ja":{"title":"Mistralは、AIエージェントを用いてFortran 77の4万ラインをC++に移行した経験をレビューしました","summary":"Mistralは、ヨーロッパのエネルギー事業者が40,000行のFortran 77貯蔵シミュレータをC++に移行するのを支援し、手法と経験をレビューしました。","category":"業界動向","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistralは、AIエージェントを用いてFortran 77の4万ラインをC++に移行した経験をレビューしました - Aioga AIニュース","description":"Mistralは、ヨーロッパのエネルギー事業者が40,000行のFortran 77貯蔵シミュレータをC++に移行するのを支援し、手法と経験をレビューしました。","url":"https://www.aioga.com/ja/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:22:38.308Z"},"ko":{"title":"Mistral은 AI 에이전트를 사용해 40,000라인의 Fortran 77을 C++로 마이그레이션한 경험을 검토했습니다","summary":"Mistral은 유럽의 한 에너지 운영자가 40,000행 Fortran 77 저수지 시뮬레이터를 C++로 이전하는 데 도움을 주었으며, 방법과 경험을 검토했습니다.","category":"업계 동향","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral은 AI 에이전트를 사용해 40,000라인의 Fortran 77을 C++로 마이그레이션한 경험을 검토했습니다 - Aioga AI 뉴스","description":"Mistral은 유럽의 한 에너지 운영자가 40,000행 Fortran 77 저수지 시뮬레이터를 C++로 이전하는 데 도움을 주었으며, 방법과 경험을 검토했습니다.","url":"https://www.aioga.com/ko/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:22:46.554Z"},"es":{"title":"Mistral repasó la experiencia de migrar 40.000 líneas de Fortran 77 a C++ usando un AI Agent","summary":"Mistral ayudó a un operador energético europeo a migrar un simulador de yacimiento Fortran 77 de 40.000 filas a C++, revisando métodos y experiencia.","category":"Industria","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral repasó la experiencia de migrar 40.000 líneas de Fortran 77 a C++ usando un AI Agent - Aioga Noticias de IA","description":"Mistral ayudó a un operador energético europeo a migrar un simulador de yacimiento Fortran 77 de 40.000 filas a C++, revisando métodos y experiencia.","url":"https://www.aioga.com/es/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:22:47.292Z"},"fr":{"title":"Mistral a passé en revue l’expérience de migration de 40 000 lignes de Fortran 77 vers C++ à l’aide d’un agent IA","summary":"Mistral a aidé un opérateur énergétique européen à migrer un simulateur de réservoir Fortran 77 de 40 000 rangées en C++, en passant en revue méthodes et expériences.","category":"Industrie","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral a passé en revue l’expérience de migration de 40 000 lignes de Fortran 77 vers C++ à l’aide d’un agent IA - Aioga Actualités IA","description":"Mistral a aidé un opérateur énergétique européen à migrer un simulateur de réservoir Fortran 77 de 40 000 rangées en C++, en passant en revue méthodes et expériences.","url":"https://www.aioga.com/fr/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:22:55.689Z"},"de":{"title":"Mistral berichtete über die Erfahrungen bei der Migration von 40.000 Leitungen von Fortran 77 auf C++ mit einem KI-Agenten","summary":"Mistral half einem europäischen Energiebetreiber, einen 40.000 Reihen umfassenden Fortran 77-Reservoirsimulator auf C++ zu migrieren und dabei Methoden und Erfahrungen zu überprüfen.","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral berichtete über die Erfahrungen bei der Migration von 40.000 Leitungen von Fortran 77 auf C++ mit einem KI-Agenten - Aioga KI-News","description":"Mistral half einem europäischen Energiebetreiber, einen 40.000 Reihen umfassenden Fortran 77-Reservoirsimulator auf C++ zu migrieren und dabei Methoden und Erfahrungen zu überprüfe...","url":"https://www.aioga.com/de/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:22:55.364Z"},"pt-BR":{"title":"A Mistral revisou a experiência de migrar 40.000 linhas de Fortran 77 para C++ usando um AI Agent","summary":"A Mistral ajudou um operador europeu de energia a migrar um simulador de reservatório Fortran 77 com 40.000 fileiras para C++, revisando métodos e experiências.","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"A Mistral revisou a experiência de migrar 40.000 linhas de Fortran 77 para C++ usando um AI Agent - Aioga Notícias de IA","description":"A Mistral ajudou um operador europeu de energia a migrar um simulador de reservatório Fortran 77 com 40.000 fileiras para C++, revisando métodos e experiências.","url":"https://www.aioga.com/pt-BR/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:23:04.644Z"},"ru":{"title":"Mistral проанализировал опыт миграции 40 000 строк Fortran 77 на C++ с использованием AI-агента","summary":"Mistral помог европейскому энергетическому оператору перенести симулятор резервуара Fortran 77 с 40 000 рядами на C++, пересматривая методы и опыт.","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral проанализировал опыт миграции 40 000 строк Fortran 77 на C++ с использованием AI-агента - Aioga Новости ИИ","description":"Mistral помог европейскому энергетическому оператору перенести симулятор резервуара Fortran 77 с 40 000 рядами на C++, пересматривая методы и опыт.","url":"https://www.aioga.com/ru/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:23:04.859Z"},"ar":{"title":"استعرض ميسترال تجربة ترحيل 40,000 خط من فورتران 77 إلى C++ باستخدام وكيل ذكاء اصطناعي","summary":"ساعد ميسترال مشغل طاقة أوروبي في نقل محاكي خزان فورتران 77 المكون من 40,000 صف إلى C++، وراجع الأساليب والخبرات.","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"استعرض ميسترال تجربة ترحيل 40,000 خط من فورتران 77 إلى C++ باستخدام وكيل ذكاء اصطناعي - Aioga أخبار الذكاء الاصطناعي","description":"ساعد ميسترال مشغل طاقة أوروبي في نقل محاكي خزان فورتران 77 المكون من 40,000 صف إلى C++، وراجع الأساليب والخبرات.","url":"https://www.aioga.com/ar/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:23:14.036Z"},"hi":{"title":"मिस्ट्रल ने एआई एजेंट का उपयोग करके फोरट्रान 40,000 की 77 लाइनों को सी ++ में स्थानांतरित करने के अनुभव की समीक्षा की","summary":"मिस्ट्रल ने एक यूरोपीय ऊर्जा ऑपरेटर को 40,000-पंक्ति फोरट्रान 77 जलाशय सिम्युलेटर को सी ++ में स्थानांतरित करने में मदद की, तरीकों और अनुभव की समीक्षा की।","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"मिस्ट्रल ने एआई एजेंट का उपयोग करके फोरट्रान 40,000 की 77 लाइनों को सी ++ में स्थानांतरित करने के अनुभव की समीक्षा की - Aioga AI समाचार","description":"मिस्ट्रल ने एक यूरोपीय ऊर्जा ऑपरेटर को 40,000-पंक्ति फोरट्रान 77 जलाशय सिम्युलेटर को सी ++ में स्थानांतरित करने में मदद की, तरीकों और अनुभव की समीक्षा की।","url":"https://www.aioga.com/hi/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:23:13.400Z"},"it":{"title":"Mistral ha esaminato l'esperienza di migrazione di 40.000 righe di Fortran 77 in C++ utilizzando un AI Agent","summary":"Mistral ha aiutato un operatore energetico europeo a migrare un simulatore di serbatoi Fortran 77 di 40.000 file in C++, rivedendo metodi ed esperienze.","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral ha esaminato l'esperienza di migrazione di 40.000 righe di Fortran 77 in C++ utilizzando un AI Agent - Aioga Notizie IA","description":"Mistral ha aiutato un operatore energetico europeo a migrare un simulatore di serbatoi Fortran 77 di 40.000 file in C++, rivedendo metodi ed esperienze.","url":"https://www.aioga.com/it/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:23:22.918Z"},"nl":{"title":"Mistral besprak de ervaring van het migreren van 40.000 lijnen Fortran 77 naar C++ met behulp van een AI-agent","summary":"Mistral hielp een Europese energiebeheerder om een Fortran 77-reservoirsimulator met 40.000 rijen te migreren naar C++, waarbij methoden en ervaringen werden bekeken.","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral besprak de ervaring van het migreren van 40.000 lijnen Fortran 77 naar C++ met behulp van een AI-agent - Aioga AI-nieuws","description":"Mistral hielp een Europese energiebeheerder om een Fortran 77-reservoirsimulator met 40.000 rijen te migreren naar C++, waarbij methoden en ervaringen werden bekeken.","url":"https://www.aioga.com/nl/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:23:21.818Z"},"tr":{"title":"Mistral, Fortran 77'nin 40.000 satırını bir yapay zeka Ajanı kullanarak C++'a taşıma deneyimini inceledi","summary":"Mistral, bir Avrupa enerji operatörüne 40.000 sıralı Fortran 77 rezervuar simülatörünü C++'ya taşımasına yardımcı oldu, yöntemleri ve deneyimi gözden geçirdi.","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral, Fortran 77'nin 40.000 satırını bir yapay zeka Ajanı kullanarak C++'a taşıma deneyimini inceledi - Aioga AI Haberleri","description":"Mistral, bir Avrupa enerji operatörüne 40.000 sıralı Fortran 77 rezervuar simülatörünü C++'ya taşımasına yardımcı oldu, yöntemleri ve deneyimi gözden geçirdi.","url":"https://www.aioga.com/tr/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:23:32.012Z"},"vi":{"title":"Mistral đã xem xét trải nghiệm di chuyển 40.000 dòng của Fortran 77 sang C++ bằng cách sử dụng AI Agent","summary":"Mistral đã giúp một nhà điều hành năng lượng châu Âu chuyển đổi trình mô phỏng bể chứa Fortran 77 40.000 hàng sang C++, xem xét các phương pháp và kinh nghiệm.","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral đã xem xét trải nghiệm di chuyển 40.000 dòng của Fortran 77 sang C++ bằng cách sử dụng AI Agent - Tin tức AI Aioga","description":"Mistral đã giúp một nhà điều hành năng lượng châu Âu chuyển đổi trình mô phỏng bể chứa Fortran 77 40.000 hàng sang C++, xem xét các phương pháp và kinh nghiệm.","url":"https://www.aioga.com/vi/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:23:31.183Z"},"id":{"title":"Mistral meninjau pengalaman memigrasi 40.000 baris Fortran 77 ke C++ menggunakan AI Agent","summary":"Mistral membantu operator energi Eropa memigrasikan simulator reservoir Fortran 77 dengan 40.000 baris ke C++, meninjau metode dan pengalaman.","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral meninjau pengalaman memigrasi 40.000 baris Fortran 77 ke C++ menggunakan AI Agent - Berita AI Aioga","description":"Mistral membantu operator energi Eropa memigrasikan simulator reservoir Fortran 77 dengan 40.000 baris ke C++, meninjau metode dan pengalaman.","url":"https://www.aioga.com/id/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:23:41.169Z"},"th":{"title":"Mistral ได้ทบทวนประสบการณ์การย้าย Fortran 77 จํานวน 40,000 บรรทัดไปยัง C++ โดยใช้ AI Agent","summary":"Mistral ช่วยผู้ประกอบการพลังงานยุโรปย้ายเครื่องจําลองแหล่งเก็บ Fortran 77 ขนาด 40,000 แถวไปสู่ภาษา C++ พร้อมทบทวนวิธีการและประสบการณ์","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral ได้ทบทวนประสบการณ์การย้าย Fortran 77 จํานวน 40,000 บรรทัดไปยัง C++ โดยใช้ AI Agent - ข่าว AI Aioga","description":"Mistral ช่วยผู้ประกอบการพลังงานยุโรปย้ายเครื่องจําลองแหล่งเก็บ Fortran 77 ขนาด 40,000 แถวไปสู่ภาษา C++ พร้อมทบทวนวิธีการและประสบการณ์","url":"https://www.aioga.com/th/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:23:40.448Z"},"pl":{"title":"Mistral podsumował doświadczenia migracji 40 000 linii Fortran 77 do C++ z użyciem AI Agenta","summary":"Mistral pomógł europejskiemu operatorowi energetycznemu przenieść symulator złoża Fortran 77 z 40 000 rzędów do C++, przeglądając metody i doświadczenia.","category":"行业动态","source":"Mistral AI：News（网页）","aggregationSource":"Mistral AI：News（网页）","pageTitle":"Mistral podsumował doświadczenia migracji 40 000 linii Fortran 77 do C++ z użyciem AI Agenta - Aioga Wiadomości AI","description":"Mistral pomógł europejskiemu operatorowi energetycznemu przenieść symulator złoża Fortran 77 z 40 000 rzędów do C++, przeglądając metody i doświadczenia.","url":"https://www.aioga.com/pl/news/cmtugpn561cgnrofplpzs3udv/","contentTranslated":true,"sourceHash":"40803a5833199b20","translatedAt":"2026-09-09T19:23:50.178Z"}},"evidenceTier":"verified-news","reviewStatus":"editorial-selected","indexable":true,"editorialCover":""}}