SearcharxivSearch

arXiv subjects

Evan Boyd

Publications and source records attributed to Evan Boyd.

2 recordsLinked to original sources

Structure- and Event-Driven Frameworks for State Machine Modeling with Large Language Models

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.

cs.SE

Irreducibility of Random Polynomials

We study the probability that a random polynomial with integer coefficients is reducible when factored over the rational numbers. Using computer-generated data, we investigate a number of different models, including both monic and non-monic polynomials. Our data supports conjectures made by Odlyzko and Poonen and by Konyagin, and we formulate a universality heuristic and new conjectures that connect their work with Hilbert's Irreducibility Theorem and work of van der Waerden. The data indicates that the probability that a random polynomial is reducible divided by the probability that there is a linear factor appears to approach a constant and, in the large-degree limit, this constant appears to approach one. In cases where the model makes it impossible for the random polynomial to have a linear factor, the probability of reducibility appears to be close to the probability of having a non-linear, low-degree factor. We also study characteristic polynomials of random matrices with +1 and -1 entries.

math.PR