An AI engine that translates legacy COBOL to Python and checks that the logic is preserved.
The situation
Core business logic lived in COBOL, the experts were leaving, and a manual rewrite was too slow and risky.
Legacy code holds decades of business rules that nobody can fully list. Manual rewrites are slow, and every hand-translated line is a chance to change behaviour by accident.
The idea behind the solution
A compiler front end parses source code into an abstract syntax tree, and a back end emits another language from that tree. Because the transformation is deterministic, it can be tested: the same inputs must give the same outputs before and after. Migration then proceeds in slices, with old and new running side by side until the comparison is clean.
Draws onAho, Lam, Sethi & Ullman, Compilers: Principles, Techniques, and Tools · Fowler, Refactoring, and the strangler-fig pattern
What we built
A modernization engine for a client. A CodeT5+ model translates the code, an LLM refines it, and natural-language-inference checks guard semantic equivalence. Part of it was later open-sourced.
01COBOL source02CodeT5+ translation03LLM refinement04NLI equivalence checks05Python output
- Translates COBOL programs to Python
- Refines output for readability with an LLM
- Checks equivalence with NLI
- Produces code ready for test harnesses
What the business gained
Conversion that would take years by hand is done in months, with equivalence demonstrated by tests rather than asserted. The organisation leaves a scarce-skill platform without betting on a single cut-over.
- Delivered to a client; partial version open-sourced
Put an agent to work.
Tell us the workflow you want to change. An architect replies, and if there is a fit we scope a four-week proof of concept on your own data.

