Object oriented design pattern inference

When designing a new application, experienced software engineers usually try to employ solutions that proved successful in previous projects. Such reuse of code organizations is seldom made explicit. Nevertheless it represents important information about the system, that can be extremely valuable in the maintenance phase by documenting the design choices underlying the implementation. In addition, having it available, it can be reused whenever a similar problem is encountered. In this paper an approach is proposed to the inference of recurrent design patterns directly from the code or the design. No assumption is made on the availability of any pattern library and the concept analysis algorithm, adapted for this purpose, is able to infer the presence of class groups which instantiate a common, repeated pattern. In fact, concept analysis provides sets of objects sharing attributes, which, in the case of object oriented design patterns, become class members or inter-class relations. The approach was applied to a C++ application, for which the structural relations among classes led to the extraction of a set of structural design patterns, which could be enriched with non structural information about class members and method invocations. The resulting patterns could be interpreted as meaningful organizations aimed at solving general problems which have several instances in the analyzed application.

[1]  Ralph Johnson Documenting frameworks using patterns , 1992, OOPSLA 1992.

[2]  Aniello Cimitile,et al.  Extracting abstract data types from C programs: A case study , 1993, 1993 Conference on Software Maintenance.

[3]  Atul Prakash,et al.  A Framework for Source Code Search Using Program Patterns , 1994, IEEE Trans. Software Eng..

[4]  Theodore Johnson,et al.  A new approach to finding objects in programs , 1994, J. Softw. Maintenance Res. Pract..

[5]  Aniello Cimitile,et al.  A precise method for identifying reusable abstract data types in code , 1994, Proceedings 1994 International Conference on Software Maintenance.

[6]  Gregor Snelting,et al.  On the inference of configuration structures from source code , 1994, Proceedings of 16th International Conference on Software Engineering.

[7]  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.

[8]  Kent L. Beck Smalltalk best practice patterns , 1996 .

[9]  Kyle G. Brown,et al.  Design reverse-engineering and automated design-pattern detection in Smalltalk , 1996 .

[10]  Gregor Snelting,et al.  Assessing Modular Structure of Legacy Code Based on Mathematical Concept Analysis , 1997, Proceedings of the (19th) International Conference on Software Engineering.

[11]  Kostas Kontogiannis,et al.  Evaluation experiments on the detection of programming patterns using software metrics , 1997, Proceedings of the Fourth Working Conference on Reverse Engineering.

[12]  Ralph E. Johnson,et al.  A Refactoring Tool for Smalltalk , 1997, Theory Pract. Object Syst..

[13]  Stéphane Ducasse,et al.  Dynamic Type Inference to Support Object-Oriented Reenginerring in Smalltalk , 1998, ECOOP Workshops.

[14]  Kris De Volder,et al.  Type-Oriented Logic Meta Programming , 1998 .

[15]  Lutz Prechelt,et al.  Functionality versus Practicality: Employing Existing Tools for Recovering Structural Design Patterns , 1998, J. Univers. Comput. Sci..

[16]  Giuliano Antoniol,et al.  Using metrics to identify design patterns in object-oriented software , 1998, Proceedings Fifth International Software Metrics Symposium. Metrics (Cat. No.98TB100262).

[17]  Rudolf K. Keller,et al.  Pattern visualization for software comprehension , 1998, Proceedings. 6th International Workshop on Program Comprehension. IWPC'98 (Cat. No.98TB100242).

[18]  Stéphane Ducasse,et al.  A language independent approach for detecting duplicated code , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[19]  Oscar Nierstrasz,et al.  A meta-model for language-independent refactoring , 2000, Proceedings International Symposium on Principles of Software Evolution.

[20]  Roel Wuyts,et al.  A Logic Meta-Programming Approach to Support the Co-Evolution of Object-Oriented Design and Implementation , 2001 .