Get the newsletter
IBM · AI / ML · Filed Feb 26, 2025 · USPTO published Aug 27, 2026 · Aug 27 release

IBM Patents AI System That Translates Legacy Business Code Automatically

Millions of lines of old business software are stuck in programming languages nobody writes anymore, and translating them by hand costs a fortune. IBM is patenting a way to let an AI language model do that work automatically, even for the parts that were always considered too complicated to automate.

Original PL/I source code converted into expanded code segments and template definitions for translation. Drawing from patent filing US 2026/0252330 A1.
Original PL/I source code converted into expanded code segments and template definitions for translation.All 9 drawings ↓
Publication number
US 2026/0252330 A1(US20260252330A1)
Applicant
INTERNATIONAL BUSINESS MACHINES CORPORATION
Filed · Published
Feb 26, 2025 · Aug 27, 2026
Inventors
TAKAAKI TATEISHI, YASUHARU KATSUNO
Status when we published
Waiting for an examiner
Document
20 claims
US classification
717/137

How IBM's system handles the trickiest parts of code translation

Every time a big bank processes a wire transfer or an airline books a seat, there is a decent chance the code doing the work was written in a language that dates back to the 1960s or 70s, like COBOL. Companies desperately want to modernize that code, but translating it to something current is slow, expensive, and full of traps.

One of the nastiest traps is something programmers call expandable code: shorthand instructions that balloon out into many lines of real code when the program runs. Standard automated tools choke on this because the shorthand has to be understood before it can be translated. IBM's patent describes a method that first replaces those tricky shorthand pieces with labeled placeholders, then hands the result to an AI language model that fills in the blanks in the new language.

The result is a two-step pipeline: a traditional rule-based translator handles the straightforward parts, while the AI handles the ambiguous, context-dependent sections. You end up with modernized code without needing a team of specialists to read every line by hand.

From the filing · CLAIM 1
… generating a symbolic variable for a variable in the expandable code into a code template providing a symbolic expression of the expandable code; …

Translation: It replaces complex code snippets with temporary symbolic placeholders to simplify the translation process.

How symbolic templates let the LLM skip bad macro guesses

The patent targets a specific class of problem in automated code translation: expandable code, which includes constructs like macros (think of a macro as a named recipe that gets substituted for a full set of instructions at run time). Standard translation tools struggle with macros because the tools see the shorthand name, not the actual instructions it represents.

IBM's method works in three phases:

  • Identify expandable code: The system scans the source program and flags every macro or similar construct that a rule-based translator cannot handle directly.
  • Build a symbolic template: Instead of trying to translate the macro outright, the system swaps its internal variables for labeled placeholders (symbolic variables), creating a kind of fill-in-the-blank version of the code.
  • Hybrid translation: A conventional source-to-target translator converts the placeholder definitions into target-language statements. Then a large language model (an AI trained on vast amounts of code) reads the symbolic template and writes the actual target-language instructions that implement the macro's behavior.

The key insight is that by stripping the macro down to a symbolic skeleton first, the LLM receives a clean, unambiguous prompt rather than a tangle of legacy syntax. This reduces the chance that the AI misreads context and generates incorrect code, which is the most common failure mode when LLMs attempt code translation directly.

From the filing · THE ABSTRACT
A large language model, that generates code in the target programming language from symbolic statements, translates the symbolic expression in the code template to target programming language statements implementing the expandable code in the target program.

Translation: An AI translates those temporary placeholders into fully functional modern code in the new programming language.

What this means for companies still running old mainframe code

For large enterprises, legacy code migration is one of the most expensive IT projects imaginable. A single mainframe application can contain millions of lines of COBOL, PL/I, or RPG code, and macros are scattered throughout. Every macro a human specialist has to inspect manually adds hours of billable time. A system that automates even a fraction of that work could cut migration projects from years to months.

IBM is one of the companies with the deepest financial interest in this problem: it sells both the mainframes that run old code and the consulting services that migrate it. That dual position makes this patent read as practical infrastructure, not a research curiosity. For anyone tracking AI-assisted software tools, this filing sits alongside this week's Big Tech patents in the code-generation and automated programming space, where IBM, Microsoft, and Google are all staking out different corners of the same market.

That makes this IBM's 26th filing we've tracked in Language AI since May, a group that includes one on scoring AI bias toward protected groups and one on AI errors in technical documents.

Source: US 2026/0252330 A1 at the USPTO (PDF). Full patent text and figures are in the official publication.

Get our take in your Top Stories

Liked this breakdown? Add Patentlyze as a preferred source on Google, and our plain-English take shows up more often in your Top Stories the next time IBM patent news breaks.

There are more where this came from

We read the new patents from Big Tech, carmakers and more and send you the ones worth knowing. Plain English, free, every week.

The drawings · 9 sheets

9 drawing sheets from US 2026/0252330 A1 · click any drawing to enlarge

System architecture for code translation, drawing sheet 1 from US 2026/0252330 A1
Sheet 1 System architecture for code translation
Main translation process flow, drawing sheet 2 from US 2026/0252330 A1
Sheet 2 Main translation process flow
While loop expansion steps, drawing sheet 3 from US 2026/0252330 A1
Sheet 3 While loop expansion steps
Source code and template conversion, drawing sheet 4 from US 2026/0252330 A1
Sheet 4 Source code and template conversion
Target language program output, drawing sheet 5 from US 2026/0252330 A1
Sheet 5 Target language program output
Procedure definition and template creation, drawing sheet 6 from US 2026/0252330 A1
Sheet 6 Procedure definition and template creation
Class structure and macro evaluation, drawing sheet 7 from US 2026/0252330 A1
Sheet 7 Class structure and macro evaluation
Conditional placeholder escaping method, drawing sheet 8 from US 2026/0252330 A1
Sheet 8 Conditional placeholder escaping method
Show sheet 9
IBM Patents AI System That Translates Legacy Business Code Automatically patent drawing, sheet 9
Sheet 9
Patent filing page