Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    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.

    Visit blogHN submissions
    Languages & CompilersProgramming
    What HN says

    HN commenters cite his papers on verified compilation in CompCert, floating point, and the ZINC machine, and his book on control structures.

    Stats for nerds
    17HN people shared it
    13linked in comments
    250story points
    Mar 2026last shared
    2017people per year2026

    Top posts on HN

    1. 1
      Control structures in programming languages: from goto to algebraic effects
      5 people · 227 points · first shared 2025 · 32 comments on HN
    2. 2
      Compiling functional languages [pdf]
      2 people · 6 points · first shared 2019 · Discussion on HN
    3. 3
      Control Structures in Programming Languages
      1 person · 5 points · first shared 2026 · Discussion on HN
    4. 4
      Control Structures
      2 people · 4 points · first shared 2024 · Discussion on HN
    5. 5
      Programming = proving? The Curry-Howard correspondence today
      1 person · 3 points · first shared 2025 · Discussion on HN
    6. 6
      The Hacker Test (1989)
      1 person · 3 points · first shared 2019 · Discussion on HN
    7. 7
      From Krivine's machine to the Caml implementations [pdf]
      1 person · 2 points · first shared 2025 · Discussion on HN
    8. 8
      Validation regalloc.pdf
      1 person · first shared 2017
    9. 9
      5.pdf
      1 person · first shared 2025
    10. 10
      Leroy ZINC
      1 person · first shared 2026

    What HN people wrote when they linked it

    • tom_melliorDec 2017

      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…

    • thaliaarchiMay 2024

      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

    • NokinsideSep 2025

      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

    • lxgrApr 2024

      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

    • tomeNov 2025

      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.

    • rwmjMar 2026

      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.

    Related

    Oleg Kiselyovokmij.org251 people

    How the OCaml type checker works (2022)

    Oleg Kiselyov
    Personal · last shared 2026
    David Givencowlark.com94 people

    Live coding a vi for CP/M from scratch

    David Given
    Personal · last shared 2026
    Lambda the Ultimatelambda-the-ultimate.org615 people

    Simon Peyton Jones Elected into the Royal Society Fellowship

    Lambda the Ultimate
    Publication · last shared 2026
    Eric Kiddrandomhacks.net65 people

    Rust lifetimes: Getting away with things that would be reckless in C++

    Eric Kidd
    Personal · last shared 2026
    François Pottiergallium.inria.fr/~fpottier18 people

    A few lessons from the Mezzo project [pdf]

    François Pottier
    Personal · last shared 2025
    John Regehrblog.regehr.org401 people

    Teaching C

    John Regehr
    Personal · last shared 2026
    Edward Z. Yangblog.ezyang.com165 people

    PyTorch Internals: Ezyang's Blog

    Edward Z. Yang
    Personal · last shared 2026
    call-with-current-continuation.orgcall-with-current-continuation.org42 people

    Fleng 22 (concurrent logic programming)

    call-with-current-continuation.org
    Personal · last shared 2026