Req2Road: A GenAI Pipeline for SDV Test Artifact Generation and On-Vehicle Execution
This paper presents "Req2Road," a GenAI-driven pipeline that leverages Large and Vision-Language Models with Retrieval-Augmented Generation to automatically transform natural language requirements into executable Gherkin scenarios and test scripts for Software-Defined Vehicles, demonstrating an 89% success rate in converting requirements for a Child Presence Detection System across simulation and real-vehicle environments.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are the chief architect of a massive, futuristic city (a Software-Defined Vehicle). This city is run by thousands of rules written in plain English, complex flowcharts, and messy notes. Your job is to build a team of robots to patrol this city and make sure it follows all the rules.
The problem? The rules are written in human language, but the robots only speak "machine code." Traditionally, you'd need a team of human translators to read the rules, draw the maps, and then write the code for the robots. It's slow, expensive, and prone to mistakes.
Req2Road is a new, AI-powered "super-translator" pipeline that automates this entire process. Here is how it works, broken down with simple analogies:
1. The Problem: The "Lost in Translation" Gap
In the old days, if a car manufacturer wanted to test a safety feature (like a system that detects if a child is left in a hot car), they had to:
- Read a 50-page document written by engineers.
- Manually figure out which sensors (cameras, seat belts, thermometers) were involved.
- Write thousands of lines of code to tell the car what to do.
It was like trying to build a house by reading a recipe written in a different language, without a dictionary.
2. The Solution: The "AI Construction Crew"
The authors built a pipeline called Req2Road (Requirements-to-Road). Think of it as a four-stage assembly line run by different types of AI robots:
Stage A: The "Reading & Understanding" Robot (LLMs & VLMs)
First, the system reads the messy human requirements (text documents) and looks at the blueprints (diagrams).
- The Analogy: Imagine a super-smart intern who can read a novel and look at a sketch on a napkin. They understand that "If the baby cries, turn on the AC" means the car needs to use its Air Conditioning sensor and its Microphone.
- The Tech: They use Large Language Models (LLMs) for the text and Vision-Language Models (VLMs) to "see" the diagrams.
Stage B: The "Dictionary Lookup" (RAG & VSS)
This is the most critical step. The car has thousands of sensors (like a library with 1,000 books). If you ask the AI to "find the temperature sensor," it might hallucinate and invent a fake one.
- The Analogy: Instead of letting the AI guess, the system first pulls out a standardized dictionary called the Vehicle Signal Specification (VSS). It's like a universal catalog where "Temperature" is always called
Vehicle.Cabin.Temperature. - The Trick: They use a technique called RAG (Retrieval-Augmented Generation). Before asking the AI to write code, they show it a "shortlist" of only the 16 relevant words from the dictionary. This stops the AI from making things up.
Stage C: The "Scriptwriter" (Gherkin)
Now that the AI knows the rules and the correct dictionary words, it writes a "script" in a language called Gherkin.
- The Analogy: Gherkin is like a simple "If-Then" story.
- If the child is detected...
- And the parent hasn't answered in 5 minutes...
- Then turn on the horn and unlock the doors.
- This script is readable by humans and machines. It's the bridge between the idea and the code.
Stage D: The "Code Generator" (Python)
Finally, the AI translates that simple "If-Then" story into actual Python code that the car can run.
- The Analogy: This is the robot taking the script and building the actual robot patrol unit. It connects the "If-Then" logic to the real car sensors (like the HVAC system or the door locks).
3. The Big Test: From Simulation to Reality
The team didn't just stop at writing code; they actually tested it in two ways:
- The Video Game (SiL): They ran the tests in a digital simulation (the "digital.auto" playground). It's like testing a flight simulator before flying a real plane.
- The Real Car (ViL): They took the exact same code and ran it on a real Mercedes-Benz vehicle. They even put a "surrogate" (a fake baby with a crying audio track) in the back seat to trigger the system.
The Result: The AI successfully turned 32 out of 36 complex safety rules into working tests that ran on the real car. The car detected the "baby," waited the required time, and then turned on the AC and unlocked the doors, exactly as the script said.
Why This Matters
- Speed: It turns weeks of manual coding into hours.
- Portability: Because they used the "Universal Dictionary" (VSS), the same test script can run on a Mercedes, a BMW, or a Ford without rewriting the code.
- Safety: It ensures that the tests actually match the safety rules, reducing the chance of human error.
The Catch (Reality Check)
The paper admits the AI isn't perfect yet.
- It needs a human editor: The AI is like a brilliant but slightly reckless writer. It gets the story right 89% of the time, but a human still needs to review the script to catch the tricky parts (like "What if the battery is dead?").
- Complexity limits: If you give the AI too many rules at once, it gets confused. It works best when you break big problems into small, manageable chunks.
In a nutshell: Req2Road is a tool that helps car companies translate their safety wishes (written in English) into robot actions (written in code), ensuring that our future self-driving cars are safe, tested, and ready for the road.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.