Aspects of complexity in automotive software systems and their relation to maintainability effort. A case study
Bengt Haraldsson, Miroslaw Staron
TL;DR
The paper examines how maintainability effort in automotive embedded software relates to multiple sources of complexity, including code, product variants, and organizational factors. Using a mixed-method case study at Scania with two large systems, it links quantitative metrics (cyclomatic complexity, fan-in/fan-out, LOC) to qualitative developer perceptions gathered through interviews, showing that variant management, legacy code, and hardware-control tasks drive maintainability effort alongside external coordination and regulatory considerations. The study demonstrates alignment between code/variant metrics and perceived complexity, and identifies trade-off strategies developers use to minimize effort while maintaining risk, suggesting that a holistic metric set that captures external complexity is needed for accurate maintainability assessment. Practically, the findings inform how teams can structure organizations and build processes to manage complexity more effectively in long-lived automotive software ecosystems.
Abstract
Context: Large embedded systems in vehicles tend to grow in size and complexity, which causes challenges when maintaining these systems. Objective: We explore how developers perceive the relation between maintainability effort and various sources of complexity. Methods: We conduct a case study at Scania AB, a heavy vehicle OEM. The units of analysis are two large software systems and their development teams/organizations. Results: Our results show that maintainability effort is driven by system internal complexity in the form of variant management and complex hardware control tasks. The maintainability is also influenced by emergent complexity caused by the system's longevity and constant growth. Besides these system-internal complexities, maintainability effort is also influenced by external complexities, such as organizational coordination and business needs. During the study, developer trade-off strategies for minimizing maintainability effort emerged. Conclusions: Complexity is a good proxy of maintainability effort, and allows developers to create strategies for managing the maintainability effort. Adequate complexity metrics include both external aspects -- e.g., coordination complexity -- and internal ones -- e.g., McCabe Cyclomatic Complexity.
