使用大语言模型对 Simulink 模型进行需求驱动的切片
Requirements-driven Slicing of Simulink Models Using LLMs
AI总结:
本文提出一种基于大语言模型的Simulink模型需求驱动切片方法,将模型转为文本表示后由LLM识别相关模块并构建切片,并研究了文本表示粒度和提示策略对切片准确性的影响。
摘要:
模型切片是一种有用的技术,用于识别较大模型中与满足给定需求相关的子集。切片的显著应用包括在检查设计是否充分满足所关注需求时减少审查工作量,以及在进行变更影响分析时减少工作量。在本文中,我们提出了一种基于大语言模型(LLMs)的方法,用于从图形化 Simulink 模型中提取模型切片。我们的方法将 Simulink 模型转换为文本表示,使用大语言模型识别满足特定需求所必需的 Simulink 模块,并构建一个包含大语言模型所识别模块的可靠模型切片。我们探讨了在将 Simulink 模型转换为文本表示时不同粒度的详细程度(详尽程度),以及用于提示大语言模型的策略,如何影响所生成切片的准确性。我们的初步研究结果表明,由保留 Simulink 模块语法和语义、同时省略 Simulink 模型视觉渲染信息的文本表示所生成的提示,能够产生最准确的切片。此外,思维链提示策略和零样本提示策略使我们的方法产生了数量最多的准确模型切片。
英文摘要:
Model slicing is a useful technique for identifying a subset of a larger model that is relevant to fulfilling a given requirement. Notable applications of slicing include reducing inspection effort when checking design adequacy to meet requirements of interest and when conducting change impact analysis. In this paper, we present a method based on large language models (LLMs) for extracting model slices from graphical Simulink models. Our approach converts a Simulink model into a textual representation, uses an LLM to identify the necessary Simulink blocks for satisfying a specific requirement, and constructs a sound model slice that incorporates the blocks identified by the LLM. We explore how different levels of granularity (verbosity) in transforming Simulink models into textual representations, as well as the strategy used to prompt the LLM, impact the accuracy of the generated slices. Our preliminary findings suggest that prompts created by textual representations that retain the syntax and semantics of Simulink blocks while omitting visual rendering information of Simulink models yield the most accurate slices. Furthermore, the chain-of-thought and zero-shot prompting strategies result in the largest number of accurate model slices produced by our approach.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。