Formally Verifying Optimizations with Block Simulations
Léo Gourdin, Benjamin Bonneau, Sylvain Boulmé, David Monniaux, Alexandre Bérard
Abstract
CompCert (ACM Software System Award 2021) is the first industrial-strength compiler with a mechanically checked proof of correctness. Yet, CompCert remains a moderately optimizing C compiler. Indeed, some optimizations of “gcc -O1” such as Lazy Code Motion (LCM) or Strength Reduction (SR) were still missing: developing these efficient optimizations together with their formal proofs remained a challenge. Cyril Six et al. have developed efficient formally verified translation validators for certifying the results of superblock schedulers and peephole optimizations. We revisit and generalize their approach into a framework (integrated into CompCert) able to validate many more optimizations: an enhanced superblock scheduler, but also Dead Code Elimination (DCE), Constant Propagation (CP), and more noticeably, LCM and SR. In contrast to other approaches to translation validation, we co-design our untrusted optimizations and their validators. Our optimizations provide hints, in the forms of invariants or CFG morphisms , that help keep the formally verified validators both simple and efficient. Such designs seem applicable beyond CompCert.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 5f1d6498-719e-45f8-875c-124c348fb67eCited by top-tier papers3
- Formal verification of high-level synthesisYann Herklotz, James D. Pollard, Nadesh Ramanathan, John WickersonOOPSLA 2021 · 29 citations
- Towards Trustworthy Automated Program Verifiers: Formally Validating Translations into an Intermediate Verification LanguageGaurav Parthasarathy, Thibault Dardinier, Benjamin Bonneau, Peter Müller et al.PLDI 2024 · 6 citations
- Relational Verification for Cost-Aware Quantum Program OptimizationZiming Zhao, Tingting Li, Zhaoxuan Li, Jianwei YinAAAI 2026
Builds on4
- Random testing for C and C++ compilers with YARPGenVsevolod Livinskii, Dmitry Babokin, John RegehrOOPSLA 2020 · 140 citations
- Certified and efficient instruction scheduling: application to interlocked VLIW processorsCyril Six, Sylvain Boulmé, David MonniauxOOPSLA 2020 · 21 citations
- Language-parametric compiler validation with application to LLVMTheodoros Kasampalis, Daejun Park, Zhengyao Lin, Vikram S. Adve et al.ASPLOS 2021 · 18 citations
- End-to-end translation validation for the halide languageBasile Clément, Albert CohenOOPSLA 2022 · 13 citations
Related papers
- Fully Verified Instruction SchedulingZiteng Yang, Jun Shirako, Vivek SarkarOOPSLA 2024 · 1 citation
- Counterexample-guided correlation algorithm for translation validationShubhani Gupta, Abhishek Rose, Sorav BansalOOPSLA 2020 · 14 citations
- CompCertELF: verified separate compilation of C programs into ELF object filesYuting Wang, Xiangzhe Xu, Pierre Wilke, Zhong ShaoOOPSLA 2020 · 26 citations
- Formal verification of a constant-time preserving C compilerGilles Barthe, Sandrine Blazy, Benjamin Grégoire, Rémi Hutin et al.POPL 2020 · 77 citations
- Hyperblock Scheduling for Verified High-Level SynthesisYann Herklotz, John WickersonPLDI 2024 · 3 citations
