With the continuous improvement of informatization,software is widely used in various engineering fields.However,the software usually faces complex application scenarios that require higher software quality in engineering projects,especially in engineering fields with special tasks,such as military software.As one of the important means to ensure software quality,software architecture refactoring has been extensively studied to meet the requirements of engineering projects consequently.Software architecture refactoring technology mainly includes three key components:software architecture modeling,software architecture pattern recognition,and software architecture refactoring implementation.For software architecture refactoring,the theoretical studies still suffer from some shortcomings.These have some.Specifically,for software architecture modeling,the existing methods mainly focus on obtaining architecture information based on the source code of the whole software project.However,due to frequent software iterations,the effectiveness and efficiency of existing approaches are difficult to meet the requirements of software architecture refactoring during the version upgrade.In addition,the result of existing software architecture refactoring approaches is a software architecture file,which contains information that cannot meet the requirements of architecture refactoring.For architectural pattern recognition,since the recognition mistakes will have an impact on architectural refactoring,the lower accuracy of architecture pattern recognition produced by existing approaches is insufficient to satisfy the demands of software architecture refactoring.For architecture refactoring,the existing approaches are mostly aimed at the bad smell of software.On the one hand,those approaches are incapable of addressing the issue of specific software architecture patterns.On the other hand,most of the existing approaches refactor software at the code level.To solve the problems of the software architecture,it is necessary to refactor the software at the architecture level.In order to solve the above problems,software architecture refactoring technology has been studied from three aspects: software architecture modeling,architecture pattern recognition,and architecture refactoring implementation.Firstly,the software architecture responsibility model is developed for software architecture refactoring.The pattern recognition approach to the software architecture is then investigated using the developed architecture responsibility model.Further,the usage principles of software architecture patterns are analyzed,and the software architecture refactoring points and the architecture refactoring suggestions are proposed.Finally,a military software project is selected as a case study to verify the effectiveness and feasibility of the proposed software architecture refactoring technology in military software engineering projects.The main research contents and contributions of this dissertation are as follows.(1)Aiming at the problems of low efficiency and high cost of software architecture recovery,as well as the lack of an abstract description of software architecture,this dissertation proposes an architecture responsibility model construction approach for software architecture refactoring.The approach extracts code change information based on code differences.Then,the double classifier technology is used to refactor the software architecture incrementally,which improves the efficiency and reduces the cost of the software architecture refactoring.Finally,a software architecture responsibility model can be constructed for architectural elements and architectural behaviors.(2)Aiming at the problems of the low accuracy of software architecture pattern recognition,this dissertation proposes a pattern recognition approach based on the architecture responsibility model.The approach instantiates the architecture responsibility model based on the architecture responsibility model.According to the characteristics of typical layered software architecture and event-driven architecture,the architectural elements are identified and the architectural behavior is modeled.The architecture recognition result of this approach is closer to the groudturth architecture,and the accuracy of pattern recognition is higher than that of existing approaches.(3)Aiming at the problems of software architecture refactoring,this dissertation proposes an architecture refactoring approach based on the usage rules of software architecture patterns.The approach analyzes the usage rules and violations of layered software architecture and event-driven architecture.This dissertation puts forward an approach of architecture-level refactoring point locating and refactoring suggestions.Then it maps the refactoring suggestions to the code-level modification so that software architecture refactoring can be implemented in the engineering field.(4)Based on theoretical research,we choose an engineering project in the field of military software as the case study.The case study shows that the proposed software architecture refactoring technology is accurate for architecture pattern recognition of military software and is of great significance for ensuring software quality.The proposed approach can help military software developers find out the architecture problems in the project accurately and eliminate these problems according to the refactoring suggestions.The case study shows that this dissertation achieves the expected effect of software architecture refactoring technology research. |