摘要
设计模式是程序员在软件设计中所得的经验总结,它被广泛应用于软件系统中,用以解决软件设计中常见的各种问题。从代码中识别设计模式可以帮助我们了解代码原本的设计意图。但是现有的设计模式识别方法都不能很好地识别有缺陷的设计模式。文中给出了一种使用模糊有限自动机来识别设计模式的新方法。根据各个语法信息的重要程度来为它们加权,以此来计算相似值,进而识别设计模式。在试验中该方法可以很好的识别有缺陷的设计模式。
Design pattern is the experience of developers during software system development and has been widely adopted. Identifying design patterns from source code may help to refactor and understand the intention. However, existing approaches cannot discover malformed instances of design pattern. In this paper, we give out a new approach to identify design patterns by representing the pattern information in form of Fuzzy Finite-State Automata. Different aspects of syntactic information according to the degree of importance are weighted to calculate the similar score to identify design pattern instances. In case study, the method can well identify design pattern defects.
出处
《电气自动化》
2009年第6期55-57,共3页
Electrical Automation
关键词
设计模式识别
模糊有限自动机
design pattern identify fuzzy finite-state automata