Skip to Main Content
Design patterns are micro architectures that have proved to be reliable, easy-to implement and robust. There is a need in science and industry for recognizing these patterns. This paper aims toward development of a new method for discovering design patterns in the source codes. The method provides a precise specification of how the patterns work by describing basic structural information like inheritance, composition, aggregation and association, and as an indispensable part, by defining call delegation, object creation and operation overriding. We have tried to introduce a new XML-based language, the extensible pattern markup language XPML, which provides an easy way for the users to modify pattern descriptions to suit their needs, or even to define their own patterns or just classes in certain relations they wish to find. The proposed method is tested on four open-source systems, and is found to be effective in discovering design pattern instances.