Exploring How Well Llama3 can Generate State Machines Represented in Umple - Pathak, Parva (Université d'Ottawa / University of Ottawa, 2025)
Modelling a system is an important part of design which can be time consuming and difficult. A common type of model is a state machine, describing a system or component's behaviour. Multiple languages have been created to make this process smoother, one of them being Umple, which enables describing state machines both textually and graphically, as well as embedding them in multiple programming languages and generating code from them. Although tools such as Umple have made the process easier, developers or business analysts still have to translate requirements into state machines. In this thesis, we investigate how well this step can be automated with the application of artificial intelligence. We show that using modern large language models, Llama 3 in our case, we can allow a user to generate a state machine by only providing a short description of the system requirements. These state machines generated by large language models (LLMs) can be used as a model for the system as is if they meet the requirements or a base that can be improved on. We found that for simple systems using a large language model along with techniques such as retrieval augmented generation and multi-shot learning, can save users large amount of time compared to coding state machines from scratch.
Keywords: state machine; Llama; large language model; Umple; artificial intelligence; UML