Skip to Main Content
In today's software engineering, more and more emphasis is put on the quality of object-oriented software design. It is commonly accepted that building a software system with maintainability and reusability issues in mind is far more important than just getting all the requirements fulfilled in one way or another. Design patterns are powerful means to obtain this goal. Tools have been built that automatically detect design patterns in object-oriented code and help in understanding the code. Other tools help in refactoring object-oriented code towards introducing design patterns, but human intelligence is needed to detect where these design patterns should be inserted. This paper proposes a logic approach to the automatic detection of places within object-oriented code where the Composite design pattern could have been used. Suspects identified by such a tool could very well be served as input data for other tools that automatically refactor the code as to introduce the missing design pattern.