Detection of design pattern using Graph Isomorphism and Normalized Cross Correlation

Present day software engineering concept gives emphasis on the use of design patterns for developing software which are recurring in nature. Detection of design pattern is one of the emerging field of Software Reverse Engineering. In this work, an attempt has been made to present an approach for design pattern detection with the help of Graph Isomorphism and Normalized Cross Correlation techniques. In this study, system and design pattern are presented in the form of graphs. The Graph Isomorphism technique finds the pattern subgraph in the system graph and Normalized Cross Correlation provides a way to formulate the percentage existence of the design pattern in the system. An Eclipse Plug-in i.e., ObjectAid is used to extract Unified Modeling Language (UML) class diagrams as well as eXtensible Markup Language (XML) files from the software system and design patterns. An algorithm is proposed to identify relevant information from the XML files. Then Graph Isomorphism and Normalized Cross Correlation techniques are used to find the pattern subgraph and its percentage existence in the system. This approach has been applied on four open source software tools for the evaluation of five design patterns, such as Composite, Facade, Flyweight, State, and Template Method.

[1]  M. Gupta,et al.  Design Pattern Detection using inexact graph matching , 2010, 2010 International Conference on Communication and Computational Intelligence (INCOCCI).

[2]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[3]  Federico Bergenti IMPROVING UML DESIGNS USING AUTOMATIC DESIGN PATTERN DETECTION , 2001 .

[4]  Gerardo Canfora,et al.  Achievements and challenges in software reverse engineering , 2011, Commun. ACM.

[5]  Ashish Kumar Dwivedi,et al.  Incorporating Security Features in Service-Oriented Architecture using Security Patterns , 2015, SOEN.

[6]  Welf Löwe,et al.  Automatic design pattern detection , 2003, 11th IEEE International Workshop on Program Comprehension, 2003..

[7]  Ashish Kumar Dwivedi,et al.  Analysis of a Complex Architectural Style C2 Using Modeling Language Alloy , 2014 .

[8]  Yongtao Sun,et al.  Design pattern detection by template matching , 2008, SAC '08.

[9]  Alexander Chatzigeorgiou,et al.  Design Pattern Detection Using Similarity Scoring , 2006, IEEE Transactions on Software Engineering.

[10]  Manjari Gupta,et al.  Design Pattern Detection by normalized cross correlation , 2010, 2010 International Conference on Methods and Models in Computer Science (ICM2CS-2010).

[11]  Giuseppe Scanniello,et al.  Documenting Design-Pattern Instances: A Family of Experiments on Source-Code Comprehensibility , 2015, TSEM.

[12]  Shensheng Zhang,et al.  A practical pattern recovery approach based on both structural and behavioral analysis , 2005, J. Syst. Softw..

[13]  Francesca Arcelli Fontana,et al.  A tool for design pattern detection and software architecture reconstruction , 2011, Inf. Sci..

[14]  Sven Wenzel,et al.  Model-Driven Design Pattern Detection Using Difference Calculation , 2006 .

[15]  Yanyan Zhang,et al.  A comprehensive approach to the recovery of design pattern instances based on sub-patterns and method signatures , 2015, J. Syst. Softw..

[16]  Hong Zhu,et al.  An algebra of design patterns , 2013, TSEM.

[17]  Wei Wu,et al.  Detection of design pattern instances based on graph isomorphism , 2013, 2013 IEEE 4th International Conference on Software Engineering and Service Science.

[18]  Yann-Gaël Guéhéneuc,et al.  Meta-modeling Design Patterns: application to pattern detection and code synthesis , 2001 .

[19]  Ashish Kumar Dwivedi,et al.  Formalization of web security patterns , 2015 .

[20]  Ashish Kumar Dwivedi,et al.  Selecting and formalizing an architectural style: A comparative study , 2014, 2014 Seventh International Conference on Contemporary Computing (IC3).

[21]  M. Rizwan Jameel Qureshi,et al.  The proposal of improved inexact isomorphic graph algorithm to detect design patterns , 2014, ArXiv.

[22]  Fabio Stella,et al.  On applying machine learning techniques for design pattern detection , 2015, J. Syst. Softw..