Autonomous driving, which the car industry is already gearing up for in the form of advanced driver-assistance systems (ADAS), requires vehicles to be more intelligent (at driving) than human beings. The solutions, based on stochastic deep-learning, neural networks and artificial intelligence (AI) rather than deterministic algorithms, are shaking the foundations of vehicle software engineering. Perhaps surprisingly, it has led to convergence on an old friend – the C++ language.
The original C language, despite its limited library support, has served the automotive industry well. Standardized in the AUTOSAR (AUTomotive Open System ARchitecture) platform, it’s at the heart of functions such as electronic stability control, anti-lock braking and traction control that are nowadays taken for granted in production models. Written in C, the basic software models for the deterministic algorithms involved could easily be developed and maintained in-house.
Advancing the standards
Implementing the latest ADAS solutions is a whole new ball game. Today’s vehicles feature intelligent camera systems for automated parking, radar for distance measurement, and LiDAR for 3D awareness. Not only is there a lot more data involved, processing it requires sophisticated new AI algorithms that are fresh out of research, necessitating the integration of third-party software libraries.
Can this be done in the good old C language? Most certainly yes, but in practice these new algorithms are nearly always written in C++, not least because C++ is at the heart of machine learning frameworks such as TensorFlow, PyTorch and CAFFE. C++ is a good choice because it has inherent advantages over C when it comes to structuring large projects, while it maintains C’s advantages of speed, real-time behavior, architecture portability, and the ability to run on bare-metal target systems. It’s why the AUTOSAR Adaptive Platform, introduced in 2017, includes programming guidelines for C++14, and why the new MISRA led guidelines will incorporate the latest version of the C++ language – C++17 and its successor C++20 when available.
C++ is the way
The evolution of ADAS is driving the automotive industry to switch from C to C++, while the safety-critical nature of ADAS solutions increases the need to validate the ability of compilers to correctly compile these larger, more complex and harder to verify applications. The good news is that Solid Sands has excellent tests for C++ compilers.
SuperTest contains the latest suites for validating C++11 and C++14 compilers, and we keep adding tests for new C++ standards, including C++17. So with SuperTest you can keep pace with the increasing complexity of artificial intelligence applications like those in the car industry, by ensuring that your compilers remain fit-for-purpose in a rapidly changing world.
Subscribe to our monthly blog!