Architecture and code checking for embedded and PC software

Success Story in collaboration with Phoenix Contact

This is the logo of Phoenix Contact

Architecture and code checking for embedded and PC software

Phoenix Contact is the global market leader for components, systems and solutions in the field of electrical engineering, electronics and automation. The company’s products and solutions have a very long life cycle; some have been in use for decades and are continually further developed. To ensure the maintainability and further development of product software based on C, C++ or C#, Phoenix Contact uses the Axivion Suite in an increasing number of areas.

Download Phoenix Success Story as PDF


Product cycle times of 10 or 20 years are by no means rare in industrial environments such as railway engineering, the energy sector, or mechanical engineering.

Maintenance of the hardware is a matter of course, but the embedded and PC software for the products must also be regularly maintained and any errors which occur in the code – e. g. due to interaction with other, new components – must be eliminated by means of appropriate updates. At the same time, existing tried-and-tested components and systems must be adapted to new market requirements. Continuous further development with regard to important criteria such as safety, as well as efficiency and operability ensures the success of the products and the company. For developers, this means that the “legacy code” which has been maintained and extended over the years in the C, C++ and C# programming languages must be kept maintainable and at the same time must be usable as a dependable basis for the next product generation. The architecture of the software plays a decisive role in this. Is it comprehensibly defined for all those involved in the project over the course of many product cycles, and is it consistently applied? In the course of this “clean code development”, Phoenix Contact has dedicated itself to the development of maintainable and “clean” C, C++ and C# codes.

The objective is homogeneous architecture descriptions, UML models with uniform semantics and comprehensible  documentation. In the code itself, the main objective is to eliminate style violations, which in the long term may be potential sources of malfunctions or failures in the further developed products.

The Axivion Suite combines all of the essential functions for architecture and code analysis, and has therefore become an important instrument for efficient “clean code development”.


Initially, the developers at Phoenix Contact concentrated on the use of software architecture checking within the Axivion Suite.

This quickly indicates code violations of the architecture: Test reports mark the  “problem areas” in the program and hence create the basis for target-oriented discussions. Together with the software architects in the team, the subsets in the UML models are more precisely defined and according to the context – for example in the case of safety-relevant functions – are modelled down to class level.  Component models are generated in projects which are not safety-relevant. This creates consistent and homogeneous UML models, whose conformity is promptly and continually monitored in further architecture checks, in particular for new code.

Use of the Axivion Suite for architecture checks quickly became established at Phoenix Contact. After this, further functions of the suite of tools were integrated into routine development work. The features for checking source code for style violations were of special interest to the developers. For the use of metrics, care was taken to observe a small number of metrics to track down quality outliers, e. g. cyclomatic complexity (McCabe metric). Statistical analysis is also important to developers for the detection of errors. By means of additional analyses such as the identification of cycles, even faults that only occur sporadically and that otherwise would not be detectable can be identified and remedied. The Axivion Suite also efficiently detects clones, i. e. lexical and syntactic duplicates, in C, C++ and C# code.

The clone management system not only helps the Phoenix Contact teams to avoid source code duplicates, but also to eliminate potential errors in the legacy code, if necessary at several points at the same time.


The rapid and obvious successes provide motivation for the Phoenix Contact developers. On the basis of analyses with the Axivion Suite, they understand and appreciate the value of architecture as a tool and now document their programming even more consistently. With the development of consistent and homogeneous UML models they ensure the long-term and manageable further development of safety-relevant as well as non safety-critical products.

The Axivion Suite analyses also help with routine reflection for the improvement of the code quality of individual developers. Thanks to the positive error culture at Phoenix Contact and design reviews that can easily be integrated in the workflow, all employees have the ambition to develop “clean” code and to jointly improve software quality. A work group with “Axivion Key Users” regularly cooperates and informs the teams. In the event of any support or other questions, developers are assisted by Axivion contact partners.

Phoenix Contact has been using the Axivion Suite since 2013. The suite of tools was extensively tested both in the embedded environment with C and C++ as well as in a PC software project with C#. The results of this were positive, so that Phoenix Contact is now successively rolling out its use in more and more areas – entirely in line with the company’s “clean code” initiative.


PHOENIX CONTACT is the global market leader for components, systems and solutions in the field of electrical engineering, electronics and automation. The family business now employs about 14,500 people worldwide and had a  turnover of 1.91 billion euros in 2015. The company headquarters is in Blomberg  in Westphalia, Germany.

The Phoenix Contact Group consists of twelve companies in Germany and more than 50 sales companies throughout the world. This international presence is  reinforced by 30 agencies in Europe and overseas.


Sources of images: PHOENIX CONTACT