We Are GAP Mobilize
Free Assessment Tool

The Case for AI-Based Semantic Pattern Matching

by DeeDee Walsh, on Dec 30, 2023 12:53:18 AM

On the Translation of Programs: an introductory level view at Mobilize approach

Sherlock Holmes legacy code

Imagine you’ve got a bunch of old-school computer programs… And you want to bring them into the modern age without having to start over from scratch. That’s where GAP’s Mobilize Modernization Solutions come in.

It’s like teaching your computer to understand the old code and then rewrite it in a new language, all by itself. It does this trick (not magic, but pretty close) using what’s called ‘deduction’. Just like Sherlock Holmes, it deduces what each piece of the old code does, translates it step by step, and makes sure it still does the same thing in the new language. It’s all about keeping the original program’s ‘intent’ intact.

GAP has a special language to represent the old code abstractly. It’s like breaking down the code into simple Lego blocks. Once it’s in this form, we can either run it as-is or flip it into a new programming language.

The whole thing is pretty cool because it doesn’t just try to understand the old code. Instead, it focuses on the actions that the code is supposed to perform. Imagine you’re translating a joke from English to Spanish. Instead of directly translating word for word – which probably wouldn’t make sense (or be very funny for that matter) in Spanish, you find a way to convey the punchline so that it still gets a laugh. That’s kind of what’s happening with program translation – we ensure the “punchline” (the program’s function) works in the new language, not just the words (the code).

And when it comes to actually making the switch, we’ve got this toolset that interprets the patterns in the code, finds matches and swaps them out with the equivalent in the new language. It’s like having a universal translator for programming languages. (geek alert for Star Trek nerds)

Let’s say the old code has a way of handling errors that the new language does differently. This system can figure that out and translate it into something that makes sense in the new language, like turning old-school error handling in VB6 into the much sleeker try-catch format in .NET.

We’ve built all of our tools on the principle that translating code is all about AI rewriting things in a way that keeps their meaning the same. The underlying technology for our translators is the Evolution Framework, which is like a big brain that knows how to read and write in different programming languages.

Another critical part of our AI technology is Matchine, which is about recognizing code patterns. It’s like an insanely smart search function that can find and replace code snippets in a very sophisticated and scalable way.

To give you an idea of what we can do, there’s a way to check if something is part of a collection. The old way might be a complicated, long-winded search, but with Matchine, it’s like playing “Where is Waldo” with code and finding Waldo instantly.

Another example is where you’ve got a list of stuff and you want to apply the same change to each item. With Matchine, you can apply the change instantly on huge volumes of code.

AI Application Modernization-1

In short, Mobilize technology is like having a translator that doesn’t just know two languages but understands the intention of what’s being said. So when it translates, what comes out the other side does exactly what it’s supposed to do, just in a new language.

Topics:code transformationAI

Comments

Subscribe to Mobilize.Net Blog

More...

More...
FREE CODE ASSESSMENT TOOL