paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Data Dependency-Aware Code Generation from Enhanced UML Sequence Diagrams

基于增强 UML 序列图的数据依赖感知代码生成
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 4/10 · 论文核心是用增强 UML 序列图与数据依赖推断来提升 LLM 代码生成的可靠性,属于“形式化规格 + LLM 程序合成”方向,与用户关注的“静态分析×AI/Agentic 程序”只在边缘相邻(仅有静态解析与依赖剪枝,分析对象是规格而非程序),也不涉及浮点或贝叶斯程序分析。其工业数据集与落地评测(编译/单测通过率)契合用户对工程落地与问题驱动研究的偏好,但研究方向本身偏离核心。引用 0 inbox
Wenxin Mao, Zhitao Wang, Long Wang, Sirong Chen, Cuiyun Gao, Luyang Cao, Ziming Liu, Qiming Zhang, Jun Zhou, Zhi Jin
crossref: 2026-09-12

AI 速览

一句话:提出 UML2Dep 框架,用增强 UML 序列图显式建模并结合数据依赖推断,提升 LLM 从复杂需求生成代码的可靠性。

针对自然语言需求歧义大、难以刻画复杂系统行为与架构约束,以及服务化架构中隐式数据依赖难以推断的问题,本文提出分步代码生成框架 UML2Dep。该框架扩展 UML 序列图,加入决策表和 API 规格,显式形式化服务交互的结构关系与业务逻辑流;并将数据依赖推断(DDI)作为独立任务,在代码合成前构建显式依赖图,通过数学化提示、静态解析与依赖剪枝降低上下文复杂度。在自建工业数据集上,DDI 取得 89.97% 召回率、95.06% 精确率和 92.33% F1;接入代码生成流程后,编译通过率提升 8.83%,单元测试通过率提升 11.66%。

问题
自然语言描述存在歧义,难以表达复杂系统行为、条件逻辑和架构约束;服务化架构中的隐式数据依赖也难以被 LLM 正确推断和处理。
方法
提出 UML2Dep:扩展 UML 序列图并集成决策表与 API 规格,将数据依赖推断形式化为约束数学推理任务,在代码生成前构建显式依赖图,并结合静态解析与依赖剪枝。
评估
在自建工业数据集上评估 DDI 任务与整体代码生成流程,报告召回率、精确率、F1,以及编译通过率和单元测试通过率的提升。
原文摘要(Abstract)

Large language models (LLMs) excel at generating code from natural language (NL) descriptions. However, the plain textual descriptions are inherently ambiguous and often fail to capture complex requirements like intricate system behaviors, conditional logic, and architectural constraints; implicit data dependencies in service-oriented architectures are difficult to infer and handle correctly.To bridge this gap, we propose a novel step-by-step code generation framework named UML2Dep by leveraging unambiguous formal specifications of complex requirements. First, we introduce an enhanced Unified Modeling Language (UML) sequence diagram tailored for service-oriented architectures. This diagram extends traditional visual syntax by integrating decision tables and API specifications, explicitly formalizing structural relationships and business logic flows in service interactions to rigorously eliminate linguistic ambiguity. Second, recognizing the critical role of data flow, we introduce a dedicated data dependency inference (DDI) task. DDI systematically constructs an explicit data dependency graph prior to actual code synthesis. To ensure reliability, we formalize DDI as a constrained mathematical reasoning task through novel prompting strategies, aligning with LLMs’ excellent mathematical strengths. Additional static parsing and dependency pruning further reduce context complexity and cognitive load associated with intricate specifications, thereby enhancing reasoning accuracy and efficiency.Experimental results on our in-house industrial datasets demonstrate the effectiveness of the proposed framework. Specifically, our framework achieves strong performance, with 89.97% recall, 95.06% precision, and 92.33% F1 score on the DDI task. Furthermore, the integration of UML2Dep into the code generation pipeline also improves practical deployment, increasing compilation pass rate by 8.83% and unit test pass rate by 11.66%.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9548,
  title = {Data Dependency-Aware Code Generation from Enhanced UML Sequence Diagrams},
  author = {Wenxin Mao and Zhitao Wang and Long Wang and Sirong Chen and Cuiyun Gao and Luyang Cao and Ziming Liu and Qiming Zhang and Jun Zhou and Zhi Jin},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00282}
}