一句话:提出 IceBear 调度框架,为三种 C/C++ 静态分析器提供函数级细粒度增量分析,减少冗余检查并过滤无关报告。
静态分析器已广泛用于迭代开发中以发现代码缺陷,但现有许多分析器不支持增量分析,或仅支持粗粒度增量,导致大量时间耗费在重复分析上,并产生大量与本次修改无关的告警报告。针对这一问题,本文提出 IceBear——一个支持三种 C/C++ 静态分析器的调度框架,实现细粒度增量分析。IceBear 首先精确定位发生变更的代码范围,并将变更传播到其他受影响组件(如 AST 节点、函数),通过提取这些细粒度的 diff 信息,在函数级别实施增量分析,从而减少冗余检查并过滤与修改无关的报告。实验结果表明,IceBear 可将整体分析时长降低 60.4%,并消除 92.3% 与修改无关的报告。
Static analyzers are commonly integrated into real-world development workflows to detect hidden code defects throughout iterative development. However, some analyzers do not support incremental analysis or only support coarse-grained incremental analysis, leading to substantial time wasted on redundant analysis, as well as numerous reports unrelated to the modifications made in this iteration. To address these issues, this paper proposes IceBear, a scheduling framework that supports three C/C++ static analyzers, offering fine-grained incremental analysis. IceBear pinpoints the changed code ranges and propagates these changes to other affected components (e.g., AST nodes, functions). By extracting this detailed diff information, IceBear implements a function-level incremental analysis, enabling it to reduce redundant checks and filter unrelated reports. Experimental results show that IceBear can reduce 60.4% of the overall analysis duration and eliminate 92.3% of reports that are unrelated to the modifications.