Static Detection of Design Patterns in Class Diagrams

Ed van Doorn, Sylvia Stuurman, Marko van Eekelen

Research output: Chapter in Book/Report/Conference proceedingConference Article in proceedingAcademicpeer-review

237 Downloads (Pure)


Teaching Object-Oriented design on the class diagram level is often a cumbersome effort. Requiring the use of specific design patterns helps the students in structuring their design properly. However, checking whether students used the right design pattern can be a very time-intensive task due to the variety of possibilities of creating structure using design patterns on the high-level class diagrams. For the same reason, it is hard for students to check for themselves whether their solution fulfills the basic requirements that are required by the instructor with respect to the use of design patterns. Efficiency and the quality of design pattern education can be improved by automatic detection of design patterns in \textsc{UML} class diagrams. We introduce a new method to detect design patterns in class diagrams, together with a prototype of a tool that uses this new method. Using this tool, an instructor needs less effort to review solutions of design exercises since the tool can check the basic class requirements automatically. Consequently, an instructor can focus on the more high-level requirements that were set in the exercise and students can easier check for themselves whether their design satisfies the basic required properties on the pattern level. The method offers static decidability for those design patterns, that are identified by structural properties e.c. the names of the classes and their associations. It is non-duplicating. That is a specific occurrence of a design pattern is not reported multiple times. The method not only detects all 16 static Gang of Four design patterns without false positives or false negatives, but also it can detect redundant relations. Our tool contributes tto the quality and efficiency of design pattern education, both for students and instructors.
Original languageEnglish
Title of host publicationCSERC '19
Subtitle of host publicationProceedings of the 8th Computer Science Education Research Conference
EditorsEbrahim Rahimi, Dave Stikkolorum
Place of PublicationNew York, NY
PublisherAssociation for Computing Machinery (ACM)
Number of pages10
ISBN (Electronic)9781450377171
ISBN (Print)9781450377171
Publication statusPublished - 18 Nov 2019
Event8th Computer Science Education Research Conference (CSERC'19) - University of Cyprus, Larnaca, Cyprus
Duration: 18 Nov 201920 Nov 2019
Conference number: 8


Conference8th Computer Science Education Research Conference (CSERC'19)
Abbreviated titleCSERC


  • Design patterns
  • Software engineering


Dive into the research topics of 'Static Detection of Design Patterns in Class Diagrams'. Together they form a unique fingerprint.

Cite this