Structure- and Event-Driven Frameworks for State Machine Modeling with Large Language Models
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
UML state machine design is a critical process in software engineering. Traditionally, state machines are manually crafted by experienced engineers based on natural language requirements-a time-consuming and error-prone procedure. Many automated approaches exist but they require structured NL requirements. In this paper, we investigate the capabilities of current Large Language Models to fully automate UML state machine generation via specialized State Machine Frameworks (SMFs) from non-structured NL requirements. We evaluate two types of state-of-the-art LLMs using single-step and multi-step prompting approaches: a non-reasoning LLM GPT-4o and a reasoning-focused LLM Claude 3.5 Sonnet, and introduce a novel Hybrid Approach that uses the output from a Single-Prompt Baseline as an initial draft state machine, which is then refined through an SMF. In our study, two distinct SMFs are developed based on human approaches: (i) a Structure-Driven SMF, in which state machine components (states, transitions, guards, actions, etc.) are generated in sequential steps, and (ii) an Event-Driven SMF, where identified events iteratively guide state machine construction. Our experiments indicate that while LLMs demonstrate a promising ability to generate state machine models from the Single-Prompt Baseline (e.g., F1-scores of 0.90 for states and 0.75 for transitions using Claude 3.5 Sonnet), their performance is not yet fully sufficient for a fully automated solution (e.g., F1-scores of 0.23 for guards and 0.00 for actions for GPT-4o). Our proposed Hybrid Approach improves the performance of the non-reasoning LLM (GPT-4o) to a similar level as the reasoning LLM (Claude 3.5 Sonnet) but does not further improve the reasoning LLM. Our evaluation highlights both the potential and the limitations of current LLMs for automated state machine design, providing a baseline for future research in this domain.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. First posted on arXiv 31 Mar 2026.
Builds on
No reference list yet.
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Automatic Translation of Unstructured Requirements into Linear Temporal Logic through Large Language Models ↗
- 2025Exploring State Tracking Capabilities of Large Language Models
- 2024StateFlow: Enhancing LLM Task-Solving through State-Driven Workflows
- 2026Class Model Generation from Requirements using Large Language Models ↗
- 2026Why Do LLMs Fail at OCL Generation? A Graph Reasoning Perspective
- 2025Evaluating LLMs on Sequential API Call Through Automated Test Generation
- 2026LLM-FSM: Scaling Large Language Models for Finite-State Reasoning in RTL Code Generation
- 2025Failure Modes in LLM Systems: A System-Level Taxonomy for Reliable AI Applications