Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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 2006 Publication 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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[10]
M. A. Dave. Compiler verification: a bibliography. SIGSOFT Softw. Eng. Notes, 28(6):2--2, 2003.]]
[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.]]
[12]
L. George and A. W. Appel. Iterated register coalescing. ACM Trans. Prog. Lang. Syst., 18(3):300--324, 1996.]]
[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.]]
[14]
B. Grégoire. Compilation des termes de preuves: un (nouveau) mariage entre Coq et Ocaml. PhD thesis, University Paris 7, 2003.]]
[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.]]
[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.]]
[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.]]
[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.]]
[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.]]
[20]
J. S. Moore. A mechanically verified language implementation. Journal of Automated Reasoning, 5(4):461--492, 1989.]]
[21]
J. S. Moore. Piton: a mechanically verified assembly-language. Kluwer, 1996.]]
[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.]]
[23]
G. C. Necula. Proof-carrying code. In 24th Principles of Progr. Lang, pages 106--119. ACM Press, 1997.]]
[24]
G. C. Necula. Translation validation for an optimizing compiler. In Prog. Lang. Design and Impl. 2000, pages 83--95. ACM Press, 2000.]]
[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.]]
[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.]]
[27]
D. Pichardie. Interprétation abstraite en logique intuitionniste: extraction d'analyseurs Java certifiés. PhD thesis, University Rennes 1, Dec. 2005.]]
[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.]]
[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.]]
[30]
M. Rinard and D. Marinov. Credible compilation with pointers. In Proc. FLoC Workshop on Run-Time Result Verification, 1999.]]
[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.]]
[32]
R. Stärk, J. Schmid, and E. Börger. Java and the Java Virtual Machine. Springer-Verlag, 2001.]]
[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.]]
[34]
M. Strecker. Compiler verification for C0. Technical report, Université Paul Sabatier, Toulouse, April 2005.]]
[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.]]

Cited By

View all
  • (2025)Correct and Complete Type Checking and Certified Erasure for Coq, in CoqJournal of the ACM10.1145/370605672:1(1-74)Online publication date: 27-Jan-2025
  • (2025)Archmage and CompCertCast: End-to-End Verification Supporting Integer-Pointer CastingProceedings of the ACM on Programming Languages10.1145/37048819:POPL(1326-1354)Online publication date: 9-Jan-2025
  • (2025)Preservation of Speculative Constant-Time by CompilationProceedings of the ACM on Programming Languages10.1145/37048809:POPL(1293-1325)Online publication date: 9-Jan-2025
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '06: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 2006
432 pages
ISBN:1595930272
DOI:10.1145/1111037
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 41, Issue 1
    Proceedings of the 2006 POPL Conference
    January 2006
    421 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1111320
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 January 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. certified compilation
  2. compiler transformations and optimizations
  3. program proof
  4. semantic preservation
  5. the Coq theorem prover

Qualifiers

  • Article

Conference

POPL06

Acceptance Rates

Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '26

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)120
  • Downloads (Last 6 weeks)11
Reflects downloads up to 26 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2025)Correct and Complete Type Checking and Certified Erasure for Coq, in CoqJournal of the ACM10.1145/370605672:1(1-74)Online publication date: 27-Jan-2025
  • (2025)Archmage and CompCertCast: End-to-End Verification Supporting Integer-Pointer CastingProceedings of the ACM on Programming Languages10.1145/37048819:POPL(1326-1354)Online publication date: 9-Jan-2025
  • (2025)Preservation of Speculative Constant-Time by CompilationProceedings of the ACM on Programming Languages10.1145/37048809:POPL(1293-1325)Online publication date: 9-Jan-2025
  • (2025)A Verified Foreign Function Interface between Coq and CProceedings of the ACM on Programming Languages10.1145/37048609:POPL(687-717)Online publication date: 9-Jan-2025
  • (2024)Refinement Composition LogicProceedings of the ACM on Programming Languages10.1145/36746458:ICFP(573-601)Online publication date: 15-Aug-2024
  • (2024)Verified Extraction from Coq to OCamlProceedings of the ACM on Programming Languages10.1145/36563798:PLDI(52-75)Online publication date: 20-Jun-2024
  • (2024)Modeling Dynamic (De)Allocations of Local Memory for Translation ValidationProceedings of the ACM on Programming Languages10.1145/36498638:OOPSLA1(1463-1492)Online publication date: 29-Apr-2024
  • (2024)Correct-by-Construction Design of Custom Accelerator MicroarchitecturesIEEE Transactions on Computers10.1109/TC.2023.332924373:1(278-291)Online publication date: Jan-2024
  • (2024) : A simplified and abstract multicore hardware model for large scale system software formal verification Journal of Systems Architecture10.1016/j.sysarc.2023.103049147(103049)Online publication date: Feb-2024
  • (2024)Microprocessor Assurance and the Role of Theorem ProvingHandbook of Computer Architecture10.1007/978-981-97-9314-3_38(1321-1363)Online publication date: 21-Dec-2024
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media