It sounds too good to be true: that every piece of legacy software can be replaced by new, high-quality code fully automatically.This doesn't mean that remnants from the past can only be weeded out by going over all code by hand. There is an alternative. Embedded systems innovation by TNO-ESI develops a semi-automated rejuvenation approach based on models. The model extraction step cuts away entangled, organically grown software structures. It thus separates valuable domain logic from low-level implementation detail. This step opens the way to model-based engineering and automated generation of up-to-date implementation code. This model-based rejuvenation frees up resources currently stuck in maintenance for development of new innovative features that are valuable to customers.
It is the flip-side of success in cyber-physical systems. The body of embedded software grows without structural changes being made. The legacy of embedded software is extended in every product generation, but doesn't live up to present standards anymore. For instance, code written in ancient languages hardly benefits from improvements in computer science from the last few decades. It explains why an estimated and staggering forty percent of software engineering budgets in the high-tech industry is presently consumed by software maintenance. These are costs to stand still, but add no value to customers. As a rule of thumb, every fifty to hundred thousand lines of code requires 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 this by hand.
"with legacy software it is just like peeling an onion, layer by layer, tears come to your eyes"
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.
Every case asks for a tailor made approach, but the overall procedure is generic. ESI aims for a toolkit consisting of generic tools that can easily be tailored/customized to concrete rejuvenation projects. Selection of analysis tools based on expert judgment is an important aspect. Static analysis to search for specific code patterns in source code is one of the options. This allows you to dig deep in the right spots to find out how the software was designed to work. Another way is to ignore how a systems works under the hood and to just establish how a system behaves functionally at run-time. In this so called dynamic approach you instruct a learning tool to push all 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 to find out how a system was used. In the end, one way or another, the old software has to unveil its secrets. You can decide to go directly from code to new code. But the biggest challenge and promise for the future is to use model extraction to separate valuable domain knowledge from execution code. Once the model has been extracted, software construction can start again. For instance by using code generators to produce new execution code. We believe that working from legacy code via models to new code offers the best chances to make a big improvement in the software