用VeriFast证明C程序关于CompCert的正确性
Certifying C program correctness with respect to CompCert with VeriFast
摘要:
VeriFast是一个强大的工具,用于验证使用符号执行的C程序的各种正确性属性。然而,VeriFast本身尚未得到验证。我们提出了一个概念验证扩展,为每个成功的验证单独运行生成一个正确性证书。此证书采用Coq脚本的形式,其中包含两个证明,当Coq成功检查时,就不再需要信任VeriFast本身的正确性。第一个证明了一个引理,该引理表达了程序相对于我们开发的一个大步操作语义的正确性,旨在反映VeriFast对C语言的解释。我们在Coq中将这种语义形式化为cbsem。这个引理通过Coq中的符号执行来证明,而Coq又通过将程序的导出AST转换为表示VeriFast本身执行的符号执行的Coq命题来实现。第二个证明了同一个C程序在CompCert的Clight大步语义方面的正确性。这个证明简单地将我们对cbsem关于CompCert Clight的可靠性的证明应用于第一个证明。
英文摘要:
VeriFast is a powerful tool for verification of various correctness properties of C programs using symbolic execution. However, VeriFast itself has not been verified. We present a proof-of-concept extension which generates a correctness certificate for each successful verification run individually. This certificate takes the form of a Coq script containing two proofs which, when successfully checked by Coq, together remove the need for trusting in the correctness of VeriFast itself. The first proves a lemma expressing the correctness of the program with respect to a big step operational semantics developed by ourselves, intended to reflect VeriFast's interpretation of C. We have formalized this semantics in Coq as cbsem. This lemma is proven by symbolic execution in Coq, which in turn is implemented by transforming the exported AST of the program into a Coq proposition representing the symbolic execution performed by VeriFast itself. The second proves the correctness of the same C program with respect to CompCert's Clight big step semantics. This proof simply applies our proof of the soundness of cbsem with respect to CompCert Clight to the first proof.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。