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

  • Daniel Anderson Silva UFCG
  • Renan Alves UFCG
  • Emanuel Dantas UFCG
  • Ademar França de Sousa Neto UFCG
  • Mirko Perkusich UFCG
  • Danyllo Albuquerque UFCG
  • Kyller Gorgônio UFCG
  • Angelo Perkusich UFCG

Resumo


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.
Palavras-chave: Large Language Models, Microservice Architecture, Monolith Decomposition, Static Analysis, Structural Validation, Reproducibility

Referências

Albuquerque, Danyllo et al. From Textual Requirements to Microservice Architectures: An Empirical Evaluation of LLM-Based Architectural Synthesis. arXiv preprint arXiv:2607.28307, 2026.

Pereira, Jose Renan A. et al. Toward Generating Microservice Architectures from Textual Requirements with Large Language Models. In: Anais do XIX Simpósio Brasileiro de Componentes, Arquiteturas e Reutilização de Software (SBCARS), p. 79–89, Porto Alegre, RS, 2025.

Sellami, Khaled; Saied, Mohamed Aymen. MonoEmbed: Enhancing LLM representations for monolith to microservices decomposition through contrastive learning. Empirical Software Engineering, v. 31, n. 11, 2026.

Alsayed, Ahmed Saeed; Dam, Hoa Khanh; Nguyen, Chau. MicroDec: Leveraging Large Language Models for Microservice Decomposition. Journal of Systems and Software, v. 203, 111622, 2024.

Pereira, José Renan A. et al. Do LLMs Agree on Microservice Decompositions? A Multi–Model Study from Textual Requirements. In: The 41st ACM/SIGAPP Symposium on Applied Computing (SAC ’26), Thessaloniki, Grécia, 2026.

Newman, Sam. Building Microservices: Designing Fine-Grained Systems. Sebastopol, CA: O’Reilly Media, 2015.

Lewis, James; Fowler, Martin. Microservices: a definition of this new architectural term. ThoughtWorks, 2014. [link]

Krause, Alexander et al. Microservice Decomposition via Static and Dynamic Analysis of the Monolith. In: 2020 IEEE International Conference on Software Architecture Companion (ICSA-C), p. 9–16, 2020.

Matias, Tiago et al. Determining Microservice Boundaries: A Case Study Using Static and Dynamic Software Analysis. In: European Conference on Software Architecture (ECSA), p. 315–332, 2020.

Abgaz, Yalemisew et al. Decomposition of Monolith Applications into Microservices Architectures: A Systematic Review. IEEE Transactions on Software Engineering, v. 49, n. 8, p. 4213–4242, 2023.

Bucaioni, Alessio et al.Artificial Intelligence for Software Architecture: Literature Review and the Road Ahead. In: Proceedings of the ACM International Conference on the Foundations of Software Engineering (FSE ’25), ACM, 2025.

Ait Mansour, Nassima et al. Semantic Approaches to Microservice Identification: A Systematic Literature Review. IEEE Access, v. 13, 2025.

Sooksatra, Korn et al. Using Static Analysis to Aid Monolith to Microservice System Transformation: Tuning Fuzzy c-Means in a VAE-Based GNN Approach. In: 39th IEEE/ACM International Conference on Automated Software Engineering Workshops (ASEW ’24), p. 43–53, 2024.

Saucedo, Ana Martínez et al. On the Variability of Microservice Decompositions: A Data-Driven Analysis. In: 2024 L Latin American Computer Conference (CLEI), p. 1–9, 2024.

Saucedo, Ana Martínez et al. Exploring Alternative Microservice Decompositions using Data-driven Techniques and LLMs. CLEI Electronic Journal, v. 28, n. 3, paper 6, 2025.

Sellami, Khaled. Automated Migration of Monolithic Systems into Microservices-based Architecture. 217 f. Tese (Doutorado em Informática) – Université Laval, Québec, Canadá, 2026.

Weerasinghe, Mineth et al. From Monolith to Microservices: A Comparative Evaluation of Decomposition Frameworks. arXiv preprint arXiv:2601.23141, 2026.

Alsayed, Ahmed Saeed; Dam, Hoa Khanh; Nguyen, Chau. MicroRec: Leveraging Large Language Models for Microservice Recommendation. In: 21st International Conference on Mining Software Repositories (MSR ’24), ACM, 2024. DOI: 10.5281/zenodo.20709439
Publicado
11/09/2026
SILVA, Daniel Anderson; ALVES, Renan; DANTAS, Emanuel; SOUSA NETO, Ademar França de; PERKUSICH, Mirko; ALBUQUERQUE, Danyllo; GORGÔNIO, Kyller; PERKUSICH, Angelo. Structural Validation of LLM-Generated Microservice Decompositions Using Source-Code Dependencies. In: WORKSHOP BRASILEIRO DE ENGENHARIA DE SOFTWARE INTELIGENTE (ISE), 5. , 2026, São Paulo/SP. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2026 . p. 13-18. DOI: https://doi.org/10.5753/ise.2026.32557.