JOURNAL ARTICLE

Formally Verifying Optimizations with Block Simulations

Léo GourdinBenjamin BonneauSylvain BoulméDavid MonniauxAlexandre Bérard

Year: 2023 Journal:   Proceedings of the ACM on Programming Languages Vol: 7 (OOPSLA2)Pages: 59-88   Publisher: Association for Computing Machinery

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.

Keywords:
Computer science Compiler Mathematical proof Correctness Parallel computing Optimizing compiler Programming language Theoretical computer science Mathematics

Metrics

12
Cited By
3.07
FWCI (Field Weighted Citation Impact)
47
Refs
0.90
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Logic, programming, and type systems
Physical Sciences →  Computer Science →  Artificial Intelligence
Formal Methods in Verification
Physical Sciences →  Computer Science →  Computational Theory and Mathematics
Security and Verification in Computing
Physical Sciences →  Computer Science →  Artificial Intelligence
© 2026 ScienceGate Book Chapters — All rights reserved.