以精确的设计模式检测结果为目标,为解决设计模式识别的变体问题,提出一种基于文法产生式优化的设计模式识别方法,旨在使用可视化文法产生式描述设计模式参与者角色的属性与联系,并通过增加文法产生式描述的特征信息来识别重叠的设计模式及参与者角色间的附加关系。实验结果表明,该方法减少了设计模式识别的假阳性结果与假阴性结果,通过与主流方法的F-score评估指标比较,显示出该方法的优势。
Aiming at obtaining the accurate detection results of design pattern, an optimization method for design pattern identification based on the grammar production is presented for solving the variant problem of design pattern. The method focuses on role attributes of participants and relationships of design pattern instances by visual grammar production, and identifies the overlapping patterns and the additional relations between the participant roles by adding the feature information of grammar production. Experiment results show that the proposed method can reduce the false positive results and the false negative results, F-score index comparison with other well-known algorithms indicates the effectiveness and merits of the proposed method.