[论文解读] Discovery of Layered Software Architecture from Source Code Using Ego Networks
本文提出了一种新颖的、完全自动化的方法,通过将依赖关系建模为以单个节点为中心的个体网络(ego networks)——一种社会网络结构——从Java源代码中恢复分层软件架构。该方法在静态系统和演化系统中均优于标准技术,在分层准确性和违规检测方面表现更优,展现出在架构恢复与维护方面的强大潜力。
Software architecture refers to the high-level abstraction of a system including the configuration of the involved elements and the interactions and relationships that exist between them. Source codes can be easily built by referring to the software architectures. However, the reverse process i.e. derivation of the software architecture from the source code is a challenging task. Further, such an architecture consists of multiple layers, and distributing the existing elements into these layers should be done accurately and efficiently. In this paper, a novel approach is presented for the recovery of layered architectures from Java-based software systems using the concept of ego networks. Ego networks have traditionally been used for social network analysis, but in this paper, they are modified in a particular way and tuned to suit the mentioned task. Specifically, a dependency network is extracted from the source code to create an ego network. The ego network is processed to create and optimize ego layers in a particular structure. These ego layers when integrated and optimized together give the final layered architecture. The proposed approach is evaluated in two ways: on static versions of three open-source software, and a continuously evolving software system. The distribution of nodes amongst the proposed layers and the committed violations are observed on both class level and package level. The proposed method is seen to outperform the existing standard approaches over multiple performance metrics. We also carry out the analysis of variation in the results concerning the change in the node selection strategy and the frequency. The empirical observations show promising signs for recovering software architecture layers from source codes using this technique and also extending it further to other languages and software.
研究动机与目标
- 解决从源代码逆向工程分层软件架构的挑战,尤其是在文档过时或缺失的情况下。
- 克服依赖专家输入并引入偏差或成本的手动和半自动方法的局限性。
- 开发一种完全自动化、可扩展的方法,利用网络分析原理重建分层架构。
- 通过准确地将类和包分配到逻辑层,提高软件系统的可解释性和可维护性。
- 在多样化软件系统(包括持续演化的系统)上验证该方法,以确保其鲁棒性和泛化能力。
提出的方法
- 提取Java系统中类与包之间的依赖关系,构建有向网络表示。
- 将依赖网络建模为个体网络,其中每个节点(类/包)作为中心节点(ego),其直接邻居构成一阶邻域。
- 处理每个个体网络,基于依赖模式和连通性识别并优化局部分层结构。
- 通过迭代合并与优化,将单个个体层整合并优化为全局分层架构。
- 基于频率和连通性设计节点选择策略,以指导分层形成并提高稳定性。
- 使用违规数量(反向调用和跳过调用)、稳定性以及跨软件版本的变更影响等指标验证结果。
实验结果
研究问题
- RQ1个体网络能否有效用于建模和从源代码依赖关系中恢复分层软件架构?
- RQ2与标准聚类和架构恢复技术相比,所提出的基于个体网络的方法在准确性和违规检测方面表现如何?
- RQ3节点选择策略和频率对恢复架构的质量和稳定性有何影响?
- RQ4该方法在静态系统和持续演化系统中的表现如何?
- RQ5该方法在不同类型的软件和面向对象语言中具有多大程度的泛化能力?
主要发现
- 与四种标准方法相比,该方法在分层恢复和违规检测的多个指标上均表现出更优性能。
- 在JHotDraw系统中,最新版本(jhd7_6)的稳定性为44.46%,表明对变更更加敏感,其中55.54%的违规归因于新依赖。
- 该方法在jhd7_2中检测到72.18%的违规,在jhd7_5_1中检测到56.24%的违规,显示出对架构漂移的高敏感性。
- 该方法在小型和大型系统(包括复杂且持续演化的JHotDraw)中均表现优异,分层分配准确率高。
- 实证分析表明,节点选择策略和频率显著影响分层质量与稳定性,优化策略可减少违规。
- 该方法在多个版本中实现了100%的稳定性(例如,jhd5_3、jhd6_0_b1),表明在特定条件下具有稳定的架构完整性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。