Legacy Migration with LLMs: What 2027 Will Look Like

Legacy migration with LLMs: design, translation and testing phases in 2027

Legacy migration with LLMs will work best in 2027 when people make the design decisions, an engineered system does the translation, and most of the money goes to testing. That’s the forecast of a veteran of RPG-to-Java migrations, drawn from experiments that translated real ERP systems. It targets three phases that LLMs are changing: design, translation and testing.

Design: don’t let the model decide

An LLM will translate an application without asking anything, making every decision on the way. The author’s warning is that you’re still responsible for the consequences and must be able to defend choices you never made. In the experiments, the same prompt run three times gave three different designs, and the decisions that were identical in every run weren’t ones clients would pick.

He doesn’t expect models to learn this soon. They’ve improved where feedback is fast and unambiguous, such as code that compiles or passes a test. Architecture consequences show up after five or ten years in maintenance cost and hiring, so there is little to train on. LLMs also tend to offer certainty, so a person must know which doubts to raise.

The decisions to make include language, framework (often Spring Boot for enterprise Java), database (Db2, PostgreSQL or staying put) and who maintains the code. An RPG team may want types that mirror fixed-length strings and packed decimals. Java developers will want String, BigDecimal and int, with the old rules in a runtime library.

Rows of wooden barrels in a brewery storehouse
Image: Federico Tomassetti

Who decides, and why it takes work

Choosing well means weighing things that aren’t in the code: the skills a company has or can realistically hire, the other technologies in its group, how those technologies will fare over the 10 to 15 years the migrated system must live, and whether performance, maintainability, talent or infrastructure cost matters most. Many firms bring in outside help exactly here, after decades on one technology. Others have the skills in-house. Either way, the design in a well-run migration is something somebody decided.

Translation: two engineered routes

For an application of roughly 50,000 lines, the author would first try handing the design to an LLM and then iterating on the result. For large systems that fails: each run decides differently, style drifts across sessions, utilities get rewritten in dozens of programs, and errors appeared in every translation examined. He sees two workable approaches.

  1. A migration software factory: a plan from whole-codebase analysis, written design decisions with example code, a runtime defined before translation, steps that revisit earlier work, automatic checks on duplication and conventions, and a verification loop.
  2. An LLM-built transpiler: use the model to write a deterministic translator, then run that. The agent in the experiment wrote seven small transpilers unprompted.

A transpiler brings consistency, localized errors (a wrong rule is wrong everywhere and fixed once) and a smaller thing to verify. Its drawback is needing parsers and frameworks first. The agent’s generators covered the easy parts, such as file definitions, screens, queries and CL, while the RPG logic, which mixes fixed and free format, was translated by hand.

Testing: the unsolved part

Known approaches are record and replay, parallel runs and manual testing. None is brilliant, and rare events like year-end closing may never run during observation.

Having the LLM write the tests doesn’t solve it. Each run wrote tests that passed while the three translations disagreed. The large translation passed all 1,150 of its tests, and none caught the errors found. A second model writing tests may help, but two models agreeing doesn’t prove the system matches the old one. Certainty needs the original system running, and the team had no IBM i.

The cost is also rising. Generating test scenarios for five programs cost about four times as much as translating them. The 2024 DORA report associated greater AI adoption with lower delivery stability, which matters for conservative companies whose systems must keep running.

The 2027 bet

  • Design starts with people who take responsibility, using the LLM to explore options and not to choose.
  • An engineered system performs translation, whether a factory or a transpiler, and mechanical translation gets cheaper but not cheap.
  • Verification takes most of the effort and budget, and whoever solves it holds the most valuable part of the job.

Source: Federico Tomassetti

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.