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
Bodden, Eric
中科院分区:
计算机科学3区
文献类型:
--
作者:
Schubert, Philipp Dominik;Gazzillo, Paul;Patterson, Zach;Braha, Julian;Schiebel, Fabian;Hermann, Ben;Wei, Shiyi;Bodden, Eric

文献摘要

相似文献

许多关键代码库都是用C语言编写的,其中大多数使用预处理器指令来编码可变性,有效地编码软件产品线。然而,这些预处理器指令挑战了任何静态代码分析。SPLlift,以前提出的分析软件产品线的方法,仅限于Java程序,使用一个相当简单的功能编码和分析问题,一个有限的和理想的小域。其他允许分析真实世界的C软件产品线的方法使用特殊目的的分析,防止重用现有的分析基础设施,并忽略了静态分析社区所取得的进展。本文提出了一种新的软件产品线静态分析方法VarAlyzer,它首先将预处理器结构转换为普通C语言,同时保留了它们的可变性和语义。然后,它解决了任何给定的分布式分析问题的转换产品线在一个可变性感知的方式。VarAlyzer的分析结果与特征约束,编码在每个结果持有的配置注释。我们的实验与OpenSSL的95个编译单元表明,applyingVarAlyzerenables一个进行跨程序,流程,字段和上下文敏感的数据流分析整个产品线的第一次,优于基于产品的方法高度可配置的系统。
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.