Formal Verification of a C Compiler Front-End
This paper presents the formal verification of a compiler front-end that translates a subset of the C language into the Cminor intermediate language. The semantics of the source and target languages as well as the translation between them have been written in the specification language of the Coq proof assistant. The proof of observational semantic equivalence between the source and generated code has been machine-checked using Coq. An executable compiler was obtained by automatic extraction of executable Caml code from the Coq specification of the translator, combined with a certified compiler back-end generating PowerPC assembly code from Cminor, described in previous work.
Unable to display preview. Download preview PDF.
- 4.Gurevich, Y., Huggins, J.: The semantics of the C programming language. In: Martini, S., Börger, E., Kleine Büning, H., Jäger, G., Richter, M.M. (eds.) CSL 1992. LNCS, vol. 702, pp. 274–308. Springer, Heidelberg (1993)Google Scholar
- 5.Klein, G., Nipkow, T.: A machine-checked model for a Java-like language, virtual machine and compiler. Technical Report 0400001T.1, National ICT Australia, March 2004, in ACM TOPLAS (to appear) (2004)Google Scholar
- 6.Leinenbach, D., Paul, W., Petrova, E.: Towards the formal verification of a C0 compiler. In: Proc. Conf. on Software Engineering and Formal Methods (SEFM), Koblenz, Germany, September 2005, pp. 2–11. IEEE Computer Society Press, Los Alamitos (2005)Google Scholar
- 7.Leroy, X.: The Compcert certified compiler back-end – commented Coq development (2006), available online at: http://cristal.inria.fr/~xleroy
- 8.Leroy, X.: Formal certification of a compiler back-end, or: programming a compiler with a proof assistant. In: Proc. Symp. Principles Of Programming Languages (POPL), Charleston, USA, January 2006, pp. 42–54. ACM Press, New York (2006)Google Scholar
- 9.Nepomniaschy, V., Anureev, I., Promsky, A.: Verification-oriented language C-light and its structural operational semantics. In: Ershov Memorial Conference, pp. 103–111 (2003)Google Scholar
- 10.Norrish, M.: C formalised in HOL. PhD thesis, University of Cambridge (December 1998)Google Scholar
- 11.Papaspyrou, N.: A formal semantics for the C programming language. PhD thesis, National Technical University of Athens (February 1998)Google Scholar
- 12.Strecker, M.: Compiler verification for C0. Technical report, Université Paul Sabatier, Toulouse (April 2005)Google Scholar