Static Detection of Design Patterns in Class Diagrams

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

Abstract

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)
Pages79–88
Number of pages10
Edition1
ISBN (Print)9781450377171
DOIs
Publication statusPublished - Nov 2019
Event8th Computer Science Education Research Conference (CSERC'19) - University of Cyprus, Larnaca, Cyprus
Duration: 18 Nov 201920 Nov 2019
Conference number: 8

Conference

Conference8th Computer Science Education Research Conference (CSERC'19)
Abbreviated titleCSERC
CountryCyprus
CityLarnaca
Period18/11/1920/11/19

    Fingerprint

Keywords

  • Software engineering
  • Design patterns

Cite this

Doorn, E. V., Stuurman, S., & van Eekelen, M. (2019). Static Detection of Design Patterns in Class Diagrams. In E. Rahimi, & D. Stikkolorum (Eds.), CSERC '19: Proceedings of the 8th Computer Science Education Research Conference (1 ed., pp. 79–88). Association for Computing Machinery (ACM). https://doi.org/10.1145/3375258.3375268