Retrieval-Augmented Validation of AUTOSAR ARXML: A Machine-Learning-Assisted Code-Review Framework
2025 (English)Independent thesis Advanced level (degree of Master (Two Years)), 12 credits / 18 HE credits
Student thesis
Abstract [en]
The automotive industry heavily depends on the AUTOSAR (Automotive Open System Architecture) platform to standardize and streamline the development of electronic control units (ECUs). ARXML files, which serve as the structural backbone forAUTOSAR-based systems, pose unique challenges due to their hierarchical complexity and verbose nature. Manual review of these files is time-consuming, error-prone,and inefficient at the scale demanded by modern automotive workflows. Advances in artificial intelligence, particularly Retrieval-Augmented Generation (RAG) models, present an opportunity to automate and enhance ARXML validation. This thesis explores how integrating AUTOSAR specifications, vector embeddings, and promptengineering can improve the precision and efficiency of ARXML review processes. This research aims to design, implement, and evaluate a RAG-based pipeline tailored for ARXML analysis and review. The main objective is to assess whether RAGmodels can detect inconsistencies in ARXML configurations and deliver actionable,specification-grounded suggestions. An additional goal is to optimize developer experience by embedding AUTOSAR compliance logic directly into review feedback, thereby streamlining validation tasks. An iterative action research methodology was adopted to co-develop the systemwith practitioners. The framework integrates semantic vector embeddings, hybrid retrieval (BM25 + FAISS), and structured prompt templates to process ARXML diffs sand retrieve relevant segments from the AUTOSAR Classic Platform R23-11 specification. The system is evaluated using an LLM-as-a-Judge framework, which separately scores retrieval quality and generation faithfulness using rubric-based criteria. Performance metrics and model interpretability were analyzed across representative patch sets from a production-grade OEM project.The RAG system produced feedback that aligned well with AUTOSAR semantics, ordering clear and structured guidance to reviewers. The generation component received high ratings for clarity and completeness, although retrieval sometimeslacked clause-level grounding. While the tool reduced reliance on manual documentation lookup and improved review usability, it did not produce executable artefacts. The framework demonstrated interactive latency (~1.9s) suitable for integration withtools like Gerrit. This thesis demonstrates that a RAG-based approach can automate and improve ARXML review by embedding structured domain knowledge into AI feedback. Allthough the system currently targets AUTOSAR Classic R23-11, its modular architecture is adaptable to other structured formats such as YAML or JSON and applicable to regulated domains like aerospace and medical devices. Future work should address traceability, integration with live review systems, and broader generalization across standards and organizations.
Place, publisher, year, edition, pages
2025. , p. 34
Keywords [en]
RXML, AUTOSAR, Retrieval-Augmented Generation, LLM, Embedding Models, AI Feedback, Automated Code Review
National Category
Embedded Systems Computer Systems
Identifiers
URN: urn:nbn:se:bth-28282OAI: oai:DiVA.org:bth-28282DiVA, id: diva2:1980721
External cooperation
Volvo Cars
Subject / course
PA2592 Research Methods and Master's Thesis (60 credits) in Software Engineering for Professionals
Educational program
PAASA Master's Programme in Software Engineering 60,0 hp
Supervisors
2025-07-042025-07-022025-09-30Bibliographically approved