skip to main content
10.1145/1111037.1111042acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

Formal certification of a compiler back-end or: programming a compiler with a proof assistant

Published:11 January 2006Publication History

ABSTRACT

This paper reports on the development and formal certification (proof of semantic preservation) of a compiler from Cminor (a C-like 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.

References

  1. G. Barthe, P. Courtieu, G. Dufay, and S. M. de Sousa. Tool-Assisted Specification and Verification of the JavaCard Platform. In Proceedings of AMAST'02, volume 2422 of LNCS, pages 41--59. Springer-Verlag, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Y. Bertot and P. Castéran. Interactive Theorem Proving and Program Development -- Coq'Art: The Calculus of Inductive Constructions. EATCS Texts in Theoretical Computer Science. Springer-Verlag, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Y. Bertot, B. Grégoire, and X. Leroy. A structured approach to proving compiler optimizations based on dataflow analysis. In Types for Proofs and Programs, Workshop TYPES 2004, LNCS. Springer-Verlag, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Blazy and X. Leroy. Formal verification of a memory model for C-like imperative languages. In International Conference on Formal Engineering Methods (ICFEM 2005), volume 3785 of LNCS, pages 280--299. Springer-Verlag, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. O. Blech, S. Glesner, J. Leitner, and S. Mülling. Optimizing code generation from SSA form: A comparison between two formal correctness proofs in Isabelle/HOL. In Proc. COCV Workshop (Compiler Optimization meets Compiler Verification), 2005.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. Cachera, T. Jensen, D. Pichardie, and V. Rusu. Extracting a data flow analyser in constructive logic. In European Symposium on Programming 2004, volume 2986 of LNCS, pages 385--400. Springer-Verlag, 2004. Extended version to appear in Theor. Comp. Sci.]]Google ScholarGoogle ScholarCross RefCross Ref
  7. G. J. Chaitin. Register allocation and spilling via graph coloring. In Symp. Compiler Construction, volume 17(6) of SIGPLAN Notices, pages 98--105. ACM Press, 1982.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. Coupet-Grimal and W. Delobel. A Uniform and Certified Approach for Two Static Analyses. Research report 24-2005, Laboratoire d'Informatique Fondamentale, Marseille, France, April 2005.]]Google ScholarGoogle Scholar
  9. P. Cousot. The calculational design of a generic abstract interpreter. In M. Broy and R. Steinbrüggen, editors, Calculational System Design. NATO ASI Series F. IOS Press, Amsterdam, 1999.]]Google ScholarGoogle Scholar
  10. M. A. Dave. Compiler verification: a bibliography. SIGSOFT Softw. Eng. Notes, 28(6):2--2, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Dold and V. Vialard. A mechanically verified compiling specification for a Lisp compiler. In Proc. FST TCS 2001, volume 2245 of LNCS, pages 144--155. Springer-Verlag, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. L. George and A. W. Appel. Iterated register coalescing. ACM Trans. Prog. Lang. Syst., 18(3):300--324, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. G. Goos and W. Zimmermann. Verification of compilers. In Correct System Design, Recent Insight and Advances, volume 1710 of LNCS, pages 201--230. Springer-Verlag, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. B. Grégoire. Compilation des termes de preuves: un (nouveau) mariage entre Coq et Ocaml. PhD thesis, University Paris 7, 2003.]]Google ScholarGoogle Scholar
  15. G. Klein and T. Nipkow. A machine-checked model for a Java-like language, virtual machine and compiler. Technical Report 0400001T.1, National ICT Australia, Mar. 2004. To appear in ACM TOPLAS.]]Google ScholarGoogle Scholar
  16. J. Knoop, D. Koschützki, and B. Steffen. Basic-block graphs: Living dinosaurs? In Proc. Compiler Construction '98, volume 1383 of LNCS, pages 65--79. Springer-Verlag, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. D. Leinenbach, W. Paul, and E. Petrova. Towards the formal verification of a C0 compiler: Code generation and implementation correctness. In Int. Conf. on Software Engineering and Formal Methods (SEFM 2005), pages 2--11. IEEE Computer Society Press, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. S. Lerner, T. Millstein, E. Rice, and C. Chambers. Automated soundness proofs for dataflow analyses and transformations via local rules. In 32nd Principles of Progr. Lang, pages 364--377. ACM Press, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. P. Letouzey. A new extraction for Coq. In Types for Proofs and Programs, Workshop TYPES 2002, volume 2646 of LNCS, pages 200--219. Springer-Verlag, 2003.]]Google ScholarGoogle Scholar
  20. J. S. Moore. A mechanically verified language implementation. Journal of Automated Reasoning, 5(4):461--492, 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. S. Moore. Piton: a mechanically verified assembly-language. Kluwer, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. G. Morrisett, D. Walker, K. Crary, and N. Glew. From System F to typed assembly language. ACM Trans. Prog. Lang. Syst., 21(3):528--569, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. G. C. Necula. Proof-carrying code. In 24th Principles of Progr. Lang, pages 106--119. ACM Press, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. G. C. Necula. Translation validation for an optimizing compiler. In Prog. Lang. Design and Impl. 2000, pages 83--95. ACM Press, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. G. C. Necula and S. P. Rahul. Oracle-based checking of untrusted software. In 28th Principles of Progr. Lang, pages 142--154. ACM Press, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. S. L. Peyton Jones, N. Ramsey, and F. Reig. C--: a portable assembly language that supports garbage collection. In PPDP'99: International Conference on Principles and Practice of Declarative Programming, volume 1702 of LNCS, pages 1--28. Springer-Verlag, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. D. Pichardie. Interprétation abstraite en logique intuitionniste: extraction d'analyseurs Java certifiés. PhD thesis, University Rennes 1, Dec. 2005.]]Google ScholarGoogle Scholar
  28. A. Pnueli, M. Siegel, and E. Singerman. Translation validation. In Tools and Algorithms for Construction and Analysis of Systems, TACAS '98, volume 1384 of LNCS, pages 151--166. Springer-Verlag, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. L. Rideau and B. P. Serpette. Coq à la conquête des moulins. In Journées françaises des langages applicatifs (JFLA 2005), pages 169--180. INRIA, 2005.]]Google ScholarGoogle Scholar
  30. M. Rinard and D. Marinov. Credible compilation with pointers. In Proc. FLoC Workshop on Run-Time Result Verification, 1999.]]Google ScholarGoogle Scholar
  31. X. Rival. Symbolic transfer function-based approaches to certified compilation. In 31st symposium Principles of Programming Languagessymp. Principles of Progr. Lang, pages 1--13. ACM Press, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. R. Stärk, J. Schmid, and E. Börger. Java and the Java Virtual Machine. Springer-Verlag, 2001.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. M. Strecker. Formal verification of a Java compiler in Isabelle. In Proc. Conference on Automated Deduction (CADE), volume 2392 of Lecture Notes in Computer ScienceLNCS, pages 63--77. Springer-Verlag, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. M. Strecker. Compiler verification for C0. Technical report, Université Paul Sabatier, Toulouse, April 2005.]]Google ScholarGoogle Scholar
  35. L. D. Zuck, A. Pnueli, Y. Fang, and B. Goldberg. VOC: A translation validator for optimizing compilers. Electr. Notes Theor. Comput. Sci., 65(2), 2002.]]Google ScholarGoogle Scholar

Index Terms

  1. Formal certification of a compiler back-end or: programming a compiler with a proof assistant

                  Recommendations

                  Comments

                  Login options

                  Check if you have access through your login credentials or your institution to get full access on this article.

                  Sign in

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader
                  About Cookies On This Site

                  We use cookies to ensure that we give you the best experience on our website.

                  Learn more

                  Got it!