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.
To Another Language
from source content
arxiv.org
Deeper Inquiries