Static Detection of Design Patterns in Class Diagrams

E. V. Doorn, Sylvia Stuurman, M. V. Eekelen
{"title":"Static Detection of Design Patterns in Class Diagrams","authors":"E. V. Doorn, Sylvia Stuurman, M. V. Eekelen","doi":"10.1145/3375258.3375268","DOIUrl":null,"url":null,"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 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 to the quality and efficiency of design pattern education, both for students and instructors.","PeriodicalId":120434,"journal":{"name":"Proceedings of the 8th Computer Science Education Research Conference","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-11-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 8th Computer Science Education Research Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3375258.3375268","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

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 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 to the quality and efficiency of design pattern education, both for students and instructors.
类图中设计模式的静态检测
在类图级别上教授面向对象设计通常是一项繁琐的工作。要求使用特定的设计模式有助于学生正确地构建他们的设计。然而,检查学生是否使用了正确的设计模式可能是一项非常耗时的任务,因为在高级类图上使用设计模式创建结构的可能性很大。出于同样的原因,学生很难自己检查他们的解决方案是否满足了教师在使用设计模式方面所要求的基本要求。通过在UML类图中自动检测设计模式,可以提高设计模式教育的效率和质量。我们介绍了一种在类图中检测设计模式的新方法,以及一个使用这种新方法的工具的原型。使用该工具,教师无需花费太多精力来检查设计练习的解决方案,因为该工具可以自动检查基本课程要求。因此,指导教师可以将重点放在练习中设置的更高级的需求上,学生可以更容易地自己检查他们的设计是否满足模式级别上所需的基本属性。该方法为那些由结构属性(如类的名称及其关联)标识的设计模式提供了静态可判定性。它是不复制的。即一个设计模式的特定出现没有被报告多次。该方法不仅能检测出所有16种静态四人帮设计模式,无假阳性或假阴性,而且还能检测出冗余关系。我们的工具有助于提高学生和教师的设计模式教育的质量和效率。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信