arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.25650cs.SEcs.SYeess.SY
收藏

利用大型语言模型对基于FMU的仿真进行黑盒测试

Using Large Language Models for Black-Box Testing of FMU-Based Simulations

Åbo Akademi University(奥博学术大学);Novia University of Applied Sciences(诺维亚应用科学大学);University of Turku(图尔库大学)

Abdullah Mughees, Gaadha Sudheerbabu, Tanwir Ahmad, Dragos Truscan, Mikael Manngård, Kristian Klemets

AI总结:

本文提出利用大型语言模型生成动态仿真模型的测试场景,通过结构化目标减少手动工作量并提高结果可解释性。

摘要:

我们提出了一种人机协同的方法,利用大型语言模型(LLMs)对功能模拟单元(FMUs)进行黑盒测试。该方法以FMU的功能和接口规范为输入,提示LLM生成以Given-When-Then格式定义的结构化场景目标,指定仿真初始输入条件、可能的条件变化及系统预期输出行为。对应的场景计划指定输入模式并添加断言 oracle 描述场景目标中的预期输出模式。该方法生成完整的输入时间序列,运行FMU仿真并评估断言。生成的场景和结果用于评估和后续重执行。我们在润滑油冷却系统上评估了该方法,并讨论了使该方法适用于日常使用的设计选择。结果表明,LLM辅助的场景生成可以促进动态仿真模型的自动测试设计和验证。

英文摘要:

We propose a human in the loop approach for black-box testing of Functional Mock-up Units (FMUs) using Large Language Models (LLMs). The goal is to reduce the manual effort in defining test scenarios for dynamic simulation models and to improve the interpretability of results. The approach takes the functional and interface specifications of an FMU as input, and prompts an LLM to generate structured scenario goals in Given-When-Then format that define the initial input conditions of the simulation, a possible change in those conditions, and the expected output behaviour of the system against those changes. The corresponding scenario plans specify input patterns and add assertion oracles that describe expected output patterns defined in scenario goals. The approach generates a complete input time series for the scenario plans, runs the FMU simulation, and evaluates assertions on the recorded outputs. It produces human-readable logs and plots that show statistics for each scenario with overlays, aggregate pass rates, and per-goal outcomes. The generated scenarios and results are stored for evaluation and later re-execution. We evaluate the approach on a Lube Oil Cooling system and discuss design choices that make the approach practical for everyday use. Results suggest that LLM-assisted scenario generation can facilitate automatic test design and verification of dynamic simulation models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑