Abstract

Identifying design patterns from source code is one of the most promising methods for improving software maintainability, reusing experience and facilitating software refactoring In the process of design pattern application, different methods of instantiation usually lead to generation of pattern variants. The detection of these variants from source code is a key point and a challenge of reverse engineering. In this paper, we propose an approach of detecting design pattern variants from source code based on constraints. More specifically, we first propose the method to describe the design pattern variants based on constraints, input the constraint conditions of design patterns into the library of pattern features, conduct static analysis on source code including analysis of control flow and data flow to obtain representations of pattern participants in the source code, conduct matching with the predicate matching tool, and then merge the instances by clustering analysis and obtain the final collection of pattern instances. Finally, a tool of extracting design pattern variants from source code is implemented and the feasibility of our approach is verified through the results of running it on three open source software.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.