This paper reports on the development and formal certification (proof of semantic preservation) of a compiler from Cminor (a Clike imperative language) to PowerPC assembly code, using the Coq proof assistant both for programming the compiler and for proving its correctness. Such a certified compiler is useful in the context of formal methods applied to the certification of critical software: the certification of the compiler guarantees that the safety properties proved on the source code hold for the executable compiled code as well.
For example, Leroy REF uses the Coq proof assistant to program the compiler for a C-like imperative language and to prove its correctness.
Formal certification of a compiler back-end or: programming a compiler with a proof assistant
POPL '06
Computer Science