最新 微软与美国政府警告:重大技术故障还将持续 The Verge
行业观察 ●●●○○

OpenAI 称 AI 可迁移 COBOL,专家质疑

Can AI help solve the COBOL code crisis?

摘要Summary

OpenAI 称其最新模型在将 COBOL 等老旧语言代码迁移至现代语言时取得显著进展,GPT-6.1 Sol 在高推理强度下行为保持准确率达 98%。但多位专家指出,重写代码不等于安全替换关键遗留系统,OpenAI 的评测未覆盖系统拆解、数据与集成等核心难点。

OpenAI claims its latest models substantially improve migration of aging COBOL code to modern languages, with GPT-6.1 Sol reaching 98% behavior-preservation accuracy at higher reasoning effort. Experts caution that rewriting code is not the same as safely replacing critical legacy systems, and that OpenAI's evaluations miss the core difficulties of decomposition, data and integration.

  • GPT-6.1 Sol 高推理下行为保持准确率达 98%
  • 专家称重写代码不等于替换系统
  • Anthropic 亦推 Claude Code 迁移方案

全文对照Full text · 中 / EN

维系世界运转的古老代码,或许终将在 AI 面前遇到对手。但今天还不是那一天。

The ancient code holding the world together may meet its match in AI. Today is not that day.

美国国税局、银行、航空公司以及世界各地的基础设施有什么共同点?它们全都运行在靠古董级计算机代码支撑的系统上,而这些代码没人敢碰,唯恐一碰就全盘崩溃。

What do the IRS, banks, airlines, and government infrastructure around the world have in common? They’re all running on systems propped up by antique computer code that nobody dares touch, lest everything come crashing down.

OpenAI 认为它或许有解决办法。10 月 19 日,该公司宣称其最新 AI 模型在将用较老编程语言编写的陈旧软件迁移为现代代码方面取得了“实质性改进”,并称这可以帮助各组织“维护并现代化老旧系统”。

OpenAI thinks it may have a solution. On October 19th, the company touted “substantial improvements” in its latest AI models’ ability to migrate aging software written in older programming languages into modern code, which it claims could help organizations with “maintaining and modernizing older systems.”

这可能是一件意义重大的事。OpenAI 重点提及的语言之一 COBOL,至今仍顽固地深嵌在全球关键基础设施的很大一部分之中。尽管几十年来人们一直努力想把它送进历史,这门语言却一路蹒跚地活了下来,就是不肯消亡。

That’s a potentially massive deal. COBOL, one of the languages highlighted by OpenAI, remains stubbornly embedded in vast portions of the world’s critical infrastructure. And despite decades of efforts to banish it to history, the language has limped on, simply refusing to die.

“但凡头脑正常的人,都不会在新开发项目中使用 COBOL。”

“Nobody in their right mind would use COBOL for a new development project.”

COBOL 的普及程度怎么强调都不为过。COBOL 是“common business-oriented language”(通用面向商业语言)的缩写,诞生于 1959 年。近七十年后的今天,它依然无处不在。据 IBM 称,COBOL 是超过 40% 的网上银行系统的基础,支撑着 80% 的面对面信用卡交易,并处理着 95% 的 ATM 交易。它也是许多政府系统的底层支撑,从社会保障局到国税局,再到大多数州运营的服务。一项粗略估计认为,COBOL 的低效每年给美国 GDP 造成的成本约为 1050 亿美元。

It is hard to overstate COBOL’s ubiquity. Short for “common business-oriented language,” COBOL came into being in 1959. Nearly seven decades later, it is still everywhere. According to IBM , COBOL is the foundation for more than 40 percent of online banking systems, supports 80 percent of in-person credit card transactions, and handles 95 percent of ATM transactions. It also underpins many government systems, from Social Security to the IRS to services run by most states . One rough estimate puts the annual cost of COBOL’s inefficiencies to the US GDP at around $105 billion.

但替换 COBOL 极其困难。其他遗留编程语言也是如此,比如 Fortran,如今仍被用于从科学计算、天气预报到大气与海洋研究,以及对核安全至关重要的代码等方方面面。这些系统往往太过重要,承担不起被弄坏的风险,而许多懂这些系统的程序员早已退休或离世。

But replacing COBOL is fiendishly difficult. The same goes for other legacy programming languages, like Fortran, still in use today for everything from scientific computing and weather forecasting to atmospheric and ocean studies and codes critical to nuclear security . These systems are often too important to risk breaking, and many of the programmers who understand them have long since retired or died.

尽管 AI 编程工具在现代软件开发中取得了令人瞩目的进展,但它们在处理这些遗留系统时却一直难以取得太大突破。不过,近期的进展表明,这种情况可能正在改变。

For all their impressive advances in modern software development , AI coding tools have struggled to make much headway with these legacy systems. But recent developments suggest that may be changing.

OpenAI 在最新博客文章中报告了将 COBOL 代码迁移到 C++、Java、Kotlin、Python 和 Rust 等更现代编程语言的有希望结果,且不改变原始软件的功能。最后这一点对于希望摆脱 COBOL 等代码的组织至关重要,OpenAI 也承认“只有当所有测试都通过时,迁移才算成功”。

In its latest blog post, OpenAI reported promising results migrating COBOL code to more modern programming languages, including C++, Java, Kotlin, Python, and Rust, without changing what the original software does. That last bit is crucial for organizations looking to ditch code like COBOL, and OpenAI acknowledges that “a migration is considered successful only if all tests pass.”

在 OpenAI 自己的测试中,GPT-6.1 Sol 在低推理强度下——即模型在给出答案前用于分析问题的计算步数——实现了 87% 的行为保持准确率,在更高推理强度下攀升至 98%。相比之下,在低推理强度下,GPT-6 Astra 得分约为 86%,GPT-6 Sol 仅为 21%,而 GPT-5.6 Sol 只有 5%。

In OpenAI’s own tests, GPT-6.1 Sol achieved 87 percent behavior preservation accuracy at low reasoning effort — how many computational steps the model spends analyzing a problem before giving an answer — climbing to 98 percent at higher reasoning. By comparison, at low reasoning effort, GPT-6 Astra scored around 86 percent, GPT-6 Sol just 21 percent, and GPT-5.6 Sol a mere 5 percent.

“重写代码并不等同于替换系统。”

“Rewriting code is not the same as replacing a system.”

OpenAI 写道:“这些评估结果表明,对于正在对业务所依赖的软件进行现代化的团队而言,我们正朝着更准确、更经济的代码迁移方向取得进展。”

“These evaluation results demonstrate progress toward more accurate, affordable code migration for teams modernizing the software their businesses depend on,” OpenAI wrote.

该公司还报告称,其模型在用包括 COBOL 在内的多种编程语言构建数据库软件方面的能力有所提升。

The company also reported improvements on its models’ ability to build database software in various programming languages, including COBOL.

Anthropic 也看到了遗留系统中的机会。今年 2 月,它发布了一份分步式“代码现代化操作手册”,并推销其编程智能体 Claude Code,称其可将 COBOL 代码迁移到 Java 或 Python 等现代语言。它没有提供显示 Claude Code 在此类迁移中表现如何的性能基准,但宣称“COBOL 现代化的经济账已经改变”。在 Anthropic 发布公告后,IBM 的股价暴跌,该公司部分收入来自帮助企业维护遗留系统。

Anthropic also sees an opportunity in legacy systems. In February, it published a step-by-step “code modernization playbook” and pitched its coding agent, Claude Code, as a way to migrate COBOL code into modern languages like Java or Python. It offered no performance benchmarks showing how well Claude Code could perform such migrations, but declared that “the economics of COBOL modernization have shifted.” Shares in IBM, which derives part of its revenue helping companies maintain legacy systems, nosedived following Anthropic’s announcement.

接受 The Verge 采访的专家一致认为,近年来 AI 工具在处理遗留代码方面取得了长足进步。但他们也提醒,OpenAI 本周大肆宣传的进展,距离能够安全替换围绕遗留代码构建的关键系统还非常遥远。

Experts who spoke to The Verge agreed that AI tools have made strides in tackling legacy code in recent years. But they cautioned that advances trumpeted by OpenAI this week are a very long way from making it possible to safely replace critical legacy systems built around it.

OpenAI 发言人 Oscar Haines 在给 The Verge 的一封电子邮件中承认,遗留代码“仍远未成为一个已解决的问题”,并表示公司正在听取开发者和企业的反馈,探索构建更好的测试方法,并持续提升其模型对编程语言的理解能力。Anthropic 未能在发稿前提供置评。

OpenAI spokesperson Oscar Haines acknowledged in an email to The Verge that legacy code “is still far from a solved problem” and said the company is listening to feedback from developers and enterprises and exploring ways to build better tests and continue improving its models’ understanding of coding languages. Anthropic did not provide comment in time for publication.

“OpenAI 展示的评估并未触及关键难点:将一个复杂的遗留系统拆解为可以逐个替换的更小单元。”

“The evaluations shown by OpenAI don’t address the key difficulty: Breaking up a complex legacy system into smaller units that can be replaced individually.”

“重写代码并不等同于替换系统,”荷兰特温特大学软件演化副教授 Vadim Zaytsev 表示。系统确实包含大量代码——Zaytsev 说他所见过的最大系统有 2.5 亿行 COBOL 代码,“绝对算不上世界上最大的”——但这只是问题的一部分。他说,代码可能用多种语言编写,还有可能以各种格式存储的数据需要考虑。此外,还存在与其他系统的技术集成,以及需要顾及的人员和组织的期望。

“Rewriting code is not the same as replacing a system,” said Vadim Zaytsev, an associate professor of software evolution at the University of Twente in the Netherlands. Systems do have a lot of code — Zaytsev said the largest system he’d seen had 250 million lines of COBOL, “definitely not the world’s largest” — but that’s only part of the problem. Code may be written in multiple languages and there’s data, potentially stored in various formats, to consider, he said. There are also technical integrations with other systems and the expectations of the people and organizations to bear in mind.

所有这些复杂性意味着,“目前 AI 在替换或迁移遗留 COBOL 系统方面并未发挥主要作用,”Zaytsev 说。

All that complexity means “AI is not playing a major role at the moment in replacing or migrating legacy COBOL systems,” Zaytsev said.

荷兰代尔夫特理工大学软件工程教授 Arie van Deursen 对 The Verge 表示,OpenAI 的评估同样未能捕捉到这一复杂的现实。他称该公司的博客“肤浅”,指出其中几乎没有提供关于迁移任务的细节,而其语言基准测试的是模型在相对简单且定义明确的任务上的表现,涉及的系统与它们在训练中可能遇到的系统类似。他还强调了维护老旧系统与对其进行现代化改造之间的巨大差距。“维护当然比现代化改造容易得多,”van Deursen 说,并称 OpenAI 用来评估其模型的任务与实际的现代化改造相距“光年之遥”。“OpenAI 展示的评估并未触及关键难点:将一个复杂的遗留系统拆分成可以单独替换的更小单元。”

OpenAI’s evaluations don’t capture this complex reality either, Arie van Deursen, a software engineering professor at Delft University of Technology in the Netherlands, told The Verge . He described the company’s blog as “superficial,” noting it offered few details about the migration task, while its language benchmark tested models on a relatively simple and well-defined task involving systems similar to those they would have encountered in training. He also stressed the huge gap between maintaining an aging system and modernizing it. “Maintaining is of course a lot easier than modernizing,” van Deursen said, calling the tasks OpenAI used to assess its models “lightyears” away from actual modernization. “The evaluations shown by OpenAI don’t address the key difficulty: Breaking up a complex legacy system into smaller units that can be replaced individually.”

最大的挑战未必是重写代码。“主要挑战确实不在于理解系统如何运作,”伦敦帝国理工学院编程语言教授 Alastair Donaldson 说。他表示,对于使用 COBOL 等语言的遗留系统而言,这种理解上的缺失是一个“非常普遍”的问题,并补充说如今很少有人还懂得用这些语言编程。尽管 COBOL 无处不在,Donaldson 说,“任何头脑正常的人都不会用 COBOL 来做新的开发项目。”

The biggest challenge isn’t necessarily rewriting code. “The main challenge is indeed not understanding how the system works,” said Alastair Donaldson, a professor of programming languages at Imperial College London. Such a lack of understanding is a “very common” problem for legacy systems using languages like COBOL, he said, adding that very few people know how to program in them anymore. And while it is everywhere, Donaldson said “nobody in their right mind would use COBOL for a new development project.”

“在许多情况下,迁移前后系统行为即使只有细微差异也是不可接受的。”

“In many cases even minor differences in system behaviour before and after migration are unacceptable.”

Donaldson 说,这使得稳健的测试至关重要。一种方法可以是将相同的工作流程分别在旧系统和新系统上运行,以检查它们的行为是否完全一致。AI 还可以记录其代码翻译过程,理想情况下让熟悉遗留语言的人员能够审查这项工作。南丹麦大学数学与计算机科学教授 Jacopo Mauro 表示,形式化验证是另一种选择,它使用数学技术通过计算来验证代码行为是否正确。

That makes robust testing crucial, Donaldson said. One approach could be to run the same workflows through the old and new systems to check they behave identically. AI could also document its code translation, ideally allowing humans familiar with the legacy language to review the work. Formal verification, which uses mathematical techniques to computationally verify that code behaves correctly, is another option, said Jacopo Mauro, a mathematics and computer science professor at the University of Southern Denmark.

Mauro 表示,这类方法已被用于验证 AI 生成的数学结果,但将其应用于遗留代码需要“巨大的工作量”。Mauro 说,使用这些方法意味着代码可以被自动检查,并补充道,“拥有这一能力将比人工检查翻译是否正确更好。”他表示,在此之前,“人工验证仍然至关重要。”

Such methods are already used to verify AI-generated mathematical results , but applying them to legacy code would require a “huge amount of work,” Mauro said. Using those methods would mean code could be checked automatically, Mauro said, adding that “having this will be better than having a human check that the translation is correct.” Until then, he said, “human verification remains essential.”

而当涉及的系统像运行在 COBOL 上的系统那样关键时,专家表示,你需要绝对确定替代系统能够正常工作。Zaytsev 说:“在许多情况下,迁移前后系统行为即使存在微小差异也是不可接受的。”虽然 AI 确实可以节省成本并加快速度,但遗留系统的复杂性意味着部分自动化还不够。

And when the systems involved are as critical as those running on COBOL, experts say you need to be absolutely certain the replacement works. “In many cases even minor differences in system behaviour before and after migration are unacceptable,” Zaytsev said. While AI can definitely deliver savings and speed things up, the complexity of legacy systems means partial automation isn’t enough.

Zaytsev 说:“假设你有一根神奇的 AI 魔杖,能处理你 99% 的代码。剩下的 1% 你怎么办?那 1% 可能是一百万行代码,散布在各处,并以超出你一生所能想象的更多方式悄然失效。”

“Suppose you have a magic AI wand that handles 99 percent of your code,” Zaytsev said. “What do you do with the remaining 1 percent? That 1 percent can be a million lines of code, spread all over the place and subtly failing in more ways you can imagine within your lifetime.”