计算机科学 > 软件工程
[提交于 2026年11月30日]
标题:From Code to Architecture: Responsibility Analysis and Dependency Graphs in the Inference of Architectural Patterns in Kotlin
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Understanding software architecture is essential for maintenance and evolution. However, architectural decisions are often undocumented or outdated, forcing developers to infer architectural structures directly from source code. This task is challenging due to inconsistent naming, variable code quality, architectural erosion, hybrid styles, and the lack of systematic identification methods. In this work, we propose an automated pipeline to infer architectural patterns directly from Kotlin source code. The approach combines static code analysis, heuristic identification of class responsibilities, and dependency graph construction to capture both the roles of individual components and the structural relationships between them. Based on this representation, the pipeline is able to identify architectural patterns such as MVVM, MVP, MVC, MVI, and VIPER. To evaluate the effectiveness of the proposed approach, we conducted an empirical study using a dataset of Kotlin repositories collected from GitHub. The evaluation was performed on a statistically representative sample, comparing the inferred architectures with those explicitly declared by the repository authors. The results show that the pipeline achieves an accuracy of 69.8%, significantly outperforming benchmark strategies such as random and majority class classifiers. These results indicate that combining responsibility analysis with dependency-based structural representations provides a robust and scalable solution for inferring architectural patterns. The proposed approach can aid in software maintenance, architectural analysis, and large-scale empirical studies in modern software ecosystems.
提交历史
来自:Breno Miranda[v1] 2026年11月30日 星期一 04:33:48 UTC (50 KB)