arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2401.07042cs.SEcs.AI
收藏

GEML:一种基于语法的进化机器学习方法用于设计模式检测

GEML: A Grammar-based Evolutionary Machine Learning Approach for Design-Pattern Detection

University of Córdoba(科尔多瓦大学);Virginia Tech(弗吉尼亚理工大学)

Rafael Barbudo, Aurora Ramírez, Francisco Servant, José Raúl Romero

AI总结:

本文提出GEML方法,通过进化机器学习提取符合上下文无关文法的人类可读规则并构建分类器,在15个设计模式上验证了其检测有效性与鲁棒性。

摘要:

设计模式(DPs)被公认为软件开发中的良好实践。然而,缺乏适当的文档常常阻碍可追溯性,其优势在成千上万行代码中变得模糊不清。自动化的设计模式检测方法已变得重要,但通常基于对软件度量或源代码特定属性的刚性分析。我们提出GEML,一种基于进化机器学习的新颖检测方法,利用多种性质的软件属性。首先,GEML利用进化算法提取那些更能描述设计模式的特征,并以人类可读规则的形式表述,其语法符合上下文无关文法。其次,构建一个基于规则的分类器来预测新代码是否包含隐藏的设计模式实现。GEML已在从机器学习研究中经常采用的公共仓库中选取的五个设计模式上得到验证。随后,我们将这一数量增加到15个不同的设计模式,展示了其在检测能力方面的有效性和鲁棒性。初步的参数研究用于调整参数设置,其性能保证了该方法的普遍适用性,而无需针对特定模式调整复杂参数。最后,还提供了一个演示工具。

英文摘要:

Design patterns (DPs) are recognised as a good practice in software development. However, the lack of appropriate documentation often hampers traceability, and their benefits are blurred among thousands of lines of code. Automatic methods for DP detection have become relevant but are usually based on the rigid analysis of either software metrics or specific properties of the source code. We propose GEML, a novel detection approach based on evolutionary machine learning using software properties of diverse nature. Firstly, GEML makes use of an evolutionary algorithm to extract those characteristics that better describe the DP, formulated in terms of human-readable rules, whose syntax is conformant with a context-free grammar. Secondly, a rule-based classifier is built to predict whether new code contains a hidden DP implementation. GEML has been validated over five DPs taken from a public repository recurrently adopted by machine learning studies. Then, we increase this number up to 15 diverse DPs, showing its effectiveness and robustness in terms of detection capability. An initial parameter study served to tune a parameter setup whose performance guarantees the general applicability of this approach without the need to adjust complex parameters to a specific pattern. Finally, a demonstration tool is also provided.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑