A Formally-Verified C Compiler Supporting Floating-Point Arithmetic

被引:27
作者
Boldo, Sylvie [1 ,2 ]
Jourdan, Jacques-Henri [3 ]
Leroy, Xavier [3 ]
Melquiond, Guillaume [1 ,2 ]
机构
[1] Univ Paris 11, Ctr Univ Orsay, Inria Saclay Ile De France, Bat 650 PCRI, F-91405 Orsay, France
[2] Univ Paris 11, Ctr Univ Orsay, CNRS UMR 8623, LRI, F-91405 Orsay, France
[3] Inria Paris Rocquencourt, F-78153 Le Chesnay, France
来源
2013 21ST IEEE SYMPOSIUM ON COMPUTER ARITHMETIC (ARITH) | 2013年
关键词
floating-point arithmetic; verified compilation; formal proof; floating-point semantic preservation;
D O I
10.1109/ARITH.2013.30
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Floating-point arithmetic is known to be tricky: roundings, formats, exceptional values. The IEEE-754 standard was a push towards straightening the field and made formal reasoning about floating-point computations easier and flourishing. Unfortunately, this is not sufficient to guarantee the final result of a program, as several other actors are involved: programming language, compiler, architecture. The CompCert formally-verified compiler provides a solution to this problem: this compiler comes with a mathematical specification of the semantics of its source language (a large subset of ISO C90) and target platforms (ARM, PowerPC, x86-SSE2), and with a proof that compilation preserves semantics. In this paper, we report on our recent success in formally specifying and proving correct CompCert's compilation of floating-point arithmetic. Since CompCert is verified using the Coq proof assistant, this effort required a suitable Coq formalization of the IEEE-754 standard; we extended the Flocq library for this purpose. As a result, we obtain the first formally verified compiler that provably preserves the semantics of floating-point programs.
引用
收藏
页码:107 / 115
页数:9
相关论文
共 32 条
[1]  
[Anonymous], 1974, Floating-Point Computation
[2]  
Ayad A., 2010, LECT NOTES ARTIFICIA
[3]  
Boldo S., 2004, THESIS
[4]   Formal verification of floating-point programs [J].
Boldo, Sylvie ;
Filliatre, Jean-Christophe .
18TH IEEE SYMPOSIUM ON COMPUTER ARITHMETIC, PROCEEDINGS, 2007, :187-+
[5]   Proofs of numerical programs when the compiler optimizes [J].
Boldo, Sylvie ;
Thi Minh Tuyen Nguyen .
INNOVATIONS IN SYSTEMS AND SOFTWARE ENGINEERING, 2011, 7 (02) :151-160
[6]   Flocq: A Unified Library for Proving Floating-point Algorithms in Coq [J].
Boldo, Sylvie ;
Melquiond, Guillaume .
2011 20TH IEEE SYMPOSIUM ON COMPUTER ARITHMETIC (ARITH-20), 2011, :243-252
[7]   Accelerating correctly rounded floating-point division when the divisor is known in advance [J].
Brisebarre, N ;
Muller, JM ;
Raina, SK .
IEEE TRANSACTIONS ON COMPUTERS, 2004, 53 (08) :1069-1072
[8]  
Carreno V., 1995, HOL95
[9]  
CLINGER WD, 1990, SIGPLAN NOTICES, V25, P92, DOI 10.1145/93548.93557
[10]  
Cousot P, 2005, LECT NOTES COMPUT SC, V3444, P21