What it is
A small language with a compiler with a correctness theorem
The Pancake compiler, ported
The Pancake compiler was originally verified in HOL4. Flapjack is bringing the compiler and proofs about it to Lean.
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.
Many features of Pancake to RISC-V
A path covering many features of Pancake source is implemented. All stages except initial steps (the Pancake parser and AST conversion) are associated with a correctness theorem. The software is open source under the BSD-3-Clause License.
The RISC-V code does what the Pancake program does
with result r and an I/O trace, the RISC-V code terminates too, with the same result r and the same I/O trace.
and runs forever, the RISC-V 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. For the correctness 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 RISC-V code runs out of resources while the source doesn't. Some other limitations are documented in SOUNDNESS.md; that list is not exhaustive. The exact Lean statement needs to be examined. The exact statement is rather big and is in Lean, including all definitions directly or indirectly referred to, as interpreted by parser and elaborator of Lean. Flapjack's RISC-V model is different from the authoritative Sail RISC-V model. Nobody has examined the Lean statement as far as we know. Lean statements accepted by Lean as theorems might not be true. Flapjack is distributed "as is" under the BSD-3 Clause License.
Status
What's on the plate
Get in touch
Who to talk to
zkVM guest programs
Contact zkSecurity
If you want to use Flapjack to build guest programs for zkVMs, you can talk to zkSecurity.
Other uses · ARM · x86
Contact Flamingo Ponderado
For any other use, or if you need another target such as ARM or x86, send an email.
hello@flamingoponderado.com