arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

基于大语言模型(LLMs)的UML类图评估与修复策略

UML Class Diagram Evaluation and Repair Strategies based on LLMs

Jie Liang, Peng Liang, Chong Wang

arXiv 2608.28800首次发表:更新:

发表机构

Wuchang Shouyi University; Wuhan University(武昌首义大学; 武汉大学)

机构由 AI 辅助整理,请以论文原文为准。

AI 中文总结

本研究结合SDMetrics与专家审核评估主流LLMs在UML类图建模的性能,针对其缺陷提出三种修复策略,经实验验证可显著提升类图质量,部分修复率达100%。

AI 中文摘要

UML类图是定义软件系统结构的关键工具,但设计准确且全面的类图是一项具有挑战性的任务。传统上,创建UML模型依赖专业人员的专业知识和经验。然而,随着人工智能技术尤其是大语言模型(LLMs)的发展,软件建模出现了新的机遇。尽管如此,关于LLMs在软件建模中应用的研究仍然有限,尤其是在UML类图建模领域。本研究针对多个典型软件系统案例开展实验,结合SDMetrics与专家人工审核,从规模与完整性、关系正确性、继承层次、设计规则合规性等多个维度,全面评估主流LLMs在UML类图建模中的实际性能。本研究聚焦LLMs生成的UML类图中的典型缺陷,发现LLMs表现出与人类记忆类似的不确定性,据此提出三种针对性修复策略,包括记忆强化、外部知识注入、检测引导的自动化针对性修复。案例研究的实验结果表明:(1)与专家构建的类图相比,LLMs生成的UML类图存在若干问题,如关键类识别不完整、关系混淆或缺失、继承关系不足或缺失、未使用类、循环依赖;(2)应用修复方法后,所有LLMs在解决这些问题上均有不同程度的提升,关键类识别的平均修复率达85%,耦合关系修复率为46%,继承关系修复率为69%,未使用类与循环依赖的修复率均达100%。

英文摘要

UML class diagrams are a crucial tool for defining the structure of software systems, but designing accurate and comprehensive class diagrams is a challenging task. Traditionally, creating UML models relies on the expertise and experience of professionals. However, with the development of AI technologies, particularly LLMs, new opportunities for software modeling have emerged. Despite this, there has been limited research on the application of LLMs in software modeling, especially in UML class diagram modeling. This study conducts experiments on several typical software system cases. Combining SDMetrics with expert manual review, this paper comprehensively evaluates the practical performance of mainstream LLMs in UML class diagram modeling from multiple dimensions, including size and completeness, relationship correctness, inheritance hierarchy, and design rule compliance. Focusing on typical defects in LLM-generated UML class diagrams, this study reveals that LLMs exhibit uncertainties analogous to human memory. Accordingly, three targeted repair strategies are proposed, including memory reinforcement, external knowledge injection, and detection-guided automated targeted repair. Experimental results obtained from the case studies indicate that (1) compared to expert-crafted class diagrams, LLM-generated UML class diagrams exhibit several issues, such as incomplete identification of key classes, confusion or omissions in relationships, insufficient or absent inheritance relationships, unused classes, and circular dependencies, and (2) after applying the repair methods, all the LLMs show varying degrees of improvement in addressing these issues. The average repair rate for key class identification reaches 85%, the coupling relationship repair rate is 46%, the inheritance relationship repair rate is 69%, while repair rates for unused classes and circular dependencies both reach 100%.

Comments30 pages, 5 images, 8 tables, Manuscript submitted to a journal (2026)

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑