首页> 外文OA文献 >Design Patterns − Supporting Design Process by Automatically Detecting Design Patterns and Giving Some Feedback
【2h】

Design Patterns − Supporting Design Process by Automatically Detecting Design Patterns and Giving Some Feedback

机译:设计模式-通过自动检测设计模式并提供一些反馈来支持设计过程

摘要

Since the nineties, design patterns are of interest. Since the beginning of this century, research is done to the possibilities of recognizing design patterns in source code. There is little research to recognizing design patterns in UML diagrams and possibilities to provide feedback on those designs. This has led to the following research question: Are design patterns in a UML class diagram automatically detectable, and can one automatically supply some feedback? The research question is answered by a literature review followed by creating and testing a prototype, which recognizes design patterns and provides some feedback. In literature UML class diagrams and design patterns are modelled using matrices, decision trees, boolean expressions, Prolog clauses and 4-tuples. Dong describes a method, by which the various types of relationship can be denoted in one matrix. In his article, however, there is no description of the algorithm by which a design pattern can be detected. Unsuccessfully attempt has been made to write a detection algorithm by applying the steepest descent method and Richardson iteration to the method of Dong. Next, four methods for detecting design patterns are compared. The corresponding articles, including the article of Ba-Brahem, contain no description of an algorithm by which design patterns can be detected. The method of Ba-Brahem, which is based on the use of 4-tuples, seemed most promising. This method also offers the possibility to detect design patterns, which are only partially present. It can also be used to give feedback on missing relationships. For the method of Ba-Brahem I have designed and implemented an algorithm, which is able to detect design patterns. The prototype, which implements the method of Ba-Brahem, is able to detect 17 of the 23 Gang of Four patterns. Within one second 13 different design patterns are detected in a class diagram, which contains 57 classes en 61 relationships. In a second experiment a class diagram represented by a XMI files, which contains 33 classes and 49 associations, was used. The XMI file orginates from ArgoUML. This tool is used to design class diagrams. Within one second 17 different design patterns were detected. The prototype is also able to detect design patterns, which are partially present in a class diagram. When a class diagram includes a number of classes and interfaces, which forma design pattern, feedback is specified about the relationships between these classes and interfaces, which are not part of the design pattern. The prototype has made it clear, that instead of a 4-tuple a 3-tuple can be used. One of the attributes of a 4-tuple is intended to indicate whether a class has a self-reference. However, this attribute provides no contribution for the recognition of the Singleton design pattern. An essential characteristic is a self-reference of an object and not a self-reference of a class. The prototype is compared with four programs, which are described in literature. Only one program provides feedback, which is more comprehensive than the feedback from my prototype. Two programs have a graphical user interface, which displays the detected design patterns. How a design patterns is read, is either not disclosed or less simple compared to my prototype. For other issues, such as recall, precision and performance, the score of my prototype is at least equal. The Open University considers to make my prototype user friendly, such that it can be used for educational purposes.
机译:从九十年代开始,设计模式就引起了人们的兴趣。从本世纪初开始,人们就开始研究识别源代码中的设计模式的可能性。很少有研究能够识别UML图中的设计模式以及提供有关这些设计的反馈的可能性。这导致了以下研究问题:UML类图中的设计模式是否可以自动检测到,并且可以自动提供一些反馈吗?通过文献综述回答研究问题,然后创建并测试原型,该原型可以识别设计模式并提供一些反馈。在文献中,UML类图和设计模式使用矩阵,决策树,布尔表达式,Prolog子句和4元组建模。 Dong描述了一种方法,通过该方法可以在一个矩阵中表示各种类型的关系。但是,在他的文章中,没有描述可用来检测设计模式的算法。通过将最速下降法和Richardson迭代应用于Dong的方法,未能尝试编写检测算法。接下来,比较了四种检测设计模式的方法。相应的文章,包括Ba-Brahem的文章,均未包含可用来检测设计模式的算法的描述。基于四元组的Ba-Brahem方法似乎最有前途。该方法还提供了检测仅部分存在的设计模式的可能性。它还可以用于提供有关缺失关系的反馈。对于Ba-Brahem的方法,我设计并实现了一种算法,该算法能够检测设计模式。该原型实现了Ba-Brahem的方法,能够检测到23个“四个帮派”中的17个。一秒钟之内,在类图中检测到13个不同的设计模式,其中包含57个类和61个关系。在第二个实验中,使用了一个由XMI文件表示的类图,其中包含33个类和49个关联。 XMI文件从ArgoUML开始。该工具用于设计类图。在1秒钟内,检测到17种不同的设计模式。原型还能够检测部分存在于类图中的设计模式。当一个类图包含多个用于设计模式的类和接口时,将指定关于这些类和接口之间的关系的反馈,它们不是设计模式的一部分。该原型已明确表明,可以使用3个元组代替4个元组。 4元组的属性之一旨在指示类是否具有自引用。但是,此属性对识别Singleton设计模式没有任何贡献。本质特征是对象的自引用而不是类的自引用。将原型与文献中描述的四个程序进行比较。只有一个程序提供了反馈,比我的原型提供的反馈更全面。两个程序都有一个图形用户界面,该界面显示检测到的设计模式。与我的原型相比,如何读取设计模式,未公开或不太简单。对于其他问题,例如召回率,精度和性能,我的原型得分至少是相等的。开放大学考虑使我的原型用户友好,以便可以用于教育目的。

著录项

  • 作者

    Doorn Ed van;

  • 作者单位
  • 年度 2016
  • 总页数
  • 原文格式 PDF
  • 正文语种 en
  • 中图分类

相似文献

  • 外文文献
  • 中文文献
  • 专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号