Rule-based detection of design patterns in program code

The process of understanding and reusing software is often time-consuming, especially in legacy code and open-source libraries. While some core code of open-source libraries may be well-documented, it is frequently the case that open-source libraries lack informative API documentation and reliable design information. As a result, the source code itself is often the sole reliable source of information for program understanding activities. In this article, we propose a reverse-engineering approach that can provide assistance during the process of understanding software through the automatic recovery of hidden design patterns in software libraries. Specifically, we use ontology formalism to represent the conceptual knowledge of the source code and semantic rules to capture the structures and behaviors of the design patterns in the libraries. Several software libraries were examined with this approach and the evaluation results show that effective and flexible detection of design patterns can be achieved without using hard-coded heuristics.

[1]  L. Stein,et al.  OWL Web Ontology Language - Reference , 2004 .

[2]  David L. Olson,et al.  Advanced Data Mining Techniques , 2008 .

[3]  Richard E. Grandy,et al.  Orlando, Florida, USA , 2011 .

[4]  Rudolf Ferenc,et al.  Mining design patterns from C++ source code , 2003, International Conference on Software Maintenance, 2003. ICSM 2003. Proceedings..

[5]  Michele Risi,et al.  Improving Behavioral Design Pattern Detection through Model Checking , 2010, 2010 14th European Conference on Software Maintenance and Reengineering.

[6]  N. F. Noy,et al.  Ontology Development 101: A Guide to Creating Your First Ontology , 2001 .

[7]  Yann-Gaël Guéhéneuc,et al.  DeMIMA: A Multilayered Approach for Design Pattern Identification , 2008, IEEE Transactions on Software Engineering.

[8]  Danko Basch,et al.  Ontology-Based Design Pattern Recognition , 2008, KES.

[9]  Keith E. Williamson,et al.  Ontology reuse and application , 1998 .

[10]  Wei Wang,et al.  Design pattern detection in Eiffel systems , 2005, 12th Working Conference on Reverse Engineering (WCRE'05).

[11]  Ronald A. Olsson,et al.  Reverse Engineering of Design Patterns from Java Source Code , 2006, 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06).

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

[13]  Laurie J. Hendren,et al.  Context-sensitive interprocedural points-to analysis in the presence of function pointers , 1994, PLDI '94.

[14]  Ian Horrocks,et al.  Ontologies and the semantic web , 2008, CACM.

[15]  James A. Hendler,et al.  The Semantic Web" in Scientific American , 2001 .

[16]  Kamran Sartipi,et al.  BEHAVIOR-DRIVEN DESIGN PATTERN RECOVERY , 2008 .

[17]  Lutz Prechelt,et al.  Design recovery by automated search for structural design patterns in object-oriented software , 1996, Proceedings of WCRE '96: 4rd Working Conference on Reverse Engineering.

[18]  Mel Ó Cinnéide,et al.  A methodology for the automated introduction of design patterns , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[19]  Ghulam Rasool,et al.  Flexible design pattern detection based on feature types , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[20]  Carole A. Goble,et al.  A Semantic Web-Based Approach to Knowledge Management for Grid Applications , 2007, IEEE Transactions on Knowledge and Data Engineering.

[21]  Benjamin N. Grosof,et al.  Supporting Rule System Interoperability on the Semantic Web with SWRL , 2005, SEMWEB.

[22]  Ian Horrocks,et al.  OWL Web Ontology Language Reference-W3C Recommen-dation , 2004 .

[23]  Michele Risi,et al.  Behavioral Pattern Identification through Visual Language Parsing and Code Instrumentation , 2009, 2009 13th European Conference on Software Maintenance and Reengineering.

[24]  Jens Dietrich,et al.  A formal description of design patterns using OWL , 2005, 2005 Australian Software Engineering Conference.

[25]  Yarden Katz,et al.  Pellet: A practical OWL-DL reasoner , 2007, J. Web Semant..

[26]  G Stix,et al.  The mice that warred. , 2001, Scientific American.

[27]  Mike Uschold,et al.  A Framework for Understanding and Classifying Ontology Applications , 1999 .

[28]  Boris Motik,et al.  Structured objects in owl: representation and reasoning , 2008, WWW.

[29]  Tian Zhao,et al.  Towards a Model-driven Approach for Reverse Engineering Design Patterns , 2009, TWOMDE@MoDELS.

[30]  Rudolf Ferenc,et al.  Design pattern mining enhanced by machine learning , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[31]  Günter Kniesel,et al.  DPJF - Design Pattern Detection with High Accuracy , 2012, 2012 16th European Conference on Software Maintenance and Reengineering.

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

[33]  Jens Dietrich,et al.  Towards a web of patterns , 2007, J. Web Semant..

[34]  Giancarlo Guizzardi,et al.  Developing software for and with reuse: an ontological approach , 2002 .

[35]  E. Prud hommeaux,et al.  SPARQL query language for RDF , 2011 .

[36]  Yann-Gaël Guéhéneuc,et al.  P-MARt : Pattern-like Micro Architecture Repository , 2007 .

[37]  Thomas R. Gruber,et al.  A translation approach to portable ontology specifications , 1993, Knowl. Acquis..