Microsoft Patents an AI System That Rewrites Old Software Into Modern Code
Millions of businesses run software written decades ago in languages that barely anyone codes in anymore. Microsoft has filed a patent for an AI system that reads that old code, draws a map of what it does, and rewrites it in a modern language.
What Microsoft's AI code-conversion system actually does
You're an IT manager at a hospital or a bank, and your core software was written in the 1980s. It works, but nobody on your team knows the old programming language anymore, and adding new features feels like defusing a bomb. That's the problem Microsoft is describing here.
The patent covers a system where an AI first reads your old software and its documentation to build a kind of blueprint, called a schema, that maps out every major function and how they connect to each other. Think of it as drawing a floor plan before demolishing a building so you can reconstruct it exactly somewhere else.
Once that map exists, a second AI pass uses it to rewrite the old code in a new programming language, piece by piece, making sure every function still does what it used to do and still connects to the other parts the same way. The goal is a working modern application that behaves identically to the original.
cause an artificial intelligence system to generate a schema, which defines functional blocks of a legacy application and logical relationships between the functional blocks, by providing the legacy application and documentation, which describes the functional blocks and the logical relationships, as first inputs to the artificial intelligence system; …
Translation: The system feeds old code and its manuals into an AI to map out how the program works.
How the schema maps old code before rewriting it
The system works in two distinct AI-driven stages, and the order matters.
In the first stage, the AI receives the legacy application itself alongside any existing documentation describing what the software does and how its parts relate. From that, it generates a schema, a structured blueprint that formally defines each functional block (a self-contained chunk of the program with a specific job) and the logical relationships between them (which blocks call which, what data flows where, and in what order things happen).
In the second stage, that schema becomes the instruction set for the actual conversion. The AI uses it to:
- Identify each functional block in the original code
- Rewrite each block in the target programming language while preserving its exact behavior
- Reconstruct the same logical connections between the newly written blocks
The key design choice here is the schema as an intermediate artifact. Rather than asking the AI to translate raw legacy code directly into new code in one shot (a notoriously error-prone approach), the system forces a structured understanding step first. The schema essentially acts as a language-neutral description of what the software is, which the second-stage AI then uses as a reliable reference during rewriting.
Techniques are described herein that are capable of causing an AI system to convert a legacy application into a converted application using a schema.
Translation: Methods are outlined for using a structural blueprint to help an artificial intelligence rewrite old software.
What this means for companies still running outdated software
For large organizations, legacy software modernization is one of the most expensive and risky projects IT departments face. A full rewrite done by human engineers can take years and cost millions, with a real chance the new version behaves differently in subtle ways that only show up after launch. If this system works as described, it compresses that process significantly and gives the AI a structured reference to check its own work against.
The practical upside for you as an end user is indirect but real: the software your bank, insurer, or government agency runs on would become easier to update, extend, and secure. Microsoft has been filing around AI-assisted developer tooling since at least 2023, and this filing fits a pattern of using AI not just to write new code but to manage the enormous stock of old code that already exists in the world.
Microsoft's 33rd filing in our Enterprise AI coverage since May adds to a run that includes one flagging unsafe code inputs and one catching hidden data variables.
The two-step approach here, building a structured map of the old software before writing a single line of new code, is a reasonable bet. It trades speed for reliability, and for complex systems where one missed connection can break everything downstream, that trade is probably worth making.
The real vulnerability is step one. The map is only as good as the written documentation fed into it, and old software is notorious for having documentation that describes the original intention rather than what the program actually does. A wrong map produces a faithful translation of the wrong thing.
That gap between the patent's assumptions and real conditions narrows the practical target considerably. This design works best for organizations that already have decent records of their old systems, which is a smaller group than it sounds.
There are more where this came from
We read every patent application Big Tech publishes and send you the ones worth knowing. Plain English, free, every week.
The drawings
7 drawing sheets from US 2026/0277551 A1 · click any drawing to enlarge
Want this weekly breakdown for a company we don't cover? Patentlyze Pro →