Core Concepts
GPT-4-Vision, a state-of-the-art deep learning model, can effectively transform Unified Modeling Language (UML) class diagrams into functioning Java class files, with an average success rate of 88.25% across various diagram complexities.
Abstract
This study explores the capabilities of OpenAI's GPT-4-Vision model in automatically generating Java source code from UML class diagrams. The researchers collected a diverse set of UML diagrams, categorizing them as either single-class or multi-class, and used three different prompts to assess the model's performance.
For single-class diagrams, the model was able to generate "perfect" source code, with a 100% success rate in most cases. However, for multi-class diagrams, the model's performance was weaker, with success rates ranging from 28.45% to 95.65%, depending on the complexity of the diagram and the prompt used.
The researchers developed a scoring system to evaluate the generated code, considering factors such as the existence of classes, data members, methods, visibility modifiers, and relationships between classes. They found that the model often struggled with correctly identifying visibility modifiers and handling complex relationships between classes in multi-class diagrams.
Despite these challenges, the study demonstrates the potential of GPT-4-Vision in automating the transition from UML design to code implementation, which could significantly reduce development time and minimize human errors. The researchers plan to expand their investigation to include a wider range of UML diagrams, different programming languages, and more sophisticated prompting techniques to further enhance the model's capabilities.
Stats
The model was able to generate source code for an average of 88.25% of the elements shown in the UML diagrams.
For single-class diagrams, the model achieved a 100% success rate in most cases.
For multi-class diagrams, the success rates ranged from 28.45% to 95.65%, depending on the complexity of the diagram and the prompt used.
Quotes
"GPT-4-Vision exhibits proficiency in handling single-class UML diagrams, successfully transforming them into syntactically correct class files."
"For multi-class UML diagrams, the model's performance is weaker compared to single-class diagrams."