Static data-flow analysis for software product lines in C: Revoking the preprocessor’s special role
Static data-flow analysis for software product lines in C: Revoking the preprocessor’s special role
复制标题
C 语言中软件产品线的静态数据流分析:撤销预处理器的特殊角色
DOI:
10.1007/s10515-022-00333-1
复制
发表时间:
2022
影响因子:
3.4
通讯作者:
Bodden, Eric
中科院分区:
文献类型:
--
作者:
Schubert, Philipp Dominik;Gazzillo, Paul;Patterson, Zach;Braha, Julian;Schiebel, Fabian;Hermann, Ben;Wei, Shiyi;Bodden, Eric
Many critical codebases are written in C, and most of them use preprocessor directives to encode variability, effectively encoding software product lines. These preprocessor directives, however, challenge any static code analysis. SPLlift, a previously presented approach for analyzing software product lines, is limited to Java programs that use a rather simple feature encoding and to analysis problems with a finite and ideally small domain. Other approaches that allow the analysis of real-world C software product lines use special-purpose analyses, preventing the reuse of existing analysis infrastructures and ignoring the progress made by the static analysis community. This work presentsVarAlyzer, a novel static analysis approach for software product lines.VarAlyzerfirst transforms preprocessor constructs to plain C while preserving their variability and semantics. It then solves any given distributive analysis problem on transformed product lines in a variability-aware manner.VarAlyzer’s analysis results are annotated with feature constraints that encode in which configurations each result holds. Our experiments with 95 compilation units of OpenSSL show that applyingVarAlyzerenables one to conduct inter-procedural, flow-, field- and context-sensitive data-flow analyses on entire product lines for the first time, outperforming the product-based approach for highly-configurable systems.