Fast Static Analyses of Software Product Lines - An Example With More Than 42,000 Metrics

被引:4
作者
El-Sharkawy, Sascha [1 ]
Krafczyk, Adam [1 ]
Schmid, Klaus [1 ]
机构
[1] Univ Hildesheim, Inst Comp Sci, Hildesheim, Germany
来源
PROCEEDINGS OF THE 14TH INTERNATIONAL WORKING CONFERENCE ON VARIABILITY MODELLING OF SOFTWARE-INTENSIVE SYSTEMS (VAMOS '20) | 2020年
关键词
Software Product Lines; SPL; Metrics; Implementation; Variability Models; Feature Models; Abstract Syntax Trees; AST; PREDICTION;
D O I
10.1145/3377024.3377031
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页数:9
相关论文
共 1 条
  • [1] MetricHaven - More Than 23,000 Metrics for Measuring Quality Attributes of Software Product Lines
    El-Sharkawy, Sascha
    Krafczyk, Adam
    Schmid, Klaus
    23RD INTERNATIONAL SYSTEMS AND SOFTWARE PRODUCT LINE CONFERENCE(SPLC 2019), VOL B, 2019, : 25 - 28