当前位置: X-MOL 学术Sci. Comput. Program. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Dynamic creation of source code models for the extraction of code metrics data through grammar querying
Science of Computer Programming ( IF 1.5 ) Pub Date : 2020-05-19 , DOI: 10.1016/j.scico.2020.102480
Alberto S. Nuñez-Varela , Héctor G. Pérez-Gonzalez , Francisco E. Martínez-Perez , Carlos Soubervielle-Montalvo , Oscar E. Perez-Cham

Source code metrics extraction is a complex task that has to be done automatically given the current size of software. They are extracted using software metric tools and more generic extraction mechanisms. These mechanisms usually work by querying a source code representation model. These models are static, and the information that can be obtained from them is limited. In this work an extraction methodology is presented in which the model is created every time certain information is needed. This is accomplished by querying the language context-free grammar, and from the information obtained by the query, a dynamic model is created. Current extraction mechanisms work by querying a model, while the proposed methodology queries the grammar directly, thus the model is created afterwards from the query result, and contains all the needed information. A metrics tool is created based on the proposed methodology, and in order to prove the correct functioning of extracting the desired information from the source code, not as already predefined as in current tools, several metrics are extracted as defined by four existing metrics tools. Querying the language grammar allows access to all available data in the source code, regardless of the programming language and paradigm.



中文翻译:

动态创建源代码模型以通过语法查询提取代码度量数据

源代码指标提取是一项复杂的任务,在给定当前软件大小的情况下,必须自动完成。使用软件度量工具和更通用的提取机制来提取它们。这些机制通常通过查询源代码表示模型来工作。这些模型是静态的,并且可以从中获得的信息有限。在这项工作中,提出了一种提取方法,其中每当需要某些信息时就创建模型。这是通过查询语言无关上下文的语法来完成的,并根据查询获得的信息创建动态模型。当前的提取机制通过查询模型来工作,而所提出的方法直接查询语法,因此随后从查询结果中创建模型,并包含所有需要的信息。基于所提出的方法来创建度量工具,并且为了证明从源代码中提取所需信息的正确功能,而不是像当前工具中已经预先定义的那样,提取了四个现有度量工具定义的几个度量。查询语言语法可以访问源代码中的所有可用数据,而无需考虑编程语言和范例。

更新日期:2020-05-19
down
wechat
bug