Generating Automotive Code: Large Language Models for Software Development and Verification in Safety-Critical Systems
Sven Kirchner, Alois C. Knoll · 2025
Read Generating Automotive Code: Large Language Models for Software Development and Verification in Safety-Critical Systems by Sven Kirchner, Alois C. Knoll (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-04038.txt.
Introduction
Sven Kirchner and Alois Knoll build a framework for generating automotive software with large language models. Safety-critical car software faces rising complexity and strict regulation. Their framework inserts AI into the development life cycle, with models writing code in languages such as C++ under safety-focused practice.
Static checks, test-driven development, and repeated refinement are built into a feedback pipeline that runs tests and simulations for standards compliance. The framework was validated by building an adaptive cruise control system. Models were tested head to head for accuracy and how well they held up. The authors present the work as a bridge between AI and real safety demands.
Catalog record
| CREATOR | Sven Kirchner, Alois C. Knoll |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 35 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2506-04038
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Generating Automotive Code: Large Language Models for Software Development and Verification in Safety-Critical Systems Thanks: 1 Technical University of Munich, Garching, Bayern, Germany Thanks: Thanks: This research was funded by the Federal Ministry of Education and Research of Germany (BMBF) as part of the CeCaS project, FKZ: 16ME0800K. Sven Kirchner, Alois C. Knoll Abstract Developing safety-critical automotive software presents significant challenges due to increasing system complexity and strict regulatory demands. This paper proposes a novel framework integrating Generative Artificial Intelligence (GenAI) into the Software Development Lifecycle (SDLC). The framework uses Large Language Models (LLMs) to automate code generation in languages such as C++, incorporating safety-focused practices such as static verification, test-driven development and iterative refinement. A feedback-driven pipeline ensures the integration of test, simulation and verification for compliance with safety standards. The framework is validated through the development of an Adaptive Cruise Control (ACC) system. Comparative benchmarking of LLMs ensures optimal model selection for accuracy and reliability. Results demonstrate that the framework enables automatic code generation while ensuring compliance with safety-critical requirements, systematically integrating GenAI into automotive software engineering. This work advances the use of AI in safety-critical domains, bridging the gap between state-of-the-art generative models and real-world safety requirements. © 2025 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. I INTRODUCTION Recent advancements in the automotive domain are driving a paradigm shift from hardware-defined to software-defined intelligent vehicles, where software complexity and safety-criticality have increased significantly. Traditional linear processes, such as the V-model or the waterfall model [ 1 ] , offer limited flexibility to adapt to dynamically evolving requirements. As the volume of automotive software grows, each change in requirements requires extensive changes to the code base and repeated validation cycles, increasing both development time and cost. As a result, software architects and developers face increasing challenges in ensuring safety compliance, especially given the continuous expansion of regulatory frameworks and standards, which are now reaching levels of complexity that are difficult to track and implement manually [ 2 ] . Large Language Models (LLMs), such as Chat GPT-3 [ 3 ] , have recently shown promise in addressing this complexity by transforming the role of developers from code authors to orchestrators of generative pipelines. Instead of writing all application-level software manually, engineers can leverage LLMs for automated code generation, using the same standards that once hindered rapid development as structured data sources for compliance. In this work, we propose a novel framework that integrates Generative Artificial Intelligence (GenAI) into the software development lifecycle (SDLC). By using LLMs in conjunction with test-driven development (TDD) and static analysis, our approach enables modular system architectures that can be rapidly adapted to evolving requirements, while ensuring compliance with critical safety standards. A core element of the proposed framework is its focus on software generation during the test and integration phases, making the LLM an active participant in the iterative refinement loop. Under this paradigm, test suites and integration scripts assist the LLM by guiding automated code generation to meet specified requirements. The automated process reduces the need for manual recoding and retesting when system requirements change. Our methodology therefore shifts engineering effort to the creation of specification artefacts and robust tools, rather than traditional manual coding. We detail how this framework improves development speed by minimizing human intervention in code production and compliance checks and we illustrate its capabilities with an automotive case study that demonstrates its ability to save time and reduce error rates. We therefore present the following contributions : • GenAI-Integrated SDLC: A novel LLM-driven development cycle that combines TDD, static analysis and iterative refinement for safety-critical automotive software. • Safety Monitoring Pipeline: A unified framework for static analysis, formal verification, and automated integration validation to ensure safety compliance in automotive software systems. • LLM Handling: Evaluating the benchmark performance of LLMs and optimizing their implementation for automated code generation and refinement in automotive software development. • ISO-based ACC Case Study: Validation through automated generation of an ISO-based ACC system in C++, tested on the CARLA simulator [ 4 ] . II Related Work Fig. 1 : Introduction of Attention Mechanism and Transformer Architecture in Large Language Models for Code Generation. The fundamental principles of software engineering are based on critical design decisions in software development. To integrate safety as a priority, a focus on robust design capabilities can be complemented by effective test and validation methodologies and the use of software verification tools. This enables GenAI to create scalable and safety-critical applications while ensuring compliance with automotive standards. II-A Reducing software complexity through design choices Managing complexity in software engineering requires a systematic approach to design choices, aimed at constraining degrees of freedom and thereby reducing the likelihood of errors. Consequently, maintaining logical consistency in algorithms and flow control becomes essential for verifying correctness [ 5 ] . Structured interactions between the system and its environment reduce ambiguity and improve integration [ 6 ] . Efficient organization of data underpins performance and scalability [ 7 ] , while modular architectures ensure extensibility and adaptability [ 8 ] . Test-driven development integrates correctness into the development process [ 9 ] , while computational precision mitigates numerical instability [ 10 ] . Dependency management and platform compatibility ensure consistent behaviour across environments [ 11 ] . Addressing security vulnerabilities is essential for demonstrating system safety [ 12 ] , while effectively managing concurrency is critical for handling dynamic and parallel systems [ 13 ] . Design principles and standards provide a formal framework for managing the inherent degrees of freedom in software development, ultimately enabling the creation of robust, scalable and extensible systems [ 8 ] . Strategically controlling each degree of freedom minimizes the potential for error, thereby increasing the overall safety and reliability of the software. II-B Safety-Critical Software Safety-critical software requires a systematic approach, treating programming as an exact science with predictable and provable behaviour under all conditions [ 14 ] . Achieving this requires careful selection of programming languages, robust compiler validation and comprehensive verification and testing methodologies. C++ is widely used in safety-critical design because of to its balance of high performance, precise memory control, and deterministic resource management, which enables strict real-time and reliability constraints to be met. Compiler validation further strengthens these guarantees by translating the code correctly. C++ compilers such as GCC and Clang are highly optimized for performance and reliability, offering advanced static analysis, code optimization and diagnostics [ 15 ] . Beyond language and compiler choice, static code analysis is essential to ensure logical consistency [ 5 ] . Tools such as cppcheck for C++ [ 16 ] identify memory leaks, race conditions and guideline violations, significantly reducing the likelihood of unexpected behaviors. Before full integration, system behaviour is validated through unit testing. Frameworks like Google Test [ 17 ] verify functional correctness by adapting testing preconditions and edge cases. By integrating language safety, certified compilers, static analysis and rigorous testing,