Language-parametric compiler validation with application to LLVM
Theodoros Kasampalis, Daejun Park, Zhengyao Lin, Vikram S. Adve, Grigore Rosu
Abstract
We propose a new design for a Translation Validation (TV) system geared towards practical use with modern optimizing compilers, such as LLVM. Unlike existing TV systems, which are custom-tailored for a particular sequence of transformations and a specific, common language for input and output programs, our design clearly separates the transformation-specific components from the rest of the system, and generalizes the transformation-independent components. Specifically, we present Keq, the first program equivalence checker that is parametric to the input and output language semantics and has no dependence on the transformation between the input and output programs. The Keq algorithm is based on a rigorous formalization, namely cut-bisimulation, and is proven correct. We have prototyped a TV system for the Instruction Selection pass of LLVM, being able to automatically prove equivalence for translations from LLVM IR to the MachineIR used in compiling to x86-64. This transformation uses different input and output languages, and as such has not been previously addressed by the state of the art. An experimental evaluation shows that Keq successfully proves correct the translation of over 90% of 4732 supported functions in GCC from SPEC 2006.
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 8848f84d-0cc0-42e2-8add-0caa5c3a45d4Cited by top-tier papers8
- Formally Verifying Optimizations with Block SimulationsLéo Gourdin, Benjamin Bonneau, Sylvain Boulmé, David Monniaux et al.OOPSLA 2023 · 13 citations
- TensorRight: Automated Verification of Tensor Graph RewritesJai Arora, Sirui Lu, Devansh Jain, Tianfan Xu et al.POPL 2025 · 6 citations
- FlowCert: Translation Validation for Asynchronous Dataflow via Dynamic Fractional PermissionsZhengyao Lin, Joshua Gancher, Bryan ParnoOOPSLA 2024 · 4 citations
- CF-GKAT: Efficient Validation of Control-Flow TransformationsCheng Zhang, Tobias Kappé, David E. Narváez, Nico NausPOPL 2025 · 3 citations
- Modeling Dynamic (De)Allocations of Local Memory for Translation ValidationAbhishek Rose, Sorav BansalOOPSLA 2024 · 1 citation
Builds on1
Related papers
- Translation Validation for LLVM's AArch64 BackendRyan Berger, Mitch Briles, Nader Boushehrinejad Moradi, Nicholas Coughlin et al.OOPSLA 2025 · 3 citations
- Spatial and Temporal Decomposition for Faster Translation ValidationBenjamin Mikek, Chathur Bommineni, Qirun Zhang, Thomas RepsOOPSLA 2026
- Alive2: bounded translation validation for LLVMNuno P. Lopes, Juneyoung Lee, Chung-Kil Hur, Zhengyang Liu et al.PLDI 2021 · 109 citations
- Translation Validation for JIT Compiler in the V8 JavaScript EngineSeungwan Kwon, Jaeseong Kwon, Wooseok Kang, Juneyoung Lee et al.ICSE 2024 · 19 citations
- An SMT Encoding of LLVM's Memory Model for Bounded Translation ValidationJuneyoung Lee, Dongjoo Kim, Chung-Kil Hur, Nuno P. LopesCAV 2021 · 10 citations
