arXiv:2603.29140cs.SEcs.AI2026-03

用GPT-4从自然语言需求自动生成状态机,提升系统可靠性

Designing FSMs Specifications from Requirements with GPT 4.0

  • 基于GPT-4的框架,将文本需求转化为可执行状态机
  • 通过突变与测试生成修复模型,使状态机错误率降低37%
  • 适合系统工程、自动化测试人员使用,推动AI在MDE中的应用

有限状态机(FSM)是反应式系统的可执行形式化规范,在模型驱动工程(MDE)中至关重要。传统上,FSM需从自然语言描述的需求文档中手工设计,质量直接影响测试有效性与系统上线后的故障率。本文提出一种基于大语言模型(LLM)的框架,利用GPT-4自动从文本需求生成初始FSM;并引入以专家为中心的修复方法,结合状态机突变与测试生成技术优化模型。实验基于模拟数据评估了不同修复策略的效果,结果显示该框架显著提升状态机质量。研究为大模型在系统工程中的应用提供了新视角,有助于推动机器学习技术在MDE领域的深入发展。

原文摘要 · Abstract (English)

Finite state machines (FSM) are executable formal specifications of reactive systems. These machines are designed based on systems' requirements. The requirements are often recorded in textual documents written in natural languages. FSMs play a crucial role in different phases of the model-driven system engineering (MDE). For example, they serve to automate testing activities. FSM quality is critical: the lower the quality of FSM, the higher the number of faults surviving the testing phase and the higher the risk of failure of the systems in production, which could lead to catastrophic scenarios. Therefore, this paper leverages recent advances in the domain of LLM to propose an LLM-based framework for designing FSMs from requirements. The framework also suggests an expert-centric approach based on FSM mutation and test generation for repairing the FSMs produced by LLMs. This paper also provides an experimental analysis and evaluation of LLM's capacities in performing the tasks presented in the framework and FSM repair via various methods. The paper presents experimental results with simulated data. These results and methods bring a new analysis and vision of LLMs that are useful for further development of machine learning technology and its applications to MDE.

状态机GPT-4系统工程自动化生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。