Model-based software rejuvenation

Model-based software rejuvenation

It sounds too good to be true: the possibility for every piece of legacy software to be replaced by new, high-quality code in a fully-automatic manner. This means that remnants from the past need not be weeded out by going through all of the code manually - there’s an alternative. ESI is developing a semi-automated rejuvenation approach based on models. The model extraction step cuts away entangled, organically-grown software structures, thus separating valuable domain logic from low-level implementation detail. This opens the way to model-based engineering and the automated generation of up-to-date implementation code.

This model-based rejuvenation frees up resources (which are currently stuck in maintenance) for the development of new, innovative features which are valuable to customers.

Model-based rejuvenation by capturing valuable domain knowledge in models
Legacy software

The flip-side of success in cyber-physical systems is that the body of embedded software grows without structural changes being made. The legacy of embedded software is extended in every product generation but no longer lives up to present standards. For instance, code written in ancient languages hardly benefits from improvements in computer science from the last few decades. This explains why an estimated (and staggering) 40 percent per software engineering budget in the high-tech industry is presently consumed by software maintenance. These are necessary costs but add no value to customers.

As a rule of thumb, every fifty to a hundred thousand lines of code require one software engineer for maintenance every year. As high-tech companies often have many millions of lines of code in their systems, it is almost impossible to go over all of this by hand. Model-Driven Software Engineering introduces models with valuable, essential domain knowledge as an intermediate between human ideas and low-level implementation details. Low-level software is generated from the models. If the models are technology-independent, this facilitates the change to new or future implementation technologies.

Code – model – code

Every case asks for a tailormade approach, but the overall procedure is generic. ESI is aiming for a toolkit consisting of generic tools that can easily be tailored/customized for concrete rejuvenation projects. The selection of analysis tools based on expert judgments is an important aspect. Static analysis in order to search for specific code patterns in source code is one of the options. This allows you to dig deep in the right spots in order to find out how the software was designed to work. Another way is to ignore how a system works under the hood and to just establish how a system behaves functionally at runtime. In this so-called dynamic approach, you instruct a learning tool to push all of the buttons in a system one after the other and see what happens. This can generate a lot of knowledge. A third option is to unleash a tool on the log data in order to find out how a system was used. In the end, one way or another, the old software has to reveal its secrets. You can decide to go directly from code to new code. But the biggest challenge and promise for the future is the use of model extraction to separate valuable domain knowledge from execution code.

Once the model has been extracted, software construction can start again, such as by using code generators to produce new execution code. We believe that working from legacy code to new code via models offers the best chances of making a big improvement to the software.

Additional information