Creating UML Class Diagrams with General-Purpose LLMs

General-purpose large language models (LLMs) have become a versatile tool in software development and maintenance. These models offer support in tasks such as under-standing, writing, and summarizing code. While these LLMs can generate code quickly their use in software modeling is relatively under-explored. This research aims to study ChatGPT's ability to generate class diagrams from source code. To do this, we engineered a prompt that takes in source code to create a UML class diagram for that system. We used this prompt to create class diagrams for 40 systems and assessed the diagrams on their correctness and structure. Our results show that ChatGPT creates class diagrams that accurately capture 90% of the classes and their attributes and 66 % of the associations. While ChatGPT performed nearly flawlessly for smaller projects, the diagrams for larger projects had more issues. We conclude that ChatGPT is best utilized as a complementary tool rather than the sole resource for software modeling and maintenance.

Authors

Institutions

Publication Details

Published
2024-10-06
DOI
https://doi.org/10.1109/vissoft64034.2024.00031
Citations
3
Primary Topic
Model-Driven Software Engineering Techniques
Type
article
Field-Weighted Citation Impact
1.46
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Creating UML Class Diagrams with General-Purpose LLMs

Mohamed Shehata, Esteban Parra, Blaire Lepore, Hailey Cummings
3 citations
Model-Driven Software Engineering Techniques
1.46
article

Creating UML Class Diagrams with General-Purpose LLMs

Mohamed Shehata, Esteban Parra, Blaire Lepore, Hailey Cummings
article en
3 citations

Abstract

General-purpose large language models (LLMs) have become a versatile tool in software development and maintenance. These models offer support in tasks such as under-standing, writing, and summarizing code. While these LLMs can generate code quickly their use in software modeling is relatively under-explored. This research aims to study ChatGPT's ability to generate class diagrams from source code. To do this, we engineered a prompt that takes in source code to create a UML class diagram for that system. We used this prompt to create class diagrams for 40 systems and assessed the diagrams on their correctness and structure. Our results show that ChatGPT creates class diagrams that accurately capture 90% of the classes and their attributes and 66 % of the associations. While ChatGPT performed nearly flawlessly for smaller projects, the diagrams for larger projects had more issues. We conclude that ChatGPT is best utilized as a complementary tool rather than the sole resource for software modeling and maintenance.

Belmont University (US)
Openalex Percentile: Top 14%
Model-Driven Software Engineering Techniques
1.46
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.