Context: Software metrics, as one form of static analyses, is a commonly used approach in software engineering in order to understand the state of a software system, in particular to identify potential areas prone to defects. Family-based techniques extract variability information from code artifacts in Software Product Lines (SPLs) to perform static analysis for all available variants. Many different types of metrics with numerous variants have been defined in literature. When counting all metrics including such variants, easily thousands of metrics can be defined. Computing all of them for large product lines can be an extremely expensive process in terms of performance and resource consumption. Objective: We address these performance and resource challenges while supporting customizable metric suites, which allow running both, single system and variability-aware code metrics. Method: In this paper, we introduce a partial parsing approach used for the efficient measurement of more than 42,000 code metric variations. The approach covers variability information and restricts parsing to the relevant parts of the Abstract Syntax Tree (AST). Conclusions: This partial parsing approach is designed to cover all relevant information to compute a broad variety of variability-aware code metrics on code artifacts containing annotation-based variability, e.g., realized with C-preprocessor statements. It allows for the flexible combination of single system and variability-aware metrics, which is not supported by existing tools. This is achieved by a novel representation of partially parsed product line code artifacts, which is tailored to the computation of the metrics. Our approach consumes considerably less resources, especially when computing many metric variants in parallel.
翻译:软件量度,作为一种静态分析的形式,是一种常用的软件工程方法,目的是了解软件系统的状况,特别是查明易出现缺陷的潜在领域。基于家庭的技术从软件产品行(SPLs)的编码文物中提取变异性信息,对所有可用的变异性进行静态分析。文献中定义了多种变异性的许多不同类型的计量方法。在计算包括变异性在内的所有计量时,可以很容易地界定数千度量。对大型产品行进行计算,可能是一个极其昂贵的性能和资源消耗过程。目标:我们处理这些性能和资源挑战,同时支持可定制的计量套件,既可以运行单一的系统,又可以识别变异性代码。方法:在本文中,我们采用了一种部分分解方法,用于有效计量42 000多种代碼变异性。当计算包括变性信息并限制对“简易语系树”相关部分的分解。结论:这一部分分解方法的设计可以涵盖所有相关信息,用于对多种变异性和资源进行可定制化的可定制度量和可变性识别的计量的计量套套套。具体地,我们用一个量化的代号的代号的代号的代号的代号的代号的计算工具可以相当的计算。在成本中,其实现的易变化的易变化的计算,其实现的代号的代号的代号的代号的代号的代号的代号的代为一种不同的计算,其变式的代号的代号的计算,其为一种不同的计算方法,其变式的代算工具的代算方法是相当的计算。