What it is
The Pancake compiler, in Rocq
The Pancake compiler, ported
The Pancake compiler was originally verified in HOL4. Galette brings the compiler and the proofs about it to Rocq. HOL4 is the reference, and Flapjack's Lean port is a second opinion.
Easy for AI agents to write
Pancake is a small, low-level language with simple rules. That makes it a good target for code written by AI agents.
One HOL4 declaration, one translation
Every ported declaration is tagged with the HOL4 declaration it translates, and each HOL4 declaration has at most one translation. A script checks the tags. All of them have been compared line by line with HOL4; the 225 known differences are documented.
Byte-identical RISC-V output
The extracted compiler matches the original cake output byte for byte on all 166 fixtures of Flapjack's parity corpus, and on two builds of a stateless Ethereum guest program (about 5 MB of assembly each). The software is open source under the BSD-3-Clause License.
The machine code does what the Pancake program does
with result r and an I/O trace, the machine code terminates too, with the same result r and the same I/O trace.
and runs forever, the machine code diverges too with the same I/O trace.
You reason about the Pancake program, and the theorem carries that reasoning down to the machine code.
Small print. The theorem is a Rocq port of HOL4's pan_to_target_compile_semantics, and its statement is meant to match the HOL4 one clause by clause. As in HOL4, for the theorem to work fully, the stack size of the Pancake program needs to be statically determined, and must be small enough; otherwise the theorem leaves the possibility that the machine code runs out of resources while the source doesn't. The exact Rocq statement is rather big, including all definitions directly or indirectly referred to, and needs to be examined. Its only axioms are the classical logic, choice and extensionality axioms declared in Base.v. The RISC-V model is a port of HOL4's L3 model, not the authoritative Sail model. See PROGRESS.md. Nobody has examined the Rocq statement as far as we know. Rocq statements accepted by Rocq as theorems might not be true. Galette is distributed "as is" under the BSD-3 Clause License.
Status
What's on the plate
cake on the parity corpus
Pancake fragment → RISC-V: with a correctness theorem
BSD-3-Clause, on GitHub ↗
Other targets: ask us
Get in touch
Who to talk to
Any use · other targets
Contact Flamingo Ponderado
If you want to use Galette, or if you need another target, send an email.
hello@flamingoponderado.com