Verified Compilation of Floating-Point Computations

被引:24
|
作者
Boldo, Sylvie [1 ]
Jourdan, Jacques-Henri [2 ]
Leroy, Xavier [2 ]
Melquiond, Guillaume [1 ]
机构
[1] Univ Paris 11, Inria, LRI, CNRS,UMR 8623, F-91405 Orsay, France
[2] Inria Paris Rocquencourt, F-78153 Le Chesnay, France
关键词
Floating-point arithmetic; Compiler verification; Semantic preservation; CompCert; Coq; FORMAL VERIFICATION; ALGORITHMS; COMPILER;
D O I
10.1007/s10817-014-9317-x
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
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, and 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 C99) 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.
引用
收藏
页码:135 / 163
页数:29
相关论文
共 50 条