Structural Validation of LLM-Generated Microservice Decompositions Using Source-Code Dependencies
Daniel Silva, Renan Alves, Emanuel Dantas Filho, Ademar Sousa Neto, Mirko Perkusich, Danyllo Wagner Albuquerque, Kyller Gorgônio, Angelo Perkusich
Abstract
Decomposing monolithic systems into microservices is a key activity in software modernization. Although Large Language Models (LLMs) can generate semantically plausible decompositions from textual requirements, it remains unclear whether these proposals preserve the structural dependencies implemented in the source code. This paper evaluates the structural adherence of microservice decompositions generated by OpenAI o3 for the PetClinic and Bookstore systems. We propose an automated validation pipeline based on static dependency analysis and compare zero-shot and few-shot prompting using dependency preservation (TPD) and dependency violation (TVD) metrics. A robustness analysis was conducted to control for differences in class-to-service mapping coverage. After normalization, both prompting strategies produced equivalent structural adherence, achieving TPD values of 68.0% (PetClinic) and 83.3% (Bookstore). The findings demonstrate that structural evaluations of LLM-generated decompositions should explicitly control for mapping coverage, as apparent differences between prompting strategies may otherwise reflect methodological bias rather than genuine architectural quality.
Create a lesson
Related papers
Dependency-Guided Code Generation: Structured Matrix Decomposition and Consistency-Guided Refinement
Shared title terminology · Mingqiao Mo, Yangchen Zeng, Zikai Xiao et al.
How Specification Explicitness Shapes Failure in LLM-Generated Code
Shared title terminology · Elmira Onagh, Maleknaz Nayebi
Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generation
Shared title terminology · Zhongxin Liu, Zhonghao Jiang, Zhifan Ye et al.
Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Code
Shared title terminology · Hengzhi Ye, Fengyuan Ran, Weiwei Xu et al.
A Causal Perspective on Measuring, Explaining and Mitigating Smells in LLM-Generated Code
Shared title terminology · Alejandro Velasco, Daniel Rodriguez-Cardenas, Dipin Khati et al.
Unreliable in Practice? A Comprehensive Study of Errors in LLM-Generated Code
Shared title terminology · Rodrigo Pato Nogueira, Marco Vieira, João R. Campos