计算机科学与探索 ›› 2019, Vol. 13 ›› Issue (4): 563-573.DOI: 10.3778/j.issn.1673-9418.1803050

• 学术研究 • 上一篇    下一篇

结合动静态分析实现架构恢复的方法

任  武+   

  1. 上海立信会计金融学院,上海 201620
  • 出版日期:2019-04-01 发布日期:2019-04-10

Approach for Implementing Architecture Recovery by Combining Dynamic and Static Analysis

REN Wu+   

  1. Shanghai Lixin University of Accounting and Finance, Shanghai 201620, China
  • Online:2019-04-01 Published:2019-04-10

摘要: 在大型遗留系统的维护活动中,通过聚类技术将系统划分为更小和更易于控制的子系统,是理解软件架构的一项重要措施。传统架构恢复的研究主要关注静态结构,而面向对象系统由于多态和动态绑定等复杂因素的存在,仅有结构分析还不足以支持架构恢复。功能特征作为一种可触发可观察的系统行为反映了系统实现的功能需求,已经成为构建核心架构的基础。提出一种动静态结合的分析方法,以软件特征作为出发点,通过特征的场景执行以及模块聚类,建立起目标系统的核心架构,然后分析系统的静态结构以提取模块的依赖关联,补充实体到已建立的聚类中。通过对两个开源项目的实验评估和讨论,分析所提方法的有效性和适用性。

关键词: 动态分析, 程序理解, 架构恢复, 依赖性分析, 特征追踪

Abstract: In the maintenance activities of large legacy systems, it is an important measure to understand the software architecture to divide the system into smaller and more manageable subsystems through clustering technology. The researches on architectural decomposition mostly focus on static structural relationships. However, due to the complexity of object-oriented systems such as polymorphism and dynamic binding existing, these structural relationships are not sufficient enough for system structure recovery. As a kind of system behavior that can be triggered and observed, feature reflects the functional requirements of a system implementation and has become the foundation of building core framework. This paper presents a combination of dynamic and static analysis approach, starting from the software features analysis, through the scenarios of the features executing and modules clustering to establish the core architecture of the system, and then analyzes the static structure to extract modules dependence, supplementing scenarios and components to the existing clusters. Two open source projects are evaluated and discussed to indicate the effectiveness and applicability of the proposed approach.

Key words: dynamic analysis, program understanding, architecture recovery, dependency analysis, feature traces