摘要
误报率和漏报率是静态缺陷检测的关键技术指标,提高分析精度是降低误报和漏报的主要手段.文中介绍了缺陷模式及其有限状态机描述,提出基于传统数据流分析的缺陷检测方法.采用变量抽象取值来近似地表示程序动态执行信息,通过状态条件中的变量抽象取值范围为空来判断不可达路径,以实现路径敏感分析;使用缺陷相关的函数摘要来表示缺陷检测所需函数调用信息,其中缺陷相关的函数摘要包括前置约束信息、后置约束信息和函数特征信息三部分,实现了上下文敏感的跨函数分析.文中方法已在缺陷检测系统DTS中实现,在大型开源软件分析中的实验结果表明,该方法能减少误报和漏报.
False positive rate and false negative rate are key criteria of static defect detecting.Improving the analytic accuracy is the main method to reduce false positive and false negative.Defect pattern and its finite state machine description were introduced and then a defect detecting algorithm based on traditional dataflow analysis was presented.In order to realize path sensitive analysis,the dynamic information of program was represented approximately by abstract value of variables,and then infeasible path can be identified when some variable's abstract value is empty in the state condition.In order to realize context sensitive analysis,the context information of function call was represented using defect related function summary.A defect related function summary includes preconditions,postconditions and features.This method has been implemented in a defect detecting tool called DTS.Experimental results on ten open-source programs show that this method can reduce false positive and false negative.
出处
《计算机辅助设计与图形学学报》
EI
CSCD
北大核心
2010年第11期2037-2044,共8页
Journal of Computer-Aided Design & Computer Graphics
基金
国家"八六三"高技术研究发展计划(2007AA010302
2009AA012404)
关键词
缺陷检测
静态分析
数据流分析
路径敏感
上下文敏感
defect detecting
static analysis
dataflow analysis
path sensitive
context sensitive