Data Dependency-Aware Code Generation from Enhanced UML Sequence Diagrams

Wenxin Mao, Zhitao Wang, Long Wang, Sirong Chen, Cuiyun Gao +5 more
8/5/2025
cs.AIcs.SE

No confident code implementation found for this paper. 1 possible match can be shown below.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{mao2025data,
  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},
  year   = {2025},
  eprint = {2508.03379},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.03379v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.03379.svg)](https://codeofpaper.com/paper/2508.03379)

Discussion