Code and Test Generation for I4.0 State Machines with LLM-based Diagram Recognition

Research output: Contribution to book/Conference proceedings/Anthology/ReportConference contributionContributedpeer-review

Contributors

Abstract

In the context of Industry 4.0, the automatic code and test generation from state diagrams embedded in specifications is a critical challenge for software correctness. In this paper we present an approach that leverages Large Language Models (LLMs) for the recognition of state diagrams to generate code and unit tests automatically. We compare the performance of LLMs with traditional computer vision models, highlighting the advantages of LLMs in terms of generalization and simplicity of setup. The results on two prominent industrial communication protocols, PROFINET and OPC UA, demonstrate the applicability of the approach, achieving significant reductions in manual effort and improving the accuracy of code and test generation.

Details

Original languageEnglish
Title of host publication2025 IEEE 21st International Conference on Factory Communication Systems (WFCS)
EditorsFrank Golatowski, Stefano Scanzio, Mohammad Ashjaei, Ramez Daoud, Pedro Santos, Hassanein Amer
PublisherIEEE Industrial Electronics Society
Number of pages8
ISBN (electronic)979-8-3315-3005-1
ISBN (print)979-8-3315-3006-8
Publication statusPublished - 13 Jun 2025
Peer-reviewedYes

Publication series

SeriesIEEE International Workshop on Factory Communication Systems (WFCS)
ISSN2835-8511

Conference

Title21st IEEE International Conference on Factory Communication Systems
Abbreviated titleWFCS 2025
Conference number21
Duration10 - 13 June 2025
Website
LocationUniversität Rostock
CityRostock
CountryGermany

External IDs

ORCID /0000-0002-4646-4455/work/188438628
ORCID /0009-0000-2432-5529/work/188438774
Mendeley c64406be-fae4-35d2-8b71-334ec722b0e1
Scopus 105012249550

Keywords

Keywords

  • Codes, Computer vision, Fourth Industrial Revolution, Industrial communication, Large language models, Manuals, Production facilities, Protocols, Software, Test pattern generators, Code generation, Diagram recognition, Industry 4.0, LLM, Large Language Model, Test case generation