[论文解读] Redefining measures of Layered Architecture
本文通过引入基于依赖关系的度量方法,重新定义了分层架构的评估方式,能够检测反向调用、跳过调用和循环依赖,并提出了一个新的逻辑分离指数。该方法在先前方法的基础上进行了改进,不仅识别出违反分层原则的组件,还明确了导致违规的具体依赖关系,从而在JHotDraw和JFreeChart等真实Java系统中提供了更精确的重构指导。
Layered architecture represents the software structure in the form of layers. Every element in the software is assigned to one of the layers such that the relationship amongst the elements is maintained. A set of design principles rules the process of construction of the layered architecture. Various statistical measures have been defined to check whether the layered architecture of a given software is following these design principles or not. In this paper, we redefine the measures of layered architecture based on the relationship between the software components. The measures check for the violations committed regarding the back calls, skip calls, and cyclic structures. Further, we also introduce a new measure to verify the logical separation amongst the layers. The system's current architecture is extracted from the source code and represented using a three-tier layered structure, which is the defacto standard architecture of Java applications. The redefined measures are applied to determine the conformance of layering principles in the system. We evaluate five different software systems for their architecture consistency. The results obtained on our redefined measures are compared to those obtained by applying the standard set of measures. A quantitative analysis of the proposed measures is performed, and we conclude that they can determine the consideration of layering principles followed during the development of a software system.
研究动机与目标
- 解决现有分层架构评估度量方法的局限性,这些方法未能捕捉违规依赖的本质特征。
- 通过不仅识别出违反分层原则的组件,还识别出导致违规的具体依赖关系,从而提升软件可维护性。
- 提出一种新的逻辑分离指数,以定量评估恢复的软件架构中分层的质量。
- 通过识别问题依赖关系而非仅组件,为开发者提供可操作的重构洞察。
- 使用三层分层结构在真实Java应用程序中评估所提出度量的有效性。
提出的方法
- 将传统的分层架构度量方法重新表述为基于软件组件之间依赖关系的度量,而非基于组件数量的统计。
- 定义新度量:基于显式依赖类型(继承、实例化、参数传递)的反向调用违规指数、跳过调用违规指数和循环依赖违规指数。
- 引入一个逻辑分离指数,通过层间依赖与总依赖的比值来量化各层之间的解耦程度。
- 使用依赖提取工具(如Dependency Finder)从源代码中提取软件架构,构建依赖网络。
- 将软件建模为社交网络,其中组件为节点,依赖为边,从而可应用网络分析原理。
- 将重新定义的度量应用于五个真实软件系统(Constore、JHotDraw、JFreeChart、JCommon),以评估其对开放分层风格的符合程度。
实验结果
研究问题
- RQ1如何重新定义分层架构评估度量,以更好地反映违规依赖的本质?
- RQ2新度量在多大程度上比以往方法更有效地检测并表征反向调用、跳过调用和循环依赖?
- RQ3逻辑分离指数能否可靠地量化恢复架构中各层之间的解耦程度?
- RQ4与现有度量相比,所提出的度量在精度和为开发者提供的可操作洞察方面表现如何?
- RQ5重新定义的度量在多大程度上反映了真实软件系统中的实际设计意图?
主要发现
- Constore应用的逻辑分离指数为0.90,表明分层质量较高,但HW组件中的前两层未实现良好分离。
- JHotDraw 7.0.6的逻辑分离指数为0.93,跳过调用违规指数为0.096,检测到五个因特定依赖关系导致的反向调用违规。
- JFreeChart 1.0.0表现出51次跳过调用违规,但无循环依赖,且逻辑分离指数达到完美的1.0,表明分层质量极佳。
- 所提出的度量在JFreeChart中检测到51次跳过调用违规,在JHotDraw中检测到5次反向调用违规,且提供了明确的关系级别洞察,而以往方法不具备此能力。
- 新度量通过识别导致违规的具体依赖关系而非仅违规组件,相比以往方法提供了更具可操作性的信息。
- 度量被证实具有高灵敏度和准确性,依赖提取工具与人工验证均确认了关系检测的高保真度。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。