A well-known testing method for the safety evaluation and real-time validation of automotive software systems (ASSs) is Fault Injection (FI). In accordance with the ISO 26262 standard, the faults are introduced artificially for the purpose of analyzing the safety properties and verifying the safety mechanisms during the development phase. However, the current FI method and tools have a significant limitation in that they require manual identification of FI attributes, including fault type, location and time. The more complex the system, the more expensive, time-consuming and labour-intensive the process. To address the aforementioned challenge, a novel Large Language Models (LLMs)-assisted fault test cases (TCs) generation approach for utilization during real-time FI tests is proposed in this paper. To this end, considering the representativeness and coverage criteria, the applicability of various LLMs to create fault TCs from the functional safety requirements (FSRs) has been investigated. Through the validation results of LLMs, the superiority of the proposed approach utilizing gpt-4o in comparison to other state-of-the-art models has been demonstrated. Specifically, the proposed approach exhibits high performance in terms of FSRs classification and fault TCs generation with F1-score of 88% and 97.5%, respectively. To illustrate the proposed approach, the generated fault TCs were executed in real time on a hardware-in-the-loop system, where a high-fidelity automotive system model served as a case study. This novel approach offers a means of optimizing the real-time testing process, thereby reducing costs while simultaneously enhancing the safety properties of complex safety-critical ASSs.
翻译:故障注入(FI)是汽车软件系统(ASSs)安全性评估与实时验证中一种广为人知的测试方法。根据ISO 26262标准,在开发阶段人为引入故障,旨在分析安全属性并验证安全机制。然而,当前的FI方法及工具存在一个显著局限:需要人工识别故障属性,包括故障类型、位置与时间。系统越复杂,该过程成本越高、耗时越长且人力投入越大。为应对上述挑战,本文提出了一种新颖的、基于大语言模型(LLMs)辅助的故障测试用例(TCs)生成方法,用于实时FI测试。为此,考虑到代表性与覆盖准则,本文研究了多种LLMs从功能安全需求(FSRs)生成故障TCs的适用性。通过LLMs的验证结果,证明了所提出的利用gpt-4o的方法相较于其他先进模型的优越性。具体而言,所提方法在FSRs分类和故障TCs生成方面表现出高性能,F1分数分别达到88%和97.5%。为说明所提方法,生成的故障TCs在一个硬件在环系统上实时执行,其中以高保真汽车系统模型作为案例研究。这一新颖方法为优化实时测试过程提供了一种途径,从而在降低复杂安全关键ASSs成本的同时,增强了其安全属性。