Automating AUTOSAR BSW Configuration Generation with Fine-Tuned LLMs and a Compact Intermediate Representation

The configuration of AUTOSAR Basic Software (BSW) modules relies on verbose AUTOSAR XML (ARXML) files that are complex, error-prone, and costly to produce manually—particularly for safety-critical modules governed by ISO 26262. This paper presents a two-stage approach to automating BSW configuration generation that generalizes to any ECU Configuration (ECUC)-based module: a fine-tuned large language model (LLM) generates a compact JSON intermediate representation capturing only semantically meaningful parameters, which a deterministic expansion function reconstructs into schema-conformant ARXML. We fine-tune three open-weight models (Qwen3-8B, Ministral-3-8B-Instruct, Llama 3.1 8B) with Quantized Low-Rank Adaptation (QLoRA) on 6050 compositionally generated Watchdog Manager (WdgM) samples spanning five complexity tiers with 30+ prompt templates, and introduce a hierarchical evaluation pipeline combining schema validation with referential integrity, structural completeness, parameter accuracy, and semantic constraint satisfaction. The compact representation reduces output tokens by approximately 8–10× compared to full ARXML. All three models achieve closely comparable performance (0.815–0.836 overall score), with Llama 3.1 8B scoring highest (0.836) and every model reaching ≥93% schema validity and ≥72% parameter accuracy—an 8.4× improvement over zero-shot baselines. Decomposing generation into LLM-driven semantic capture and deterministic expansion is an effective strategy for verbose, schema-governed configuration formats, extensible to other AUTOSAR modules beyond WdgM.

Authors

Institutions

Publication Details

Journal
Applied Sciences
Published
2026-08-25
DOI
https://doi.org/10.3390/app16178443
Primary Topic
Model-Driven Software Engineering Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Automating AUTOSAR BSW Configuration Generation with Fine-Tuned LLMs and a Compact Intermediate Representation

Mohamed Taher, Ahmed Moro, Amr Samy
Applied Sciences
Model-Driven Software Engineering Techniques
article

Automating AUTOSAR BSW Configuration Generation with Fine-Tuned LLMs and a Compact Intermediate Representation

Mohamed Taher, Ahmed Moro, Amr Samy
article en

Abstract

The configuration of AUTOSAR Basic Software (BSW) modules relies on verbose AUTOSAR XML (ARXML) files that are complex, error-prone, and costly to produce manually—particularly for safety-critical modules governed by ISO 26262. This paper presents a two-stage approach to automating BSW configuration generation that generalizes to any ECU Configuration (ECUC)-based module: a fine-tuned large language model (LLM) generates a compact JSON intermediate representation capturing only semantically meaningful parameters, which a deterministic expansion function reconstructs into schema-conformant ARXML. We fine-tune three open-weight models (Qwen3-8B, Ministral-3-8B-Instruct, Llama 3.1 8B) with Quantized Low-Rank Adaptation (QLoRA) on 6050 compositionally generated Watchdog Manager (WdgM) samples spanning five complexity tiers with 30+ prompt templates, and introduce a hierarchical evaluation pipeline combining schema validation with referential integrity, structural completeness, parameter accuracy, and semantic constraint satisfaction. The compact representation reduces output tokens by approximately 8–10× compared to full ARXML. All three models achieve closely comparable performance (0.815–0.836 overall score), with Llama 3.1 8B scoring highest (0.836) and every model reaching ≥93% schema validity and ≥72% parameter accuracy—an 8.4× improvement over zero-shot baselines. Decomposing generation into LLM-driven semantic capture and deterministic expansion is an effective strategy for verbose, schema-governed configuration formats, extensible to other AUTOSAR modules beyond WdgM.

Applied SciencesVol. 16(17)
Ain Shams University (EG), Software Engineering Institute (US)
Openalex Percentile: Top 5%
Model-Driven Software Engineering Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.