期刊文献+

一种C程序断言的全自动静态验证方法 被引量:1

Full-Automatic Static Assertion Verification for C Programs
下载PDF
导出
摘要 在软件程序中插入断言是保证软件质量的一个简单但有效的方法,人们常使用测试的方法检验程序中的断言是否满足,但测试很难保证验证的完备性。本文提出了一种可以保证完备性的全自动静态断言验证方法,其基本思想是基于程序切片符号执行程序的所有执行路径,并证明路径上的所有断言都满足。为了尽量减少符号执行的语句的数量,使用了基于反例的抽象精化方法,从一个粗略的切片标准开始迭代地符号执行一条路径,根据验证的反例自动生成下一次迭代过程中使用的精化的切片标准。包含循环的程序可能具有无穷多条程序执行路径,提出的基于符号执行上下文不变式证明的方法可以证明由于循环导致的无穷多条路径中断言都满足,从而使得验证过程可以终止。实验表明,提出的全自动静态断言验证方法不仅可行,而且验证代价较小,具有较强的实用性。 Inserting assertions into program source codes is a simple but effective way to ensure software quality. One usually checks the assertions through testing, but the testing based verification can't guarantee completeness. We present in this paper a full-automatic static verification method for complete assertion verification. The basic ideal behind our method is symbolically executing every execution trace and proving that all the assertions of the trace hold. We only symbolically execute those statements which are relevant to the assertions and use a slicing criterion to judge which one is relevant. In order to lessen the statements to be executed when symbolically executing a trace, we use the ideal of Counter-Example Guided Abstraction Refinement (CEGAR)to generate a refined slicing criterion from counter-examples and use the new slicing criterion to start a new verification iteration for the same trace until a real counter-example trace found or assertions proved to be hold. There are infinite many traces for programs with loops. We also present a method based on symbolic execution context invariant proving to prove that all assertions of the infinite many traces leading by loops are satisfied and thus make our verification process terminate. It's shown by the experiments that the assertion verification method presented in this paper not only is feasible but also has little verification cost.
出处 《计算机科学》 CSCD 北大核心 2006年第9期253-256,273,共5页 Computer Science
基金 863重大软件专项No.2002AA1Z2101~~
关键词 断言验证 基于程序切片的符号执行 基于反例的抽象精化 静态分析 Assertion verification,Symbolic execution based on program slicing, CEGAR, Static analysis
  • 相关文献

参考文献14

  • 1King J C.Symbolic execution and program testing.Communications of the ACM,1976,19(7):385~394
  • 2Weiser M.Program slicing.IEEE Transactions on Software Engineering(TSE) 1982,SE-10(4):352~357
  • 3Clarke E M,Grumberg O,Jha S,et al.Counterexample-guided abstraction refinement.In:Proceedings of CAV 1855,2000.154~169
  • 4Henzinger T A,Jhala R,Majumdar R,et al.Software Verification with BLAST.10th Int SPIN Workshop (SPIN'2003)2648 of Lecture Notes in Computer Science,2003.235~239
  • 5Chaki S,Clarke E,Groce A.Modular Verification of Software Components in C.In:ACM-SIGSOFT Distinguished Paper in the 25th International Conference on Software Engineering (ICSE),2003.385~395
  • 6Gries D.The Science of Programming.Springer-Verlag,1981
  • 7Ball T,Rajamani S K.Generating abstract explanations of spurious counterexamples in C programs:[Technical Report].MSR-TR-2002-09,Microsoft Research,Microsoft Corporation,2002
  • 8Zhang Xiangyu,Gupta R,Zhang Youtao.Precise Dynamic Slicing Algorithms.IEEE/ACM International Conference on Software Engineering (ICSE),2003.319~329
  • 9Detlefs D,Nelson G,Saxe J.Simplify:A theorem prover for program checking.http://research compaq com/src/esc/simplify html.2003
  • 10Graf S,Saidi H.Construction of abstract state graphs with PVS.In:CAV 97:Computer-aided Verification,LNCS 1254,SpringerVerlag,1997.72~83

同被引文献2

引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部