Structural Validation of LLM-Generated Microservice Decompositions Using Source-Code Dependencies

📅 2026-07-30
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study evaluates the ability of large language models (LLMs) to preserve source code structural dependencies during microservice decomposition. The authors establish an automated validation pipeline based on static dependency analysis and introduce a normalized metric—control-class-to-service mapping coverage—to assess architectural fidelity. They further propose Dependency Preservation Rate (TPD) and Dependency Violation Rate (TVD) to quantitatively measure architectural quality. Experiments conducted with the OpenAI o3 model compare zero-shot and few-shot prompting strategies on the PetClinic and Bookstore systems. Results show that, after normalization, both strategies achieve comparable performance (TPD of 68.0% and 83.3%, respectively), with observed structural differences primarily attributable to methodological bias rather than genuine disparities in architectural quality. This highlights the necessity of carefully disentangling prompt engineering effects from actual architectural effectiveness when evaluating LLM-generated designs.
📝 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.
Problem

Research questions and friction points this paper is trying to address.

microservice decomposition
structural validation
source-code dependencies
LLM-generated architectures
dependency preservation
Innovation

Methods, ideas, or system contributions that make the work stand out.

microservice decomposition
LLM validation
static dependency analysis
dependency preservation
prompting strategy
D
Daniel Silva
Federal University of Campina Grande - UFCG
R
Renan Alves
Federal University of Campina Grande - UFCG
E
Emanuel Dantas Filho
Federal Institute of Pernambuco - IFPE
A
Ademar Sousa Neto
Federal University of Campina Grande - UFCG
M
Mirko Perkusich
Federal University of Campina Grande - UFCG
D
Danyllo Wagner Albuquerque
Instituto Federal da Paraíba - IFPB
K
Kyller Gorgônio
Federal University of Campina Grande - UFCG
Angelo Perkusich
Angelo Perkusich
Federal University of Campina Grande
Software EngineeringPervasive ComputingInternet of ThingsFormal MethodsPetri Nets