电子学报 ›› 2021, Vol. 49 ›› Issue (1): 201-208.DOI: 10.12263/DZXB.20191198
王丽1,2, 杜鹏程1, 许一鸣2, 李必信1
收稿日期:
2019-10-22
修回日期:
2020-04-05
出版日期:
2021-01-25
通讯作者:
作者简介:
基金资助:
WANG Li1,2, DU Peng-cheng1, XU Yi-ming2, LI Bi-xin1
Received:
2019-10-22
Revised:
2020-04-05
Online:
2021-01-25
Published:
2021-01-25
Corresponding author:
Supported by:
摘要: 本文提出一种基于分层架构模式识别的软件架构重构技术.该技术以目标软件的源代码作为输入,过滤与分层架构无关的代码,再利用代码词汇信息挖掘程序实体之间的语义关联,通过代码主题提取并计算程序实体之间的职责相似度,依据相似度将程序实体聚类形成组件.在软件组件化的基础上结合分层模式的ILD属性识别软件层次和软件架构模式.在模式识别的基础上,定位系统中存在的违规作为重构点,生成相应的重构建议并实施重构.最后,本文在Github与SourceForge开源社区中选取10个开源软件系统作为实验对象,验证了本文提出的基于分层架构模式识别的软件架构重构技术在模式识别有效性、重构点识别效果和重构建议实施效果方面与传统方法相比有较大提升,能够有效的帮助软件开发人员识别软件架构模式、获取重构点、生成重构建议,并协助开发人员进行架构重构实施,改善系统违规情况,提升软件质量.
中图分类号:
王丽, 杜鹏程, 许一鸣, 等. 基于分层架构模式识别的软件架构重构技术[J]. 电子学报, 2021, 49(1): 201-208.
WANG Li, DU Peng-cheng, XU Yi-ming, et al. Software Architecture Reconstruction Technology Based on Layered Architecture Pattern Recognition[J]. Acta Electronica Sinica, 2021, 49(1): 201-208.
[1] Silva L D,Balasubramaniam D.Controlling software architecture erosion:A survey[J].Journal of Systems and Software,2012,85(1):132-151. [2] 杜鹏程.基于软件职责和结构的分层架构模式识别及重构[D].江苏南京:东南大学,2019. [3] Clements P,Bachmann F,Bass L,et al.Documenting Software Architectures:Views and Beyond[M].USA,2010.740-741. [4] Chavan P U,Murugan M,Chavan P P.A review on software architecture styles with layered robotic software architecture[A].International Conference on Computing Communication Control and Automation[C].Pune,India,2015.827-831. [5] Samarthyam G,Suryanarayana G,Sharma T.Refactoring for software architecture smells[A].The 1st International Workshop[C].USA:ACM,2016.1-4. [6] Linhui Zhong,Haitao Ye,Jing Xia.Research on software evolution reconstruction based on architecture recovery[A].IEEE 9th International Conference on Software Engineering and Service Science (ICSESS)[C].USA:IEEE,2018.68-71. [7] Kong X,Li B,Wang L,et al.Directory-based dependency processing for software architecture recovery[J].IEEE Access,2018,6:52321-52335. [8] Andreopoulos B,An A,Tzerpos V,Wang X.Clustering large software systems at multiple layers[J].Information and Software Technology,2007,49(3):244-254. [9] Laval J,Anquetil N,Bhatti U,et al.OZone:Layer identification in the presence of cyclic dependencies[J].Science of Computer Programming,2013,78(8):1055-1072. [10] 任武.通过用况聚类促进软件结构恢复的方法[J].电子学报,2013,41(7):166-172. REN Wu.Approach for facilitating structural recovery by clustering use cases[J].Acta Electronica Sinica,2013,41(7):166-172.(in Chinese) [11] 王桐,廖力,李必信.一种基于演进原则度量的软件架构持续演进效果评估方法[J].电子学报,2019,45(7):1475-1481. WANG Tong,LIAO Li,LI Bi-xin.An approach to evaluate the sustainable evolution effect of software architecture based on the measurements of evolution principles[J].Acta Electronica Sinica,2019,45(7):1475-1481.(in Chinese) [12] 刘辉辉,李必信,廖力,等.Java类和包的易替换性度量与影响因素分析[J].电子学报,2017,45(9):2149-2155. LIU Hui-hui,LI Bi-xin,LIAO Li,et al.Replaceability measurement and impact factor analysis for java classes and packages[J].Acta Electronica Sinica,2017,45(9):2149-2155.(in Chinese) [13] Binkley D,Heinz D,Lawrie D,et al.Understanding LDA in source code analysis[A].International Conference on Program Comprehension[C].USA:ACM,2014.26-36. [14] 孙小兵,刘湘月,李斌,张伟佳.基于相关主题模型的程序网络自动构建与分析[J].电子学报,2017,45(5):1052-1056. SUN Xiao-bing,LIU Xiang yue,LI Bin,ZHANG Wei-jia.On automatic construction and analysis of program network via relational topic mode[J].Acta Electronica Sinica,2017,45(5):1052-1056.(in Chinese) [15] Belle A B,Boussaidi G E,et al.Combining lexical and structural information to reconstruct software layers[J].Information and Software Technology,2016,74(1):1-16. [16] Belle A B,El Boussaidi G,et al.The layered architecture revisited:is it an optimization problem[A].The 25th International Conference on Software Engineering and Knowledge Engineering[C].USA:SEKE,2013.1-6. [17] Schmidt F,Macdonell S G,et al.An automatic architecture reconstruction and refactoring framework[A].The 9th International Conference on Software Engineering Research,Management and Applications[C].USA:SERA,2011.95-111. [18] Elish K O,Alshayeb M.A classification of refactoring methods based on software quality attributes[J].Arabian Journal for Science & Engineering,2011,36(7):1253-1267. [19] Sarkar S,Maskeri G,Ramachandran S.Discovery of architectural layers and measurement of layering violations in source code[J].Journal of Systems and Software,2009,82(11):1891-1905. |
[1] | 范伟, 周魏, 文俊浩. 基于异构图的双通道交叉自适应对比学习推荐[J]. 电子学报, 2023, (): 1-10. |
[2] | 王桐, 李必信, 王东东. 一种基于MAAT两步匹配的架构多层次变更检测方法[J]. 电子学报, 2023, 51(3): 694-700. |
[3] | 薄莉莉, 朱程, 李斌, 孙小兵. 文件信息增强的方法级软件缺陷定位[J]. 电子学报, 2023, 51(3): 613-621. |
[4] | 张颖辉, 张艳梅, 张志成, 姜淑娟, 丁艳茹, 袁冠. 基于深度强化学习的类集成测试序列生成方法[J]. 电子学报, 2023, 51(2): 455-466. |
[5] | 曹阳, 高旻, 余俊良, 范琪琳, 荣文戈, 文俊浩. 基于双图混合随机游走的社会化推荐模型[J]. 电子学报, 2023, 51(2): 286-296. |
[6] | 钱忠胜, 成轶伟, 俞情媛, 张丁, 姚昌森, 秦朗悦. 基于关键边概率与路径层接近度的多路径覆盖测试[J]. 电子学报, 2023, (): 1-9. |
[7] | 龚雪鸾, 陈艳姣, 王涛, 曹雨欣. SeqGANPass:使用序列生成式对抗网络进行口令猜测[J]. 电子学报, 2023, (): 1-6. |
[8] | 张帅, 高旻, 文俊浩, 熊庆宇, 唐旭. 基于自监督学习的去流行度偏差推荐方法[J]. 电子学报, 2022, 50(10): 2361-2371. |
[9] | 李雪莹, 王田路, 梁鹏, 王翀. 基于系统模型的用户评论中非功能需求的自动分类[J]. 电子学报, 2022, 50(9): 2079-2089. |
[10] | 王飞扬, 冀鹏欣, 孙笠, 危倩, 李根, 张忠宝. 一种基于深度学习的动态社交网络用户对齐方法[J]. 电子学报, 2022, 50(8): 1925-1936. |
[11] | 李辉, 张建朋, 陈福才. 基于流式分析的大规模网络重叠社区发现算法[J]. 电子学报, 2022, 50(8): 1951-1958. |
[12] | 钱忠胜, 宋佳, 俞情媛, 成轶伟, 孙志旺. 利用函数影响力的相似程序间测试用例重用与生成[J]. 电子学报, 2022, 50(7): 1696-1707. |
[13] | 王飞扬, 冀鹏欣, 孙笠, 危倩, 李根, 张忠宝. 一种基于深度学习的动态社交网络用户对齐方法[J]. 电子学报, 0, (): 1-12. |
[14] | 刘杰, 游品鸿, 田明, 刘金凤. 基于局部投影的视差图像拼接平滑优化[J]. 电子学报, 2022, 50(6): 1451-1456. |
[15] | 李志博, 李清宝, 兰明敬, 孙剑帆. 基于镜像选择序优化的MART算法[J]. 电子学报, 2022, 50(2): 314-325. |
阅读次数 | ||||||
全文 |
|
|||||
摘要 |
|
|||||