Proving that your F* (Low*) code behaves like another version
Two programs (an optimized and a reference version, or code before and after a change) are proved to behave the same, or one refines the other.
Change the question
Ranked by: support for this property, stage, coverage of the features you pick, and trust. Tools that work on compiled code rank lower. Ranking as JSON.
-
Write low-level code in Low*, a C-like subset of F*, prove it safe and correct with F* and Z3, then compile it to readable C with KaRaMeL.
Partial.No dedicated equivalence mode; you prove Low* code equal to a pure F* specification function by hand, which is how HACL* is structured. Partial — No dedicated equivalence mode; you prove Low* code equal to a pure F* specification function by hand, which is how HACL* is structured.
- Effort
- Auto-active
- Covers
- 5 of 10 F* (Low*) features
- Relies on
- F*'s type checker and the Z3 SMT solver decide; no small kernel, no proof certificates. Low*'s memory model is a library inside F*; formalized on paper, not validated against C.
Stage 2 · Production 1/5 strong - Alive2 on compiled code: LLVM IR
Automatically checks that an optimized LLVM IR function still behaves like the original, or shows a counterexample. Loops are checked only up to a set bound.
Supported.This is Alive2's main job: it checks that the target refines the source (it may be more defined, never less). Within the loop bound and without timeouts, a pass is a proof for that one pair of functions.
Source Supported — This is Alive2's main job: it checks that the target refines the source (it may be more defined, never less). Within the loop bound and without timeouts, a pass is a proof for that one pair of functions.- Effort
- Push-button
- Covers
- 2 of 10 common features
- Relies on
- Z3 decides refinement; no proof certificates. Results hold only up to the loop bound. Alive2's own SMT model of LLVM IR; run on LLVM's tests, but no published validation.
Stage 1 · Usable 1/5 strong - s2n-bignum on compiled code: x86-64
Prove hand-written x86-64 or Arm64 assembly correct in HOL Light, on the exact bytes of the built object file; used for AWS's cryptography code.
Supported.A relational Hoare logic (CAV 2025) is used to prove optimized code (NEON vectorization, SLOTHY reordering) equivalent to a reference version.
Source Supported — A relational Hoare logic (CAV 2025) is used to prove optimized code (NEON vectorization, SLOTHY reordering) equivalent to a reference version.- Effort
- Interactive
- Covers
- 0 of 0 common features
- Relies on
- Hand-written instruction models; random co-simulation against real CPUs in CI.
Stage 1 · Usable 4/5 strong - CBMC on compiled code: C
Write a test-like harness for your C code; CBMC checks every execution up to a loop bound, giving a counterexample or a bounded proof.
Partial.No dedicated equivalence mode for two C functions; you write a harness that runs both on the same nondeterministic inputs and asserts equal results, within the loop bounds. The README also mentions checking C against Verilog.
Source Partial — No dedicated equivalence mode for two C functions; you write a harness that runs both on the same nondeterministic inputs and asserts equal results, within the loop bounds. The README also mentions checking C against Verilog.- Effort
- Push-button
- Covers
- 5 of 10 common features
- Relies on
- A SAT or SMT solver decides; its answer is trusted and no proof certificate is kept. C model built into CBMC; tested by its own regression suite.
Stage 1 · Usable 0/5 strong - Frama-C WP on compiled code: C
Write ACSL contracts and loop invariants as comments in your C code; Frama-C's WP plug-in turns them into proof goals for SMT solvers.
Partial.WP proves one function against one contract. Relating two programs (such as an optimized and a reference version) needs the separate research plug-in RPP, which uses self-composition on top of WP.
Source Partial — WP proves one function against one contract. Relating two programs (such as an optimized and a reference version) needs the separate research plug-in RPP, which uses self-composition on top of WP.- Effort
- Auto-active
- Covers
- 4 of 10 common features
- Relies on
- Alt-Ergo or another SMT solver via Why3 is trusted; no proof certificates. C model built into Frama-C and WP's memory models; no published validation found.
Stage 1 · Usable 0/5 strong - LNSym on compiled code: AArch64
Prove Armv8 (AArch64) machine code correct in Lean 4 by symbolic simulation over a hand-written model; aimed at AWS-LC cryptographic routines.
Unknown
- Effort
- Interactive
- Covers
- 0 of 0 common features
- Relies on
- Hand-written AArch64 subset; random co-simulation against real Arm CPUs in CI. Opcodes are pasted from objdump into Lean; not linked to the binary by a proof.
Stage 0 · Research 2/5 strong
No option matches this effort level.
Verify F* (Low*), but not this property
- Verified Software Toolchain (Verifiable C) — No built-in way to compare two programs. You can prove that both meet the same specification.
- CN — No built-in way to compare two programs. You can prove that both meet the same specification.
- Islaris — The logic proves properties of one program; no support for relating two programs is described.
Ask something else about F* (Low*)
- Everything
- No undefined behavior
- Functional correctness
- Information flow
- Concurrency
- Termination and liveness
New to this? Start with the glossary: auto-activeAuto-active verification. You write specifications and hints in the code; an automatic solver does the proving., interactiveInteractive theorem prover. A proof assistant where you write proofs step by step and the system checks each step., trusted computing baseTrusted computing base (TCB). Everything that must be correct for a proof to mean what it says..