Table of Contents
Fetching ...

LLM-Empowered Event-Chain Driven Code Generation for ADAS in SDV systems

Nenad Petrovic, Norbert Kroth, Axel Torschmied, Yinglei Song, Fengjunjie Pan, Vahid Zolfaghari, Nils Purschke, Sven Kirchner, Chengdong Wu, Andre Schamschurko, Yi Zhang, Alois Knoll

TL;DR

The paper tackles the challenge of generating validated automotive software from natural-language requirements by integrating LLM-driven code synthesis with a formal event-chain model and a Retrieval-Augmented Generation layer over a Vehicle Signal Specification catalog. This closes the gap between flexible NL interpretation and strict real-time, architectural constraints, using a three-stage pipeline (Preparation, Design-time, Deployment) and extensive validation in an SDV testbed. A proof-of-concept emergency braking scenario demonstrates that the approach yields consistent, signal-faithful code without retraining the LLM. The work highlights a scalable, safe pathway for end-to-end ADAS code generation in SDV systems through formalized reasoning, RAG context, and structured event chains.

Abstract

This paper presents an event-chain-driven, LLM-empowered workflow for generating validated, automotive code from natural-language requirements. A Retrieval-Augmented Generation (RAG) layer retrieves relevant signals from large and evolving Vehicle Signal Specification (VSS) catalogs as code generation prompt context, reducing hallucinations and ensuring architectural correctness. Retrieved signals are mapped and validated before being transformed into event chains that encode causal and timing constraints. These event chains guide and constrain LLM-based code synthesis, ensuring behavioral consistency and real-time feasibility. Based on our initial findings from the emergency braking case study, with the proposed approach, we managed to achieve valid signal usage and consistent code generation without LLM retraining.

LLM-Empowered Event-Chain Driven Code Generation for ADAS in SDV systems

TL;DR

The paper tackles the challenge of generating validated automotive software from natural-language requirements by integrating LLM-driven code synthesis with a formal event-chain model and a Retrieval-Augmented Generation layer over a Vehicle Signal Specification catalog. This closes the gap between flexible NL interpretation and strict real-time, architectural constraints, using a three-stage pipeline (Preparation, Design-time, Deployment) and extensive validation in an SDV testbed. A proof-of-concept emergency braking scenario demonstrates that the approach yields consistent, signal-faithful code without retraining the LLM. The work highlights a scalable, safe pathway for end-to-end ADAS code generation in SDV systems through formalized reasoning, RAG context, and structured event chains.

Abstract

This paper presents an event-chain-driven, LLM-empowered workflow for generating validated, automotive code from natural-language requirements. A Retrieval-Augmented Generation (RAG) layer retrieves relevant signals from large and evolving Vehicle Signal Specification (VSS) catalogs as code generation prompt context, reducing hallucinations and ensuring architectural correctness. Retrieved signals are mapped and validated before being transformed into event chains that encode causal and timing constraints. These event chains guide and constrain LLM-based code synthesis, ensuring behavioral consistency and real-time feasibility. Based on our initial findings from the emergency braking case study, with the proposed approach, we managed to achieve valid signal usage and consistent code generation without LLM retraining.

Paper Structure

This paper contains 9 sections, 7 figures.

Figures (7)

  • Figure 1: Structure of the automotive exploration environment
  • Figure 2: Structure of the universal vehicle communication middleware.
  • Figure 3: Workflow of event chain-driven LLM-empowered ADAS code generator.
  • Figure 4: Integrated code generation toolchain based on n8n.
  • Figure 5: Generated event chain for case study example, rendered as PlantUML activity diagram.
  • ...and 2 more figures