一句话:提出 RuleRefiner,用 LLM 多阶段精化静态分析器检测规则,从根本上减少误报与漏报。
静态分析器对保障软件质量至关重要,但常因检测规则缺陷而产生误报。本文针对直接用大语言模型精化分析器中缺陷规则这一挑战性任务,提出多阶段框架 RuleRefiner。该框架系统性地利用 LLM:融合动态剖析信息实现基于事实的规则-代码对齐,执行差分故障定位以准确锁定错误来源,并使用针对性模板引导和约束 LLM 的修改,从而实现精确且破坏性最小的规则增强。作者在 218 个真实世界精化任务上进行评估,RuleRefiner 取得 80.28% 的 pass@5 分数,在相同设置下显著优于所有选定的 LLM 基线;此外,其精化后的规则展现出与人类专家编写规则相当的高泛化能力。
Static analyzers are vital to ensure software quality, but often produce false alarms. In this paper, we focus on the challenging task, directly refining defective static detection rules in the analyzer with Large Language Models to mitigate false positives/negatives fundamentally. This paper introduces RuleRefiner, a novel multi-stage framework for static analyzer rule refinement. Specifically, RuleRefiner systematically employs LLMs by integrating dynamic profiling information for fact-based rule-code alignment, performing differential fault localization to accurately pinpoint error sources, and utilizing targeted templates to guide and constrain LLM-based modifications for precise and minimally disruptive enhancements. Evaluated on 218 real-world refinement tasks, RuleRefiner achieved a pass@5 score of 80.28%, significantly outperforming all selected LLM-based baselines under the same settings. Moreover, the rules refined by RuleRefiner demonstrated high generalization capability comparable to those written by human experts.
DOI 原文 ·
@inproceedings{paperbot9241,
title = {Fact-Aligned and Template-Constrained Static Analyzer Rule Enhancement with LLMs},
author = {Zongze Jiang and Ming Wen and Ge Wen and Hai Jin},
booktitle = {ASE},
year = {2025},
doi = {10.1109/ase63991.2025.00138}
}