Background

Metaprogramming for maintenance at Philips

Jurgen Vinju leads the research group Software Analysis and Transformation (SWAT) at Centrum Wiskunde & Informatica and is a part-time full professor of automated software analysis at Eindhoven University of Technology.

Reading time: 7 minutes

Philips joined forces with Centrum Wiskunde & Informatica and Eindhoven University of Technology to automatically maintain a key component, written in C++, of one of its successful software systems. Without automation, and for good reasons, such large-scale maintenance is often considered to be too complex and too risky. The partners applied the Rascal metaprogramming solution to script approximately 5,840 source code transformations. The resulting C++ code passed the quality assurance processes and is, in fact, of higher quality than before.

The price of the success of any high-tech system is that it gets increasingly complex over time. The code growth in volume and complexity raises the costs of maintenance (perfective, corrective or adaptive). When the code grows, then so do the costs. Code practically always grows exponentially because it’s rarely thrown away and often multiplied (“cloned”). And so maintenance costs also grow exponentially. The (unverified) story at the coffee machine is that companies and governmental institutes in the Netherlands yearly spend around 15 percent of the total cumulative cost-of-ownership of their source code on maintenance. Perhaps surprisingly, this number could easily be higher than the initial development costs.

Change is a force of nature, so what kind of code evolution is essential for survival? Firstly, we have to adapt to new market opportunities. For example, Arm processors and Linux have economical advantages, so we should be able to port our code to Linux on Arm. Secondly, we have to react to changing technical circumstances: programming languages and libraries we depend on disappear and new ones with better features appear. This is also a major part of remaining secure: security flaws in dependencies are a hazard. Thirdly, we have to remove arbitrary complexity to be able to focus on the essential complexity: source code grows more complex under the pressure of quick features and quick bug fixes (aka technical debt). We have to shrink the code back to a humane understandable size. In short: without continuous source code maintenance, businesses get stuck in the past, eventually losing their competitive edge.

This article is exclusively available to premium members of Bits&Chips. Already a premium member? Please log in. Not yet a premium member? Become one for only €15 and enjoy all the benefits.

Login

Related content