X

Xavier Leroy

xavierleroy.org · Personal blog · on HN since 2017

Xavier Leroy, a programming language researcher behind OCaml and CompCert, hosts papers and talks on compilers and control structures.

What HN saysHN commenters cite his papers on verified compilation in CompCert, floating point, and the ZINC machine, and his book on control structures.
17HN people shared it
7linked it in comments
13stories submitted
250story points
4 months agolast shared
2017people per year2026

Most-shared posts

  1. 1
  2. 2
    Compiling functional languages [pdf]
    2 people · 6 points · first shared 2019 · discussion on HN
  3. 3
    Control Structures
    2 people · 4 points · first shared 2024 · discussion on HN
  4. 4
    Control Structures in Programming Languages
    1 people · 5 points · first shared 2026 · discussion on HN
  5. 5
    The Hacker Test (1989)
    1 people · 3 points · first shared 2019 · discussion on HN
  6. 6
  7. 7
    From Krivine's machine to the Caml implementations [pdf]
    1 people · 2 points · first shared 2025 · discussion on HN
  8. 8
    Oncard verifier spe.pdf
    1 people · first shared 2024
  9. 9
    5.pdf
    1 people · first shared 2025
  10. 10
    Leroy ZINC
    1 people · first shared 2026
  11. 11
    Compcert CACM.pdf
    1 people · first shared 2024
  12. 12
    Validation regalloc.pdf
    1 people · first shared 2017
  13. 13
    Floating point compcert.pdf
    1 people · first shared 2019

What HN people wrote when they linked it

tom_mellior · 2017-12-12
Maybe, but on the other hand maybe the CakeML developers have some proof techniques that the CompCert people didn't think of. I don't know. For reference, my only knowledge of this point comes from the CC 2010 paper at https://xavierleroy.org/publi/validation-regalloc.pdf, which says in section 5: "From a proof engineering viewpoint, the validator is a success. Its mechanized proof of correctness is only 900 lines of Coq, which is quite small for a 350-line piece of code. (The typical ratio for Coq program proofs is 6 to 8 lines of proof per line of code.) In contrast, 4300 lines of Coq proof were needed to verify the register allocation and spilling passes of the original CompCert compiler. Even this earlier development used translation validation on a sub-problem: the George-Appel graph coloring algorithm was implemented directly in untrusted Caml code, then followed by a verified validator to check that the resulting as- signment is a valid coloring of the interference graph. Later, Blazy, Robillard and Appel conducted a Coq proof of the graph coloring algorithm [13]. This is a fairly large proof: in total, more than 10000 lines of proof are needed to com- pletely verify the original CompCert register allocation and spilling passes." (And hence my statement above was also inaccurate in that the original CompCert was not fully directly proven. I had misremembered the details of this paragraph. The point still stands that the newer…
rwmj · 2026-03-07
Also Xavier Leroy's ZINC paper (https://xavierleroy.org/bibrefs/Leroy-ZINC.html) although I believe that's no longer the implementation used by OCaml since it got replaced by an even more efficient one.
tome · 2025-11-21
Thanks! You might also like the introduction I wrote to the Bluefin docs, which has some similar content: https://hackage-content.haskell.org/package/bluefin/docs/Bluefin.html Yes, Xavier's book was really interesting. It's here: https://xavierleroy.org/control-structures/ It's missing some subtleties of capability-based effect systems (which Bluefin is). Maybe I should write to him.
lxgr · 2024-04-30
Historically, smartcard chips were very underpowered 16- or even 8-bit MCUs that couldn't even perform Java bytecode validation on-chip (which caused some security vulnerabilities in the past; there's interesting academic literature on this if you're curious, for just one example see [1]). These days, these are sometimes ARM M0 cores which are significantly more powerful. I think Doom over SAT (SIM application toolkit) is within reach :) [1] https://xavierleroy.org/publi/oncard-verifier-spe.pdf
thaliaarchi · 2024-05-15
I didn't touch on that, but I did assume trust of the Rust toolchain, verifying starting at THIR. Verifying rustc would be a monumental undertaking, though I think some people are working on it. Since we don't have a verified rustc (a la CompCert [0]), I wonder if an approach like the translation validation of seL4 [1] would work. They prove that the artifact (ARM machine code) produced by an existing compiler (gcc) for a chosen program (seL4) matches the source semantics (C). Thus you could circumvent trusting rustc, but it only works to verify a specific output of a chosen program. If the chosen program was coq-of-rust, I don't think this would be easier than the approach I detailed above. The seL4 kernel is 9,500 lines of C, while their Isabel/HOL specification is over 200,000 lines, so the technique doesn't seem to scale to a large chosen source like rustc. Isn't bootstrapping fun? [0]: Xavier Leroy. 2008. “Formal verification of a realistic compiler”. https://xavierleroy.org/publi/compcert-CACM.pdf [1]: Thomas Sewell, Magnus Myreen, and Gerwin Klein. PLDI 2013. “Translation Validation for a Verified OS Kernel”. https://sci-hub.st/10.1145/2491956.2462183
Nokinside · 2025-09-02
That's just start. The bleeding edge uses abstract interpretation to verify code. Free from NASA: IKOS (Inference Kernel for Open Static Analyzers) is a static analyzer for C/C++ based on the theory of Abstract Interpretation. https://github.com/NASA-SW-VnV/ikos Commercial: Astrée is a static analyzer for safety-critical software written or gen­er­ated in C or C++. https://www.absint.com/astree/index.htm https://www.absint.com/astree/index.htm abstract interpretation for static analysis and verification: Good intro Mechanized semantics, fifth lecture Abstract art: static analysis by abstract interpretation https://xavierleroy.org/CdF/2019-2020/5.pdf Static Analysis and Verification of Aerospace Software by Abstract Interpretation https://mine.perso.lip6.fr/publi/article-bertrane-al-fntpl15.pdf

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close