Using Large Language Models to Extract UML Class Diagrams from Java Programs
Many organizations rely on software systems to perform their core business operations. These systems often require modernization to accommodate new requirements and demands over time. Visual representations and diagrams help maintainers to understand these systems and to assist their maintenance and evolution. Reverse engineering is used to extract different representations of software systems, and the modeldriven engineering (MDE) approach can be used to assist the reverse engineering process, leading to model-driven reverse engineering (MDRE). Large Language Models (LLMs) are an advanced deep learning (DL) technology increasingly being applied in various domains. Despite this, the use of LLMs to extract diagrams from source code has rarely been used. In this paper, we introduce a novel MDRE framework, LLM4Models, that extracts UML class diagrams from Java source code files using LLMs. The paper also introduces a set of rules to extract UML class diagram representations. These rules have been implemented to create training data samples, which are then used to fine-tune the pre-trained LLM. Finally, the proposed framework is explained with an illustrative example and then evaluated.
Authors
- Kevin Lano (ORCID: https://orcid.org/0000-0002-9706-1410)
- Hanan Abdulwahab Siala (ORCID: https://orcid.org/0009-0003-4693-8707)
Institutions
- King's College London (GB)
- King's College School (GB)
Publication Details
- Published
- 2025-04-04
- DOI
- https://doi.org/10.1109/icosse65712.2025.00020
- Citations
- 1
- Primary Topic
- Software System Performance and Reliability
- Type
- article
- Field-Weighted Citation Impact
- 1.49