CyberGuardAI 安全情报工作区
AI 安全知识情报
LJH 管理员
返回首页 学术论文

生成与验证:面向安全关键汽车软件工程的人机协作

摘要与解读

论文研究安全关键汽车软件开发中人类与代理协作的生成与验证流程,并讨论模式匹配检查的局限。

六维情报分析

6 个维度 · 原文可溯源

影响范围

  • 来源报告的影响对象是AUMOVIO活跃汽车C/C++项目中的编码代理与开发者协作流程:代理基于函数签名、文档、关联需求文本和UML行为生成实现,并内置verify工具。其必要条件是每次变更都需评审、追溯到需求并对照编码标准检查后才能提交,因此信任边界落在人工评审与标准符合性检查上;后果是若把模式检查通过当作功能与时序正确,缺陷会越过评审进入安全关键代码。

    原文依据 · 4

    中文译文

    面向安全关键型汽车软件工程的协作 Elizaveta Zinovyeva1、Aiham Taleb1、Nikita Kozodoi1、Daniel Schleicher1、Amir Mahdi Namazi2、Martin Kraus2、Levent Kent1、Brian Jensen1* 1 Amazon Web Services,德国;2 AUMOVIO,德国雷根斯堡 {zinovyee,aitaleb,kozodoi,dschlei,levkent,jensbri}@amazon.com {amir.mahdi.namazi,martin.2.kraus}@aumovio.com 摘要 关于编码智能体的研究主要关注代码生成质量。然而,安全关键型汽车软件还提出了两项额外要求。它优先考虑验证,因为每项变更都要经过审查、追溯到某项需求,

    原文引文

    t Collaboration for Safety-Critical Automotive Software Engineering Elizaveta Zinovyeva1, Aiham Taleb1, Nikita Kozodoi1, Daniel Schleicher1, Amir Mahdi Namazi2,Martin Kraus 2,Levent Kent 1,Brian Jensen 1* 1Amazon Web Services, Germany, 2AUMOVIO, Regensburg, Germany {zinovyee,aitaleb,kozodoi,dschlei,levkent,jensbri}@amazon.com {amir.mahdi.namazi,martin.2.kraus}@aumovio.com Abstract Research on coding agents mainly focuses on generation quality. Yet, safety-critical automo- tive software makes two additional demands. It prioritizes verification, since every change is reviewed, traced to a requir
    查看原文 · v1

    中文译文

    默认生成符合 MISRA 规范的代码(Umer,2025),而幻觉会带来切实的安全风险(Pavel 等,2025)。这对汽车软件编码助手提出了两项额外要求。 第一项要求是验证。在安全关键型场景中,开发者不能盲目接受大语言模型的输出,因为每项变更在提交前都必须经过审查、追溯到某项需求,并对照编码标准进行检查。因此,实际问题不仅是模型能否编写符合规范的代码,还在于智能体应如何与开发者协作,以便合规性能够被

    原文引文

    e MISRA-compliant code by default (Umer, 2025), while hallucinations pose tangible safety risks (Pavel et al., 2025). This places two additional demands on coding assistants for automotive software. The first demand is verification. In safety-critical settings, developers cannot accept LLM output blindly, since every change is reviewed, traced to a requirement, and checked against coding standards before it can be committed. The practical question is therefore not only whether the model can write compliant code, but how the agent should collabo- rate with the developer so that compliance can b
    查看原文 · v1

    中文译文

    e 其;(ii)通过提示工程以及在与每个函数必须满足的要求配对的生产代码上进行微调,使模型适应该领域。我们将其部署在 AUMOVIO 正在进行的汽车 C/C++ 项目中,评估模式符合性,并在生产环境中开展开发者试点。 我们的实验得出三项发现。首先,verify 是试点中使用最多的工具,开发者会在自己已有的代码上运行它,而不仅仅是在生成的输出上运行,这表明

    原文引文

    e it; (ii) adapting the model to the domain through prompt engineering and fine-tuning on production code paired with the requirements each function must satisfy. We deploy it on AUMOVIO’s active automotive C/C++ projects, evaluate pattern con- formance, and run a developer pilot in production. Our experiments produce three findings. First, verify is the most-used tool in the pilot, and developers run it on their own existing code rather than only on generated output, which indicates that
    查看原文 · v1

    中文译文

    合规工作:它产生的所有内容都需要由合格的工程师审查。部署中有三种失败模式值得关注。虚假信心,即通过模式检查的代码仍然违反功能或时序要求;第 5.2 节就是一个具体案例,因为到处添加防御性模式会提高评分,却不会使代码

    原文引文

    ate compliance work: everything it produces needs re- view by qualified engineers. Three failure modes matter in deployment.False confidence, where code that passes pattern checks still violates func- tional or timing requirements; Section 5.2 is a con- crete case, since adding defensive patterns every- where raises the score without making the code
    查看原文 · v1

关联资产

  • 原文示明的关联资产包括:AUMOVIO汽车生产C/C++代码及其函数签名、文档、需求文本与UML图;MISRA C 2012、CERT C等编码标准规则集;AUTOSAR分层架构与嵌入式实时、内存受限运行环境;以及经Cognito认证、由Lambda调用领域托管模型、orchestrator编排调用的云侧组件。适用前提是代码带有需求追溯链接并处于安全关键评审流程中;本地资产清单未提供,未做任何本地匹配。

    原文依据 · 4
    ted via Cognito, to Lambda functions that invoke the models we host for the automotive domain, so the orchestrator sequences the calls while specialized models generate code. 4 Evaluation Setup Evaluating automotive code quality requires both automated metrics and human expertise. Table 2 in Appendix summarizes candidate metrics by type, tool availability, complexity, reliability, and cost, spanning reference-based similarity measures (Paul et al., 2024; Takaichi et al., 2022), static and dy- namic analysis, and standards conformance against MISRA (Association, 2013), CERT C (Seacord, 2008), a
    查看原文 · v1
    on un- der real-time constraints, follow specific architec- tural patterns (e.g., AUTOSAR layered architec- ture) rarely encountered during pre-training, oper- ate under tight memory and resource constraints in embedded systems, and respect interface con- ventions particular to the organization that owns the codebase. A general-purpose model fits this 557 setting poorly, since the conventions it must follow are underrepresented in its training data (Cassano et al., 2024; Gu et al., 2025; Liu et al., 2023). This paper introduces an agentic assistant for automotive software, built on the Model
    查看原文 · v1
    24The behavior follows this UML diagram: 25@startuml 26ValidateEngineParameters -> CheckRPMRange : ↪→validate RPM 27CheckRPMRange -> CheckTemperature : if RPM ↪→valid 28CheckTemperature -> SetValidationResult : set ↪→result 29@enduml""" 30}, 31{ 32"role": "assistant", 33"content": """ 34void ValidateEngineParameters(const ↪→EngineData_t * engineData, ↪→ValidationResult_t * result) 35{ 36/ * MISRA-C 2012 Rule 1.3: No undefined ↪→behavior */ 37if ((engineData == NULL) || (result == NULL ↪→)) 38{ 39if (result != NULL) 40{ 41result->isValid = false; 42result->errorCode = ↪→VALIDATION_NULL_POINTER
    查看原文 · v1
    complete enough to specify behavior, validates them against our custom rule sets, and analyzes complexity for balanced stratification. The pipeline yields over 6,000 function implementations stratified by com- plexity, of which 822 are held out for evaluation. The step that distinguishes this setting from gen- 559 eral code generation is requirements traceability. In safety-critical automotive practice, an imple- mentation is not merely expected to work; it must be attributable to a specific requirement, and that link is what makes review and certification pos- sible. AUMOVIO’s code carries t
    查看原文 · v1

风险评估

  • 已报道的风险机制有三类:一是false confidence,代码通过模式检查仍违反功能或时序需求,例如到处添加防御性模式会抬高分数而不改善代码;二是模式匹配代理可被优化而未被满足,模型通过输出可识别构造提高得分;三是LLM幻觉带来实际安全风险,且自修复收益有限、模型缺少外部反馈时难以自我纠正。触发条件包括以简化模式子集替代完整验证、以及仅依赖模型自评。防护优先级应放在外部验证与人工评审,而非提高模式得分。

    原文依据 · 4

    中文译文

    合规工作:它产生的所有内容都需要由合格的工程师审查。部署中有三种失败模式值得关注。虚假信心,即通过模式检查的代码仍然违反功能或时序要求;第 5.2 节就是一个具体案例,因为到处添加防御性模式会提高评分,却不会使代码

    原文引文

    ate compliance work: everything it produces needs re- view by qualified engineers. Three failure modes matter in deployment.False confidence, where code that passes pattern checks still violates func- tional or timing requirements; Section 5.2 is a con- crete case, since adding defensive patterns every- where raises the score without making the code
    查看原文 · v1
    pattern-matching proxy for a standard can be optimized without being satisfied: a model raises its score by emitting recognized con-
    查看原文 · v1
    ate that domain- specific code generation requires both LLM adap- tation and domain-aware validation. Such valida- tion is typically placed inside the generation loop, where the model critiques and repairs its own out- put, but gains from self-repair are modest and bot- tlenecked by the model’s ability to judge its own code (Olausson et al., 2024), and models struggle to self-correct without external feedback (Huang et al., 2024; Stechly et al., 2024). A further stream studies coding assistants from a developer-productivity perspective, reporting faster task completion with GitHub Copilot (Pen
    查看原文 · v1

    中文译文

    默认生成符合 MISRA 规范的代码(Umer,2025),而幻觉会带来切实的安全风险(Pavel 等,2025)。这对汽车软件编码助手提出了两项额外要求。 第一项要求是验证。在安全关键型场景中,开发者不能盲目接受大语言模型的输出,因为每项变更在提交前都必须经过审查、追溯到某项需求,并对照编码标准进行检查。因此,实际问题不仅是模型能否编写符合规范的代码,还在于智能体应如何与开发者协作,以便合规性能够被

    原文引文

    e MISRA-compliant code by default (Umer, 2025), while hallucinations pose tangible safety risks (Pavel et al., 2025). This places two additional demands on coding assistants for automotive software. The first demand is verification. In safety-critical settings, developers cannot accept LLM output blindly, since every change is reviewed, traced to a requirement, and checked against coding standards before it can be committed. The practical question is therefore not only whether the model can write compliant code, but how the agent should collabo- rate with the developer so that compliance can b
    查看原文 · v1

相关研究

  • 研究方法是在通用LLM上做汽车领域定制:用AUMOVIO生产代码构造数据集,每个函数配对需求文本与UML行为,比较prompt engineering(PE,参数固定、领域知识经系统提示注入,含JSON规则集)与fine-tuning两种策略,并在活跃项目上评估模式符合性、开展开发者试点。相关研究材料指出通用LLM因领域库使用有限而在专用上下文表现不足,DomCoder以提示与微调注入API知识,另有工作指出自修复收益有限、模型需外部反馈。贡献在于把验证置于生成循环之外并强调需求可追溯性。

    原文依据 · 5
    us- ing a general-purpose model, we customize the underlying LLM for the automotive do- main through prompt engineering and fine- tuning. We construct a dataset from automotive production code of AUMOVIO, where each function is paired with the requirement texts and Unified Modeling Language (UML) be- havior it must satisfy. In a two-week pilot on active production projects, developers re- port verify as the most-used tool and con- firm using it on their own code and not only on generated output. Comparing model cus- tomization strategies, 75% prefer the faster prompt-engineered configuration.
    查看原文 · v1
    extraction and filtering steps. 3.2 Model Customization In PE mode, model parameters stay fixed and all do- main knowledge enters through the prompt. Each request carries a system prompt that states the au- tomotive coding role and instructs the model to return a single function implementation based on the task context assembled by our pipeline: the function signature, its documentation and linked requirements, signatures and documentation of im- ported functions, and the UML diagram when one is referenced. The prompt also includes JSON rule sets the code needs to conform with, includ- ing con
    查看原文 · v1
    gram- ming (Li et al., 2022; Wang et al., 2021; Ahmad et al., 2021), but struggle with domain-specific code due to gaps in specialized knowledge. Gu et al. (2025) show that general-purpose LLMs un- derperform in domain-specific contexts because they make limited use of domain-specific libraries, and their DomCoder approach recovers quality by injecting API knowledge through prompting and fine-tuning. Another work fine-tunes code mod- els on domain-specific corpora (Liu et al., 2023) and finds that developers expect assistants to under- stand specific frameworks and libraries, and their two-sta
    查看原文 · v1
    ate that domain- specific code generation requires both LLM adap- tation and domain-aware validation. Such valida- tion is typically placed inside the generation loop, where the model critiques and repairs its own out- put, but gains from self-repair are modest and bot- tlenecked by the model’s ability to judge its own code (Olausson et al., 2024), and models struggle to self-correct without external feedback (Huang et al., 2024; Stechly et al., 2024). A further stream studies coding assistants from a developer-productivity perspective, reporting faster task completion with GitHub Copilot (Pen
    查看原文 · v1
    complete enough to specify behavior, validates them against our custom rule sets, and analyzes complexity for balanced stratification. The pipeline yields over 6,000 function implementations stratified by com- plexity, of which 822 are held out for evaluation. The step that distinguishes this setting from gen- 559 eral code generation is requirements traceability. In safety-critical automotive practice, an imple- mentation is not merely expected to work; it must be attributable to a specific requirement, and that link is what makes review and certification pos- sible. AUMOVIO’s code carries t
    查看原文 · v1

验证资料

  • 来源给出的实验数据:流水线产出超过6,000个按复杂度分层的函数实现,其中822个留作评估;两周生产试点中开发者报告verify为最常用工具,并用于自身既有代码而非仅生成输出;比较模型定制策略时75%偏好更快的prompt-engineered配置。适用条件是模式子集刻意简化,排除需要语义、数据流或过程间推理的规则,生产使用需成熟汽车linter。防御性核查可观察:verify调用对象是否为人工既有代码、模式违规均值与端到端生成指标、以及模式得分上升而功能/时序需求未覆盖的案例。

    原文依据 · 4
    complete enough to specify behavior, validates them against our custom rule sets, and analyzes complexity for balanced stratification. The pipeline yields over 6,000 function implementations stratified by com- plexity, of which 822 are held out for evaluation. The step that distinguishes this setting from gen- 559 eral code generation is requirements traceability. In safety-critical automotive practice, an imple- mentation is not merely expected to work; it must be attributable to a specific requirement, and that link is what makes review and certification pos- sible. AUMOVIO’s code carries t
    查看原文 · v1
    us- ing a general-purpose model, we customize the underlying LLM for the automotive do- main through prompt engineering and fine- tuning. We construct a dataset from automotive production code of AUMOVIO, where each function is paired with the requirement texts and Unified Modeling Language (UML) be- havior it must satisfy. In a two-week pilot on active production projects, developers re- port verify as the most-used tool and con- firm using it on their own code and not only on generated output. Comparing model cus- tomization strategies, 75% prefer the faster prompt-engineered configuration.
    查看原文 · v1
    drawn from verification patterns AUMOVIO already applies1, selected by engineers as high-impact patterns. They are a deliberately simplified subset of AUMOVIO’s verification process: rules requiring semantic, data- flow, or inter-procedural reasoning are excluded by construction, since a pattern matcher cannot decide them and may produce false positives and false negatives. Production use therefore requires established automotive linters. 5 Results 5.1 Pattern Conformance Evaluation Table 1 reports mean pattern-level rule violations per generated function alongside the observed end- to-end ge
    查看原文 · v1

    中文译文

    e 其;(ii)通过提示工程以及在与每个函数必须满足的要求配对的生产代码上进行微调,使模型适应该领域。我们将其部署在 AUMOVIO 正在进行的汽车 C/C++ 项目中,评估模式符合性,并在生产环境中开展开发者试点。 我们的实验得出三项发现。首先,verify 是试点中使用最多的工具,开发者会在自己已有的代码上运行它,而不仅仅是在生成的输出上运行,这表明

    原文引文

    e it; (ii) adapting the model to the domain through prompt engineering and fine-tuning on production code paired with the requirements each function must satisfy. We deploy it on AUMOVIO’s active automotive C/C++ projects, evaluate pattern con- formance, and run a developer pilot in production. Our experiments produce three findings. First, verify is the most-used tool in the pilot, and developers run it on their own existing code rather than only on generated output, which indicates that
    查看原文 · v1

处置建议

  • 按序建议:一,把verify作为独立外部检查接入提交前流程,覆盖人工既有代码与生成代码,对应试点中verify最常用的观察;二,以成熟汽车linter补齐模式匹配器无法判定的语义、数据流与过程间规则,避免仅以模式得分作为放行依据;三,监测模式违规均值与false confidence案例,重点审查防御性模式堆叠导致的分数虚高;四,在PE与fine-tuning间按75%偏好更快的PE配置先行试点,同时保留人工评审与需求追溯作为最终关口。

    原文依据 · 5
    drawn from verification patterns AUMOVIO already applies1, selected by engineers as high-impact patterns. They are a deliberately simplified subset of AUMOVIO’s verification process: rules requiring semantic, data- flow, or inter-procedural reasoning are excluded by construction, since a pattern matcher cannot decide them and may produce false positives and false negatives. Production use therefore requires established automotive linters. 5 Results 5.1 Pattern Conformance Evaluation Table 1 reports mean pattern-level rule violations per generated function alongside the observed end- to-end ge
    查看原文 · v1

    中文译文

    e 其;(ii)通过提示工程以及在与每个函数必须满足的要求配对的生产代码上进行微调,使模型适应该领域。我们将其部署在 AUMOVIO 正在进行的汽车 C/C++ 项目中,评估模式符合性,并在生产环境中开展开发者试点。 我们的实验得出三项发现。首先,verify 是试点中使用最多的工具,开发者会在自己已有的代码上运行它,而不仅仅是在生成的输出上运行,这表明

    原文引文

    e it; (ii) adapting the model to the domain through prompt engineering and fine-tuning on production code paired with the requirements each function must satisfy. We deploy it on AUMOVIO’s active automotive C/C++ projects, evaluate pattern con- formance, and run a developer pilot in production. Our experiments produce three findings. First, verify is the most-used tool in the pilot, and developers run it on their own existing code rather than only on generated output, which indicates that
    查看原文 · v1

    中文译文

    合规工作:它产生的所有内容都需要由合格的工程师审查。部署中有三种失败模式值得关注。虚假信心,即通过模式检查的代码仍然违反功能或时序要求;第 5.2 节就是一个具体案例,因为到处添加防御性模式会提高评分,却不会使代码

    原文引文

    ate compliance work: everything it produces needs re- view by qualified engineers. Three failure modes matter in deployment.False confidence, where code that passes pattern checks still violates func- tional or timing requirements; Section 5.2 is a con- crete case, since adding defensive patterns every- where raises the score without making the code
    查看原文 · v1
    us- ing a general-purpose model, we customize the underlying LLM for the automotive do- main through prompt engineering and fine- tuning. We construct a dataset from automotive production code of AUMOVIO, where each function is paired with the requirement texts and Unified Modeling Language (UML) be- havior it must satisfy. In a two-week pilot on active production projects, developers re- port verify as the most-used tool and con- firm using it on their own code and not only on generated output. Comparing model cus- tomization strategies, 75% prefer the faster prompt-engineered configuration.
    查看原文 · v1
    pattern-matching proxy for a standard can be optimized without being satisfied: a model raises its score by emitting recognized con-
    查看原文 · v1
模型与引文记录
模型
deepseek-flash
生成时间
记录编号
REQ-400a5982d0294c48874cb95a4732d873
分析原文
查看原文 · v1

图片与附件

1 项关联材料
  • 2026.realm-1.38.pdf已归档 · 283.8 KB
    采集与来源记录
    文件名称
    2026.realm-1.38.pdf
    记录大小
    290653 字节
    文件格式
    application/pdf
    关联登记时间
    2026-11-05 05:03 UTC
    关联原文
    v1
    保存时校验
    c2cf96d3e9d36125b4b9cb940e66955b98cbe25703af1fec472d5dd33d08919b

资料档案

文献来源与参考链接

当前保存的来源版本 · v1

文献与标准标识
doi:10.18653/2026.realm-1.38
文字提取方式
pypdf-6.19.0
本段页码
1、14
PDF 总页数
14
当前分段
1
PDF 分段总数
1
采集来源格式
acl_anthology_pdf
结构化格式
native_pdf
原始标题与分类记录

Generation and Verification: Human-Agent Collaboration for Safety-Critical Automotive Software Engineering

研究方向
攻击方法、评测治理
影响维度
安全与合规
风险类型
幻觉与可靠性
相关技术
LLM、Agent、工具调用

当前为离线关键词规则模式。

分类规则与原始字段
攻击方法 · attack
lly swayed by how a change is framed, and an iterative attack that refines its framing against a local copy of the review pipeline succeeds in every case they te
评测治理 · evaluation
ritical settings the developer must be able to trigger evaluation directly, because a check the agent can skip is not a reliable check. We address the second demand
幻觉与可靠性 · hallucination
hid Zolfaghari, Fengjunjie Pan, and Alois Knoll. 2025. Hallucination in LLM-based code genera- tion: An automotive case study.arXiv preprint arXiv:2508.11257. Sida Peng
安全与合规 · safety
ration and Verification: Human-Agent Collaboration for Safety-Critical Automotive Software Engineering The Proceedings of the Second Workshop for REsearch on Age
LLM · llm
g a general-purpose model, we customize the underlying LLM for the automotive do- main through prompt engineering and fine- tuning. We construct a dataset fro
Agent · agent
Generation and Verification: Human-Agent Collaboration for Safety-Critical Automotive Software Engineering The Proceedings of the Second Wor
工具调用 · mcp
omotive software, built on the Model Context Protocol (MCP) (Anthropic, 2024), that addresses both demands. We address the first demand by exposing verificati
{
  "ai_relevance": {
    "evidence": [
      {
        "end_offset": 1210,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 1206
      },
      {
        "end_offset": 1609,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 1606
      },
      {
        "end_offset": 3003,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 2999
      },
      {
        "end_offset": 3312,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 3309
      },
      {
        "end_offset": 7880,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 7876
      },
      {
        "end_offset": 8217,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 8213
      },
      {
        "end_offset": 9687,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 9683
      },
      {
        "end_offset": 9808,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 9804
      },
      {
        "end_offset": 10101,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 10098
      },
      {
        "end_offset": 25820,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 25817
      },
      {
        "end_offset": 37843,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 37839
      },
      {
        "end_offset": 38584,
        "location": "title_and_content",
        "quote": "llms",
        "rule": "ai_term",
        "start_offset": 38580
      },
      {
        "end_offset": 38865,
        "location": "title_and_content",
        "quote": "large language models",
        "rule": "ai_term",
        "start_offset": 38844
      },
      {
        "end_offset": 39429,
        "location": "title_and_content",
        "quote": "large language models",
        "rule": "ai_term",
        "start_offset": 39408
      },
      {
        "end_offset": 40008,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 40005
      },
      {
        "end_offset": 40546,
        "location": "title_and_content",
        "quote": "large language models",
        "rule": "ai_term",
        "start_offset": 40525
      },
      {
        "end_offset": 41650,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 41646
      },
      {
        "end_offset": 42305,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 42302
      },
      {
        "end_offset": 42786,
        "location": "title_and_content",
        "quote": "Artificial Intelligence",
        "rule": "ai_term",
        "start_offset": 42763
      },
      {
        "end_offset": 42943,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 42940
      },
      {
        "end_offset": 44013,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 44009
      },
      {
        "end_offset": 44251,
        "location": "title_and_content",
        "quote": "large language models",
        "rule": "ai_term",
        "start_offset": 44230
      },
      {
        "end_offset": 44689,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 44685
      },
      {
        "end_offset": 16318,
        "location": "title_and_content",
        "quote": "HuggingFace",
        "rule": "ai_component",
        "start_offset": 16307
      }
    ],
    "matches": [
      {
        "end_offset": 1210,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 1206
      },
      {
        "end_offset": 1609,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 1606
      },
      {
        "end_offset": 3003,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 2999
      },
      {
        "end_offset": 3312,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 3309
      },
      {
        "end_offset": 7880,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 7876
      },
      {
        "end_offset": 8217,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 8213
      },
      {
        "end_offset": 9687,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 9683
      },
      {
        "end_offset": 9808,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 9804
      },
      {
        "end_offset": 10101,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 10098
      },
      {
        "end_offset": 25820,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 25817
      },
      {
        "end_offset": 37843,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 37839
      },
      {
        "end_offset": 38584,
        "location": "title_and_content",
        "quote": "llms",
        "rule": "ai_term",
        "start_offset": 38580
      },
      {
        "end_offset": 38865,
        "location": "title_and_content",
        "quote": "large language models",
        "rule": "ai_term",
        "start_offset": 38844
      },
      {
        "end_offset": 39429,
        "location": "title_and_content",
        "quote": "large language models",
        "rule": "ai_term",
        "start_offset": 39408
      },
      {
        "end_offset": 40008,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 40005
      },
      {
        "end_offset": 40546,
        "location": "title_and_content",
        "quote": "large language models",
        "rule": "ai_term",
        "start_offset": 40525
      },
      {
        "end_offset": 41650,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 41646
      },
      {
        "end_offset": 42305,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 42302
      },
      {
        "end_offset": 42786,
        "location": "title_and_content",
        "quote": "Artificial Intelligence",
        "rule": "ai_term",
        "start_offset": 42763
      },
      {
        "end_offset": 42943,
        "location": "title_and_content",
        "quote": "LLM",
        "rule": "ai_term",
        "start_offset": 42940
      },
      {
        "end_offset": 44013,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 44009
      },
      {
        "end_offset": 44251,
        "location": "title_and_content",
        "quote": "large language models",
        "rule": "ai_term",
        "start_offset": 44230
      },
      {
        "end_offset": 44689,
        "location": "title_and_content",
        "quote": "LLMs",
        "rule": "ai_term",
        "start_offset": 44685
      },
      {
        "end_offset": 16318,
        "location": "title_and_content",
        "quote": "HuggingFace",
        "rule": "ai_component",
        "start_offset": 16307
      }
    ],
    "method": "explainable_keyword_rules",
    "reason": "Matched AI topic or component evidence",
    "relevant": true
  },
  "entity_ids": [],
  "facts": [],
  "method": "source_grounded_extraction",
  "unknown_fields": [
    "affected_products",
    "affected_versions",
    "fixed_versions",
    "cvss",
    "mitigations",
    "references",
    "papers",
    "poc"
  ]
}
原始采集文本
The Proceedings of the Second Workshop for REsearch on Agent Language Models (REALM 2026), pages 557–570
October 29, 2026 ©2026 Association for Computational Linguistics
Generation and Verification: Human-Agent Collaboration for
Safety-Critical Automotive Software Engineering
Elizaveta Zinovyeva1, Aiham Taleb1, Nikita Kozodoi1, Daniel Schleicher1,
Amir Mahdi Namazi2,Martin Kraus 2,Levent Kent 1,Brian Jensen 1*
1Amazon Web Services, Germany, 2AUMOVIO, Regensburg, Germany
{zinovyee,aitaleb,kozodoi,dschlei,levkent,jensbri}@amazon.com
{amir.mahdi.namazi,martin.2.kraus}@aumovio.com
Abstract
Research on coding agents mainly focuses on
generation quality. Yet, safety-critical automo-
tive software makes two additional demands. It
prioritizes verification, since every change is
reviewed, traced to a requirement, and checked
against industry standards such as MISRA and
AUTOSAR before it can be committed. It is
also a narrow domain, written against layered
architectures, embedded resource constraints,
and organization-specific interface conventions
that are scarce in the data general-purpose
LLMs are trained on. We present a coding
assistant for automotive C/C++ that addresses
both demands. First, it exposes three tools
to the user over the Model Context Protocol
(generate, edit, and verify), allowing
developers to run verify on any code on
demand rather than relying on the agent to
check its own output. Second, rather than us-
ing a general-purpose model, we customize
the underlying LLM for the automotive do-
main through prompt engineering and fine-
tuning. We construct a dataset from automotive
production code of AUMOVIO, where each
function is paired with the requirement texts
and Unified Modeling Language (UML) be-
havior it must satisfy. In a two-week pilot
on active production projects, developers re-
port verify as the most-used tool and con-
firm using it on their own code and not only
on generated output. Comparing model cus-
tomization strategies, 75% prefer the faster
prompt-engineered configuration. MISRA- and
AUTOSAR-inspired pattern checkers indicate
that prompt engineering achieves a lower num-
ber of violations on C, while fine-tuning shows
better conformance with architecture patterns
for C++.
*Work done while at Amazon Web Services.
1 Introduction
Research on AI coding assistants is organized
largely around generation quality (Jiang et al.,
2024), asking whether a model produces code that
compiles, passes tests, and resembles a reference
implementation (Paul et al., 2024; Zheng et al.,
2025). Automotive software development is adopt-
ing these assistants as car makers seek productiv-
ity gains (Hepp et al., 2025). Yet, they fall short
of safety-critical requirements such as AUTOSAR
(AUTOSAR, 2017) and MISRA-C (Association,
2013), which establish strict rules for reliability in
automotive systems. Recent studies show that pop-
ular LLMs struggle to produce MISRA-compliant
code by default (Umer, 2025), while hallucinations
pose tangible safety risks (Pavel et al., 2025). This
places two additional demands on coding assistants
for automotive software.
The first demand is verification. In safety-critical
settings, developers cannot accept LLM output
blindly, since every change is reviewed, traced to a
requirement, and checked against coding standards
before it can be committed. The practical question
is therefore not only whether the model can write
compliant code, but how the agent should collabo-
rate with the developer so that compliance can be
verified, audited, and trusted.
The second demand is domain fit. Automotive
code must guarantee deterministic execution un-
der real-time constraints, follow specific architec-
tural patterns (e.g., AUTOSAR layered architec-
ture) rarely encountered during pre-training, oper-
ate under tight memory and resource constraints
in embedded systems, and respect interface con-
ventions particular to the organization that owns
the codebase. A general-purpose model fits this
557

setting poorly, since the conventions it must follow
are underrepresented in its training data (Cassano
et al., 2024; Gu et al., 2025; Liu et al., 2023).
This paper introduces an agentic assistant for
automotive software, built on the Model Context
Protocol (MCP) (Anthropic, 2024), that addresses
both demands. We address the first demand by
exposing verification as a separate tool. Rather
than providing a single code generation mode, the
system exposes three tools: generate, edit,
and verify. The first two generate and revise
function bodies from a signature, documentation,
and context such as imported functions and UML
diagrams. This task is central to automotive work-
flows, where interfaces are specified upfront and
implementations must follow established patterns.
The third tool lets developers run the same auto-
motive rule checks the agent uses internally, on
demand and independently of generation. Most
coding agents treat checking as an internal step that
the agent itself decides to invoke. We argue that in
safety-critical settings the developer must be able
to trigger evaluation directly, because a check the
agent can skip is not a reliable check.
We address the second demand by customiz-
ing the model to the domain. We build a dataset
from an AUMOVIO’s production automotive code
in which each function is paired with the con-
text needed to implement it compliantly, includ-
ing requirement texts resolved from AUMOVIO’s
requirements-management system and the UML
behavior the function must realize. On this dataset
we compare the two customization strategies most
used for code models (Shin et al., 2025; Freire
et al., 2026): prompt engineering (PE) with general-
purpose API models and domain-specific fine-
tuning (FT) (Zirak and Hemmati, 2024), both
scored against custom rule sets inspired by estab-
lished automotive standards. PE here involves sup-
plying the assembled context and the rule sets in
full at inference time, rather than tuning instruction
wording, so the two strategies differ in when the
domain information reaches the model and not in
what it contains. Because those rule sets are pattern
matchers, we treat their output as pattern confor-
mance rather than compliance, and report how that
changes what the numbers support.
The main contributions are the following. First,
we present an MCP-based architecture in which
verification is exposed as a tool the developer
can invoke directly, on any code and at any time,
and articulate the corresponding division of la-
bor between human and agent in safety-critical
review. Second, we implement a context engineer-
ing pipeline that assembles requirement texts, UML
behavior, and API context into training and infer-
ence examples, which lets us compare PE against
FT on the same domain information, differing in
whether it arrives during training or at inference.
We analyze how the two methods perform in terms
of architecture and coding pattern violations and
generation latency. Comparing against a human
baseline of shipped production code, we find that
generated C code scores better than code written by
the engineers, and we show that this reflects what
the checkers reward rather than a genuine quality
advantage. Finally, we report results from a two-
week pilot with nine developers from AUMOVIO
and show how the three tools are taken up in a
real-world production workflow.
2 Related Work
Code generation and editing are part of the Ma-
chine Learning on Code or Big Code research
field (Allamanis et al., 2018). Code generation
for automotive software dates back to the late
1980s and 1990s (Hanselmann, 1998; Hanselmann
et al., 1999), where early systems used rule-based
transformations; neural approaches have become
feasible only recently with the advent of LLMs.
Early neural code generation models such as Codex
(Chen et al., 2021) and open-source counterparts
demonstrated strong accuracy in general program-
ming (Li et al., 2022; Wang et al., 2021; Ahmad
et al., 2021), but struggle with domain-specific
code due to gaps in specialized knowledge. Gu
et al. (2025) show that general-purpose LLMs un-
derperform in domain-specific contexts because
they make limited use of domain-specific libraries,
and their DomCoder approach recovers quality by
injecting API knowledge through prompting and
fine-tuning. Another work fine-tunes code mod-
els on domain-specific corpora (Liu et al., 2023)
and finds that developers expect assistants to under-
stand specific frameworks and libraries, and their
two-stage CodeGen4Libs outperforms non-domain-
specific baselines.
Which of the two customization strategies to
prefer is unsettled. Shin et al. (2025) compare
prompt engineering against 17 fine-tuned models
on code summarization, generation, and translation,
and find that prompting a stronger general-purpose
model does not consistently win, while Freire et al.
558

(2026) report that LoRA fine-tuning beats few-shot
prompting and retrieval on domain-specific text-to-
code. This motivates our comparison of the two
strategies on the same assembled context.
For safety-critical domains, researchers integrate
verification and domain constraints into genera-
tion. Fakih et al. (2024)’s LLM4PLC combines
fine-tuning with an iterative verification loop, im-
proving code generation success rates from 47%
to 72% and expert-rated quality from 2.25/10 to
7.75/10, while Jiang et al. (2025)’s ROCODE in-
tegrates static analysis to reach a 99.1% compi-
lation success rate. Recent work targets automo-
tive compliance specifically: Kirchner and Knoll
(2025) integrate LLMs into automotive develop-
ment with test-driven development and iterative
refinement; Umer (2025) finds that popular LLMs
(ChatGPT, Gemini, DeepSeek, Copilot) produce no
MISRA C++ compliant code by default; and Pavel
et al. (2025) identify high rates of syntax viola-
tions and API conflicts in GPT-4 variants that pose
safety risks. Together, these indicate that domain-
specific code generation requires both LLM adap-
tation and domain-aware validation. Such valida-
tion is typically placed inside the generation loop,
where the model critiques and repairs its own out-
put, but gains from self-repair are modest and bot-
tlenecked by the model’s ability to judge its own
code (Olausson et al., 2024), and models struggle
to self-correct without external feedback (Huang
et al., 2024; Stechly et al., 2024).
A further stream studies coding assistants from a
developer-productivity perspective, reporting faster
task completion with GitHub Copilot (Peng et al.,
2023) and measuring suggestion acceptance and
satisfaction across a 400-developer enterprise roll-
out (Bakal et al., 2025). Heydari (2025) argues
that such evaluations still under-weigh how well a
tool adapts to user expertise and supports collabo-
ration. Productivity and adoption therefore depend
not only on generation quality but on how the as-
sistant supports oversight, which is amplified in
safety-critical settings.
A recent line of work reframes review of gener-
ated code as a trust problem rather than a diffing
problem. Heander et al. (2026) find, across a par-
ticipatory design study with industry practitioners,
that trust calibration is the central challenge when
reviewing agent-generated multi-file changes, and
argue that tools should surface risk and confidence
signals at the granularity where reviewers allocate
attention. Mitropoulos et al. (2026) supply the
security argument for keeping the reviewer inde-
pendent of the generator: automated review judg-
ments are systematically swayed by how a change
is framed, and an iterative attack that refines its
framing against a local copy of the review pipeline
succeeds in every case they test, since the attacker
may retry while the defender has one chance to
detect. Both motivate our design: verification the
developer controls, rather than verification the gen-
erating system elects to perform. Our work dif-
fers from these lines in treating verification as a
developer-invocable tool on par with generation,
grounding the comparison in production code, and
a pilot on an active automotive project rather than
synthetic benchmarks.
3 Methodology
Our coding assistant centers on an MCP-based
framework compatible with modern AI coding as-
sistants such as Cline, Claude Code and Codex,
extending them with automotive-specific tools. We
compare two ways of customizing the underly-
ing model: prompt engineering (PE), which sup-
plies domain knowledge at inference time, and
fine-tuning (FT), which absorbs it into the pa-
rameters. We evaluateQwen3-32B(Yang et al.,
2025) in three variants, PE, FT, and FT on curated
redundancy-removed data, and useClaude Sonnet
4andAmazon Nova Proin PE mode as baselines.
3.1 Dataset Preparation
We build a context engineering pipeline to pro-
cess an AUMOVIO’s production automotive C/C++
code into a structured dataset for fine-tuning and
evaluation. The data comes from multiple actively
maintained projects, so the examples reflect indus-
try practices and compliance requirements. The
pipeline parses C/C++ files to isolate individual
functions, then augments each with the context
a developer would consult when implementing it:
header declarations and the signatures and docu-
mentation of imported functions for API context,
import statements and namespaces, and the require-
ment and UML artifacts described next. It keeps
only functions whose documentation is complete
enough to specify behavior, validates them against
our custom rule sets, and analyzes complexity for
balanced stratification. The pipeline yields over
6,000 function implementations stratified by com-
plexity, of which 822 are held out for evaluation.
The step that distinguishes this setting from gen-
559

eral code generation is requirements traceability.
In safety-critical automotive practice, an imple-
mentation is not merely expected to work; it must
be attributable to a specific requirement, and that
link is what makes review and certification pos-
sible. AUMOVIO’s code carries this link in a
machine-readable form: Doxygen comments cite
requirement identifiers, while the requirement texts
live in a separate requirements-management sys-
tem. Our pipeline parses DOORS (IBM, 2025)
export XML to expand each cited identifier into
its full requirement text, and likewise extracts ref-
erenced PlantUML (PlantUML, 2025) diagrams
to supply behavioral specifications. The pipeline
also reconciles implementation signatures against
their header declarations, correcting mismatches
that would otherwise train the model on inconsis-
tent interfaces. Each function’s prompt therefore
states the complete obligation that the function is
meant to satisfy.
Listing 1 shows the resulting format of the con-
structed function prompt, with the requirement text
and UML fragment resolved in place. Appendix B
details the extraction and filtering steps.
3.2 Model Customization
In PE mode, model parameters stay fixed and all do-
main knowledge enters through the prompt. Each
request carries a system prompt that states the au-
tomotive coding role and instructs the model to
return a single function implementation based on
the task context assembled by our pipeline: the
function signature, its documentation and linked
requirements, signatures and documentation of im-
ported functions, and the UML diagram when one
is referenced. The prompt also includes JSON
rule sets the code needs to conform with, includ-
ing conforming and non-conforming examples (see
Section 3.3 for details). The rule sets are supplied
in full rather than retrieved per request, since our
subset is compact enough to fit the context win-
dow of all models we test, which keeps the prompt
identical across examples and avoids confounding
retrieval quality with model capability. Because
the assembled context is the same one used to build
training examples, the two strategies work from the
same domain information, differing in whether it
arrives at inference time or during training.
In FT mode, the same information is instead ab-
sorbed into the parameters. We select Qwen3-32B
as the base model and train it on the preprocessed
function corpus formatted as user-assistant turns
via HuggingFace chat templates, with the context
as the user message and the human production im-
plementation as the target, so the model learns the
conventions its authors applied rather than a syn-
thetic notion of compliant code. We use Low-Rank
Adaptation (Hu et al., 2021) with rank-8 adapters
to adapt the model while preserving general coding
capabilities, with 4-bit quantization (Dettmers et al.,
2023) and gradient checkpointing to fit available
memory, on SageMaker with DeepSpeed (Rasley
et al., 2020) for multi-GPU training (Appendix C).
We train two variants: one on the full corpus and
one on a curated version with near-duplicate func-
tions removed. The resulting models are packaged
through Amazon Bedrock’s custom model import
functionality for integration with the multi-model
MCP architecture. At inference, the FT models
receive the same assembled context and rule sets
as the PE models, so FT adds parameter adaptation
on top of the PE condition.
Listing 1: Abbreviated training example. Each numbered block is assembled by the pipeline from a different artifact
in AUMOVIO’s repositories; requirement texts are resolved from DOORS identifiers cited in the Doxygen comment.
Appendix D gives the full untruncated example.
1INPUT CONTEXT
2(1) Signature: void ValidateEngineParameters(
3const EngineData_t * engineData, ValidationResult_t * result)
4(2) Doxygen: @brief Validates engine parameters ...
5@requirements REQ_ENG_001, REQ_ENG_002 @safety_level ASIL-D
6(3) Requirements (resolved from DOORS):
7REQ_ENG_001: "... shall validate that engine RPM remains within the
8operational range of 800 to 6000 RPM ..."
9(4) UML (PlantUML, if referenced):
10ValidateEngineParameters -> CheckRPMRange : validate RPM
11(5) API context: signatures + docs of imported functions, header declarations
12(6) Rules (optional): JSON rule sets, see Listing 2
13
14OUTPUT
15if ((engineData == NULL) || (result == NULL)) { ... return; } / * null guard */
16if ((engineData->rpm < 800U) || (engineData->rpm > 6000U)) / * REQ_ENG_001 */
17{ result->errorCode = VALIDATION_RPM_OUT_OF_RANGE; return; }
560

3.3 Automotive Rule Sets Integration
We build custom rule sets inspired by established
automotive coding standards, covering patterns
common in safety-critical embedded systems and
prioritized by AUMOVIO’s engineers.
TheCodingrules, 57 for C and 107 for C++,
address pointer validation before dereferencing,
buffer bounds checking, error return handling, and
memory access patterns. TheArchitecturerules,
37 for C and 30 for C++, address layered architec-
ture principles, interface design conventions, and
module separation patterns typical in automotive
software. Each rule carries one of four severity
levels (info, warning, error, critical), mirroring the
tiers used in static analysis tools. We review the
rule sets with automotive engineers to confirm they
target the patterns AUMOVIO prioritizes. The
same rule sets serve two purposes: they supply
context during code generation, and they act as
scoring rubrics during evaluation (Section 4).
We process the rule sets into a JSON format (see
Listing 2) holding rule identifiers, descriptions, and
pairs of conforming and non-conforming examples.
3.4 Deployment
We package the solution as an MCP-based agen-
tic coding assistant with three core tools, each
mapping to a stage of the developer’s workflow:
generate produces new function implementa-
tions aware of custom rule sets from a specification
or signature; edit makes contextual modifications
using existing code for refactoring or extending;
verifychecks code against the rule sets.
In the standard MCP arrangement, an agent reads
tool descriptions and selects tools autonomously, so
a well-described checker is invoked whenever the
agent judges a check useful. We retain this setup
but also expose verify to developers directly.
The concern is not that agents skip checks; it is
that the model which produced a piece of code is
poorly placed to judge whether that code warrants
scrutiny. Safety-critical review practice resolves
this through independence, where a different party
controls the check. Exposing verify as a peer
tool the developer invokes on demand preserves
that independence.
Our architecture (Figure 1) integrates with ex-
isting development environments while maintain-
ing separation between orchestration and special-
ized generation models. This separation is what
makes the assistant agentic: the developer works
in an IDE plugin such as Cline, whose orchestra-
tor model decides which MCP tool a task requires
and dispatches the request rather than answering
from its own weights. Requests route through API
Gateway, authenticated via Cognito, to Lambda
functions that invoke the models we host for the
automotive domain, so the orchestrator sequences
the calls while specialized models generate code.
4 Evaluation Setup
Evaluating automotive code quality requires both
automated metrics and human expertise. Table 2 in
Appendix summarizes candidate metrics by type,
tool availability, complexity, reliability, and cost,
spanning reference-based similarity measures (Paul
et al., 2024; Takaichi et al., 2022), static and dy-
namic analysis, and standards conformance against
MISRA (Association, 2013), CERT C (Seacord,
2008), and AUTOSAR (AUTOSAR, 2017). We
do not adopt the similarity measures as primary
metrics, since closeness to a reference implemen-
tation is a weak proxy for the standards adherence
developers must certify.
Our evaluation covers three dimensions. First,
we score code against the rule sets of Section 3.3,
comparing generated functions to a human base-
line of production code written before the assistant
was introduced on 822 held-out functions (574 C,
248 C++). Second, we measure generation latency.
Third, we pilot the assistant with automotive engi-
neers and survey their usage patterns.
Listing 2: Simplified C Example: Buffer Access Rule
1{"rule_id": "BUF_001",
2"rule_name": "Buffer Access Protection",
3"non_compliant_example": "memcpy(dest, src, len);",
4"compliant_example":
5"if (dest src len > 0 len <= DEST_SIZE len <= src_size)
6{
7memcpy(dest, src, len); return SUCCESS;
8}
9return ERROR;"}
561

Figure 1: System architecture. The MCP server exposes three tools ( generate, edit, verify) that AI coding
assistants invoke. Requests route through API Gateway to models on Amazon Bedrock or SageMaker.
To score code automatically, we implement rule
sets as pattern-based (regular-expression) static
checkers. The rules they encode are drawn from
verification patterns AUMOVIO already applies1,
selected by engineers as high-impact patterns. They
are a deliberately simplified subset of AUMOVIO’s
verification process: rules requiring semantic, data-
flow, or inter-procedural reasoning are excluded
by construction, since a pattern matcher cannot
decide them and may produce false positives and
false negatives. Production use therefore requires
established automotive linters.
5 Results
5.1 Pattern Conformance Evaluation
Table 1 reports mean pattern-level rule violations
per generated function alongside the observed end-
to-end generation latency in seconds.
Holding the base model fixed at Qwen3 32B,
PE gives the fewest C violations on both checkers
(1.22 coding, 0.54 architecture), ahead of either
FT variant. On C++ the ordering reverses, with
FT on curated data recording the fewest coding
(1.25) and architecture (0.02) violations. These
margins are thin: the architecture column separates
all three Qwen variants by at most 0.08 violations
per function, which we do not treat as a meaningful
difference. The same curated variant is also the
worst Qwen variant on both C checkers (1.67 each),
so its C++ gain comes with a C cost rather than
a uniform improvement. Across model families,
Claude Sonnet 4 (PE) and Amazon Nova Pro (PE)
produce more violations in both languages than the
1Licenses are required for the use of these standards.
best Qwen3 32B variant.
One plausible reading of the C versus C++ diver-
gence is that the two rule families differ in locality.
Our C rules mostly describe function-local obli-
gations, such as validating a pointer before deref-
erencing it or checking buffer bounds, which can
be stated compactly in a prompt and applied by a
general-purpose model without prior exposure to
the codebase. The C++ architecture rules instead
encode the AUMOVIO’s layering and interface
conventions, which are longer-range, idiosyncratic
to their projects, and largely absent from pretrain-
ing data. These are difficult to convey exhaustively
in a prompt but appear repeatedly in training ex-
amples. If this reading is right, fine-tuning helps
less by teaching C++ syntax than by absorbing
organization-specific convention.
Observed generation latency ranges from ∼15
seconds (Nova Pro, PE) to ∼110 seconds (Qwen3
32B, PE). Note that these figures are not a con-
trolled comparison of the customization strategies,
since PE models are served through a managed API
while FT models run on separately provisioned
inference infrastructure. At the same time, the
numbers characterize what developers in our pilot
actually waited for when using the assistant. The
spread is wide enough to motivate hybrid serving,
with faster models reserved for interactive editing
and slower ones for long-form function generation.
5.2 Comparison with the Human Baseline
Human production code records 2.45 and 2.20 vio-
lations per function on the two C checkers, worse
than every generated variant. Read naively, LLM-
generated C code adheres to automotive rules better
562

Table 1: Automotive code generation: meanpattern-levelrule violations per function (lower is better) and observed
end-to-end generation latency. Counts reflect conformance to patterns our custom checkers can match, not
MISRA/AUTOSAR compliance or functional correctness. Models are evaluated on 822 test examples (574 C, 248
C++) from production automotive code.Bold= best per column; underline = worst per column.
Model Coding
patterns (C)
Architecture
patterns (C)
Coding
patterns (C++)
Architecture
patterns (C++)
Generation
latency (s)
Qwen3 32B (PE)1.22 0.541.73 0.10 110.19
Qwen3 32B (FT) 1.31 0.84 1.81 0.09 93.69
Qwen3 32B (FT, curated) 1.67 1.67 1.250.0285.34
Sonnet 4 (PE) 1.80 1.84 2.61 0.12 28.68
Nova Pro (PE) 1.63 1.48 2.88 0.24 14.62
Human code (production) 2.45 2.20 0.840.06 N/A
than code written by the AUMOVIO’s own engi-
neers and shipped in production vehicles. However,
inspecting the outputs hints why this reading does
not hold: generated functions apply defensive con-
structs, with null checks on pointer parameters, ex-
plicit bounds checks, single-exit control flow, and
explicit error returns, and our checkers reward these
surface patterns. Human code frequently omits a
local null check because the invariant holds else-
where, at a caller or through a module-level pre-
condition that the author knows to hold and that a
pattern matcher cannot see. The checker counts an
absent local check as a violation whether or not the
property holds non-locally, so it penalizes code that
reasons beyond the function boundary and rewards
code that re-checks everything. Such redundancy is
not free in embedded settings, where extra branches
cost code space and complicate timing analysis.
The C++ results point the other way, with human
code best on coding patterns (0.84). Our C++ rule
sets weight architectural and interface conventions
more heavily than local defensive checks, so uni-
form guard insertion earns less credit there, while
the AUMOVIO’s own code follows conventions its
authors apply routinely. Together, the results sug-
gest the checkers measure how closely code resem-
bles a pattern vocabulary, which generated code
matches well when the rules are local and less well
when they encode organization-specific structure.
The problem is that a pattern-matching proxy for a
standard can be optimized without being satisfied:
a model raises its score by emitting recognized con-
structs rather than by producing safer code. Such
checkers are therefore limited but are still useful as
a fast pre-commit filter and as generation context.
5.3 Pilot Study with Developers
Pattern conformance metrics describe what the
models can produce in isolated tasks. To test the ac-
tual human-agent collaboration, we run a two-week
pilot with nine of the AUMOVIO’s developers and
analyze post-usage survey results.
Pilot participants are automotive engineers on
AUMOVIO’s active C/C++ projects, recruited vol-
untarily from teams scheduled to trial AI assistance.
Each installs the MCP server into Cline and works
on their own production tasks rather than assigned
benchmarks. All three tools are exposed through
MCP descriptions, so the assistant can select them
autonomously, and verify is additionally docu-
mented as directly invocable.
Evidence comes from a concluding survey cov-
ering experience, usage frequency, tool usage, use-
fulness, and other aspects. Every quantity is self-
reported, since we collect no telemetry on invoca-
tion counts. Note that with nine respondents, we
read only large gaps in the results as informative.
Developers rate their overall experience with the
assistant 3.89 out of 5, and their willingness to rec-
ommend it to colleagues 4.00 out of 5. On average,
the productivity improvements is marked at 4.67
on a seven-point scale. The distributions behind
these means are more informative: no respondent
gives the lowest rating on any item, but none is
unanimous: experience draws 3 top ratings vs 1
low, recommendation – 4 top against 3 at or below
the midpoint Figure 2 provides more detail on us-
ability: 8 of 9 respondents find the assistant easy
to integrate, and 5 of 9 rate its reasoning accurate
against 4 neutral and none inaccurate. Usage does
not settle at a middle value: four of nine respon-
563

0 25 50 75 100%
Share of respondents
Easy to access
Standards conformance
Reasoning accuracy
Usage frequency
Yes
89%
Somewhat
11%
Always
11%
Mostly
56%
Sometimes
22%
Never
11%
Accurate
56%
Neutral
44%
Daily
45%
Rarely
44%
Setup
11%
How the assistant was judged (best to worst, left to right)
0 25 50 75 100%
Share of respondents
Most-used tool
Model preference
verify
40%
generate
30%
edit
30%
PE
75%
FT
25%
Which tool and which model developers reached for
Figure 2: Pilot survey response distributions (n=9 developers). The upper panel holds judgments of the assistant,
ordered from most to least favorable; the lower panel holds choices among tools and modes. Denominators differ by
item, since not every respondent answered every question; raw counts are given in the text. Only large gaps are
informative and percentages are rounded to sum to 100. “Setup” denotes participants who installed the assistant but
reported no working use. All responses are self-reported.
dents use the assistant daily and four use it rarely,
forming two distinct user populations.
Three patterns stand out in the survey results.
First, 6 of the 8 respondents who answered this
question prefer the PE mode. The PE configura-
tions served in the pilot include the API-hosted
models, which answer in roughly 15 to 29 seconds
against 85 to 94 for the FT models (Table 1), so
mode preference and response time are confounded
here. Combined with developer feedback, we read
this as evidence that in tight read-edit-review loops
generation latency behaves as a key property.
Second, 6 of 9 developers report conformance
alwaysormost of the time, but only one of them
answersalways, while 2 answersometimesand 1
never. This matters because in Table 1 the same
models score at or better than human code on rule
set conformance. Developers do not internalize the
favorable automated numbers as trust.
Third, verify draws the largest share of most-
used-tool responses (4 of 10 selections, against 3
each for generate and edit; the item permit-
ted multiple selections) and the largestvery useful
share. Respondents also run verify on existing
human-written code, not only on generated output,
a use a generation-only assistant would not support.
6 Conclusion
AI assistance helps safety-critical development
only if built around how such code is accepted:
reviewed, traced to a requirement, checked before
commit. We present an MCP-based coding assis-
tant addressing this by: (i) treating verification as a
peer of generation rather than a step hidden inside
it; (ii) adapting the model to the domain through
prompt engineering and fine-tuning on production
code paired with the requirements each function
must satisfy. We deploy it on AUMOVIO’s active
automotive C/C++ projects, evaluate pattern con-
formance, and run a developer pilot in production.
Our experiments produce three findings. First,
verify is the most-used tool in the pilot, and
developers run it on their own existing code rather
than only on generated output, which indicates that
verification is used as a first-class step. Second,
with the base model held fixed, PE gives fewer C
violations while the C++ counts separate the two
strategies by margins too small to call, so we do not
read either as the better choice. Third, developers
prefer the faster configuration and do not fully trust
the output despite its scores.
Together, these results suggest that coding assis-
tants for safety-critical domains should be judged
on more than generation quality. What mattered to
our developers was checking code themselves, get-
ting answers fast enough to stay in a review loop,
and knowing where the automated verdict held.
Acknowledgments
We thank the wider AUMOVIO team who sup-
ported us throughout the project. We are especially
grateful to Stefan-Cosmin Grigoriu for his support.
564

Limitations
Our evaluation has several limitations. Section 4
states what our pattern checkers can and cannot
show, and Section 5.2 shows they favor generated
code. We also report no functional correctness: no
compilation or unit-test pass rates, and no check
that a function satisfies the requirements or UML
behavior in its prompt.
On the model comparison, we use parameter-
efficient LoRA fine-tuning rather than full fine-
tuning, and run no ablations over prompt design,
context elements, or rule-set inclusion. We report
no significance tests, so the small C++ margins
should not be read as ranking the strategies. La-
tency was measured on different serving stacks, so
it describes our deployment rather than the general
strategies.
On the human evidence, the pilot has nine self-
selected developers working with the assistant for
two weeks. Everything is self-reported, with no
telemetry and no record of whether generated code
was committed or how much it was edited first,
so the results are directional signals rather than
effect estimates. Finally, all data comes from one
organization, and the code, rule sets, and checkers
are proprietary and cannot be released publicly.
Ethical Considerations
Defective code in the automotive setting can harm
people, so the assistant is not meant to automate
compliance work: everything it produces needs re-
view by qualified engineers. Three failure modes
matter in deployment.False confidence, where
code that passes pattern checks still violates func-
tional or timing requirements; Section 5.2 is a con-
crete case, since adding defensive patterns every-
where raises the score without making the code
safer, and the extra branches can themselves af-
fect code size and worst-case execution time.Cor-
related blind spots, where the generator and the
checker share a model family and miss the same
defect twice, which is why we keep the checker
independent of the generator and why extending
the architecture to test generation would need the
same separation.Conformance drift, where non-
conforming code spreads through reuse. Human
approval gates, keeping the checker independent of
the generator, and logging prompts, context, model
IDs, and analyzer reports all help.
We ran no red-teaming and did not test whether
the assistant can be pushed into producing insecure
code, tricked into evading the checkers, or made
to introduce vulnerabilities our rules do not cover.
Production readiness would require that work.
The study uses AUMOVIO’s proprietary code
under their data governance. Pilot participation
was voluntary, and we collected no personal data
beyond anonymized survey responses.
References
Wasi Ahmad, Saikat Chakraborty, Baishakhi Ray, and
Kai-Wei Chang. 2021. Unified pre-training for pro-
gram and natural languages.Findings of the Associ-
ation for Computational Linguistics: ACL-IJCNLP
2021, pages 2403–2417.
Miltiadis Allamanis, Earl T Barr, Premkumar Devanbu,
and Charles Sutton. 2018. A survey of machine learn-
ing for big code and naturalness.ACM Computing
Surveys (CSUR), 51(4):1–37.
Anthropic. 2024. Model context protocol. https:
//modelcontextprotocol.io/ . Accessed:
2025-01-15.
Motor Industry Software Reliability Association. 2013.
MISRA-C: 2012: Guidelines for the Use of the C
Language in Critical Systems. MISRA.
AUTOSAR. 2017. Guidelines for the use of the c++ 14
language in critical and safety-related systems.
Gal Bakal, Ali Dasdan, Yaniv Katz, Michael Kaufman,
and Guy Levin. 2025. Experience with GitHub Copi-
lot for developer productivity at Zoominfo.arXiv
preprint arXiv:2501.13282.
Federico Cassano, John Gouwar, Francesca Lucchetti,
Claire Schlesinger, Anders Freeman, Carolyn Jane
Anderson, Molly Q Feldman, Michael Greenberg,
Abhinav Jangda, and Arjun Guha. 2024. Knowledge
transfer from high-resource to low-resource program-
ming languages for code LLMs.Proceedings of the
ACM on Programming Languages, 8(OOPSLA2).
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming
Yuan, Henrique Ponde de Oliveira Pinto, Jared Ka-
plan, Harri Edwards, Yuri Burda, Nicholas Joseph,
Greg Brockman, et al. 2021. Evaluating large
language models trained on code.arXiv preprint
arXiv:2107.03374.
Tri Dao. 2023. Flashattention-2: Faster attention with
better parallelism and work partitioning.Preprint,
arXiv:2307.08691.
Tri Dao, Daniel Y . Fu, Stefano Ermon, Atri Rudra,
and Christopher Ré. 2022. Flashattention: Fast and
memory-efficient exact attention with io-awareness.
Preprint, arXiv:2205.14135.
Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and
Luke Zettlemoyer. 2023. Qlora: Efficient finetuning
of quantized llms.arXiv preprint arXiv:2305.14314.
565

Doxygen. 2025. Doxygen. https://doxygen.nl
/. Accessed: 2025-08-12.
Mohamad Fakih, Rahul Dharmaji, Yasamin Moghaddas,
Gustavo Quiros Araya, Oluwatosin Ogundare, and
Mohammad Abdullah Al Faruque. 2024. Llm4plc:
Harnessing large language models for verifiable pro-
gramming of plcs in industrial control systems. In
Proceedings of the 46th International Conference
on Software Engineering: Software Engineering in
Practice (ICSE SEIP). ACM.
Luís Freire, Fernanda A. Andaló, and Nicki Skafte
Detlefsen. 2026. Exploring different approaches
to customize language models for domain-
specific text-to-code generation.arXiv preprint
arXiv:2603.16526.
Xiaodong Gu, Meng Chen, Yalan Lin, Yuhan Hu,
Hongyu Zhang, Chengcheng Wan, Zhao Wei, Yong
Xu, and Juhong Wang. 2025. On the effectiveness of
large language models in domain-specific code gen-
eration.ACM Transactions on Software Engineering
and Methodology, 34(3):1–22.
Herbert Hanselmann. 1998. Development speed-up for
electronic control systems. Technical report, SAE
Technical Paper.
Herbert Hanselmann, Ulrich Kiffmeier, Lutz Köster,
and Martin Meyer. 1999. Automatic generation of
production quality code for ecus.SAE transactions,
pages 1625–1633.
Lo Gullstrand Heander, Agnia Sergeyuk, Ilya Za-
kharov, Emma Söderberg, and Nikita Mukhortov.
2026. Trust-calibrated code review: A participatory
design study of review workflows for LLM-generated
multi-file changes.arXiv preprint arXiv:2606.01969.
Dominik Hepp, Michael Amroudi, Martin Harrysson,
Mateusz Wozniak, and Lukasz Maslaniec. 2025.
From engines to algorithms: Gen ai in automotive
software development.
Soroush Heydari. 2025. A human centric requirements
engineering framework for assessing GitHub Copilot
output.arXiv preprint arXiv:2508.03922.
Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan
Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and
Weizhu Chen. 2021. Lora: Low-rank adaptation of
large language models.Preprint, arXiv:2106.09685.
Jie Huang, Xinyun Chen, Swaroop Mishra,
Huaixiu Steven Zheng, Adams Wei Yu, Xiny-
ing Song, and Denny Zhou. 2024. Large language
models cannot self-correct reasoning yet. InInter-
national Conference on Learning Representations
(ICLR).
Hugging Face. 2024. Chat templates. https://hu
ggingface.co/docs/transformers/v4.
47.1/en/chat_templating. Accessed: 2025-
08-12.
IBM. 2025. IBM engineering requirements manage-
ment DOORS. https://www.ibm.com/docs
/en/engineering-lifecycle-managem
ent-suite/doors/9.7.0?topic=overv
iew-doors. Accessed: 2025-08-12.
Juyong Jiang, Fan Wang, Jiasi Shen, Sungju Kim,
and Sunghun Kim. 2024. A survey on large lan-
guage models for code generation.arXiv preprint
arXiv:2406.00515.
Xue Jiang, Yihong Dong, Yongding Tao, Huanyu Liu,
Zhi Jin, and Ge Li. 2025. Rocode: Integrating back-
tracking mechanism and program analysis in large
language models for code generation. InProceed-
ings of the 47th International Conference on Software
Engineering (ICSE). Research Track.
Sven Kirchner and Alois C. Knoll. 2025. Generating au-
tomotive code: LLMs for software development and
verification in safety-critical systems.arXiv preprint
arXiv:2506.04038.
Yujia Li, David Choi, et al. 2022. Competition-
level code generation with alphacode.Science,
378(6624):1092–1097.
Mingwei Liu, Tianyong Yang, Yiling Lou, Xueying Du,
Ying Wang, and Xin Peng. 2023. Codegen4libs: A
two-stage approach for library-oriented code genera-
tion. InProceedings of the 38th IEEE/ACM Interna-
tional Conference on Automated Software Engineer-
ing (ASE), Kirchberg, Luxembourg. IEEE.
Dimitris Mitropoulos, Nikolaos Alexopoulos, Geor-
gios Alexopoulos, and Diomidis Spinellis. 2026.
Measuring and exploiting contextual bias in LLM-
assisted security code review.arXiv preprint
arXiv:2603.18740.
Theo X. Olausson, Jeevana Priya Inala, Chenglong
Wang, Jianfeng Gao, and Armando Solar-Lezama.
2024. Is self-repair a silver bullet for code gener-
ation? InInternational Conference on Learning
Representations (ICLR).
Debalina Ghosh Paul, Hong Zhu, and Ian Bayley. 2024.
Benchmarks and metrics for evaluations of code gen-
eration: A critical review. In2024 IEEE Interna-
tional Conference on Artificial Intelligence Testing
(AITest), pages 87–94. IEEE.
Marc Pavel, Nenad Petrovic, Lukasz Mazur, Vahid
Zolfaghari, Fengjunjie Pan, and Alois Knoll.
2025. Hallucination in LLM-based code genera-
tion: An automotive case study.arXiv preprint
arXiv:2508.11257.
Sida Peng, Eirini Kalliamvakou, Peter Cihon, and Mert
Demirer. 2023. The impact of AI on developer pro-
ductivity: Evidence from GitHub Copilot.arXiv
preprint arXiv:2302.06590.
PlantUML. 2025. PlantUML language reference guide.
https://plantuml.com/guide . Accessed:
2025-08-12.
566

Samyam Rajbhandari, Jeff Rasley, Olatunji Ruwase,
and Yuxiong He. 2020. Zero: Memory optimizations
toward training trillion parameter models.Preprint,
arXiv:1910.02054.
Jeff Rasley, Samyam Rajbhandari, Olatunji Ruwase, and
Yuxiong He. 2020. Deepspeed: System optimiza-
tions enable training deep learning models with over
100 billion parameters. InProceedings of the 26th
ACM SIGKDD International Conference on Knowl-
edge Discovery & Data Mining, pages 3505–3506.
Robert C Seacord. 2008.The CERT C secure coding
standard. Pearson Education.
Jiho Shin, Clark Tang, Tahmineh Mohati, Maleknaz
Nayebi, Song Wang, and Hadi Hemmati. 2025.
Prompt engineering or fine-tuning: An empirical as-
sessment of LLMs for code. InProceedings of the
22nd IEEE/ACM International Conference on Mining
Software Repositories (MSR).
Kaya Stechly, Karthik Valmeekam, and Subbarao Kamb-
hampati. 2024. On the self-verification limitations
of large language models on reasoning and planning
tasks.arXiv preprint arXiv:2402.08115.
Riku Takaichi, Yoshiki Higo, Shinsuke Matsumoto,
Shinji Kusumoto, Toshiyuki Kurabayashi, Hiroyuki
Kirinuki, and Haruto Tanno. 2022. Are nlp metrics
suitable for evaluating generated code? InInter-
national Conference on Product-Focused Software
Process Improvement, pages 531–537. Springer.
Malik Muhammad Umer. 2025. Comparative analysis
of code generated by popular LLMs for MISRA C++
compliance.arXiv preprint arXiv:2506.23535.
Yue Wang, Weishi Wang, Shafiq Joty, and Steven C. H.
Hoi. 2021. Codet5: Identifier-aware unified pre-
trained encoder-decoder models for code understand-
ing and generation. InProceedings of the 2021 Con-
ference on Empirical Methods in Natural Language
Processing, pages 8696–8708, Punta Cana. Associa-
tion for Computational Linguistics.
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang,
Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao,
Chengen Huang, Chenxu Lv, Chujie Zheng, Day-
iheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao
Ge, Haoran Wei, Huan Lin, Jialong Tang, and 41
others. 2025. Qwen3 technical report.Preprint,
arXiv:2505.09388.
Jiasheng Zheng, Boxi Cao, Zhengzhao Ma, Ruotong
Pan, Hongyu Lin, Yaojie Lu, Xianpei Han, and
Le Sun. 2025. Beyond correctness: Benchmarking
multi-dimensional code generation for large language
models. InFindings of the Association for Computa-
tional Linguistics.
Armin Zirak and Hadi Hemmati. 2024. Improving auto-
mated program repair with domain adaptation.ACM
Transactions on Software Engineering and Method-
ology, 33(3):1–43.
567

A Evaluation Metrics Overview
Choosing what to measure is itself a decision when
evaluating safety-critical automotive code, since no
single metric captures its quality and the practical
options differ in how much tooling they need and
how much their verdicts can be trusted. Table 2
surveys the metric families we considered, rating
each on tool support, implementation complexity,
reliability, and cost. The comparison motivates
the choices in Section 4: we rely on standards
conformance, which combines high tool support
with high reliability, and on support metrics such as
latency, while declining reference-based similarity
measures whose reliability is only moderate and
whose relevance to certification is weak.
B Dataset Preprocessing Pipeline
This appendix expands the pipeline summarized in
Section 3.1. The preprocessing pipeline begins by
traversing automotive C/C++ repositories to extract
individual functions along with their surrounding
context, which includes:
• Function Documentation: Both Doxygen-
style comments (Doxygen, 2025) and inline
documentation are extracted and linked to
their corresponding function implementations
• System Requirements: The pipeline parses
DOORS export XML files (IBM, 2025) to
map requirement identifiers mentioned in
function documentation to their full require-
ment texts
• Architectural Context: PlantUML diagrams
(PlantUML, 2025) referenced in documenta-
tion are extracted and included to provide be-
havioral specifications
•Code API Context: Related header files and
their function signatures are gathered to pro-
vide information about available APIs and
data structures
Header linking works as follows: the system
identifies the main header file corresponding to
each C/C++ source file and extracts additional con-
text from included dependencies, so that generated
code can reference existing APIs rather than reim-
plementing them.
The context aggregation process is implemented
as follows:
Listing 3: Context aggregation from preprocessing
pipeline
1def create_training_example(function_info):
2user_message = f"Implement the function: {
↪→function_info[’signature’]}\n\n"
3
4if function_info[’documentation’]:
5user_message += f"with following
↪→specifications:\n{function_info
↪→[’documentation’]}"
6
7if function_info[’requirements’]:
8user_message += f"\n\nRequirements
↪→texts:\n{function_info[’
↪→requirements’]}"
9
10if function_info[’uml_diagram’]:
11user_message += f"\n\nThe behavior
↪→follows this UML diagram:\n{
↪→function_info[’uml_diagram’]}"
12
13return {
14"messages": [
15{"role": "user", "content":
↪→user_message},
16{"role": "assistant", "content":
↪→function_info[’
↪→implementation’]}
17]
18}
For quality filtering and validation, the prepro-
cessing pipeline implements several quality assur-
ance mechanisms:
• Function Signature Validation: Automat-
ically corrects function signatures in imple-
Table 2: Evaluation metrics for automotive code quality assessment. Each category is rated on Tool Support
(availability of automated tools), Complexity (implementation effort), Reliability (consistency of results), and Cost
(resources required). High = better, except for Cost and Complexity where low is preferable.
Category Example Metrics Tool Support Complexity Reliability Cost
ML Static Analysis BLEU, ROUGE, METEOR High Medium Medium Low
Static Analysis Linters, Complexity High Low High Medium
Dynamic Analysis Coverage, Runtime Medium High High High
Standards Compliance Industry Coding Standards High Medium High Medium
(e.g., MISRA, CERT C)
Support Metrics Latency, Time Low Low Medium Low
Business KPIs ROI, Time-to-Market, Productivity Low Low Low Medium
568

mentation files by matching them against
header file declarations
• Documentation Completeness: Only func-
tions whose documentation specifies the in-
tended behavior are included in the training
set
• Code Compliance: Functions are validated
against AUTOSAR (AUTOSAR, 2017) and
MISRA-C (Association, 2013) patterns to as-
sess the initial compliance level
Finally, to ensure balanced representation across
different code complexity levels, the preprocessing
pipeline implements stratified sampling based on
function length and complexity. This approach cre-
ates training and test sets that maintain consistent
distribution characteristics. The resulting dataset
contains approximately 6,000 high-quality function
implementations with their complete contextual in-
formation, split into training and evaluation sets
while maintaining complexity distribution balance.
C Model Architecture and Training
Configuration
We select Qwen3-32B as the base model (Yang
et al., 2025) for its performance on code genera-
tion tasks at a size we could fine-tune on available
hardware. Training uses Low-Rank Adaptation
(Hu et al., 2021) with rank-8 adapters andα= 16 ,
applied to the query, key, value, and output projec-
tions together with all feed-forward components,
plus 4-bit quantization via BitsAndBytes (Dettmers
et al., 2023) to reduce the memory footprint. None
of these choices are specific to automotive code:
they are a standard parameter-efficient recipe, re-
ported here for reproducibility rather than offered
as contributions.
Training runs on Amazon SageMaker with Py-
Torch DeepSpeed (Rasley et al., 2020), orches-
trated across multiple GPUs through SageMaker’s
remote function decorator, as shown in Listing 4.
Listing 4: SageMaker remote training configuration
1@remote(
2instance_type="ml.p4d.24xlarge",
3volume_size=100,
4use_torchrun=True,
5pre_execution_commands=[
6"pip install torch==2.5.1 transformers=
↪→=4.51.3",
7"pip install peft==0.15.2 deepspeed
↪→bitsandbytes",
8]
9)
10def train_model(train_dataset, test_dataset,
↪→config):
11# Training implementation with adaptive
↪→DeepSpeed configuration
12stage = 2 if use_quantization else 3
13deepspeed_config = {
14"zero_optimization": {
15"stage": stage,
16"overlap_comm": True,
17"contiguous_gradients": True,
18"offload_optimizer": {"device": "
↪→cpu", "pin_memory": True}
19}
20}
We select the DeepSpeed ZeRO stage (Rajbhan-
dari et al., 2020) according to whether quantiza-
tion is enabled. ZeRO-2 partitions optimizer states
and gradients while replicating parameters on each
device; ZeRO-3 additionally partitions the param-
eters, which permits larger models at the cost of
communication overhead and, for our long prompts,
distributes the memory burden of storing full pa-
rameters. We default to ZeRO-2 under quantiza-
tion, since quantized parameters interact poorly
with ZeRO-3’s parameter-gathering, and ZeRO-2
also requires fewer all-gather operations. The re-
maining settings are conventional: gradient accu-
mulation for a larger effective batch size, gradient
checkpointing and CPU offloading to fit the model
in memory, Flash Attention 2 (Dao et al., 2022;
Dao, 2023), and NCCL with communication over-
lap and extended timeouts. The one detail worth
flagging is that our prompts are long, since they
carry resolved requirement texts, UML fragments,
and header context, so context length rather than
model size drove most of our memory pressure.
The final model is packaged through Amazon
Bedrock’s custom model import functionality for
integration with the multi-model architecture. The
distributed setup reaches approximately 85% GPU
utilization with stable convergence, which kept
each fine-tuning cycle within a development sprint.
D Conversation Format Example
The training data utilizes HuggingFace’s chat tem-
plate (Hugging Face, 2024) to structure the auto-
motive coding task as a conversational interaction.
Listing 5 gives the full, untruncated version of the
example abbreviated as Listing 1 in Section 3.1,
showing both resolved requirement texts, the com-
plete PlantUML fragment, and the target implemen-
tation as it appears in training. This conversational
format supplies the model with the requirements,
safety level, and behavioral specification alongside
the signature, so that the obligations a function
must satisfy are present in the prompt rather than
inferred from the signature alone.
569

Listing 5: HuggingFace chat template example for auto-
motive C++ code
1training_example = {
2"messages": [
3{
4"role": "user",
5"content": """Implement the
↪→function:
6void ValidateEngineParameters(const
↪→EngineData_t * engineData,
↪→ValidationResult_t * result)
7
8with following specifications:
9/ **
10 * @brief Validates engine parameters according
↪→to AUTOSAR specification
11 * @param engineData Pointer to engine data
↪→structure containing RPM, temperature,
↪→pressure
12 * @param result Pointer to validation result
↪→structure
13 * @requirements REQ_ENG_001: Engine RPM must
↪→be within 800-6000 range
14 * @requirements REQ_ENG_002: Engine
↪→temperature must not exceed 110 degrees
↪→C
15 * @safety_level ASIL-D
16 */
17
18Requirements texts:
19REQ_ENG_001: The engine control unit shall
↪→validate that engine RPM remains within
↪→the
20operational range of 800 to 6000 RPM during
↪→normal operation.
21REQ_ENG_002: The engine control unit shall
↪→monitor engine coolant temperature and
↪→trigger
22protective measures when temperature exceeds
↪→110 degrees C.
23
24The behavior follows this UML diagram:
25@startuml
26ValidateEngineParameters -> CheckRPMRange :
↪→validate RPM
27CheckRPMRange -> CheckTemperature : if RPM
↪→valid
28CheckTemperature -> SetValidationResult : set
↪→result
29@enduml"""
30},
31{
32"role": "assistant",
33"content": """
34void ValidateEngineParameters(const
↪→EngineData_t * engineData,
↪→ValidationResult_t * result)
35{
36/ * MISRA-C 2012 Rule 1.3: No undefined
↪→behavior */
37if ((engineData == NULL) || (result == NULL
↪→))
38{
39if (result != NULL)
40{
41result->isValid = false;
42result->errorCode =
↪→VALIDATION_NULL_POINTER;
43}
44return;
45}
46
47/ * Initialize result structure */
48result->isValid = true;
49result->errorCode = VALIDATION_SUCCESS;
50
51/ * REQ_ENG_001: Validate RPM range (800-
↪→6000) */
52if ((engineData->rpm < 800U) || (engineData
↪→->rpm > 6000U))
53{
54result->isValid = false;
55result->errorCode =
↪→VALIDATION_RPM_OUT_OF_RANGE;
56return;
57}
58
59/ * REQ_ENG_002: Validate temperature limit
↪→(110 degrees C) */
60if (engineData->temperature > 110.0f)
61{
62result->isValid = false;
63result->errorCode =
↪→VALIDATION_TEMPERATURE_EXCEEDED;
64return;
65}
66/ * All validations passed (result pre-
↪→initialized to success) */
67}"""
68}
69]
70}
570
采集信息与校验
完整来源元数据
{
  "completeness": "complete_text",
  "content_level": "full_text",
  "discovery_authors": [
    "Elizaveta Zinovyeva",
    "Aiham Taleb",
    "Nikita Kozodoi",
    "Daniel Schleicher",
    "Amir Mahdi Namazi",
    "Martin Kraus",
    "Levent Kent",
    "Brian Jensen"
  ],
  "empty_pages": [],
  "extractor": "pypdf-6.19.0",
  "feed_url": "https://aclanthology.org/papers/index.xml",
  "identifiers": [
    "doi:10.18653/2026.realm-1.38"
  ],
  "landing_page": "https://aclanthology.org/2026.realm-1.38/",
  "page_count": 14,
  "page_parts": [
    [
      1,
      0,
      3991,
      0,
      3991
    ],
    [
      2,
      0,
      4884,
      3993,
      8877
    ],
    [
      3,
      0,
      4865,
      8879,
      13744
    ],
    [
      4,
      0,
      4556,
      13746,
      18302
    ],
    [
      5,
      0,
      4076,
      18304,
      22380
    ],
    [
      6,
      0,
      3388,
      22382,
      25770
    ],
    [
      7,
      0,
      4271,
      25772,
      30043
    ],
    [
      8,
      0,
      3830,
      30045,
      33875
    ],
    [
      9,
      0,
      4637,
      33877,
      38514
    ],
    [
      10,
      0,
      4686,
      38516,
      43202
    ],
    [
      11,
      0,
      2507,
      43204,
      45711
    ],
    [
      12,
      0,
      3659,
      45713,
      49372
    ],
    [
      13,
      0,
      4403,
      49374,
      53777
    ],
    [
      14,
      0,
      2332,
      53779,
      56111
    ]
  ],
  "page_range": [
    1,
    14
  ],
  "parent_source": "https://aclanthology.org/2026.realm-1.38.pdf",
  "pdf_group_id": "PDF-0e6211bb02bc44989c392f256ac32e37bd32152b91071cc5985cbb8613736d9a",
  "pdf_parser_sandbox": "bounded_process_v1",
  "pdf_repair_provenance": {
    "candidates": [],
    "coordinate_candidates": [],
    "original_bytes_modified": false,
    "original_sha256": "c2cf96d3e9d36125b4b9cb940e66955b98cbe25703af1fec472d5dd33d08919b",
    "resource_profile": "default",
    "resource_retry_reasons": [],
    "schema": "ict-strict-pdf-text-repair-provenance-v1",
    "strategy": "original-strict",
    "strict": true,
    "text_metadata_identical": false,
    "visual_equivalence_claimed": false
  },
  "pdf_revision": "c2cf96d3e9d36125b4b9cb940e66955b98cbe25703af1fec472d5dd33d08919b",
  "pdf_syntax_warnings": {
    "object_header_whitespace": 0
  },
  "pdf_title": "Generation and Verification: Human-Agent Collaboration for Safety-Critical Automotive Software Engineering",
  "segment_count": 1,
  "segment_index": 1,
  "source_updated_at": "",
  "total_pages": 14
}
{
  "format": "native_pdf",
  "pdf_artifact_sha256": "c2cf96d3e9d36125b4b9cb940e66955b98cbe25703af1fec472d5dd33d08919b",
  "source_assertions": {
    "external_id": "acl:2026.realm-1.38",
    "published_at": "2026-10-22T00:00:00+00:00",
    "source_url": "https://aclanthology.org/2026.realm-1.38.pdf",
    "structured_metadata": {},
    "title": "Generation and Verification: Human-Agent Collaboration for Safety-Critical Automotive Software Engineering"
  },
  "source_fields": {
    "authors": [],
    "content_level": "full_text",
    "date_basis": "explicit_published",
    "field_evidence": {},
    "identifiers": [
      "doi:10.18653/2026.realm-1.38"
    ],
    "mapping_version": 1,
    "published_at": "2026-10-22T00:00:00+00:00",
    "source_format": "acl_anthology_pdf",
    "source_key": "acl-anthology",
    "source_updated_at": null,
    "title": "Generation and Verification: Human-Agent Collaboration for Safety-Critical Automotive Software Engineering",
    "unknown_fields": [],
    "url": "https://aclanthology.org/2026.realm-1.38.pdf"
  },
  "source_format": "acl_anthology_pdf"
}
原文版本历史与校验
版本入库更新时间来源发布日期校验标识
v1 · 正在查看2026-11-01 15:06 UTC2026-10-22 00:00 UTC3700d4e5f38b9cd3dbf9509a8c6e6f741e7b558aadea04afa17144fdb0eafd41
可引用分片 · 46 段

CHK-f6c2e6d7b8ab1c337f317287

The Proceedings of the Second Workshop for REsearch on Agent Language Models (REALM 2026), pages 557–570
October 29, 2026 ©2026 Association for Computational Linguistics
Generation and Verification: Human-Agent Collaboration for
Safety-Critical Automotive Software Engineering
Elizaveta Zinovyeva1, Aiham Taleb1, Nikita Kozodoi1, Daniel Schleicher1,
Amir Mahdi Namazi2,Martin Kraus 2,Levent Kent 1,Brian Jensen 1*
1Amazon Web Services, Germany, 2AUMOVIO, Regensburg, Germany
{zinovyee,aitaleb,kozodoi,dschlei,levkent,jensbri}@amazon.com
{amir.mahdi.namazi,martin.2.kraus}@aumovio.com
Abstract
Research on coding agents mainly focuses on
generation quality. Yet, safety-critical automo-
tive software makes two additional demands. It
prioritizes verification, since every change is
reviewed, traced to a requirement, and checked
against industry standards such as MISRA and
AUTOSAR before it can be committed. It is
also a narrow domain, written against layered
architectures, embedded resource constraints,
and organization-specific interface conventions
that are scarce in the data general-purpose
LLMs are trained on. We present a coding
assistant for automotive C/C++ that addresses
both demands. First, it exposes three tools
to the user over the Model Context Protocol
(generate, edit, and verify), allowing
developers to run verify on any code on
demand rather than relying on the agent to

CHK-ba13c44bc2ba3fa55d24d9e6

 user over the Model Context Protocol
(generate, edit, and verify), allowing
developers to run verify on any code on
demand rather than relying on the agent to
check its own output. Second, rather than us-
ing a general-purpose model, we customize
the underlying LLM for the automotive do-
main through prompt engineering and fine-
tuning. We construct a dataset from automotive
production code of AUMOVIO, where each
function is paired with the requirement texts
and Unified Modeling Language (UML) be-
havior it must satisfy. In a two-week pilot
on active production projects, developers re-
port verify as the most-used tool and con-
firm using it on their own code and not only
on generated output. Comparing model cus-
tomization strategies, 75% prefer the faster
prompt-engineered configuration. MISRA- and
AUTOSAR-inspired pattern checkers indicate
that prompt engineering achieves a lower num-
ber of violations on C, while fine-tuning shows
better conformance with architecture patterns
for C++.
*Work done while at Amazon Web Services.
1 Introduction
Research on AI coding assistants is organized
largely around generation quality (Jiang et al.,
2024), asking whether a model produces code that
compiles, passes tests, and resembles a reference
implementation (Paul et al., 2024; Zheng et al.,
2025). Automotive software development is adopt-

CHK-e271f357fb736332aec9e5ce

s code that
compiles, passes tests, and resembles a reference
implementation (Paul et al., 2024; Zheng et al.,
2025). Automotive software development is adopt-
ing these assistants as car makers seek productiv-
ity gains (Hepp et al., 2025). Yet, they fall short
of safety-critical requirements such as AUTOSAR
(AUTOSAR, 2017) and MISRA-C (Association,
2013), which establish strict rules for reliability in
automotive systems. Recent studies show that pop-
ular LLMs struggle to produce MISRA-compliant
code by default (Umer, 2025), while hallucinations
pose tangible safety risks (Pavel et al., 2025). This
places two additional demands on coding assistants
for automotive software.
The first demand is verification. In safety-critical
settings, developers cannot accept LLM output
blindly, since every change is reviewed, traced to a
requirement, and checked against coding standards
before it can be committed. The practical question
is therefore not only whether the model can write
compliant code, but how the agent should collabo-
rate with the developer so that compliance can be
verified, audited, and trusted.
The second demand is domain fit. Automotive
code must guarantee deterministic execution un-
der real-time constraints, follow specific architec-
tural patterns (e.g., AUTOSAR layered architec-
ture) rarely encountered during pre-training, oper-

CHK-2d99ef67cb35c9668d536b7d

on un-
der real-time constraints, follow specific architec-
tural patterns (e.g., AUTOSAR layered architec-
ture) rarely encountered during pre-training, oper-
ate under tight memory and resource constraints
in embedded systems, and respect interface con-
ventions particular to the organization that owns
the codebase. A general-purpose model fits this
557

setting poorly, since the conventions it must follow
are underrepresented in its training data (Cassano
et al., 2024; Gu et al., 2025; Liu et al., 2023).
This paper introduces an agentic assistant for
automotive software, built on the Model Context
Protocol (MCP) (Anthropic, 2024), that addresses
both demands. We address the first demand by
exposing verification as a separate tool. Rather
than providing a single code generation mode, the
system exposes three tools: generate, edit,
and verify. The first two generate and revise
function bodies from a signature, documentation,
and context such as imported functions and UML
diagrams. This task is central to automotive work-
flows, where interfaces are specified upfront and
implementations must follow established patterns.
The third tool lets developers run the same auto-
motive rule checks the agent uses internally, on
demand and independently of generation. Most
coding agents treat checking as an internal step that
the agent itself decides to invoke. We argue that in

CHK-4b6a72585d019ba931d87c87

lly, on
demand and independently of generation. Most
coding agents treat checking as an internal step that
the agent itself decides to invoke. We argue that in
safety-critical settings the developer must be able
to trigger evaluation directly, because a check the
agent can skip is not a reliable check.
We address the second demand by customiz-
ing the model to the domain. We build a dataset
from an AUMOVIO’s production automotive code
in which each function is paired with the con-
text needed to implement it compliantly, includ-
ing requirement texts resolved from AUMOVIO’s
requirements-management system and the UML
behavior the function must realize. On this dataset
we compare the two customization strategies most
used for code models (Shin et al., 2025; Freire
et al., 2026): prompt engineering (PE) with general-
purpose API models and domain-specific fine-
tuning (FT) (Zirak and Hemmati, 2024), both
scored against custom rule sets inspired by estab-
lished automotive standards. PE here involves sup-
plying the assembled context and the rule sets in
full at inference time, rather than tuning instruction
wording, so the two strategies differ in when the
domain information reaches the model and not in
what it contains. Because those rule sets are pattern
matchers, we treat their output as pattern confor-
mance rather than compliance, and report how that

CHK-65eea2632bc3ae63d48c5d17

t in
what it contains. Because those rule sets are pattern
matchers, we treat their output as pattern confor-
mance rather than compliance, and report how that
changes what the numbers support.
The main contributions are the following. First,
we present an MCP-based architecture in which
verification is exposed as a tool the developer
can invoke directly, on any code and at any time,
and articulate the corresponding division of la-
bor between human and agent in safety-critical
review. Second, we implement a context engineer-
ing pipeline that assembles requirement texts, UML
behavior, and API context into training and infer-
ence examples, which lets us compare PE against
FT on the same domain information, differing in
whether it arrives during training or at inference.
We analyze how the two methods perform in terms
of architecture and coding pattern violations and
generation latency. Comparing against a human
baseline of shipped production code, we find that
generated C code scores better than code written by
the engineers, and we show that this reflects what
the checkers reward rather than a genuine quality
advantage. Finally, we report results from a two-
week pilot with nine developers from AUMOVIO
and show how the three tools are taken up in a
real-world production workflow.
2 Related Work
Code generation and editing are part of the Ma-

CHK-40dc49cf2823126a748fe70d

pers from AUMOVIO
and show how the three tools are taken up in a
real-world production workflow.
2 Related Work
Code generation and editing are part of the Ma-
chine Learning on Code or Big Code research
field (Allamanis et al., 2018). Code generation
for automotive software dates back to the late
1980s and 1990s (Hanselmann, 1998; Hanselmann
et al., 1999), where early systems used rule-based
transformations; neural approaches have become
feasible only recently with the advent of LLMs.
Early neural code generation models such as Codex
(Chen et al., 2021) and open-source counterparts
demonstrated strong accuracy in general program-
ming (Li et al., 2022; Wang et al., 2021; Ahmad
et al., 2021), but struggle with domain-specific
code due to gaps in specialized knowledge. Gu
et al. (2025) show that general-purpose LLMs un-
derperform in domain-specific contexts because
they make limited use of domain-specific libraries,
and their DomCoder approach recovers quality by
injecting API knowledge through prompting and
fine-tuning. Another work fine-tunes code mod-
els on domain-specific corpora (Liu et al., 2023)
and finds that developers expect assistants to under-
stand specific frameworks and libraries, and their
two-stage CodeGen4Libs outperforms non-domain-
specific baselines.
Which of the two customization strategies to
prefer is unsettled. Shin et al. (2025) compare

CHK-8d99a74e18d2dd2a6facbae9

two-stage CodeGen4Libs outperforms non-domain-
specific baselines.
Which of the two customization strategies to
prefer is unsettled. Shin et al. (2025) compare
prompt engineering against 17 fine-tuned models
on code summarization, generation, and translation,
and find that prompting a stronger general-purpose
model does not consistently win, while Freire et al.
558

(2026) report that LoRA fine-tuning beats few-shot
prompting and retrieval on domain-specific text-to-
code. This motivates our comparison of the two
strategies on the same assembled context.
For safety-critical domains, researchers integrate
verification and domain constraints into genera-
tion. Fakih et al. (2024)’s LLM4PLC combines
fine-tuning with an iterative verification loop, im-
proving code generation success rates from 47%
to 72% and expert-rated quality from 2.25/10 to
7.75/10, while Jiang et al. (2025)’s ROCODE in-
tegrates static analysis to reach a 99.1% compi-
lation success rate. Recent work targets automo-
tive compliance specifically: Kirchner and Knoll
(2025) integrate LLMs into automotive develop-
ment with test-driven development and iterative
refinement; Umer (2025) finds that popular LLMs
(ChatGPT, Gemini, DeepSeek, Copilot) produce no
MISRA C++ compliant code by default; and Pavel
et al. (2025) identify high rates of syntax viola-
tions and API conflicts in GPT-4 variants that pose

CHK-25f191945714e5c068314f37

roduce no
MISRA C++ compliant code by default; and Pavel
et al. (2025) identify high rates of syntax viola-
tions and API conflicts in GPT-4 variants that pose
safety risks. Together, these indicate that domain-
specific code generation requires both LLM adap-
tation and domain-aware validation. Such valida-
tion is typically placed inside the generation loop,
where the model critiques and repairs its own out-
put, but gains from self-repair are modest and bot-
tlenecked by the model’s ability to judge its own
code (Olausson et al., 2024), and models struggle
to self-correct without external feedback (Huang
et al., 2024; Stechly et al., 2024).
A further stream studies coding assistants from a
developer-productivity perspective, reporting faster
task completion with GitHub Copilot (Peng et al.,
2023) and measuring suggestion acceptance and
satisfaction across a 400-developer enterprise roll-
out (Bakal et al., 2025). Heydari (2025) argues
that such evaluations still under-weigh how well a
tool adapts to user expertise and supports collabo-
ration. Productivity and adoption therefore depend
not only on generation quality but on how the as-
sistant supports oversight, which is amplified in
safety-critical settings.
A recent line of work reframes review of gener-
ated code as a trust problem rather than a diffing
problem. Heander et al. (2026) find, across a par-

CHK-683a84e0b94428b1c5b96eeb

settings.
A recent line of work reframes review of gener-
ated code as a trust problem rather than a diffing
problem. Heander et al. (2026) find, across a par-
ticipatory design study with industry practitioners,
that trust calibration is the central challenge when
reviewing agent-generated multi-file changes, and
argue that tools should surface risk and confidence
signals at the granularity where reviewers allocate
attention. Mitropoulos et al. (2026) supply the
security argument for keeping the reviewer inde-
pendent of the generator: automated review judg-
ments are systematically swayed by how a change
is framed, and an iterative attack that refines its
framing against a local copy of the review pipeline
succeeds in every case they test, since the attacker
may retry while the defender has one chance to
detect. Both motivate our design: verification the
developer controls, rather than verification the gen-
erating system elects to perform. Our work dif-
fers from these lines in treating verification as a
developer-invocable tool on par with generation,
grounding the comparison in production code, and
a pilot on an active automotive project rather than
synthetic benchmarks.
3 Methodology
Our coding assistant centers on an MCP-based
framework compatible with modern AI coding as-
sistants such as Cline, Claude Code and Codex,
extending them with automotive-specific tools. We

CHK-3d28b66475f55f61d090d2e4

on an MCP-based
framework compatible with modern AI coding as-
sistants such as Cline, Claude Code and Codex,
extending them with automotive-specific tools. We
compare two ways of customizing the underly-
ing model: prompt engineering (PE), which sup-
plies domain knowledge at inference time, and
fine-tuning (FT), which absorbs it into the pa-
rameters. We evaluateQwen3-32B(Yang et al.,
2025) in three variants, PE, FT, and FT on curated
redundancy-removed data, and useClaude Sonnet
4andAmazon Nova Proin PE mode as baselines.
3.1 Dataset Preparation
We build a context engineering pipeline to pro-
cess an AUMOVIO’s production automotive C/C++
code into a structured dataset for fine-tuning and
evaluation. The data comes from multiple actively
maintained projects, so the examples reflect indus-
try practices and compliance requirements. The
pipeline parses C/C++ files to isolate individual
functions, then augments each with the context
a developer would consult when implementing it:
header declarations and the signatures and docu-
mentation of imported functions for API context,
import statements and namespaces, and the require-
ment and UML artifacts described next. It keeps
only functions whose documentation is complete
enough to specify behavior, validates them against
our custom rule sets, and analyzes complexity for
balanced stratification. The pipeline yields over

CHK-9f30df5961f0748324f7b1d5

complete
enough to specify behavior, validates them against
our custom rule sets, and analyzes complexity for
balanced stratification. The pipeline yields over
6,000 function implementations stratified by com-
plexity, of which 822 are held out for evaluation.
The step that distinguishes this setting from gen-
559

eral code generation is requirements traceability.
In safety-critical automotive practice, an imple-
mentation is not merely expected to work; it must
be attributable to a specific requirement, and that
link is what makes review and certification pos-
sible. AUMOVIO’s code carries this link in a
machine-readable form: Doxygen comments cite
requirement identifiers, while the requirement texts
live in a separate requirements-management sys-
tem. Our pipeline parses DOORS (IBM, 2025)
export XML to expand each cited identifier into
its full requirement text, and likewise extracts ref-
erenced PlantUML (PlantUML, 2025) diagrams
to supply behavioral specifications. The pipeline
also reconciles implementation signatures against
their header declarations, correcting mismatches
that would otherwise train the model on inconsis-
tent interfaces. Each function’s prompt therefore
states the complete obligation that the function is
meant to satisfy.
Listing 1 shows the resulting format of the con-
structed function prompt, with the requirement text

CHK-20dc6983c7f4ac2d0f9f53b3

complete obligation that the function is
meant to satisfy.
Listing 1 shows the resulting format of the con-
structed function prompt, with the requirement text
and UML fragment resolved in place. Appendix B
details the extraction and filtering steps.
3.2 Model Customization
In PE mode, model parameters stay fixed and all do-
main knowledge enters through the prompt. Each
request carries a system prompt that states the au-
tomotive coding role and instructs the model to
return a single function implementation based on
the task context assembled by our pipeline: the
function signature, its documentation and linked
requirements, signatures and documentation of im-
ported functions, and the UML diagram when one
is referenced. The prompt also includes JSON
rule sets the code needs to conform with, includ-
ing conforming and non-conforming examples (see
Section 3.3 for details). The rule sets are supplied
in full rather than retrieved per request, since our
subset is compact enough to fit the context win-
dow of all models we test, which keeps the prompt
identical across examples and avoids confounding
retrieval quality with model capability. Because
the assembled context is the same one used to build
training examples, the two strategies work from the
same domain information, differing in whether it
arrives at inference time or during training.

CHK-9bc7d3d878f0e93dcdd14f01

sed to build
training examples, the two strategies work from the
same domain information, differing in whether it
arrives at inference time or during training.
In FT mode, the same information is instead ab-
sorbed into the parameters. We select Qwen3-32B
as the base model and train it on the preprocessed
function corpus formatted as user-assistant turns
via HuggingFace chat templates, with the context
as the user message and the human production im-
plementation as the target, so the model learns the
conventions its authors applied rather than a syn-
thetic notion of compliant code. We use Low-Rank
Adaptation (Hu et al., 2021) with rank-8 adapters
to adapt the model while preserving general coding
capabilities, with 4-bit quantization (Dettmers et al.,
2023) and gradient checkpointing to fit available
memory, on SageMaker with DeepSpeed (Rasley
et al., 2020) for multi-GPU training (Appendix C).
We train two variants: one on the full corpus and
one on a curated version with near-duplicate func-
tions removed. The resulting models are packaged
through Amazon Bedrock’s custom model import
functionality for integration with the multi-model
MCP architecture. At inference, the FT models
receive the same assembled context and rule sets
as the PE models, so FT adds parameter adaptation
on top of the PE condition.
Listing 1: Abbreviated training example.

CHK-680b0848521f41506c98ae2c

 the same assembled context and rule sets
as the PE models, so FT adds parameter adaptation
on top of the PE condition.
Listing 1: Abbreviated training example. Each numbered block is assembled by the pipeline from a different artifact
in AUMOVIO’s repositories; requirement texts are resolved from DOORS identifiers cited in the Doxygen comment.
Appendix D gives the full untruncated example.
1INPUT CONTEXT
2(1) Signature: void ValidateEngineParameters(
3const EngineData_t * engineData, ValidationResult_t * result)
4(2) Doxygen: @brief Validates engine parameters ...
5@requirements REQ_ENG_001, REQ_ENG_002 @safety_level ASIL-D
6(3) Requirements (resolved from DOORS):
7REQ_ENG_001: "... shall validate that engine RPM remains within the
8operational range of 800 to 6000 RPM ..."
9(4) UML (PlantUML, if referenced):
10ValidateEngineParameters -> CheckRPMRange : validate RPM
11(5) API context: signatures + docs of imported functions, header declarations
12(6) Rules (optional): JSON rule sets, see Listing 2
13
14OUTPUT
15if ((engineData == NULL) || (result == NULL)) { ... return; } / * null guard */
16if ((engineData->rpm < 800U) || (engineData->rpm > 6000U)) / * REQ_ENG_001 */
17{ result->errorCode = VALIDATION_RPM_OUT_OF_RANGE; return; }
560

3.3 Automotive Rule Sets Integration
We build custom rule sets inspired by established
automotive coding standards, covering patterns

CHK-e85f091e74a2d10bbe98c43e

_OF_RANGE; return; }
560

3.3 Automotive Rule Sets Integration
We build custom rule sets inspired by established
automotive coding standards, covering patterns
common in safety-critical embedded systems and
prioritized by AUMOVIO’s engineers.
TheCodingrules, 57 for C and 107 for C++,
address pointer validation before dereferencing,
buffer bounds checking, error return handling, and
memory access patterns. TheArchitecturerules,
37 for C and 30 for C++, address layered architec-
ture principles, interface design conventions, and
module separation patterns typical in automotive
software. Each rule carries one of four severity
levels (info, warning, error, critical), mirroring the
tiers used in static analysis tools. We review the
rule sets with automotive engineers to confirm they
target the patterns AUMOVIO prioritizes. The
same rule sets serve two purposes: they supply
context during code generation, and they act as
scoring rubrics during evaluation (Section 4).
We process the rule sets into a JSON format (see
Listing 2) holding rule identifiers, descriptions, and
pairs of conforming and non-conforming examples.
3.4 Deployment
We package the solution as an MCP-based agen-
tic coding assistant with three core tools, each
mapping to a stage of the developer’s workflow:
generate produces new function implementa-
tions aware of custom rule sets from a specification

CHK-9c849f6da6efcf541b2275b4

ore tools, each
mapping to a stage of the developer’s workflow:
generate produces new function implementa-
tions aware of custom rule sets from a specification
or signature; edit makes contextual modifications
using existing code for refactoring or extending;
verifychecks code against the rule sets.
In the standard MCP arrangement, an agent reads
tool descriptions and selects tools autonomously, so
a well-described checker is invoked whenever the
agent judges a check useful. We retain this setup
but also expose verify to developers directly.
The concern is not that agents skip checks; it is
that the model which produced a piece of code is
poorly placed to judge whether that code warrants
scrutiny. Safety-critical review practice resolves
this through independence, where a different party
controls the check. Exposing verify as a peer
tool the developer invokes on demand preserves
that independence.
Our architecture (Figure 1) integrates with ex-
isting development environments while maintain-
ing separation between orchestration and special-
ized generation models. This separation is what
makes the assistant agentic: the developer works
in an IDE plugin such as Cline, whose orchestra-
tor model decides which MCP tool a task requires
and dispatches the request rather than answering
from its own weights. Requests route through API
Gateway, authenticated via Cognito, to Lambda

CHK-fce0b4663715255c7a38db89

a task requires
and dispatches the request rather than answering
from its own weights. Requests route through API
Gateway, authenticated via Cognito, to Lambda
functions that invoke the models we host for the
automotive domain, so the orchestrator sequences
the calls while specialized models generate code.
4 Evaluation Setup
Evaluating automotive code quality requires both
automated metrics and human expertise. Table 2 in
Appendix summarizes candidate metrics by type,
tool availability, complexity, reliability, and cost,
spanning reference-based similarity measures (Paul
et al., 2024; Takaichi et al., 2022), static and dy-
namic analysis, and standards conformance against
MISRA (Association, 2013), CERT C (Seacord,
2008), and AUTOSAR (AUTOSAR, 2017). We
do not adopt the similarity measures as primary
metrics, since closeness to a reference implemen-
tation is a weak proxy for the standards adherence
developers must certify.
Our evaluation covers three dimensions. First,
we score code against the rule sets of Section 3.3,
comparing generated functions to a human base-
line of production code written before the assistant
was introduced on 822 held-out functions (574 C,
248 C++). Second, we measure generation latency.
Third, we pilot the assistant with automotive engi-
neers and survey their usage patterns.
Listing 2: Simplified C Example: Buffer Access Rule

CHK-b967db88a089a8a97aade841

eration latency.
Third, we pilot the assistant with automotive engi-
neers and survey their usage patterns.
Listing 2: Simplified C Example: Buffer Access Rule
1{"rule_id": "BUF_001",
2"rule_name": "Buffer Access Protection",
3"non_compliant_example": "memcpy(dest, src, len);",
4"compliant_example":
5"if (dest src len > 0 len <= DEST_SIZE len <= src_size)
6{
7memcpy(dest, src, len); return SUCCESS;
8}
9return ERROR;"}
561

Figure 1: System architecture. The MCP server exposes three tools ( generate, edit, verify) that AI coding
assistants invoke. Requests route through API Gateway to models on Amazon Bedrock or SageMaker.
To score code automatically, we implement rule
sets as pattern-based (regular-expression) static
checkers. The rules they encode are drawn from
verification patterns AUMOVIO already applies1,
selected by engineers as high-impact patterns. They
are a deliberately simplified subset of AUMOVIO’s
verification process: rules requiring semantic, data-
flow, or inter-procedural reasoning are excluded
by construction, since a pattern matcher cannot
decide them and may produce false positives and
false negatives. Production use therefore requires
established automotive linters.
5 Results
5.1 Pattern Conformance Evaluation
Table 1 reports mean pattern-level rule violations
per generated function alongside the observed end-
to-end generation latency in seconds.

CHK-b358cea6244868a8bf1146a4

formance Evaluation
Table 1 reports mean pattern-level rule violations
per generated function alongside the observed end-
to-end generation latency in seconds.
Holding the base model fixed at Qwen3 32B,
PE gives the fewest C violations on both checkers
(1.22 coding, 0.54 architecture), ahead of either
FT variant. On C++ the ordering reverses, with
FT on curated data recording the fewest coding
(1.25) and architecture (0.02) violations. These
margins are thin: the architecture column separates
all three Qwen variants by at most 0.08 violations
per function, which we do not treat as a meaningful
difference. The same curated variant is also the
worst Qwen variant on both C checkers (1.67 each),
so its C++ gain comes with a C cost rather than
a uniform improvement. Across model families,
Claude Sonnet 4 (PE) and Amazon Nova Pro (PE)
produce more violations in both languages than the
1Licenses are required for the use of these standards.
best Qwen3 32B variant.
One plausible reading of the C versus C++ diver-
gence is that the two rule families differ in locality.
Our C rules mostly describe function-local obli-
gations, such as validating a pointer before deref-
erencing it or checking buffer bounds, which can
be stated compactly in a prompt and applied by a
general-purpose model without prior exposure to
the codebase. The C++ architecture rules instead

CHK-b8c7fcda2db741bf8711efc5

ds, which can
be stated compactly in a prompt and applied by a
general-purpose model without prior exposure to
the codebase. The C++ architecture rules instead
encode the AUMOVIO’s layering and interface
conventions, which are longer-range, idiosyncratic
to their projects, and largely absent from pretrain-
ing data. These are difficult to convey exhaustively
in a prompt but appear repeatedly in training ex-
amples. If this reading is right, fine-tuning helps
less by teaching C++ syntax than by absorbing
organization-specific convention.
Observed generation latency ranges from ∼15
seconds (Nova Pro, PE) to ∼110 seconds (Qwen3
32B, PE). Note that these figures are not a con-
trolled comparison of the customization strategies,
since PE models are served through a managed API
while FT models run on separately provisioned
inference infrastructure. At the same time, the
numbers characterize what developers in our pilot
actually waited for when using the assistant. The
spread is wide enough to motivate hybrid serving,
with faster models reserved for interactive editing
and slower ones for long-form function generation.
5.2 Comparison with the Human Baseline
Human production code records 2.45 and 2.20 vio-
lations per function on the two C checkers, worse
than every generated variant. Read naively, LLM-
generated C code adheres to automotive rules better
562

CHK-d1395ac37a05853f85ae7ba1

io-
lations per function on the two C checkers, worse
than every generated variant. Read naively, LLM-
generated C code adheres to automotive rules better
562

Table 1: Automotive code generation: meanpattern-levelrule violations per function (lower is better) and observed
end-to-end generation latency. Counts reflect conformance to patterns our custom checkers can match, not
MISRA/AUTOSAR compliance or functional correctness. Models are evaluated on 822 test examples (574 C, 248
C++) from production automotive code.Bold= best per column; underline = worst per column.
Model Coding
patterns (C)
Architecture
patterns (C)
Coding
patterns (C++)
Architecture
patterns (C++)
Generation
latency (s)
Qwen3 32B (PE)1.22 0.541.73 0.10 110.19
Qwen3 32B (FT) 1.31 0.84 1.81 0.09 93.69
Qwen3 32B (FT, curated) 1.67 1.67 1.250.0285.34
Sonnet 4 (PE) 1.80 1.84 2.61 0.12 28.68
Nova Pro (PE) 1.63 1.48 2.88 0.24 14.62
Human code (production) 2.45 2.20 0.840.06 N/A
than code written by the AUMOVIO’s own engi-
neers and shipped in production vehicles. However,
inspecting the outputs hints why this reading does
not hold: generated functions apply defensive con-
structs, with null checks on pointer parameters, ex-
plicit bounds checks, single-exit control flow, and
explicit error returns, and our checkers reward these
surface patterns. Human code frequently omits a

CHK-65e9c664fae351260319d1c2

, ex-
plicit bounds checks, single-exit control flow, and
explicit error returns, and our checkers reward these
surface patterns. Human code frequently omits a
local null check because the invariant holds else-
where, at a caller or through a module-level pre-
condition that the author knows to hold and that a
pattern matcher cannot see. The checker counts an
absent local check as a violation whether or not the
property holds non-locally, so it penalizes code that
reasons beyond the function boundary and rewards
code that re-checks everything. Such redundancy is
not free in embedded settings, where extra branches
cost code space and complicate timing analysis.
The C++ results point the other way, with human
code best on coding patterns (0.84). Our C++ rule
sets weight architectural and interface conventions
more heavily than local defensive checks, so uni-
form guard insertion earns less credit there, while
the AUMOVIO’s own code follows conventions its
authors apply routinely. Together, the results sug-
gest the checkers measure how closely code resem-
bles a pattern vocabulary, which generated code
matches well when the rules are local and less well
when they encode organization-specific structure.
The problem is that a pattern-matching proxy for a
standard can be optimized without being satisfied:
a model raises its score by emitting recognized con-

CHK-fd37fd153997a7cdf9e66313

ure.
The problem is that a pattern-matching proxy for a
standard can be optimized without being satisfied:
a model raises its score by emitting recognized con-
structs rather than by producing safer code. Such
checkers are therefore limited but are still useful as
a fast pre-commit filter and as generation context.
5.3 Pilot Study with Developers
Pattern conformance metrics describe what the
models can produce in isolated tasks. To test the ac-
tual human-agent collaboration, we run a two-week
pilot with nine of the AUMOVIO’s developers and
analyze post-usage survey results.
Pilot participants are automotive engineers on
AUMOVIO’s active C/C++ projects, recruited vol-
untarily from teams scheduled to trial AI assistance.
Each installs the MCP server into Cline and works
on their own production tasks rather than assigned
benchmarks. All three tools are exposed through
MCP descriptions, so the assistant can select them
autonomously, and verify is additionally docu-
mented as directly invocable.
Evidence comes from a concluding survey cov-
ering experience, usage frequency, tool usage, use-
fulness, and other aspects. Every quantity is self-
reported, since we collect no telemetry on invoca-
tion counts. Note that with nine respondents, we
read only large gaps in the results as informative.
Developers rate their overall experience with the

CHK-1b24756c0b328ee72abc63ec

 invoca-
tion counts. Note that with nine respondents, we
read only large gaps in the results as informative.
Developers rate their overall experience with the
assistant 3.89 out of 5, and their willingness to rec-
ommend it to colleagues 4.00 out of 5. On average,
the productivity improvements is marked at 4.67
on a seven-point scale. The distributions behind
these means are more informative: no respondent
gives the lowest rating on any item, but none is
unanimous: experience draws 3 top ratings vs 1
low, recommendation – 4 top against 3 at or below
the midpoint Figure 2 provides more detail on us-
ability: 8 of 9 respondents find the assistant easy
to integrate, and 5 of 9 rate its reasoning accurate
against 4 neutral and none inaccurate. Usage does
not settle at a middle value: four of nine respon-
563

0 25 50 75 100%
Share of respondents
Easy to access
Standards conformance
Reasoning accuracy
Usage frequency
Yes
89%
Somewhat
11%
Always
11%
Mostly
56%
Sometimes
22%
Never
11%
Accurate
56%
Neutral
44%
Daily
45%
Rarely
44%
Setup
11%
How the assistant was judged (best to worst, left to right)
0 25 50 75 100%
Share of respondents
Most-used tool
Model preference
verify
40%
generate
30%
edit
30%
PE
75%
FT
25%
Which tool and which model developers reached for
Figure 2: Pilot survey response distributions (n=9 developers). The upper panel holds judgments of the assistant,

CHK-9628523b436077a5813d7fb8

h tool and which model developers reached for
Figure 2: Pilot survey response distributions (n=9 developers). The upper panel holds judgments of the assistant,
ordered from most to least favorable; the lower panel holds choices among tools and modes. Denominators differ by
item, since not every respondent answered every question; raw counts are given in the text. Only large gaps are
informative and percentages are rounded to sum to 100. “Setup” denotes participants who installed the assistant but
reported no working use. All responses are self-reported.
dents use the assistant daily and four use it rarely,
forming two distinct user populations.
Three patterns stand out in the survey results.
First, 6 of the 8 respondents who answered this
question prefer the PE mode. The PE configura-
tions served in the pilot include the API-hosted
models, which answer in roughly 15 to 29 seconds
against 85 to 94 for the FT models (Table 1), so
mode preference and response time are confounded
here. Combined with developer feedback, we read
this as evidence that in tight read-edit-review loops
generation latency behaves as a key property.
Second, 6 of 9 developers report conformance
alwaysormost of the time, but only one of them
answersalways, while 2 answersometimesand 1
never. This matters because in Table 1 the same
models score at or better than human code on rule
set conformance.

CHK-4874e13cb2470e3062505c72

m
answersalways, while 2 answersometimesand 1
never. This matters because in Table 1 the same
models score at or better than human code on rule
set conformance. Developers do not internalize the
favorable automated numbers as trust.
Third, verify draws the largest share of most-
used-tool responses (4 of 10 selections, against 3
each for generate and edit; the item permit-
ted multiple selections) and the largestvery useful
share. Respondents also run verify on existing
human-written code, not only on generated output,
a use a generation-only assistant would not support.
6 Conclusion
AI assistance helps safety-critical development
only if built around how such code is accepted:
reviewed, traced to a requirement, checked before
commit. We present an MCP-based coding assis-
tant addressing this by: (i) treating verification as a
peer of generation rather than a step hidden inside
it; (ii) adapting the model to the domain through
prompt engineering and fine-tuning on production
code paired with the requirements each function
must satisfy. We deploy it on AUMOVIO’s active
automotive C/C++ projects, evaluate pattern con-
formance, and run a developer pilot in production.
Our experiments produce three findings. First,
verify is the most-used tool in the pilot, and
developers run it on their own existing code rather
than only on generated output, which indicates that

CHK-7044a32631ba98edb5943fdb

. First,
verify is the most-used tool in the pilot, and
developers run it on their own existing code rather
than only on generated output, which indicates that
verification is used as a first-class step. Second,
with the base model held fixed, PE gives fewer C
violations while the C++ counts separate the two
strategies by margins too small to call, so we do not
read either as the better choice. Third, developers
prefer the faster configuration and do not fully trust
the output despite its scores.
Together, these results suggest that coding assis-
tants for safety-critical domains should be judged
on more than generation quality. What mattered to
our developers was checking code themselves, get-
ting answers fast enough to stay in a review loop,
and knowing where the automated verdict held.
Acknowledgments
We thank the wider AUMOVIO team who sup-
ported us throughout the project. We are especially
grateful to Stefan-Cosmin Grigoriu for his support.
564

Limitations
Our evaluation has several limitations. Section 4
states what our pattern checkers can and cannot
show, and Section 5.2 shows they favor generated
code. We also report no functional correctness: no
compilation or unit-test pass rates, and no check
that a function satisfies the requirements or UML
behavior in its prompt.
On the model comparison, we use parameter-
efficient LoRA fine-tuning rather than full fine-

CHK-81ae65f90df203c4c6c4a73b

function satisfies the requirements or UML
behavior in its prompt.
On the model comparison, we use parameter-
efficient LoRA fine-tuning rather than full fine-
tuning, and run no ablations over prompt design,
context elements, or rule-set inclusion. We report
no significance tests, so the small C++ margins
should not be read as ranking the strategies. La-
tency was measured on different serving stacks, so
it describes our deployment rather than the general
strategies.
On the human evidence, the pilot has nine self-
selected developers working with the assistant for
two weeks. Everything is self-reported, with no
telemetry and no record of whether generated code
was committed or how much it was edited first,
so the results are directional signals rather than
effect estimates. Finally, all data comes from one
organization, and the code, rule sets, and checkers
are proprietary and cannot be released publicly.
Ethical Considerations
Defective code in the automotive setting can harm
people, so the assistant is not meant to automate
compliance work: everything it produces needs re-
view by qualified engineers. Three failure modes
matter in deployment.False confidence, where
code that passes pattern checks still violates func-
tional or timing requirements; Section 5.2 is a con-
crete case, since adding defensive patterns every-
where raises the score without making the code

CHK-7e8e251211f6497336998e05

es func-
tional or timing requirements; Section 5.2 is a con-
crete case, since adding defensive patterns every-
where raises the score without making the code
safer, and the extra branches can themselves af-
fect code size and worst-case execution time.Cor-
related blind spots, where the generator and the
checker share a model family and miss the same
defect twice, which is why we keep the checker
independent of the generator and why extending
the architecture to test generation would need the
same separation.Conformance drift, where non-
conforming code spreads through reuse. Human
approval gates, keeping the checker independent of
the generator, and logging prompts, context, model
IDs, and analyzer reports all help.
We ran no red-teaming and did not test whether
the assistant can be pushed into producing insecure
code, tricked into evading the checkers, or made
to introduce vulnerabilities our rules do not cover.
Production readiness would require that work.
The study uses AUMOVIO’s proprietary code
under their data governance. Pilot participation
was voluntary, and we collected no personal data
beyond anonymized survey responses.
References
Wasi Ahmad, Saikat Chakraborty, Baishakhi Ray, and
Kai-Wei Chang. 2021. Unified pre-training for pro-
gram and natural languages.Findings of the Associ-
ation for Computational Linguistics: ACL-IJCNLP
2021, pages 2403–2417.

CHK-85262b691d6b47e1a376373d

. 2021. Unified pre-training for pro-
gram and natural languages.Findings of the Associ-
ation for Computational Linguistics: ACL-IJCNLP
2021, pages 2403–2417.
Miltiadis Allamanis, Earl T Barr, Premkumar Devanbu,
and Charles Sutton. 2018. A survey of machine learn-
ing for big code and naturalness.ACM Computing
Surveys (CSUR), 51(4):1–37.
Anthropic. 2024. Model context protocol. https:
//modelcontextprotocol.io/ . Accessed:
2025-01-15.
Motor Industry Software Reliability Association. 2013.
MISRA-C: 2012: Guidelines for the Use of the C
Language in Critical Systems. MISRA.
AUTOSAR. 2017. Guidelines for the use of the c++ 14
language in critical and safety-related systems.
Gal Bakal, Ali Dasdan, Yaniv Katz, Michael Kaufman,
and Guy Levin. 2025. Experience with GitHub Copi-
lot for developer productivity at Zoominfo.arXiv
preprint arXiv:2501.13282.
Federico Cassano, John Gouwar, Francesca Lucchetti,
Claire Schlesinger, Anders Freeman, Carolyn Jane
Anderson, Molly Q Feldman, Michael Greenberg,
Abhinav Jangda, and Arjun Guha. 2024. Knowledge
transfer from high-resource to low-resource program-
ming languages for code LLMs.Proceedings of the
ACM on Programming Languages, 8(OOPSLA2).
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming
Yuan, Henrique Ponde de Oliveira Pinto, Jared Ka-
plan, Harri Edwards, Yuri Burda, Nicholas Joseph,
Greg Brockman, et al. 2021. Evaluating large

CHK-317fef01b5ad119e2981157d

oo Jun, Qiming
Yuan, Henrique Ponde de Oliveira Pinto, Jared Ka-
plan, Harri Edwards, Yuri Burda, Nicholas Joseph,
Greg Brockman, et al. 2021. Evaluating large
language models trained on code.arXiv preprint
arXiv:2107.03374.
Tri Dao. 2023. Flashattention-2: Faster attention with
better parallelism and work partitioning.Preprint,
arXiv:2307.08691.
Tri Dao, Daniel Y . Fu, Stefano Ermon, Atri Rudra,
and Christopher Ré. 2022. Flashattention: Fast and
memory-efficient exact attention with io-awareness.
Preprint, arXiv:2205.14135.
Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and
Luke Zettlemoyer. 2023. Qlora: Efficient finetuning
of quantized llms.arXiv preprint arXiv:2305.14314.
565

Doxygen. 2025. Doxygen. https://doxygen.nl
/. Accessed: 2025-08-12.
Mohamad Fakih, Rahul Dharmaji, Yasamin Moghaddas,
Gustavo Quiros Araya, Oluwatosin Ogundare, and
Mohammad Abdullah Al Faruque. 2024. Llm4plc:
Harnessing large language models for verifiable pro-
gramming of plcs in industrial control systems. In
Proceedings of the 46th International Conference
on Software Engineering: Software Engineering in
Practice (ICSE SEIP). ACM.
Luís Freire, Fernanda A. Andaló, and Nicki Skafte
Detlefsen. 2026. Exploring different approaches
to customize language models for domain-
specific text-to-code generation.arXiv preprint
arXiv:2603.16526.
Xiaodong Gu, Meng Chen, Yalan Lin, Yuhan Hu,

CHK-340c90e3abb60d673417b4c6

roaches
to customize language models for domain-
specific text-to-code generation.arXiv preprint
arXiv:2603.16526.
Xiaodong Gu, Meng Chen, Yalan Lin, Yuhan Hu,
Hongyu Zhang, Chengcheng Wan, Zhao Wei, Yong
Xu, and Juhong Wang. 2025. On the effectiveness of
large language models in domain-specific code gen-
eration.ACM Transactions on Software Engineering
and Methodology, 34(3):1–22.
Herbert Hanselmann. 1998. Development speed-up for
electronic control systems. Technical report, SAE
Technical Paper.
Herbert Hanselmann, Ulrich Kiffmeier, Lutz Köster,
and Martin Meyer. 1999. Automatic generation of
production quality code for ecus.SAE transactions,
pages 1625–1633.
Lo Gullstrand Heander, Agnia Sergeyuk, Ilya Za-
kharov, Emma Söderberg, and Nikita Mukhortov.
2026. Trust-calibrated code review: A participatory
design study of review workflows for LLM-generated
multi-file changes.arXiv preprint arXiv:2606.01969.
Dominik Hepp, Michael Amroudi, Martin Harrysson,
Mateusz Wozniak, and Lukasz Maslaniec. 2025.
From engines to algorithms: Gen ai in automotive
software development.
Soroush Heydari. 2025. A human centric requirements
engineering framework for assessing GitHub Copilot
output.arXiv preprint arXiv:2508.03922.
Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan
Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and
Weizhu Chen. 2021. Lora: Low-rank adaptation of

CHK-d27ecfcc6f7221f59aff13d4

v:2508.03922.
Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan
Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and
Weizhu Chen. 2021. Lora: Low-rank adaptation of
large language models.Preprint, arXiv:2106.09685.
Jie Huang, Xinyun Chen, Swaroop Mishra,
Huaixiu Steven Zheng, Adams Wei Yu, Xiny-
ing Song, and Denny Zhou. 2024. Large language
models cannot self-correct reasoning yet. InInter-
national Conference on Learning Representations
(ICLR).
Hugging Face. 2024. Chat templates. https://hu
ggingface.co/docs/transformers/v4.
47.1/en/chat_templating. Accessed: 2025-
08-12.
IBM. 2025. IBM engineering requirements manage-
ment DOORS. https://www.ibm.com/docs
/en/engineering-lifecycle-managem
ent-suite/doors/9.7.0?topic=overv
iew-doors. Accessed: 2025-08-12.
Juyong Jiang, Fan Wang, Jiasi Shen, Sungju Kim,
and Sunghun Kim. 2024. A survey on large lan-
guage models for code generation.arXiv preprint
arXiv:2406.00515.
Xue Jiang, Yihong Dong, Yongding Tao, Huanyu Liu,
Zhi Jin, and Ge Li. 2025. Rocode: Integrating back-
tracking mechanism and program analysis in large
language models for code generation. InProceed-
ings of the 47th International Conference on Software
Engineering (ICSE). Research Track.
Sven Kirchner and Alois C. Knoll. 2025. Generating au-
tomotive code: LLMs for software development and
verification in safety-critical systems.arXiv preprint
arXiv:2506.04038.

CHK-2ef1aad308af5024ad2d1f84

 Alois C. Knoll. 2025. Generating au-
tomotive code: LLMs for software development and
verification in safety-critical systems.arXiv preprint
arXiv:2506.04038.
Yujia Li, David Choi, et al. 2022. Competition-
level code generation with alphacode.Science,
378(6624):1092–1097.
Mingwei Liu, Tianyong Yang, Yiling Lou, Xueying Du,
Ying Wang, and Xin Peng. 2023. Codegen4libs: A
two-stage approach for library-oriented code genera-
tion. InProceedings of the 38th IEEE/ACM Interna-
tional Conference on Automated Software Engineer-
ing (ASE), Kirchberg, Luxembourg. IEEE.
Dimitris Mitropoulos, Nikolaos Alexopoulos, Geor-
gios Alexopoulos, and Diomidis Spinellis. 2026.
Measuring and exploiting contextual bias in LLM-
assisted security code review.arXiv preprint
arXiv:2603.18740.
Theo X. Olausson, Jeevana Priya Inala, Chenglong
Wang, Jianfeng Gao, and Armando Solar-Lezama.
2024. Is self-repair a silver bullet for code gener-
ation? InInternational Conference on Learning
Representations (ICLR).
Debalina Ghosh Paul, Hong Zhu, and Ian Bayley. 2024.
Benchmarks and metrics for evaluations of code gen-
eration: A critical review. In2024 IEEE Interna-
tional Conference on Artificial Intelligence Testing
(AITest), pages 87–94. IEEE.
Marc Pavel, Nenad Petrovic, Lukasz Mazur, Vahid
Zolfaghari, Fengjunjie Pan, and Alois Knoll.
2025. Hallucination in LLM-based code genera-

CHK-bc52773e74eb8a3bf6ef8af4

, pages 87–94. IEEE.
Marc Pavel, Nenad Petrovic, Lukasz Mazur, Vahid
Zolfaghari, Fengjunjie Pan, and Alois Knoll.
2025. Hallucination in LLM-based code genera-
tion: An automotive case study.arXiv preprint
arXiv:2508.11257.
Sida Peng, Eirini Kalliamvakou, Peter Cihon, and Mert
Demirer. 2023. The impact of AI on developer pro-
ductivity: Evidence from GitHub Copilot.arXiv
preprint arXiv:2302.06590.
PlantUML. 2025. PlantUML language reference guide.
https://plantuml.com/guide . Accessed:
2025-08-12.
566

Samyam Rajbhandari, Jeff Rasley, Olatunji Ruwase,
and Yuxiong He. 2020. Zero: Memory optimizations
toward training trillion parameter models.Preprint,
arXiv:1910.02054.
Jeff Rasley, Samyam Rajbhandari, Olatunji Ruwase, and
Yuxiong He. 2020. Deepspeed: System optimiza-
tions enable training deep learning models with over
100 billion parameters. InProceedings of the 26th
ACM SIGKDD International Conference on Knowl-
edge Discovery & Data Mining, pages 3505–3506.
Robert C Seacord. 2008.The CERT C secure coding
standard. Pearson Education.
Jiho Shin, Clark Tang, Tahmineh Mohati, Maleknaz
Nayebi, Song Wang, and Hadi Hemmati. 2025.
Prompt engineering or fine-tuning: An empirical as-
sessment of LLMs for code. InProceedings of the
22nd IEEE/ACM International Conference on Mining
Software Repositories (MSR).
Kaya Stechly, Karthik Valmeekam, and Subbarao Kamb-
hampati. 2024.

CHK-c069df2077ff67300cde4b0b

ceedings of the
22nd IEEE/ACM International Conference on Mining
Software Repositories (MSR).
Kaya Stechly, Karthik Valmeekam, and Subbarao Kamb-
hampati. 2024. On the self-verification limitations
of large language models on reasoning and planning
tasks.arXiv preprint arXiv:2402.08115.
Riku Takaichi, Yoshiki Higo, Shinsuke Matsumoto,
Shinji Kusumoto, Toshiyuki Kurabayashi, Hiroyuki
Kirinuki, and Haruto Tanno. 2022. Are nlp metrics
suitable for evaluating generated code? InInter-
national Conference on Product-Focused Software
Process Improvement, pages 531–537. Springer.
Malik Muhammad Umer. 2025. Comparative analysis
of code generated by popular LLMs for MISRA C++
compliance.arXiv preprint arXiv:2506.23535.
Yue Wang, Weishi Wang, Shafiq Joty, and Steven C. H.
Hoi. 2021. Codet5: Identifier-aware unified pre-
trained encoder-decoder models for code understand-
ing and generation. InProceedings of the 2021 Con-
ference on Empirical Methods in Natural Language
Processing, pages 8696–8708, Punta Cana. Associa-
tion for Computational Linguistics.
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang,
Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao,
Chengen Huang, Chenxu Lv, Chujie Zheng, Day-
iheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao
Ge, Haoran Wei, Huan Lin, Jialong Tang, and 41
others. 2025. Qwen3 technical report.Preprint,
arXiv:2505.09388.

CHK-3365fce31c093eeaf2251a77

y-
iheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao
Ge, Haoran Wei, Huan Lin, Jialong Tang, and 41
others. 2025. Qwen3 technical report.Preprint,
arXiv:2505.09388.
Jiasheng Zheng, Boxi Cao, Zhengzhao Ma, Ruotong
Pan, Hongyu Lin, Yaojie Lu, Xianpei Han, and
Le Sun. 2025. Beyond correctness: Benchmarking
multi-dimensional code generation for large language
models. InFindings of the Association for Computa-
tional Linguistics.
Armin Zirak and Hadi Hemmati. 2024. Improving auto-
mated program repair with domain adaptation.ACM
Transactions on Software Engineering and Method-
ology, 33(3):1–43.
567

A Evaluation Metrics Overview
Choosing what to measure is itself a decision when
evaluating safety-critical automotive code, since no
single metric captures its quality and the practical
options differ in how much tooling they need and
how much their verdicts can be trusted. Table 2
surveys the metric families we considered, rating
each on tool support, implementation complexity,
reliability, and cost. The comparison motivates
the choices in Section 4: we rely on standards
conformance, which combines high tool support
with high reliability, and on support metrics such as
latency, while declining reference-based similarity
measures whose reliability is only moderate and
whose relevance to certification is weak.
B Dataset Preprocessing Pipeline
This appendix expands the pipeline summarized in

CHK-27023c5a2b6215d9e591b5e2

se reliability is only moderate and
whose relevance to certification is weak.
B Dataset Preprocessing Pipeline
This appendix expands the pipeline summarized in
Section 3.1. The preprocessing pipeline begins by
traversing automotive C/C++ repositories to extract
individual functions along with their surrounding
context, which includes:
• Function Documentation: Both Doxygen-
style comments (Doxygen, 2025) and inline
documentation are extracted and linked to
their corresponding function implementations
• System Requirements: The pipeline parses
DOORS export XML files (IBM, 2025) to
map requirement identifiers mentioned in
function documentation to their full require-
ment texts
• Architectural Context: PlantUML diagrams
(PlantUML, 2025) referenced in documenta-
tion are extracted and included to provide be-
havioral specifications
•Code API Context: Related header files and
their function signatures are gathered to pro-
vide information about available APIs and
data structures
Header linking works as follows: the system
identifies the main header file corresponding to
each C/C++ source file and extracts additional con-
text from included dependencies, so that generated
code can reference existing APIs rather than reim-
plementing them.
The context aggregation process is implemented
as follows:
Listing 3: Context aggregation from preprocessing
pipeline

CHK-1fe63ad682d662a8958457a9

g APIs rather than reim-
plementing them.
The context aggregation process is implemented
as follows:
Listing 3: Context aggregation from preprocessing
pipeline
1def create_training_example(function_info):
2user_message = f"Implement the function: {
↪→function_info[’signature’]}\n\n"
3
4if function_info[’documentation’]:
5user_message += f"with following
↪→specifications:\n{function_info
↪→[’documentation’]}"
6
7if function_info[’requirements’]:
8user_message += f"\n\nRequirements
↪→texts:\n{function_info[’
↪→requirements’]}"
9
10if function_info[’uml_diagram’]:
11user_message += f"\n\nThe behavior
↪→follows this UML diagram:\n{
↪→function_info[’uml_diagram’]}"
12
13return {
14"messages": [
15{"role": "user", "content":
↪→user_message},
16{"role": "assistant", "content":
↪→function_info[’
↪→implementation’]}
17]
18}
For quality filtering and validation, the prepro-
cessing pipeline implements several quality assur-
ance mechanisms:
• Function Signature Validation: Automat-
ically corrects function signatures in imple-
Table 2: Evaluation metrics for automotive code quality assessment. Each category is rated on Tool Support
(availability of automated tools), Complexity (implementation effort), Reliability (consistency of results), and Cost
(resources required). High = better, except for Cost and Complexity where low is preferable.

CHK-5e1ef02a30daf89cc3561396

ementation effort), Reliability (consistency of results), and Cost
(resources required). High = better, except for Cost and Complexity where low is preferable.
Category Example Metrics Tool Support Complexity Reliability Cost
ML Static Analysis BLEU, ROUGE, METEOR High Medium Medium Low
Static Analysis Linters, Complexity High Low High Medium
Dynamic Analysis Coverage, Runtime Medium High High High
Standards Compliance Industry Coding Standards High Medium High Medium
(e.g., MISRA, CERT C)
Support Metrics Latency, Time Low Low Medium Low
Business KPIs ROI, Time-to-Market, Productivity Low Low Low Medium
568

mentation files by matching them against
header file declarations
• Documentation Completeness: Only func-
tions whose documentation specifies the in-
tended behavior are included in the training
set
• Code Compliance: Functions are validated
against AUTOSAR (AUTOSAR, 2017) and
MISRA-C (Association, 2013) patterns to as-
sess the initial compliance level
Finally, to ensure balanced representation across
different code complexity levels, the preprocessing
pipeline implements stratified sampling based on
function length and complexity. This approach cre-
ates training and test sets that maintain consistent
distribution characteristics. The resulting dataset
contains approximately 6,000 high-quality function
implementations with their complete contextual in-

CHK-59fb97e0f30793238a73941d

stent
distribution characteristics. The resulting dataset
contains approximately 6,000 high-quality function
implementations with their complete contextual in-
formation, split into training and evaluation sets
while maintaining complexity distribution balance.
C Model Architecture and Training
Configuration
We select Qwen3-32B as the base model (Yang
et al., 2025) for its performance on code genera-
tion tasks at a size we could fine-tune on available
hardware. Training uses Low-Rank Adaptation
(Hu et al., 2021) with rank-8 adapters andα= 16 ,
applied to the query, key, value, and output projec-
tions together with all feed-forward components,
plus 4-bit quantization via BitsAndBytes (Dettmers
et al., 2023) to reduce the memory footprint. None
of these choices are specific to automotive code:
they are a standard parameter-efficient recipe, re-
ported here for reproducibility rather than offered
as contributions.
Training runs on Amazon SageMaker with Py-
Torch DeepSpeed (Rasley et al., 2020), orches-
trated across multiple GPUs through SageMaker’s
remote function decorator, as shown in Listing 4.
Listing 4: SageMaker remote training configuration
1@remote(
2instance_type="ml.p4d.24xlarge",
3volume_size=100,
4use_torchrun=True,
5pre_execution_commands=[
6"pip install torch==2.5.1 transformers=
↪→=4.51.3",
7"pip install peft==0.15.2 deepspeed
↪→bitsandbytes",
8]
9)

CHK-8b30fae760c680ade6557416

4use_torchrun=True,
5pre_execution_commands=[
6"pip install torch==2.5.1 transformers=
↪→=4.51.3",
7"pip install peft==0.15.2 deepspeed
↪→bitsandbytes",
8]
9)
10def train_model(train_dataset, test_dataset,
↪→config):
11# Training implementation with adaptive
↪→DeepSpeed configuration
12stage = 2 if use_quantization else 3
13deepspeed_config = {
14"zero_optimization": {
15"stage": stage,
16"overlap_comm": True,
17"contiguous_gradients": True,
18"offload_optimizer": {"device": "
↪→cpu", "pin_memory": True}
19}
20}
We select the DeepSpeed ZeRO stage (Rajbhan-
dari et al., 2020) according to whether quantiza-
tion is enabled. ZeRO-2 partitions optimizer states
and gradients while replicating parameters on each
device; ZeRO-3 additionally partitions the param-
eters, which permits larger models at the cost of
communication overhead and, for our long prompts,
distributes the memory burden of storing full pa-
rameters. We default to ZeRO-2 under quantiza-
tion, since quantized parameters interact poorly
with ZeRO-3’s parameter-gathering, and ZeRO-2
also requires fewer all-gather operations. The re-
maining settings are conventional: gradient accu-
mulation for a larger effective batch size, gradient
checkpointing and CPU offloading to fit the model
in memory, Flash Attention 2 (Dao et al., 2022;
Dao, 2023), and NCCL with communication over-
lap and extended timeouts.

CHK-c50297ce263a8b6b3a8a4a34

ing and CPU offloading to fit the model
in memory, Flash Attention 2 (Dao et al., 2022;
Dao, 2023), and NCCL with communication over-
lap and extended timeouts. The one detail worth
flagging is that our prompts are long, since they
carry resolved requirement texts, UML fragments,
and header context, so context length rather than
model size drove most of our memory pressure.
The final model is packaged through Amazon
Bedrock’s custom model import functionality for
integration with the multi-model architecture. The
distributed setup reaches approximately 85% GPU
utilization with stable convergence, which kept
each fine-tuning cycle within a development sprint.
D Conversation Format Example
The training data utilizes HuggingFace’s chat tem-
plate (Hugging Face, 2024) to structure the auto-
motive coding task as a conversational interaction.
Listing 5 gives the full, untruncated version of the
example abbreviated as Listing 1 in Section 3.1,
showing both resolved requirement texts, the com-
plete PlantUML fragment, and the target implemen-
tation as it appears in training. This conversational
format supplies the model with the requirements,
safety level, and behavioral specification alongside
the signature, so that the obligations a function
must satisfy are present in the prompt rather than
inferred from the signature alone.
569

CHK-e12c4b4f7e7a2d6809de21b6

fication alongside
the signature, so that the obligations a function
must satisfy are present in the prompt rather than
inferred from the signature alone.
569

Listing 5: HuggingFace chat template example for auto-
motive C++ code
1training_example = {
2"messages": [
3{
4"role": "user",
5"content": """Implement the
↪→function:
6void ValidateEngineParameters(const
↪→EngineData_t * engineData,
↪→ValidationResult_t * result)
7
8with following specifications:
9/ **
10 * @brief Validates engine parameters according
↪→to AUTOSAR specification
11 * @param engineData Pointer to engine data
↪→structure containing RPM, temperature,
↪→pressure
12 * @param result Pointer to validation result
↪→structure
13 * @requirements REQ_ENG_001: Engine RPM must
↪→be within 800-6000 range
14 * @requirements REQ_ENG_002: Engine
↪→temperature must not exceed 110 degrees
↪→C
15 * @safety_level ASIL-D
16 */
17
18Requirements texts:
19REQ_ENG_001: The engine control unit shall
↪→validate that engine RPM remains within
↪→the
20operational range of 800 to 6000 RPM during
↪→normal operation.
21REQ_ENG_002: The engine control unit shall
↪→monitor engine coolant temperature and
↪→trigger
22protective measures when temperature exceeds
↪→110 degrees C.
23
24The behavior follows this UML diagram:
25@startuml
26ValidateEngineParameters -> CheckRPMRange :
↪→validate RPM
27CheckRPMRange -> CheckTemperature : if RPM

CHK-80684f99550323a9d9a5b4f5

24The behavior follows this UML diagram:
25@startuml
26ValidateEngineParameters -> CheckRPMRange :
↪→validate RPM
27CheckRPMRange -> CheckTemperature : if RPM
↪→valid
28CheckTemperature -> SetValidationResult : set
↪→result
29@enduml"""
30},
31{
32"role": "assistant",
33"content": """
34void ValidateEngineParameters(const
↪→EngineData_t * engineData,
↪→ValidationResult_t * result)
35{
36/ * MISRA-C 2012 Rule 1.3: No undefined
↪→behavior */
37if ((engineData == NULL) || (result == NULL
↪→))
38{
39if (result != NULL)
40{
41result->isValid = false;
42result->errorCode =
↪→VALIDATION_NULL_POINTER;
43}
44return;
45}
46
47/ * Initialize result structure */
48result->isValid = true;
49result->errorCode = VALIDATION_SUCCESS;
50
51/ * REQ_ENG_001: Validate RPM range (800-
↪→6000) */
52if ((engineData->rpm < 800U) || (engineData
↪→->rpm > 6000U))
53{
54result->isValid = false;
55result->errorCode =
↪→VALIDATION_RPM_OUT_OF_RANGE;
56return;
57}
58
59/ * REQ_ENG_002: Validate temperature limit
↪→(110 degrees C) */
60if (engineData->temperature > 110.0f)
61{
62result->isValid = false;
63result->errorCode =
↪→VALIDATION_TEMPERATURE_EXCEEDED;
64return;
65}
66/ * All validations passed (result pre-
↪→initialized to success) */
67}"""
68}
69]
70}
570
补充资料

中文译文

正文译文暂缺,以下为已译原文片段。

已译原文片段

引文译文 · 原文位置 209–809

面向安全关键型汽车软件工程的协作 Elizaveta Zinovyeva1、Aiham Taleb1、Nikita Kozodoi1、Daniel Schleicher1、Amir Mahdi Namazi2、Martin Kraus2、Levent Kent1、Brian Jensen1* 1 Amazon Web Services,德国;2 AUMOVIO,德国雷根斯堡 {zinovyee,aitaleb,kozodoi,dschlei,levkent,jensbri}@amazon.com {amir.mahdi.namazi,martin.2.kraus}@aumovio.com 摘要 关于编码智能体的研究主要关注代码生成质量。然而,安全关键型汽车软件还提出了两项额外要求。它优先考虑验证,因为每项变更都要经过审查、追溯到某项需求,

t Collaboration for Safety-Critical Automotive Software Engineering Elizaveta Zinovyeva1, Aiham Taleb1, Nikita Kozodoi1, Daniel Schleicher1, Amir Mahdi Namazi2,Martin Kraus 2,Levent Kent 1,Brian Jensen 1* 1Amazon Web Services, Germany, 2AUMOVIO, Regensburg, Germany {zinovyee,aitaleb,kozodoi,dschlei,levkent,jensbri}@amazon.com {amir.mahdi.namazi,martin.2.kraus}@aumovio.com Abstract Research on coding agents mainly focuses on generation quality. Yet, safety-critical automo- tive software makes two additional demands. It prioritizes verification, since every change is reviewed, traced to a requir

引文译文 · 原文位置 2915–3515

默认生成符合 MISRA 规范的代码(Umer,2025),而幻觉会带来切实的安全风险(Pavel 等,2025)。这对汽车软件编码助手提出了两项额外要求。 第一项要求是验证。在安全关键型场景中,开发者不能盲目接受大语言模型的输出,因为每项变更在提交前都必须经过审查、追溯到某项需求,并对照编码标准进行检查。因此,实际问题不仅是模型能否编写符合规范的代码,还在于智能体应如何与开发者协作,以便合规性能够被

e MISRA-compliant code by default (Umer, 2025), while hallucinations pose tangible safety risks (Pavel et al., 2025). This places two additional demands on coding assistants for automotive software. The first demand is verification. In safety-critical settings, developers cannot accept LLM output blindly, since every change is reviewed, traced to a requirement, and checked against coding standards before it can be committed. The practical question is therefore not only whether the model can write compliant code, but how the agent should collabo- rate with the developer so that compliance can b

引文译文 · 原文位置 32576–33070

e 其;(ii)通过提示工程以及在与每个函数必须满足的要求配对的生产代码上进行微调,使模型适应该领域。我们将其部署在 AUMOVIO 正在进行的汽车 C/C++ 项目中,评估模式符合性,并在生产环境中开展开发者试点。 我们的实验得出三项发现。首先,verify 是试点中使用最多的工具,开发者会在自己已有的代码上运行它,而不仅仅是在生成的输出上运行,这表明

e it; (ii) adapting the model to the domain through prompt engineering and fine-tuning on production code paired with the requirements each function must satisfy. We deploy it on AUMOVIO’s active automotive C/C++ projects, evaluate pattern con- formance, and run a developer pilot in production. Our experiments produce three findings. First, verify is the most-used tool in the pilot, and developers run it on their own existing code rather than only on generated output, which indicates that

已采集原文

访问来源网页

The Proceedings of the Second Workshop for REsearch on Agent Language Models (REALM 2026), pages 557–570 October 29, 2026 ©2026 Association for Computational Linguistics Generation and Verification: Human-Agent Collaboration for Safety-Critical Automotive Software Engineering Elizaveta Zinovyeva1, Aiham Taleb1, Nikita Kozodoi1, Daniel Schleicher1, Amir Mahdi Namazi2,Martin Kraus 2,Levent Kent 1,Brian Jensen 1* 1Amazon Web Services, Germany, 2AUMOVIO, Regensburg, Germany {zinovyee,aitaleb,kozodoi,dschlei,levkent,jensbri}@amazon.com {amir.mahdi.namazi,martin.2.kraus}@aumovio.com Abstract Research on coding agents mainly focuses on generation quality. Yet, safety-critical automo- tive software makes two additional demands. It prioritizes verification, since every change is reviewed, traced to a requirement, and checked against industry standards such as MISRA and AUTOSAR before it can be committed. It is also a narrow domain, written against layered architectures, embedded resource constraints, and organization-specific interface conventions that are scarce in the data general-purpose LLMs are trained on. We present a coding assistant for automotive C/C++ that addresses both demands. First, it exposes three tools to the user over the Model Context Protocol (generate, edit, and verify), allowing developers to run verify on any code on demand rather than relying on the agent to check its own output. Second, rather than us- ing a general-purpose model, we customize the underlying LLM for the automotive do- main through prompt engineering and fine- tuning. We construct a dataset from automotive production code of AUMOVIO, where each function is paired with the requirement texts and Unified Modeling Language (UML) be- havior it must satisfy. In a two-week pilot on active production projects, developers re- port verify as the most-used tool and con- firm using it on their own code and not only on generated output. Comparing model cus- tomization strategies, 75% prefer the faster prompt-engineered configuration. MISRA- and AUTOSAR-inspired pattern checkers indicate that prompt engineering achieves a lower num- ber of violations on C, while fine-tuning shows better conformance with architecture patterns for C++. *Work done while at Amazon Web Services. 1 Introduction Research on AI coding assistants is organized largely around generation quality (Jiang et al., 2024), asking whether a model produces code that compiles, passes tests, and resembles a reference implementation (Paul et al., 2024; Zheng et al., 2025). Automotive software development is adopt- ing these assistants as car makers seek productiv- ity gains (Hepp et al., 2025). Yet, they fall short of safety-critical requirements such as AUTOSAR (AUTOSAR, 2017) and MISRA-C (Association, 2013), which establish strict rules for reliability in automotive systems. Recent studies show that pop- ular LLMs struggle to produce MISRA-compliant code by default (Umer, 2025), while hallucinations pose tangible safety risks (Pavel et al., 2025). This places two additional demands on coding assistants for automotive software. The first demand is verification. In safety-critical settings, developers cannot accept LLM output blindly, since every change is reviewed, traced to a requirement, and checked against coding standards before it can be committed. The practical question is therefore not only whether the model can write compliant code, but how the agent should collabo- rate with the developer so that compliance can be verified, audited, and trusted. The second demand is domain fit. Automotive code must guarantee deterministic execution un- der real-time constraints, follow specific architec- tural patterns (e.g., AUTOSAR layered architec- ture) rarely encountered during pre-training, oper- ate under tight memory and resource constraints in embedded systems, and respect interface con- ventions particular to the organization that owns the codebase. A general-purpose model fits this 557

setting poorly, since the conventions it must follow are underrepresented in its training data (Cassano et al., 2024; Gu et al., 2025; Liu et al., 2023). This paper introduces an agentic assistant for automotive software, built on the Model Context Protocol (MCP) (Anthropic, 2024), that addresses both demands. We address the first demand by exposing verification as a separate tool. Rather than providing a single code generation mode, the system exposes three tools: generate, edit, and verify. The first two generate and revise function bodies from a signature, documentation, and context such as imported functions and UML diagrams. This task is central to automotive work- flows, where interfaces are specified upfront and implementations must follow established patterns. The third tool lets developers run the same auto- motive rule checks the agent uses internally, on demand and independently of generation. Most coding agents treat checking as an internal step that the agent itself decides to invoke. We argue that in safety-critical settings the developer must be able to trigger evaluation directly, because a check the agent can skip is not a reliable check. We address the second demand by customiz- ing the model to the domain. We build a dataset from an AUMOVIO’s production automotive code in which each function is paired with the con- text needed to implement it compliantly, includ- ing requirement texts resolved from AUMOVIO’s requirements-management system and the UML behavior the function must realize. On this dataset we compare the two customization strategies most used for code models (Shin et al., 2025; Freire et al., 2026): prompt engineering (PE) with general- purpose API models and domain-specific fine- tuning (FT) (Zirak and Hemmati, 2024), both scored against custom rule sets inspired by estab- lished automotive standards. PE here involves sup- plying the assembled context and the rule sets in full at inference time, rather than tuning instruction wording, so the two strategies differ in when the domain information reaches the model and not in what it contains. Because those rule sets are pattern matchers, we treat their output as pattern confor- mance rather than compliance, and report how that changes what the numbers support. The main contributions are the following. First, we present an MCP-based architecture in which verification is exposed as a tool the developer can invoke directly, on any code and at any time, and articulate the corresponding division of la- bor between human and agent in safety-critical review. Second, we implement a context engineer- ing pipeline that assembles requirement texts, UML behavior, and API context into training and infer- ence examples, which lets us compare PE against FT on the same domain information, differing in whether it arrives during training or at inference. We analyze how the two methods perform in terms of architecture and coding pattern violations and generation latency. Comparing against a human baseline of shipped production code, we find that generated C code scores better than code written by the engineers, and we show that this reflects what the checkers reward rather than a genuine quality advantage. Finally, we report results from a two- week pilot with nine developers from AUMOVIO and show how the three tools are taken up in a real-world production workflow. 2 Related Work Code generation and editing are part of the Ma- chine Learning on Code or Big Code research field (Allamanis et al., 2018). Code generation for automotive software dates back to the late 1980s and 1990s (Hanselmann, 1998; Hanselmann et al., 1999), where early systems used rule-based transformations; neural approaches have become feasible only recently with the advent of LLMs. Early neural code generation models such as Codex (Chen et al., 2021) and open-source counterparts demonstrated strong accuracy in general program- ming (Li et al., 2022; Wang et al., 2021; Ahmad et al., 2021), but struggle with domain-specific code due to gaps in specialized knowledge. Gu et al. (2025) show that general-purpose LLMs un- derperform in domain-specific contexts because they make limited use of domain-specific libraries, and their DomCoder approach recovers quality by injecting API knowledge through prompting and fine-tuning. Another work fine-tunes code mod- els on domain-specific corpora (Liu et al., 2023) and finds that developers expect assistants to under- stand specific frameworks and libraries, and their two-stage CodeGen4Libs outperforms non-domain- specific baselines. Which of the two customization strategies to prefer is unsettled. Shin et al. (2025) compare prompt engineering against 17 fine-tuned models on code summarization, generation, and translation, and find that prompting a stronger general-purpose model does not consistently win, while Freire et al. 558

(2026) report that LoRA fine-tuning beats few-shot prompting and retrieval on domain-specific text-to- code. This motivates our comparison of the two strategies on the same assembled context. For safety-critical domains, researchers integrate verification and domain constraints into genera- tion. Fakih et al. (2024)’s LLM4PLC combines fine-tuning with an iterative verification loop, im- proving code generation success rates from 47% to 72% and expert-rated quality from 2.25/10 to 7.75/10, while Jiang et al. (2025)’s ROCODE in- tegrates static analysis to reach a 99.1% compi- lation success rate. Recent work targets automo- tive compliance specifically: Kirchner and Knoll (2025) integrate LLMs into automotive develop- ment with test-driven development and iterative refinement; Umer (2025) finds that popular LLMs (ChatGPT, Gemini, DeepSeek, Copilot) produce no MISRA C++ compliant code by default; and Pavel et al. (2025) identify high rates of syntax viola- tions and API conflicts in GPT-4 variants that pose safety risks. Together, these indicate that domain- specific code generation requires both LLM adap- tation and domain-aware validation. Such valida- tion is typically placed inside the generation loop, where the model critiques and repairs its own out- put, but gains from self-repair are modest and bot- tlenecked by the model’s ability to judge its own code (Olausson et al., 2024), and models struggle to self-correct without external feedback (Huang et al., 2024; Stechly et al., 2024). A further stream studies coding assistants from a developer-productivity perspective, reporting faster task completion with GitHub Copilot (Peng et al.,

  1. and measuring suggestion acceptance and

satisfaction across a 400-developer enterprise roll- out (Bakal et al., 2025). Heydari (2025) argues that such evaluations still under-weigh how well a tool adapts to user expertise and supports collabo- ration. Productivity and adoption therefore depend not only on generation quality but on how the as- sistant supports oversight, which is amplified in safety-critical settings. A recent line of work reframes review of gener- ated code as a trust problem rather than a diffing problem. Heander et al. (2026) find, across a par- ticipatory design study with industry practitioners, that trust calibration is the central challenge when reviewing agent-generated multi-file changes, and argue that tools should surface risk and confidence signals at the granularity where reviewers allocate attention. Mitropoulos et al. (2026) supply the security argument for keeping the reviewer inde- pendent of the generator: automated review judg- ments are systematically swayed by how a change is framed, and an iterative attack that refines its framing against a local copy of the review pipeline succeeds in every case they test, since the attacker may retry while the defender has one chance to detect. Both motivate our design: verification the developer controls, rather than verification the gen- erating system elects to perform. Our work dif- fers from these lines in treating verification as a developer-invocable tool on par with generation, grounding the comparison in production code, and a pilot on an active automotive project rather than synthetic benchmarks. 3 Methodology Our coding assistant centers on an MCP-based framework compatible with modern AI coding as- sistants such as Cline, Claude Code and Codex, extending them with automotive-specific tools. We compare two ways of customizing the underly- ing model: prompt engineering (PE), which sup- plies domain knowledge at inference time, and fine-tuning (FT), which absorbs it into the pa- rameters. We evaluateQwen3-32B(Yang et al.,

  1. in three variants, PE, FT, and FT on curated

redundancy-removed data, and useClaude Sonnet 4andAmazon Nova Proin PE mode as baselines. 3.1 Dataset Preparation We build a context engineering pipeline to pro- cess an AUMOVIO’s production automotive C/C++ code into a structured dataset for fine-tuning and evaluation. The data comes from multiple actively maintained projects, so the examples reflect indus- try practices and compliance requirements. The pipeline parses C/C++ files to isolate individual functions, then augments each with the context a developer would consult when implementing it: header declarations and the signatures and docu- mentation of imported functions for API context, import statements and namespaces, and the require- ment and UML artifacts described next. It keeps only functions whose documentation is complete enough to specify behavior, validates them against our custom rule sets, and analyzes complexity for balanced stratification. The pipeline yields over 6,000 function implementations stratified by com- plexity, of which 822 are held out for evaluation. The step that distinguishes this setting from gen- 559

eral code generation is requirements traceability. In safety-critical automotive practice, an imple- mentation is not merely expected to work; it must be attributable to a specific requirement, and that link is what makes review and certification pos- sible. AUMOVIO’s code carries this link in a machine-readable form: Doxygen comments cite requirement identifiers, while the requirement texts live in a separate requirements-management sys- tem. Our pipeline parses DOORS (IBM, 2025) export XML to expand each cited identifier into its full requirement text, and likewise extracts ref- erenced PlantUML (PlantUML, 2025) diagrams to supply behavioral specifications. The pipeline also reconciles implementation signatures against their header declarations, correcting mismatches that would otherwise train the model on inconsis- tent interfaces. Each function’s prompt therefore states the complete obligation that the function is meant to satisfy. Listing 1 shows the resulting format of the con- structed function prompt, with the requirement text and UML fragment resolved in place. Appendix B details the extraction and filtering steps. 3.2 Model Customization In PE mode, model parameters stay fixed and all do- main knowledge enters through the prompt. Each request carries a system prompt that states the au- tomotive coding role and instructs the model to return a single function implementation based on the task context assembled by our pipeline: the function signature, its documentation and linked requirements, signatures and documentation of im- ported functions, and the UML diagram when one is referenced. The prompt also includes JSON rule sets the code needs to conform with, includ- ing conforming and non-conforming examples (see Section 3.3 for details). The rule sets are supplied in full rather than retrieved per request, since our subset is compact enough to fit the context win- dow of all models we test, which keeps the prompt identical across examples and avoids confounding retrieval quality with model capability. Because the assembled context is the same one used to build training examples, the two strategies work from the same domain information, differing in whether it arrives at inference time or during training. In FT mode, the same information is instead ab- sorbed into the parameters. We select Qwen3-32B as the base model and train it on the preprocessed function corpus formatted as user-assistant turns via HuggingFace chat templates, with the context as the user message and the human production im- plementation as the target, so the model learns the conventions its authors applied rather than a syn- thetic notion of compliant code. We use Low-Rank Adaptation (Hu et al., 2021) with rank-8 adapters to adapt the model while preserving general coding capabilities, with 4-bit quantization (Dettmers et al.,

  1. and gradient checkpointing to fit available

memory, on SageMaker with DeepSpeed (Rasley et al., 2020) for multi-GPU training (Appendix C). We train two variants: one on the full corpus and one on a curated version with near-duplicate func- tions removed. The resulting models are packaged through Amazon Bedrock’s custom model import functionality for integration with the multi-model MCP architecture. At inference, the FT models receive the same assembled context and rule sets as the PE models, so FT adds parameter adaptation on top of the PE condition. Listing 1: Abbreviated training example. Each numbered block is assembled by the pipeline from a different artifact in AUMOVIO’s repositories; requirement texts are resolved from DOORS identifiers cited in the Doxygen comment. Appendix D gives the full untruncated example. 1INPUT CONTEXT 2(1) Signature: void ValidateEngineParameters( 3const EngineData_t engineData, ValidationResult_t result) 4(2) Doxygen: @brief Validates engine parameters ... 5@requirements REQ_ENG_001, REQ_ENG_002 @safety_level ASIL-D 6(3) Requirements (resolved from DOORS): 7REQ_ENG_001: "... shall validate that engine RPM remains within the 8operational range of 800 to 6000 RPM ..." 9(4) UML (PlantUML, if referenced): 10ValidateEngineParameters -> CheckRPMRange : validate RPM 11(5) API context: signatures + docs of imported functions, header declarations 12(6) Rules (optional): JSON rule sets, see Listing 2 13 14OUTPUT 15if ((engineData == NULL) || (result == NULL)) { ... return; } / null guard / 16if ((engineData->rpm < 800U) || (engineData->rpm > 6000U)) / REQ_ENG_001 / 17{ result->errorCode = VALIDATION_RPM_OUT_OF_RANGE; return; } 560

3.3 Automotive Rule Sets Integration We build custom rule sets inspired by established automotive coding standards, covering patterns common in safety-critical embedded systems and prioritized by AUMOVIO’s engineers. TheCodingrules, 57 for C and 107 for C++, address pointer validation before dereferencing, buffer bounds checking, error return handling, and memory access patterns. TheArchitecturerules, 37 for C and 30 for C++, address layered architec- ture principles, interface design conventions, and module separation patterns typical in automotive software. Each rule carries one of four severity levels (info, warning, error, critical), mirroring the tiers used in static analysis tools. We review the rule sets with automotive engineers to confirm they target the patterns AUMOVIO prioritizes. The same rule sets serve two purposes: they supply context during code generation, and they act as scoring rubrics during evaluation (Section 4). We process the rule sets into a JSON format (see Listing 2) holding rule identifiers, descriptions, and pairs of conforming and non-conforming examples. 3.4 Deployment We package the solution as an MCP-based agen- tic coding assistant with three core tools, each mapping to a stage of the developer’s workflow: generate produces new function implementa- tions aware of custom rule sets from a specification or signature; edit makes contextual modifications using existing code for refactoring or extending; verifychecks code against the rule sets. In the standard MCP arrangement, an agent reads tool descriptions and selects tools autonomously, so a well-described checker is invoked whenever the agent judges a check useful. We retain this setup but also expose verify to developers directly. The concern is not that agents skip checks; it is that the model which produced a piece of code is poorly placed to judge whether that code warrants scrutiny. Safety-critical review practice resolves this through independence, where a different party controls the check. Exposing verify as a peer tool the developer invokes on demand preserves that independence. Our architecture (Figure 1) integrates with ex- isting development environments while maintain- ing separation between orchestration and special- ized generation models. This separation is what makes the assistant agentic: the developer works in an IDE plugin such as Cline, whose orchestra- tor model decides which MCP tool a task requires and dispatches the request rather than answering from its own weights. Requests route through API Gateway, authenticated via Cognito, to Lambda functions that invoke the models we host for the automotive domain, so the orchestrator sequences the calls while specialized models generate code. 4 Evaluation Setup Evaluating automotive code quality requires both automated metrics and human expertise. Table 2 in Appendix summarizes candidate metrics by type, tool availability, complexity, reliability, and cost, spanning reference-based similarity measures (Paul et al., 2024; Takaichi et al., 2022), static and dy- namic analysis, and standards conformance against MISRA (Association, 2013), CERT C (Seacord, 2008), and AUTOSAR (AUTOSAR, 2017). We do not adopt the similarity measures as primary metrics, since closeness to a reference implemen- tation is a weak proxy for the standards adherence developers must certify. Our evaluation covers three dimensions. First, we score code against the rule sets of Section 3.3, comparing generated functions to a human base- line of production code written before the assistant was introduced on 822 held-out functions (574 C, 248 C++). Second, we measure generation latency. Third, we pilot the assistant with automotive engi- neers and survey their usage patterns. Listing 2: Simplified C Example: Buffer Access Rule 1{"rule_id": "BUF_001", 2"rule_name": "Buffer Access Protection", 3"non_compliant_example": "memcpy(dest, src, len);", 4"compliant_example": 5"if (dest src len > 0 len <= DEST_SIZE len <= src_size) 6{ 7memcpy(dest, src, len); return SUCCESS; 8} 9return ERROR;"} 561

Figure 1: System architecture. The MCP server exposes three tools ( generate, edit, verify) that AI coding assistants invoke. Requests route through API Gateway to models on Amazon Bedrock or SageMaker. To score code automatically, we implement rule sets as pattern-based (regular-expression) static checkers. The rules they encode are drawn from verification patterns AUMOVIO already applies1, selected by engineers as high-impact patterns. They are a deliberately simplified subset of AUMOVIO’s verification process: rules requiring semantic, data- flow, or inter-procedural reasoning are excluded by construction, since a pattern matcher cannot decide them and may produce false positives and false negatives. Production use therefore requires established automotive linters. 5 Results 5.1 Pattern Conformance Evaluation Table 1 reports mean pattern-level rule violations per generated function alongside the observed end- to-end generation latency in seconds. Holding the base model fixed at Qwen3 32B, PE gives the fewest C violations on both checkers (1.22 coding, 0.54 architecture), ahead of either FT variant. On C++ the ordering reverses, with FT on curated data recording the fewest coding (1.25) and architecture (0.02) violations. These margins are thin: the architecture column separates all three Qwen variants by at most 0.08 violations per function, which we do not treat as a meaningful difference. The same curated variant is also the worst Qwen variant on both C checkers (1.67 each), so its C++ gain comes with a C cost rather than a uniform improvement. Across model families, Claude Sonnet 4 (PE) and Amazon Nova Pro (PE) produce more violations in both languages than the 1Licenses are required for the use of these standards. best Qwen3 32B variant. One plausible reading of the C versus C++ diver- gence is that the two rule families differ in locality. Our C rules mostly describe function-local obli- gations, such as validating a pointer before deref- erencing it or checking buffer bounds, which can be stated compactly in a prompt and applied by a general-purpose model without prior exposure to the codebase. The C++ architecture rules instead encode the AUMOVIO’s layering and interface conventions, which are longer-range, idiosyncratic to their projects, and largely absent from pretrain- ing data. These are difficult to convey exhaustively in a prompt but appear repeatedly in training ex- amples. If this reading is right, fine-tuning helps less by teaching C++ syntax than by absorbing organization-specific convention. Observed generation latency ranges from ∼15 seconds (Nova Pro, PE) to ∼110 seconds (Qwen3 32B, PE). Note that these figures are not a con- trolled comparison of the customization strategies, since PE models are served through a managed API while FT models run on separately provisioned inference infrastructure. At the same time, the numbers characterize what developers in our pilot actually waited for when using the assistant. The spread is wide enough to motivate hybrid serving, with faster models reserved for interactive editing and slower ones for long-form function generation. 5.2 Comparison with the Human Baseline Human production code records 2.45 and 2.20 vio- lations per function on the two C checkers, worse than every generated variant. Read naively, LLM- generated C code adheres to automotive rules better 562

Table 1: Automotive code generation: meanpattern-levelrule violations per function (lower is better) and observed end-to-end generation latency. Counts reflect conformance to patterns our custom checkers can match, not MISRA/AUTOSAR compliance or functional correctness. Models are evaluated on 822 test examples (574 C, 248 C++) from production automotive code.Bold= best per column; underline = worst per column. Model Coding patterns (C) Architecture patterns (C) Coding patterns (C++) Architecture patterns (C++) Generation latency (s) Qwen3 32B (PE)1.22 0.541.73 0.10 110.19 Qwen3 32B (FT) 1.31 0.84 1.81 0.09 93.69 Qwen3 32B (FT, curated) 1.67 1.67 1.250.0285.34 Sonnet 4 (PE) 1.80 1.84 2.61 0.12 28.68 Nova Pro (PE) 1.63 1.48 2.88 0.24 14.62 Human code (production) 2.45 2.20 0.840.06 N/A than code written by the AUMOVIO’s own engi- neers and shipped in production vehicles. However, inspecting the outputs hints why this reading does not hold: generated functions apply defensive con- structs, with null checks on pointer parameters, ex- plicit bounds checks, single-exit control flow, and explicit error returns, and our checkers reward these surface patterns. Human code frequently omits a local null check because the invariant holds else- where, at a caller or through a module-level pre- condition that the author knows to hold and that a pattern matcher cannot see. The checker counts an absent local check as a violation whether or not the property holds non-locally, so it penalizes code that reasons beyond the function boundary and rewards code that re-checks everything. Such redundancy is not free in embedded settings, where extra branches cost code space and complicate timing analysis. The C++ results point the other way, with human code best on coding patterns (0.84). Our C++ rule sets weight architectural and interface conventions more heavily than local defensive checks, so uni- form guard insertion earns less credit there, while the AUMOVIO’s own code follows conventions its authors apply routinely. Together, the results sug- gest the checkers measure how closely code resem- bles a pattern vocabulary, which generated code matches well when the rules are local and less well when they encode organization-specific structure. The problem is that a pattern-matching proxy for a standard can be optimized without being satisfied: a model raises its score by emitting recognized con- structs rather than by producing safer code. Such checkers are therefore limited but are still useful as a fast pre-commit filter and as generation context. 5.3 Pilot Study with Developers Pattern conformance metrics describe what the models can produce in isolated tasks. To test the ac- tual human-agent collaboration, we run a two-week pilot with nine of the AUMOVIO’s developers and analyze post-usage survey results. Pilot participants are automotive engineers on AUMOVIO’s active C/C++ projects, recruited vol- untarily from teams scheduled to trial AI assistance. Each installs the MCP server into Cline and works on their own production tasks rather than assigned benchmarks. All three tools are exposed through MCP descriptions, so the assistant can select them autonomously, and verify is additionally docu- mented as directly invocable. Evidence comes from a concluding survey cov- ering experience, usage frequency, tool usage, use- fulness, and other aspects. Every quantity is self- reported, since we collect no telemetry on invoca- tion counts. Note that with nine respondents, we read only large gaps in the results as informative. Developers rate their overall experience with the assistant 3.89 out of 5, and their willingness to rec- ommend it to colleagues 4.00 out of 5. On average, the productivity improvements is marked at 4.67 on a seven-point scale. The distributions behind these means are more informative: no respondent gives the lowest rating on any item, but none is unanimous: experience draws 3 top ratings vs 1 low, recommendation – 4 top against 3 at or below the midpoint Figure 2 provides more detail on us- ability: 8 of 9 respondents find the assistant easy to integrate, and 5 of 9 rate its reasoning accurate against 4 neutral and none inaccurate. Usage does not settle at a middle value: four of nine respon- 563

0 25 50 75 100% Share of respondents Easy to access Standards conformance Reasoning accuracy Usage frequency Yes 89% Somewhat 11% Always 11% Mostly 56% Sometimes 22% Never 11% Accurate 56% Neutral 44% Daily 45% Rarely 44% Setup 11% How the assistant was judged (best to worst, left to right) 0 25 50 75 100% Share of respondents Most-used tool Model preference verify 40% generate 30% edit 30% PE 75% FT 25% Which tool and which model developers reached for Figure 2: Pilot survey response distributions (n=9 developers). The upper panel holds judgments of the assistant, ordered from most to least favorable; the lower panel holds choices among tools and modes. Denominators differ by item, since not every respondent answered every question; raw counts are given in the text. Only large gaps are informative and percentages are rounded to sum to 100. “Setup” denotes participants who installed the assistant but reported no working use. All responses are self-reported. dents use the assistant daily and four use it rarely, forming two distinct user populations. Three patterns stand out in the survey results. First, 6 of the 8 respondents who answered this question prefer the PE mode. The PE configura- tions served in the pilot include the API-hosted models, which answer in roughly 15 to 29 seconds against 85 to 94 for the FT models (Table 1), so mode preference and response time are confounded here. Combined with developer feedback, we read this as evidence that in tight read-edit-review loops generation latency behaves as a key property. Second, 6 of 9 developers report conformance alwaysormost of the time, but only one of them answersalways, while 2 answersometimesand 1 never. This matters because in Table 1 the same models score at or better than human code on rule set conformance. Developers do not internalize the favorable automated numbers as trust. Third, verify draws the largest share of most- used-tool responses (4 of 10 selections, against 3 each for generate and edit; the item permit- ted multiple selections) and the largestvery useful share. Respondents also run verify on existing human-written code, not only on generated output, a use a generation-only assistant would not support. 6 Conclusion AI assistance helps safety-critical development only if built around how such code is accepted: reviewed, traced to a requirement, checked before commit. We present an MCP-based coding assis- tant addressing this by: (i) treating verification as a peer of generation rather than a step hidden inside it; (ii) adapting the model to the domain through prompt engineering and fine-tuning on production code paired with the requirements each function must satisfy. We deploy it on AUMOVIO’s active automotive C/C++ projects, evaluate pattern con- formance, and run a developer pilot in production. Our experiments produce three findings. First, verify is the most-used tool in the pilot, and developers run it on their own existing code rather than only on generated output, which indicates that verification is used as a first-class step. Second, with the base model held fixed, PE gives fewer C violations while the C++ counts separate the two strategies by margins too small to call, so we do not read either as the better choice. Third, developers prefer the faster configuration and do not fully trust the output despite its scores. Together, these results suggest that coding assis- tants for safety-critical domains should be judged on more than generation quality. What mattered to our developers was checking code themselves, get- ting answers fast enough to stay in a review loop, and knowing where the automated verdict held. Acknowledgments We thank the wider AUMOVIO team who sup- ported us throughout the project. We are especially grateful to Stefan-Cosmin Grigoriu for his support. 564

Limitations Our evaluation has several limitations. Section 4 states what our pattern checkers can and cannot show, and Section 5.2 shows they favor generated code. We also report no functional correctness: no compilation or unit-test pass rates, and no check that a function satisfies the requirements or UML behavior in its prompt. On the model comparison, we use parameter- efficient LoRA fine-tuning rather than full fine- tuning, and run no ablations over prompt design, context elements, or rule-set inclusion. We report no significance tests, so the small C++ margins should not be read as ranking the strategies. La- tency was measured on different serving stacks, so it describes our deployment rather than the general strategies. On the human evidence, the pilot has nine self- selected developers working with the assistant for two weeks. Everything is self-reported, with no telemetry and no record of whether generated code was committed or how much it was edited first, so the results are directional signals rather than effect estimates. Finally, all data comes from one organization, and the code, rule sets, and checkers are proprietary and cannot be released publicly. Ethical Considerations Defective code in the automotive setting can harm people, so the assistant is not meant to automate compliance work: everything it produces needs re- view by qualified engineers. Three failure modes matter in deployment.False confidence, where code that passes pattern checks still violates func- tional or timing requirements; Section 5.2 is a con- crete case, since adding defensive patterns every- where raises the score without making the code safer, and the extra branches can themselves af- fect code size and worst-case execution time.Cor- related blind spots, where the generator and the checker share a model family and miss the same defect twice, which is why we keep the checker independent of the generator and why extending the architecture to test generation would need the same separation.Conformance drift, where non- conforming code spreads through reuse. Human approval gates, keeping the checker independent of the generator, and logging prompts, context, model IDs, and analyzer reports all help. We ran no red-teaming and did not test whether the assistant can be pushed into producing insecure code, tricked into evading the checkers, or made to introduce vulnerabilities our rules do not cover. Production readiness would require that work. The study uses AUMOVIO’s proprietary code under their data governance. Pilot participation was voluntary, and we collected no personal data beyond anonymized survey responses. References Wasi Ahmad, Saikat Chakraborty, Baishakhi Ray, and Kai-Wei Chang. 2021. Unified pre-training for pro- gram and natural languages.Findings of the Associ- ation for Computational Linguistics: ACL-IJCNLP 2021, pages 2403–2417. Miltiadis Allamanis, Earl T Barr, Premkumar Devanbu, and Charles Sutton. 2018. A survey of machine learn- ing for big code and naturalness.ACM Computing Surveys (CSUR), 51(4):1–37. Anthropic. 2024. Model context protocol. https: //modelcontextprotocol.io/ . Accessed: 2025-01-15. Motor Industry Software Reliability Association. 2013. MISRA-C: 2012: Guidelines for the Use of the C Language in Critical Systems. MISRA. AUTOSAR. 2017. Guidelines for the use of the c++ 14 language in critical and safety-related systems. Gal Bakal, Ali Dasdan, Yaniv Katz, Michael Kaufman, and Guy Levin. 2025. Experience with GitHub Copi- lot for developer productivity at Zoominfo.arXiv preprint arXiv:2501.13282. Federico Cassano, John Gouwar, Francesca Lucchetti, Claire Schlesinger, Anders Freeman, Carolyn Jane Anderson, Molly Q Feldman, Michael Greenberg, Abhinav Jangda, and Arjun Guha. 2024. Knowledge transfer from high-resource to low-resource program- ming languages for code LLMs.Proceedings of the ACM on Programming Languages, 8(OOPSLA2). Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Ka- plan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. 2021. Evaluating large language models trained on code.arXiv preprint arXiv:2107.03374. Tri Dao. 2023. Flashattention-2: Faster attention with better parallelism and work partitioning.Preprint, arXiv:2307.08691. Tri Dao, Daniel Y . Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. 2022. Flashattention: Fast and memory-efficient exact attention with io-awareness. Preprint, arXiv:2205.14135. Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. 2023. Qlora: Efficient finetuning of quantized llms.arXiv preprint arXiv:2305.14314. 565

Doxygen. 2025. Doxygen. https://doxygen.nl /. Accessed: 2025-08-12. Mohamad Fakih, Rahul Dharmaji, Yasamin Moghaddas, Gustavo Quiros Araya, Oluwatosin Ogundare, and Mohammad Abdullah Al Faruque. 2024. Llm4plc: Harnessing large language models for verifiable pro- gramming of plcs in industrial control systems. In Proceedings of the 46th International Conference on Software Engineering: Software Engineering in Practice (ICSE SEIP). ACM. Luís Freire, Fernanda A. Andaló, and Nicki Skafte Detlefsen. 2026. Exploring different approaches to customize language models for domain- specific text-to-code generation.arXiv preprint arXiv:2603.16526. Xiaodong Gu, Meng Chen, Yalan Lin, Yuhan Hu, Hongyu Zhang, Chengcheng Wan, Zhao Wei, Yong Xu, and Juhong Wang. 2025. On the effectiveness of large language models in domain-specific code gen- eration.ACM Transactions on Software Engineering and Methodology, 34(3):1–22. Herbert Hanselmann. 1998. Development speed-up for electronic control systems. Technical report, SAE Technical Paper. Herbert Hanselmann, Ulrich Kiffmeier, Lutz Köster, and Martin Meyer. 1999. Automatic generation of production quality code for ecus.SAE transactions, pages 1625–1633. Lo Gullstrand Heander, Agnia Sergeyuk, Ilya Za- kharov, Emma Söderberg, and Nikita Mukhortov.

  1. Trust-calibrated code review: A participatory

design study of review workflows for LLM-generated multi-file changes.arXiv preprint arXiv:2606.01969. Dominik Hepp, Michael Amroudi, Martin Harrysson, Mateusz Wozniak, and Lukasz Maslaniec. 2025. From engines to algorithms: Gen ai in automotive software development. Soroush Heydari. 2025. A human centric requirements engineering framework for assessing GitHub Copilot output.arXiv preprint arXiv:2508.03922. Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2021. Lora: Low-rank adaptation of large language models.Preprint, arXiv:2106.09685. Jie Huang, Xinyun Chen, Swaroop Mishra, Huaixiu Steven Zheng, Adams Wei Yu, Xiny- ing Song, and Denny Zhou. 2024. Large language models cannot self-correct reasoning yet. InInter- national Conference on Learning Representations (ICLR). Hugging Face. 2024. Chat templates. https://hu ggingface.co/docs/transformers/v4. 47.1/en/chat_templating. Accessed: 2025- 08-12. IBM. 2025. IBM engineering requirements manage- ment DOORS. https://www.ibm.com/docs /en/engineering-lifecycle-managem ent-suite/doors/9.7.0?topic=overv iew-doors. Accessed: 2025-08-12. Juyong Jiang, Fan Wang, Jiasi Shen, Sungju Kim, and Sunghun Kim. 2024. A survey on large lan- guage models for code generation.arXiv preprint arXiv:2406.00515. Xue Jiang, Yihong Dong, Yongding Tao, Huanyu Liu, Zhi Jin, and Ge Li. 2025. Rocode: Integrating back- tracking mechanism and program analysis in large language models for code generation. InProceed- ings of the 47th International Conference on Software Engineering (ICSE). Research Track. Sven Kirchner and Alois C. Knoll. 2025. Generating au- tomotive code: LLMs for software development and verification in safety-critical systems.arXiv preprint arXiv:2506.04038. Yujia Li, David Choi, et al. 2022. Competition- level code generation with alphacode.Science, 378(6624):1092–1097. Mingwei Liu, Tianyong Yang, Yiling Lou, Xueying Du, Ying Wang, and Xin Peng. 2023. Codegen4libs: A two-stage approach for library-oriented code genera- tion. InProceedings of the 38th IEEE/ACM Interna- tional Conference on Automated Software Engineer- ing (ASE), Kirchberg, Luxembourg. IEEE. Dimitris Mitropoulos, Nikolaos Alexopoulos, Geor- gios Alexopoulos, and Diomidis Spinellis. 2026. Measuring and exploiting contextual bias in LLM- assisted security code review.arXiv preprint arXiv:2603.18740. Theo X. Olausson, Jeevana Priya Inala, Chenglong Wang, Jianfeng Gao, and Armando Solar-Lezama.

  1. Is self-repair a silver bullet for code gener-

ation? InInternational Conference on Learning Representations (ICLR). Debalina Ghosh Paul, Hong Zhu, and Ian Bayley. 2024. Benchmarks and metrics for evaluations of code gen- eration: A critical review. In2024 IEEE Interna- tional Conference on Artificial Intelligence Testing (AITest), pages 87–94. IEEE. Marc Pavel, Nenad Petrovic, Lukasz Mazur, Vahid Zolfaghari, Fengjunjie Pan, and Alois Knoll.

  1. Hallucination in LLM-based code genera-

tion: An automotive case study.arXiv preprint arXiv:2508.11257. Sida Peng, Eirini Kalliamvakou, Peter Cihon, and Mert Demirer. 2023. The impact of AI on developer pro- ductivity: Evidence from GitHub Copilot.arXiv preprint arXiv:2302.06590. PlantUML. 2025. PlantUML language reference guide. https://plantuml.com/guide . Accessed: 2025-08-12. 566

Samyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, and Yuxiong He. 2020. Zero: Memory optimizations toward training trillion parameter models.Preprint, arXiv:1910.02054. Jeff Rasley, Samyam Rajbhandari, Olatunji Ruwase, and Yuxiong He. 2020. Deepspeed: System optimiza- tions enable training deep learning models with over 100 billion parameters. InProceedings of the 26th ACM SIGKDD International Conference on Knowl- edge Discovery & Data Mining, pages 3505–3506. Robert C Seacord. 2008.The CERT C secure coding standard. Pearson Education. Jiho Shin, Clark Tang, Tahmineh Mohati, Maleknaz Nayebi, Song Wang, and Hadi Hemmati. 2025. Prompt engineering or fine-tuning: An empirical as- sessment of LLMs for code. InProceedings of the 22nd IEEE/ACM International Conference on Mining Software Repositories (MSR). Kaya Stechly, Karthik Valmeekam, and Subbarao Kamb- hampati. 2024. On the self-verification limitations of large language models on reasoning and planning tasks.arXiv preprint arXiv:2402.08115. Riku Takaichi, Yoshiki Higo, Shinsuke Matsumoto, Shinji Kusumoto, Toshiyuki Kurabayashi, Hiroyuki Kirinuki, and Haruto Tanno. 2022. Are nlp metrics suitable for evaluating generated code? InInter- national Conference on Product-Focused Software Process Improvement, pages 531–537. Springer. Malik Muhammad Umer. 2025. Comparative analysis of code generated by popular LLMs for MISRA C++ compliance.arXiv preprint arXiv:2506.23535. Yue Wang, Weishi Wang, Shafiq Joty, and Steven C. H. Hoi. 2021. Codet5: Identifier-aware unified pre- trained encoder-decoder models for code understand- ing and generation. InProceedings of the 2021 Con- ference on Empirical Methods in Natural Language Processing, pages 8696–8708, Punta Cana. Associa- tion for Computational Linguistics. An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, Chujie Zheng, Day- iheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao Ge, Haoran Wei, Huan Lin, Jialong Tang, and 41 others. 2025. Qwen3 technical report.Preprint, arXiv:2505.09388. Jiasheng Zheng, Boxi Cao, Zhengzhao Ma, Ruotong Pan, Hongyu Lin, Yaojie Lu, Xianpei Han, and Le Sun. 2025. Beyond correctness: Benchmarking multi-dimensional code generation for large language models. InFindings of the Association for Computa- tional Linguistics. Armin Zirak and Hadi Hemmati. 2024. Improving auto- mated program repair with domain adaptation.ACM Transactions on Software Engineering and Method- ology, 33(3):1–43. 567

A Evaluation Metrics Overview Choosing what to measure is itself a decision when evaluating safety-critical automotive code, since no single metric captures its quality and the practical options differ in how much tooling they need and how much their verdicts can be trusted. Table 2 surveys the metric families we considered, rating each on tool support, implementation complexity, reliability, and cost. The comparison motivates the choices in Section 4: we rely on standards conformance, which combines high tool support with high reliability, and on support metrics such as latency, while declining reference-based similarity measures whose reliability is only moderate and whose relevance to certification is weak. B Dataset Preprocessing Pipeline This appendix expands the pipeline summarized in Section 3.1. The preprocessing pipeline begins by traversing automotive C/C++ repositories to extract individual functions along with their surrounding context, which includes: • Function Documentation: Both Doxygen- style comments (Doxygen, 2025) and inline documentation are extracted and linked to their corresponding function implementations • System Requirements: The pipeline parses DOORS export XML files (IBM, 2025) to map requirement identifiers mentioned in function documentation to their full require- ment texts • Architectural Context: PlantUML diagrams (PlantUML, 2025) referenced in documenta- tion are extracted and included to provide be- havioral specifications •Code API Context: Related header files and their function signatures are gathered to pro- vide information about available APIs and data structures Header linking works as follows: the system identifies the main header file corresponding to each C/C++ source file and extracts additional con- text from included dependencies, so that generated code can reference existing APIs rather than reim- plementing them. The context aggregation process is implemented as follows: Listing 3: Context aggregation from preprocessing pipeline 1def create_training_example(function_info): 2user_message = f"Implement the function: { ↪→function_info[’signature’]}\n\n" 3 4if function_info[’documentation’]: 5user_message += f"with following ↪→specifications:\n{function_info ↪→[’documentation’]}" 6 7if function_info[’requirements’]: 8user_message += f"\n\nRequirements ↪→texts:\n{function_info[’ ↪→requirements’]}" 9 10if function_info[’uml_diagram’]: 11user_message += f"\n\nThe behavior ↪→follows this UML diagram:\n{ ↪→function_info[’uml_diagram’]}" 12 13return { 14"messages": [ 15{"role": "user", "content": ↪→user_message}, 16{"role": "assistant", "content": ↪→function_info[’ ↪→implementation’]} 17] 18} For quality filtering and validation, the prepro- cessing pipeline implements several quality assur- ance mechanisms: • Function Signature Validation: Automat- ically corrects function signatures in imple- Table 2: Evaluation metrics for automotive code quality assessment. Each category is rated on Tool Support (availability of automated tools), Complexity (implementation effort), Reliability (consistency of results), and Cost (resources required). High = better, except for Cost and Complexity where low is preferable. Category Example Metrics Tool Support Complexity Reliability Cost ML Static Analysis BLEU, ROUGE, METEOR High Medium Medium Low Static Analysis Linters, Complexity High Low High Medium Dynamic Analysis Coverage, Runtime Medium High High High Standards Compliance Industry Coding Standards High Medium High Medium (e.g., MISRA, CERT C) Support Metrics Latency, Time Low Low Medium Low Business KPIs ROI, Time-to-Market, Productivity Low Low Low Medium 568

mentation files by matching them against header file declarations • Documentation Completeness: Only func- tions whose documentation specifies the in- tended behavior are included in the training set • Code Compliance: Functions are validated against AUTOSAR (AUTOSAR, 2017) and MISRA-C (Association, 2013) patterns to as- sess the initial compliance level Finally, to ensure balanced representation across different code complexity levels, the preprocessing pipeline implements stratified sampling based on function length and complexity. This approach cre- ates training and test sets that maintain consistent distribution characteristics. The resulting dataset contains approximately 6,000 high-quality function implementations with their complete contextual in- formation, split into training and evaluation sets while maintaining complexity distribution balance. C Model Architecture and Training Configuration We select Qwen3-32B as the base model (Yang et al., 2025) for its performance on code genera- tion tasks at a size we could fine-tune on available hardware. Training uses Low-Rank Adaptation (Hu et al., 2021) with rank-8 adapters andα= 16 , applied to the query, key, value, and output projec- tions together with all feed-forward components, plus 4-bit quantization via BitsAndBytes (Dettmers et al., 2023) to reduce the memory footprint. None of these choices are specific to automotive code: they are a standard parameter-efficient recipe, re- ported here for reproducibility rather than offered as contributions. Training runs on Amazon SageMaker with Py- Torch DeepSpeed (Rasley et al., 2020), orches- trated across multiple GPUs through SageMaker’s remote function decorator, as shown in Listing 4. Listing 4: SageMaker remote training configuration 1@remote( 2instance_type="ml.p4d.24xlarge", 3volume_size=100, 4use_torchrun=True, 5pre_execution_commands=[ 6"pip install torch==2.5.1 transformers= ↪→=4.51.3", 7"pip install peft==0.15.2 deepspeed ↪→bitsandbytes", 8] 9) 10def train_model(train_dataset, test_dataset, ↪→config): 11# Training implementation with adaptive ↪→DeepSpeed configuration 12stage = 2 if use_quantization else 3 13deepspeed_config = { 14"zero_optimization": { 15"stage": stage, 16"overlap_comm": True, 17"contiguous_gradients": True, 18"offload_optimizer": {"device": " ↪→cpu", "pin_memory": True} 19} 20} We select the DeepSpeed ZeRO stage (Rajbhan- dari et al., 2020) according to whether quantiza- tion is enabled. ZeRO-2 partitions optimizer states and gradients while replicating parameters on each device; ZeRO-3 additionally partitions the param- eters, which permits larger models at the cost of communication overhead and, for our long prompts, distributes the memory burden of storing full pa- rameters. We default to ZeRO-2 under quantiza- tion, since quantized parameters interact poorly with ZeRO-3’s parameter-gathering, and ZeRO-2 also requires fewer all-gather operations. The re- maining settings are conventional: gradient accu- mulation for a larger effective batch size, gradient checkpointing and CPU offloading to fit the model in memory, Flash Attention 2 (Dao et al., 2022; Dao, 2023), and NCCL with communication over- lap and extended timeouts. The one detail worth flagging is that our prompts are long, since they carry resolved requirement texts, UML fragments, and header context, so context length rather than model size drove most of our memory pressure. The final model is packaged through Amazon Bedrock’s custom model import functionality for integration with the multi-model architecture. The distributed setup reaches approximately 85% GPU utilization with stable convergence, which kept each fine-tuning cycle within a development sprint. D Conversation Format Example The training data utilizes HuggingFace’s chat tem- plate (Hugging Face, 2024) to structure the auto- motive coding task as a conversational interaction. Listing 5 gives the full, untruncated version of the example abbreviated as Listing 1 in Section 3.1, showing both resolved requirement texts, the com- plete PlantUML fragment, and the target implemen- tation as it appears in training. This conversational format supplies the model with the requirements, safety level, and behavioral specification alongside the signature, so that the obligations a function must satisfy are present in the prompt rather than inferred from the signature alone. 569

Listing 5: HuggingFace chat template example for auto- motive C++ code 1training_example = { 2"messages": [ 3{ 4"role": "user", 5"content": """Implement the ↪→function: 6void ValidateEngineParameters(const ↪→EngineData_t * engineData, ↪→ValidationResult_t * result) 7 8with following specifications: 9/ ** 10 * @brief Validates engine parameters according ↪→to AUTOSAR specification 11 * @param engineData Pointer to engine data ↪→structure containing RPM, temperature, ↪→pressure 12 * @param result Pointer to validation result ↪→structure 13 * @requirements REQ_ENG_001: Engine RPM must ↪→be within 800-6000 range 14 * @requirements REQ_ENG_002: Engine ↪→temperature must not exceed 110 degrees ↪→C 15 * @safety_level ASIL-D 16 */ 17 18Requirements texts: 19REQ_ENG_001: The engine control unit shall ↪→validate that engine RPM remains within ↪→the 20operational range of 800 to 6000 RPM during ↪→normal operation. 21REQ_ENG_002: The engine control unit shall ↪→monitor engine coolant temperature and ↪→trigger 22protective measures when temperature exceeds ↪→110 degrees C. 23 24The behavior follows this UML diagram: 25@startuml 26ValidateEngineParameters -> CheckRPMRange : ↪→validate RPM 27CheckRPMRange -> CheckTemperature : if RPM ↪→valid 28CheckTemperature -> SetValidationResult : set ↪→result 29@enduml""" 30}, 31{ 32"role": "assistant", 33"content": """ 34void ValidateEngineParameters(const ↪→EngineData_t * engineData, ↪→ValidationResult_t * result) 35{ 36/ * MISRA-C 2012 Rule 1.3: No undefined ↪→behavior */ 37if ((engineData == NULL) || (result == NULL ↪→)) 38{ 39if (result != NULL) 40{ 41result->isValid = false; 42result->errorCode = ↪→VALIDATION_NULL_POINTER; 43} 44return; 45} 46 47/ Initialize result structure / 48result->isValid = true; 49result->errorCode = VALIDATION_SUCCESS; 50 51/ * REQ_ENG_001: Validate RPM range (800- ↪→6000) */ 52if ((engineData->rpm < 800U) || (engineData ↪→->rpm > 6000U)) 53{ 54result->isValid = false; 55result->errorCode = ↪→VALIDATION_RPM_OUT_OF_RANGE; 56return; 57} 58 59/ * REQ_ENG_002: Validate temperature limit ↪→(110 degrees C) */ 60if (engineData->temperature > 110.0f) 61{ 62result->isValid = false; 63result->errorCode = ↪→VALIDATION_TEMPERATURE_EXCEEDED; 64return; 65} 66/ * All validations passed (result pre- ↪→initialized to success) */ 67}""" 68} 69] 70} 570

原文依据