🤖 AI Summary
Existing architecture recovery approaches often yield outputs of insufficient accuracy, necessitating extensive manual correction. This work proposes an automated refinement method that synergistically integrates the semantic comprehension capabilities of large language models (LLMs) with software dependency analysis to enhance the semantics of recovered architectures—a novel combination not previously explored. By integrating mainstream recovery tools and introducing multidimensional evaluation metrics, experiments on nine real-world projects demonstrate consistent and significant improvements across five key metrics, with normalized gains ranging from 17.72% to 43.35%. Notably, MoJoFM and a2a_adj exhibit relative improvements exceeding 100%, substantially enhancing both the accuracy and interpretability of the recovered architectural models.
📝 Abstract
Understanding the architecture is crucial for effectively maintaining and managing large software systems. However, discrepancies often exist between the designed and implemented architectures, which can pose significant risks. To identify these discrepancies, architects need to extract the architecture from the system implementation, which is both time-consuming and error-prone. To simplify this procedure, many automatic architecture recovery techniques have been developed. Yet, their accuracy is often limited. Architects must still invest significant effort in refining recovery results to ensure they accurately reflect the implemented architecture.
To reduce such manual effort, we introduce Semref, a framework that combines LLMs with dependency analysis to automatically refine architectures recovered by existing architecture recovery tools. By leveraging the LLM's semantic understanding capabilities and integrating structural dependencies, Semref enhances both the accuracy and the comprehension of recovered architectures. To evaluate Semref, we tested on 9 projects with published ground-truth architectures and 10 state-of-the-art architecture recovery tools. 5 commonly used metrics are adopted to evaluate the effectiveness of Semref. The results show that Semref improves accuracy across various metrics, with normalized gains ranges from 17.72\% to 43.35\%. Specifically, for MoJoFM and $a2a_{adj}$ metrics, Semref achieves relative improvements of 118.57\% and 100.41\%, respectively.