Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3018610.3018621acmotherconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Verified compilation of CakeML to multiple machine-code targets

Published: 16 January 2017 Publication History

Abstract

This paper describes how the latest CakeML compiler supports verified compilation down to multiple realistically modelled target architectures. In particular, we describe how the compiler definition, the various language semantics, and the correctness proofs were organised to minimize target-specific overhead. With our setup we have incorporated compilation to four 64-bit architectures, ARMv8, x86-64, MIPS-64, RISC-V, and one 32-bit architecture, ARMv6. Our correctness theorem allows interference from the environment: the top-level correctness statement takes into account execution of foreign code and per-instruction interference from external processes, such as interrupt handlers in operating systems. The entire CakeML development is formalised in the HOL4 theorem prover.

References

[1]
F. Besson, S. Blazy, and P. Wilke. A concrete memory model for CompCert. In C. Urban and X. Zhang, editors, Interactive Theorem Proving (ITP), LNCS. Springer, 2015.
[2]
A. Chlipala. A verified compiler for an impure functional language. In M. V. Hermenegildo and J. Palsberg, editors, Principles of Programming Languages (POPL). ACM, Jan. 2010.
[3]
A. Chlipala. Mostly-automated verification of low-level programs in computational separation logic. In Programming Language Design and Implementation (PLDI). ACM, 2011.
[4]
A. Chlipala. The Bedrock structured programming system: Combining generative metaprogramming and Hoare logic in an extensible program verifier. In International Conference on Functional Programming (ICFP). ACM, 2013.
[5]
A. C. J. Fox. Improved tool support for machine-code decompilation in HOL4. In C. Urban and X. Zhang, editors, Interactive Theorem Proving (ITP), LNCS, 2015.
[6]
R. Kumar, M. O. Myreen, M. Norrish, and S. Owens. CakeML: a verified implementation of ML. In S. Jagannathan and P. Sewell, editors, Principles of Programming Languages (POPL). ACM, 2014.
[7]
X. Leroy. Formal verification of a realistic compiler. Commun. ACM, 52(7), 2009.
[8]
X. Leroy, A. W. Appel, S. Blazy, and G. Stewart. The CompCert memory model, version 2. Research report RR-7987, INRIA, June 2012.
[9]
J. S. Moore. A mechanically verified language implementation. Journal of Automated Reasoning, 5(4):461–492, 1989.
[10]
E. Mullen, D. Zuniga, Z. Tatlock, and D. Grossman. Verified peephole optimizations for CompCert. In C. Krintz and E. Berger, editors, Programming Language Design and Implementation (PLDI). ACM, 2016.
[11]
Z. Ni and Z. Shao. Certified assembly programming with embedded code pointers. SIGPLAN Not., 41(1), Jan. 2006.
[13]
S. Owens, M. O. Myreen, R. Kumar, and Y. K. Tan. Functional bigstep semantics. In P. Thiemann, editor, European Symposium on Programming (ESOP), LNCS. Springer, 2016.
[14]
T. A. L. Sewell, M. O. Myreen, and G. Klein. Translation validation for a verified OS kernel. In Programming Language Design and Implementation (PLDI). ACM, 2013.
[15]
Y. K. Tan, M. O. Myreen, R. Kumar, A. Fox, S. Owens, and M. Norrish. A new verified compiler backend for CakeML. In J. Garrigue, G. Keller, and E. Sumii, editors, International Conference on Functional Programming (ICFP). ACM, 2016.

Cited By

View all
  • (2024)Tinyrossa: A Compiler Framework for Vertical, Verified Construction of Smalltalk VMsCompanion Proceedings of the 8th International Conference on the Art, Science, and Engineering of Programming10.1145/3660829.3660838(43-46)Online publication date: 11-Mar-2024
  • (2024)Lightweight, Modular Verification for WebAssembly-to-Native Instruction SelectionProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 110.1145/3617232.3624862(231-248)Online publication date: 27-Apr-2024
  • (2023)Flexible Instruction-Set Semantics via Abstract Monads (Experience Report)Proceedings of the ACM on Programming Languages10.1145/36078337:ICFP(108-124)Online publication date: 31-Aug-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
CPP 2017: Proceedings of the 6th ACM SIGPLAN Conference on Certified Programs and Proofs
January 2017
234 pages
ISBN:9781450347051
DOI:10.1145/3018610
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 the author(s) 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].

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 16 January 2017

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Compiler verification
  2. ML
  3. verified assembly

Qualifiers

  • Research-article

Funding Sources

Conference

CPP '17
CPP '17: Certified Proofs and Programs
January 16 - 17, 2017
Paris, France

Acceptance Rates

Overall Acceptance Rate 18 of 26 submissions, 69%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)4
  • Downloads (Last 6 weeks)1
Reflects downloads up to 11 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Tinyrossa: A Compiler Framework for Vertical, Verified Construction of Smalltalk VMsCompanion Proceedings of the 8th International Conference on the Art, Science, and Engineering of Programming10.1145/3660829.3660838(43-46)Online publication date: 11-Mar-2024
  • (2024)Lightweight, Modular Verification for WebAssembly-to-Native Instruction SelectionProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 110.1145/3617232.3624862(231-248)Online publication date: 27-Apr-2024
  • (2023)Flexible Instruction-Set Semantics via Abstract Monads (Experience Report)Proceedings of the ACM on Programming Languages10.1145/36078337:ICFP(108-124)Online publication date: 31-Aug-2023
  • (2023)PureCake: A Verified Compiler for a Lazy Functional LanguageProceedings of the ACM on Programming Languages10.1145/35912597:PLDI(952-976)Online publication date: 6-Jun-2023
  • (2023)CN: Verifying Systems C Code with Separation-Logic Refinement TypesProceedings of the ACM on Programming Languages10.1145/35711947:POPL(1-32)Online publication date: 11-Jan-2023
  • (2023)Bounded Verification for Finite-Field-BlastingComputer Aided Verification10.1007/978-3-031-37709-9_8(154-175)Online publication date: 17-Jul-2023
  • (2022)Towards a Model Checking Framework for a New Collector FrameworkProceedings of the 19th International Conference on Managed Programming Languages and Runtimes10.1145/3546918.3546923(128-139)Online publication date: 14-Sep-2022
  • (2022)Islaris: verification of machine code against authoritative ISA semanticsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523434(825-840)Online publication date: 9-Jun-2022
  • (2022)The Trusted Computing Base of the CompCert Verified CompilerProgramming Languages and Systems10.1007/978-3-030-99336-8_8(204-233)Online publication date: 5-Apr-2022
  • (2020)Validation of Abstract Side-Channel Models for Computer ArchitecturesComputer Aided Verification10.1007/978-3-030-53288-8_12(225-248)Online publication date: 21-Jul-2020
  • 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