电子学报 ›› 2021, Vol. 49 ›› Issue (1): 201-208.DOI: 10.12263/DZXB.20191198

• 科研通信 • 上一篇    下一篇

基于分层架构模式识别的软件架构重构技术

王丽1,2, 杜鹏程1, 许一鸣2, 李必信1   

  1. 1. 东南大学计算机科学与工程学院, 江苏南京 210096;
    2. 江苏自动化研究所, 江苏连云港 222061
  • 收稿日期:2019-10-22 修回日期:2020-04-05 出版日期:2021-01-25 发布日期:2021-01-25
  • 通讯作者: 李必信
  • 作者简介:王丽 女,1982年出生,江苏连云港人.2009年毕业于同济大学.现为东南大学计算机科学与工程学院工程博士生,江苏自动化研究所高级工程师.主要从事软件工程、软件质量与可靠性、软件测评等方面的研究工作.E-mail:230188058@seu.edu.cn;杜鹏程 男,1994年出生,江苏东台人.现为东南大学软件学院软件工程专业硕士研究生,研究方向为软件架构模式识别及重构.E-mail:15606135595@163.com;许一鸣 男,1993年出生,江苏徐州人.现为江苏自动化研究所工程师.主要从事软件工程、软件质量与可靠性、软件测评等方面的研究工作.E-mail:yimingxu@cumt.edu.cn
  • 基金资助:
    国家自然科学基金(No.61572126,No.61872078);"十三五"装备预研共用技术(No.41402020501)

Software Architecture Reconstruction Technology Based on Layered Architecture Pattern Recognition

WANG Li1,2, DU Peng-cheng1, XU Yi-ming2, LI Bi-xin1   

  1. 1. School of Computer Science and Engineering, Southeast University, Nanjing, Jiangsu 210096, China;
    2. Jiangsu Automation Research Institute, Lianyungang, Jiangsu 222061, China
  • Received:2019-10-22 Revised:2020-04-05 Online:2021-01-25 Published:2021-01-25
  • Supported by:
     

摘要: 本文提出一种基于分层架构模式识别的软件架构重构技术.该技术以目标软件的源代码作为输入,过滤与分层架构无关的代码,再利用代码词汇信息挖掘程序实体之间的语义关联,通过代码主题提取并计算程序实体之间的职责相似度,依据相似度将程序实体聚类形成组件.在软件组件化的基础上结合分层模式的ILD属性识别软件层次和软件架构模式.在模式识别的基础上,定位系统中存在的违规作为重构点,生成相应的重构建议并实施重构.最后,本文在Github与SourceForge开源社区中选取10个开源软件系统作为实验对象,验证了本文提出的基于分层架构模式识别的软件架构重构技术在模式识别有效性、重构点识别效果和重构建议实施效果方面与传统方法相比有较大提升,能够有效的帮助软件开发人员识别软件架构模式、获取重构点、生成重构建议,并协助开发人员进行架构重构实施,改善系统违规情况,提升软件质量.

 

关键词: 架构重构, 分层架构模式, 架构模式识别, 重构点定位

Abstract: This paper proposes software architecture reconstruction technology based on layered architecture pattern recognition.The input of the recognition is the source code and the unnecessary source code will be filtered out at first.Then the approach relies on lexical information from the source code to mine the semantic relation between system entities and using a topic model to extract the responsibility of entities,which is then used to cluster these entities into cohesion components.Later,the approach supplements the structural information between components to generate the component graph and use the ILD property to recognize the actual software layers.Based on the results of pattern recognition and the principle of layered pattern,position the nonstandard existing in the system as the reconstruction point,and relevant reconstruction suggestions to assist the designers and developers in the reconstruction implementation.Finally,this paper selects 10 open source software systems in Github and SourceForge as experimental objects to verify the effectiveness of the technology in this paper.This technology can greatly improve the effectiveness of pattern recognition,the recognition effect of illegal refactoring points and the implementation effect of refactoring suggestions.This technology can also assist developers in the implementation of architecture reconstruction to a certain extent,improve the situation of the system violations,and improve the quality of the software.

Key words: architecture refactoring, layered pattern, recognition of architectural patterns, refactoring point positioning

中图分类号: