On Simulation-Guided LLM-based Code Generation for Safe Autonomous Driving Software
Paper in proceeding, 2025

Automated Driving System (ADS) is a safety-critical software system responsible for the interpretation of the vehicle's environment and making decisions accordingly. The unbounded complexity of the driving context, including unforeseeable events, necessitate continuous improvement, often achieved through iterative DevOps processes. However, DevOps processes are themselves complex, making these improvements both time- and resource-intensive. Automation in code generation for ADS using Large Language Models (LLM) is one potential approach to address this challenge. Nevertheless, the development of ADS requires rigorous processes to verify, validate, assess, and qualify the code before it can be deployed in the vehicle and used. In this study, we developed and evaluated a prototype for automatic code generation and assessment using a designed pipeline of a LLM-based agent, simulation model, and rule-based feedback generator in an industrial setup. The LLM-generated code is evaluated automatically in a simulation model against multiple critical traffic scenarios, and an assessment report is provided as feedback to the LLM for modification or bug fixing. We report about the experimental results of the prototype employing Codellama:34b, DeepSeek (r1:32b and Coder:33b), CodeGemma:7b, Mistral:7b, and GPT4 for Adaptive Cruise Control (ACC) and Unsupervised Collision Avoidance by Evasive Manoeuvre (CAEM). We finally assessed the tool with 11 experts at two Original Equipment Manufacturers (OEMs) by conducting an interview study.

DevOps

Autonomous Driving System

Large Language Model

Simulation

Verification

automated Software Generation

Author

Ali Nouri

University of Gothenburg

Chalmers, Computer Science and Engineering (Chalmers), Interaction Design and Software Engineering

Johan Andersson

Student at Chalmers

Kailash De Jesus Hornig

Student at Chalmers

Zhennan Fei

Volvo Cars

Emil Knabe

Volvo Cars

Hakan Sivencrona

Volvo Cars

Beatriz Cabrero-Daniel

University of Gothenburg

Chalmers, Computer Science and Engineering (Chalmers), Interaction Design and Software Engineering

Christian Berger

University of Gothenburg

Chalmers, Computer Science and Engineering (Chalmers), Interaction Design and Software Engineering

PROCEEDINGS OF THE 29TH INTERNATIONAL CONFERENCE ON EVALUATION AND ASSESSMENT IN SOFTWARE ENGINEERING, EASE 2025

1097-1106
979-8-4007-1385-9 (ISBN)

29TH INTERNATIONAL CONFERENCE ON EVALUATION AND ASSESSMENT IN SOFTWARE ENGINEERING, EASE 2025
Istanbul, Turkey,

Subject Categories (SSIF 2025)

Software Engineering

Vehicle and Aerospace Engineering

Control Engineering

Areas of Advance

Transport

DOI

10.1145/3756681.3756987

More information

Latest update

3/3/2026 8