Compile-time HOL Proof System
Mathematical proof that your code is correct — before it ever runs. Not testing. Not linting. Proof.
The Problem
Testing finds bugs. Code review catches some more. But testing can only cover the inputs you think to try, and review is limited by human attention. In safety-critical, financial, cryptographic, and defense systems, “probably correct” isn’t good enough.
One missed edge case in a medical device, a cryptographic library, or a trading engine can mean patient safety incidents, security breaches, or millions in losses. Traditional development tools leave a gap between “tested” and “proven.”
The Solution
The GDS Compile-time HOL Proof System closes that gap. It uses higher-order logic (HOL) to mathematically prove that your Rust code is correct at compile time. If the code compiles, it is correct — not by assertion, but by mathematical demonstration from foundational axioms. Zero runtime cost. The original code is emitted unchanged.
Testing finds bugs. Proofs eliminate them. Every function annotated
with #[proven] has its correctness mathematically verified at compile time.
Entire categories of defects — memory safety violations, concurrency errors,
logic bugs, security vulnerabilities — are eliminated before the code ever
executes.
Who Benefits
Safety-Critical Systems
Aerospace, automotive, medical devices, and industrial control systems where failures can endanger lives. Formal proof replaces expensive certification testing cycles.
Financial Infrastructure
Trading systems, settlement engines, payment processors, and risk engines where a single logic error can mean regulatory penalties or catastrophic financial losses.
Cryptography & Security
Prove cryptographic implementations correct. Verify protocol properties, information flow guarantees, and access control invariants with mathematical certainty.
Operating Systems & Hypervisors
Kernel development, hypervisors, and systems software where a single bug can compromise an entire platform. Verify memory safety, scheduling, and isolation properties.
Defense & Government
Mission-critical systems requiring the highest assurance levels. Formal verification provides evidence that satisfies DO-178C, Common Criteria, and similar standards.
Blockchain & Distributed Systems
Smart contracts, consensus protocols, and distributed algorithms where bugs are irrevocable and every node must agree on correctness.
Quick Start
Add pathways-prove to your Cargo.toml and annotate functions with #[proven]:
# Cargo.toml
[dependencies]
pathways-prove = "0.1" use pathways_prove::proven;
#[proven(pre = "x: nat, y: nat", post = "result = x + y")]
fn add(x: u64, y: u64) -> u64 {
x + y
} The proof runs at compile time. If the code compiles, its correctness has been mathematically verified. Zero runtime cost — the original function is emitted unchanged.
Mathematical Foundations
The proof system is built on a minimal, auditable foundation: 4 axioms, 10 foundational concepts, and 10 primitive inference rules. Every theorem in the library — over 1,400 proofs spanning 77 mathematical domains — is derived from this foundation through legitimate inference alone. After bootstrap, the definition context is permanently sealed. No shortcuts. No unverified assumptions. No back doors.
The 4 Foundational Axioms
After these four axioms are admitted, the entire definition context is permanently sealed. No new axioms, constants, type constructors, or definitions can ever be introduced through any mechanism. There is no unlock. There is no back door. All subsequent mathematics must be derived through inference from these axioms and the 10 primitive rules alone.
⊢ (λx. f(x)) = f⊢ P(x) ⇒ P(@ P)@ selects such a witness. This enables classical reasoning and the axiom of choice in one compact statement.⊢ (SUC(x) = SUC(y)) = (x = y)⊢ SUC(n) ≠ 0The 10 Foundational Concepts
Everything in the proof system — from basic arithmetic to concurrency proofs to cryptographic verification — is constructed from these 10 concepts:
= : α → α → bool. Every logical connective and all reasoning ultimately flows from equality. λx. t creates new functions. The mechanism that makes higher-order logic “higher-order.” The 10 Primitive Inference Rules
Theorems are opaque values — constructable only through these 10 rules.
Rust’s module privacy system enforces this boundary at the language level. There is
no way to forge a theorem, no escape hatch, no unsafe bypass. If a
Thm value exists, it was proven.
Architecture: Trust by Construction
The proof system enforces correctness through three architectural layers, each of which is load-bearing. Remove any one and the guarantees collapse.
Thm type is opaque — constructable only through the 10
primitive inference rules. Rust’s module privacy system enforces this at the
language level. There is no unsafe bypass, no escape hatch, no way to forge
a theorem. If a Thm value exists, it was proven.
new_axiom(), define_constant(),
register_constant(), and define_type_constructor() all return
errors. There is no unlock method. There is no second tier. There is no back door. All
subsequent mathematics must be derived purely through the 10 primitive inference rules.
Available Macros
#[proven]
Verify Rust function pre/postconditions at compile time. Supports trait contracts, generic functions, closures, recursive functions, and full control flow analysis. The core macro for proving function correctness.
asm_proven!
Verify inline assembly register state, clobber sets, flag transitions, cycle bounds, memory layout, and stack balance. Supports x86_64, AArch64, RISC-V, and WebAssembly.
#[invariant]
Verify loop invariants inductively with ghost variables and monotonic predicates. Proves that loop bodies preserve stated invariant conditions across all iterations.
#[hol_spec]
Register an axiomatic specification for trusted external interfaces without verifying the body. Makes contracts available to callers for compositional reasoning.
What You Can Prove
- Functional Correctness: Functions produce the correct output for all possible inputs, proven by induction, case analysis, and structural reasoning.
- Memory Safety: No use-after-free, buffer overflows, null dereferences, or dangling pointers — mathematically proven, not just borrow-checked.
- Heap Verification: Allocation tracking for Box, Vec, and raw allocations. Proves freedom from use-after-free, double-free, and memory leaks across all exit paths.
- Resource Tracking: File descriptors, MMIO mappings, DMA buffers, and IRQ handlers tracked from acquisition to release. Proves no resource leaks, no use-after-release, and no double-release.
- Panic Freedom: Proves unreachable panics for
unwrap(),expect(),split_at(),remove(), and all library calls with implicit panic conditions. Tracks guard facts and transitive panic risk through call chains. - Obligation Tracking: 50 violation classes across 5 phases — arithmetic overflow, cast truncation, division by zero, shift bounds, pointer validity, aliasing, array bounds, lock ordering, information leaks, MIR divergence, and more. Every obligation must be discharged or the build fails.
- Concurrency Correctness: Freedom from data races, deadlocks, priority inversions, and livelock. Verified mutex semantics, lock-free progress, and memory ordering guarantees.
- Deadlock Detection: Lock ordering validation, ABBA cycle detection across function boundaries, guard scope enforcement, bare condvar wait detection, and mutex invariant tracking.
- Taint Analysis: Secret-tainted variable propagation through all operations. Detects secret-dependent branches (timing leaks), secret-dependent memory accesses (cache leaks), and secret-dependent variable-time instructions. Enforces declassification at public boundaries.
- Security Properties: Information flow non-interference, access control invariants, capability confinement, constant-time execution, and side-channel resistance.
- Cryptographic Correctness: Hash function collision resistance, signature unforgeability, encryption semantic security, key exchange safety, and protocol composition.
- Container Proofs: 10 verified container families (bitmap, buffer, deque, heap, list, map, pool, queue, set, tree) with 30+ concrete types, each with formally proven capacity invariants, ordering, and lock-free correctness.
- Real-time Bounds: Worst-case execution time bounds proven for safety-critical scheduling. Instruction-level cycle counting with architecture-specific latency models.
- Assembly Verification: Register state, flag transitions, clobber sets, stack balance, and memory effects verified for inline assembly across all supported architectures.
- Termination: Well-founded recursion and loop termination with formally verified ranking functions and decreasing measures.
- Ownership & Separation: Linear types, move semantics, heap separation (frame rule), and resource allocation/deallocation correctness.
- Tactic System: 10+ tactics (conj_tac, disch_tac, gen_tac, spec_tac, case_split_tac, induction_tac, arith_tac, subst_tac, rewrite_once_tac, mp_tac) plus 28 derived inference rules for building proofs compositionally.
- Term Normalization: Automatic canonicalization, constant folding, commutativity/associativity normalization, and proof-driven rewriting from the theorem library.
Obligation Tracking: 50 Violation Classes
Every #[proven] function generates proof obligations that must be discharged
or the build fails. The system tracks 50 distinct violation classes across 5 phases, from
arithmetic overflow to MIR divergence. Obligations are classified by severity: hard-reject
(build fails), heuristic discharge (auto-provable), and informational (logged for audit).
Phase 1: Structural (Hard-Reject)
Fatal violations that prevent proof construction. No HOL terms are generated.
panic!(), unreachable!(), assert!(), todo!() reachabilityf32 / f64 parameters (allowed via HOL floating_point theory)Option::unwrap() / expect() without proof value is SomeResult::unwrap() / expect() without proof value is OkPhase 2: Arithmetic & Memory Safety (Heuristic Discharge)
Auto-dischargeable by the arithmetic solver or precondition analysis.
+, -, *u64 as u32, etc.)/ or %)<< or >>)&mut params without DISJOINT preconditionPhase 3: Frame & Coverage (Informational)
Informational obligations logged for audit. Always discharged.
&mut [T] param not fully covered by effects clauseOption<T> / Result<T,E> return without full branch coveragePhase 4: Aliasing, Ownership & Synchronization
Heap safety, resource lifecycle, lock ordering, and ownership tracking.
arr[i] then read arr[j], i ≠ j unprovenCopy bindingPhase 5: I/O, Hardware & Security
Hardware effects, information flow, taint analysis, and MIR soundness.
DISJOINTVerified Container Library: 10 Families, 30+ Types
The pwos-containers crate provides 10 container families with 30+ concrete types,
each with formally proven capacity invariants, ordering properties, and lock-free correctness.
All container operations are modeled as HOL terms for compositional reasoning via #[proven].
Buffer
- RingBuffer — SPSC circular buffer
- BipBuffer — two-region contiguous writes
- TraceRing — static ring with slot metadata
- DynamicRing — heap-allocated dynamic ring
Queue
- SPSC Queue — single producer, single consumer
- MPMC RingQueue — multi producer, multi consumer
- SPSC Priority Queue — priority-ordered SPSC
- MPMC Priority Queue — priority-ordered MPMC
- MPSC Queue — multi producer, single consumer
- SPMC Queue — single producer, multi consumer
Heap
- BoundedBinaryHeap<T, N> — const-capacity max-heap
- AllocBinaryHeap<T> — heap-allocated max-heap
List
- IntrusiveList<T> — zero-alloc doubly-linked
- LinkedList<T> — heap-allocated doubly-linked
Map
- BoundedHashMap<K, V, N> — open-addressing, const capacity
- AllocHashMap<K, V> — dynamic resizing
- OrderedMap<K, V> — BTree-ordered iteration
Set
- BoundedHashSet<K, N> — open-addressing, const capacity
- AllocHashSet<K> — dynamic resizing
- OrderedSet<K> — BTree-ordered iteration
Deque
- ArrayDeque<T, N> — circular buffer, const capacity
- AllocDeque<T> — heap-allocated VecDeque
- IntrusiveDeque<T> — zero-alloc intrusive deque
Tree
- RadixTree<V, N> — sorted u64-keyed tree
- IntervalTree<T, N> — interval storage with overlap queries
- AllocRadixTree<V> — heap-allocated radix tree
- AllocIntervalTree<T> — heap-allocated interval tree
Pool
- Slab<T, N> — index-based object slab allocator
- Arena<T, N> — linear bump allocator
- ObjectPool<T, N> — reusable object pool
- SlotMap<T, N> — versioned slot storage with generations
Bitmap
- Bitmap<’a> — mutable bit array view
- AtomicBitmap<’a> — lock-free atomic bitmap
- IdAllocator<’a> — bitmap-backed ID allocator
Heap Verification
The heap verifier tracks every allocation from creation to deallocation across all exit paths, proving freedom from the three critical heap safety violations:
Box::new() allocation is tracked as a live heap region. Drop is verified to occur exactly once before scope exit.Vec::new() and Vec::with_capacity() allocations tracked through push, pop, resize, and drop operations.alloc::alloc() and alloc::dealloc() pairs verified for balance across all paths including early returns and error branches.Freed state generates a hard obligation.Freed state is caught and rejected.Live region that reaches function exit without being freed or returned to the caller is flagged.Resource Tracking
Beyond heap memory, the system tracks four categories of system resources from acquisition through release, proving that every resource is properly cleaned up on all exit paths:
open() or File::create() must have a matching close() or drop() on all paths.map_mmio() to unmap_mmio(). Unmapped regions cannot be accessed.free_dma(). Aliasing with software buffers generates a DISJOINT obligation.register_irq() to unregister_irq(). Double-registration and orphaned handlers are caught.Deadlock Detection
The verifier performs static deadlock analysis by tracking lock acquisition ordering within and across function boundaries:
lock_order = "a < b < c". The verifier enforces that locks are always acquired in declared order.Mutex::lock(), RwLock::read(), and RwLock::write() calls are tracked with acquisition sequences.wait() outside a retry loop (spurious wakeup vulnerability) is flagged.Tactic System & Derived Rules
Beyond the 10 primitive inference rules, the proof system provides 10+ high-level tactics and 28 derived inference rules for building proofs compositionally:
Tactics
conj_tacdisch_tacundisch_tacmp_tacgen_tacspec_taccase_split_tacsubst_tacrewrite_once_tacinduction_tacarith_tacDerived Inference Rules (28 Beyond the 10 Primitives)
Hardware Verification Support
The asm_proven! macro verifies inline assembly across 4 architectures with full
register models, flag tracking, cycle counting, memory ordering, and peripheral device
state machines. Every instruction effect is modeled as a HOL term.
Architectures & Register Models
x86_64
- 16 GPR (rax–r15) with 32/16/8-bit sub-registers
- 8-bit high registers (ah, bh, ch, dh)
- SIMD: xmm0–15, ymm0–15, zmm0–15
- AVX-512 mask registers k0–k7
- RFLAGS: CF, PF, AF, ZF, SF, OF
- RIP (instruction pointer), EFLAGS
- ADCX/ADOX independent carry/overflow chains
- MULX (BMI2), widening MUL/IMUL, DIV/IDIV
- CMPXCHG, CMPXCHG8B, CMPXCHG16B (atomic CAS)
- BSF, BSR, POPCNT, LZCNT, TZCNT (bit ops)
- CMOV conditional moves, SETCC conditional sets
- Memory barriers: LFENCE, SFENCE, MFENCE
AArch64
- 31 GPR (x0–x30) with w-register aliases
- xzr/wzr (zero register), sp, lr, fp
- NEON: v0–v31 (q/d/s/h/b scalar views)
- NZCV condition code register
- ADDS/SUBS with flag update
- UMULH, SMULH (upper-half multiply)
- CSET, CINC (conditional set/increment)
- Load/store exclusive: LDXR, STXR, LDAXR, STLXR
- Load/store pair: LDP, STP
- DMB, DSB memory barriers
RISC-V 64-bit
- 32 GPR (zero, ra, sp, gp, tp, t0–t6, s0–s11, a0–a7)
- 32 FP registers (fa0–fa7, fs0–fs11, ft0–ft11)
- Machine CSRs: mstatus, mtvec, mepc, mcause, mtval, mie, mip, mhartid, misa
- Supervisor CSRs: sstatus, stvec, sepc, scause, satp
- User CSRs: ustatus, utvec, uepc, ucause
- Counter CSRs: cycle, time, instret
- FP CSRs: fflags, frm, fcsr
- Vector CSRs: vstart, vxsat, vxrm, vl, vtype, vlenb
- A-extension atomics: AMOSWAP, AMOADD, AMOAND, AMOOR, AMOXOR, AMOMAX, AMOMIN
- Acquire/release suffixes: .aq, .rl, .aqrl
- FENCE, FENCE.I memory ordering
WebAssembly
- Typed local slots: i32, i64, f32, f64
- v128 SIMD proposal (i8x16 through f64x2)
- Global slots with type annotations
- Stack machine semantics
- Structured control flow (block, loop, if/else)
- atomic.fence memory barrier
Peripheral Device State Machines
Hardware peripherals are modeled as state machines with typed MMIO registers, port I/O, and DMA effects. Every device interaction generates HOL terms for verification:
Virtualization (Intel VT-x / VMX)
Instruction Cycle Cost Accounting
Per-instruction latency and throughput models for WCET (worst-case execution time) analysis. Conditional branches split the context; both paths are tracked independently with min/max cycle bounds merged at join points:
Theorem Library: 1,400+ Theorems Across 77 Domains
Over 1,400 pre-verified theorems organized across 77 mathematical domains, all derived from the 4 foundational axioms through legitimate inference. Every theorem has tracked dependencies and has passed mandatory quality gates (unconditional, non-tautological). All theorems are loaded via stack-safe queue dispatch during the sealed bootstrap phase.
Core Mathematics
- Logic & propositional calculus
- Set theory & set extensions
- Order theory (partial/total orders, lattices)
- Number theory (primes, GCD, CRT, Fermat)
- Integer & rational arithmetic
- Algebra (rings, fields, groups, modules)
- Algebraic structures
- Combinatorics (permutations, partitions)
- Category theory (functors, natural transformations)
Analysis & Topology
- Real analysis (limits, continuity, derivatives, integrals)
- Complex analysis (holomorphic functions, residues)
- Functional analysis (Banach/Hilbert spaces, operators)
- Topology (compactness, connectedness)
- Metric spaces (completeness, distance)
- Measure theory (Lebesgue integral)
- Differential equations (existence, uniqueness, stability)
- Numerical analysis (error bounds, stability)
Concurrency & Synchronization
- Mutex mutual exclusion & deadlock freedom
- CAS atomicity & linearizability
- Lock-free & wait-free progress guarantees
- Acquire-release & sequential consistency ordering
- MPMC/SPSC queue correctness
- RCU, seqlock, & barrier semantics
- Hazard pointers & epoch-based reclamation
- Deadlock detection (cycle, resource graphs)
- MVCC snapshot consistency
Cryptography & Security
- Hash functions (SHA-256, SHA-3, BLAKE2/3)
- Symmetric encryption (AES, ChaCha20, modes)
- Asymmetric encryption (RSA, ECDSA, Ed25519, X25519)
- Key derivation (PBKDF2, HKDF, Argon2, Scrypt)
- AEAD constructions (AES-GCM, ChaCha20-Poly1305)
- Post-quantum cryptography (lattice, code-based)
- Security proofs (IND-CPA/CCA2, UF-CMA, hybrid arguments)
- Zero-knowledge proofs (completeness, soundness)
- Protocol verification (authentication, key establishment)
- Side-channel analysis (timing, cache, power)
- Information flow non-interference
Memory & Systems
- Ownership & linear types (move semantics, borrows)
- Separation logic (heap separation, frame rule)
- Resource management (allocation/deallocation)
- Termination (well-founded recursion, ranking functions)
- Bitwise operations (popcount, reversal, masks)
- Floating-point arithmetic (IEEE 754 error analysis)
- Conservative approximation (safe bounds)
Algorithms & Data Structures
- Sorting, searching, graph traversal correctness
- Complexity theory (P, NP, PSPACE)
- Automata & state machines (DFA, NFA, regular expressions)
- Compiler theory (parsing, type checking, codegen)
- B-trees (balancing, insertion, deletion)
- Graph theory (paths, cycles, DAGs, coloring)
- Relational algebra & SQL logic
- Coding theory (error-correcting codes)
Distributed Systems & Databases
- ACID properties & transaction semantics
- Consensus & eventual consistency
- Blockchain & merkle tree correctness
- Message passing & network topology
- Crash recovery & durability
Specialized Domains
- Machine learning theory (PAC learning, VC dimension)
- Probability & probabilistic reasoning
- Information theory (entropy, channel capacity)
- Signal processing (Fourier, convolution)
- Optimization (convex, gradient descent, convergence)
- Control theory (stability, feedback)
- Game theory (Nash equilibria)
- Quantum computing
Feature Breakdown by Target
Every capability across Rust code, inline assembly for all supported architectures, and WebAssembly:
| Capability | Rust | x86_64 ASM | AArch64 ASM | RISC-V ASM | WASM |
|---|---|---|---|---|---|
| Core Verification | |||||
| Pre/postcondition contracts | ✓ | ✓ | ✓ | ✓ | ✓ |
| Loop invariants with induction | ✓ | ✓ | ✓ | ✓ | — |
| Trait method contracts | ✓ | n/a | n/a | n/a | n/a |
| Generic / polymorphic verification | ✓ | n/a | n/a | n/a | n/a |
| Closure verification (λ abstraction) | ✓ | n/a | n/a | n/a | n/a |
| Recursive function well-foundedness | ✓ | n/a | n/a | n/a | n/a |
| Axiomatic spec registration | ✓ | n/a | n/a | n/a | n/a |
| Dead code detection | ✓ | ✓ | ✓ | ✓ | — |
| Control Flow | |||||
| If/else branch verification | ✓ | ✓ | ✓ | ✓ | ✓ |
| Match expression exhaustiveness | ✓ | n/a | n/a | n/a | n/a |
| For / while loop verification | ✓ | ✓ | ✓ | ✓ | — |
| Break / continue with invariants | ✓ | n/a | n/a | n/a | n/a |
| Conditional branch splitting after CMP/TEST | n/a | ✓ | ✓ | ✓ | n/a |
| Data Types & Containers | |||||
| Struct / enum / tuple construction & access | ✓ | n/a | n/a | n/a | n/a |
| Vec<T> (len, push, pop, remove, extend, retain, contains, indexing) | ✓ | n/a | n/a | n/a | n/a |
| HashMap / BTreeMap (get, insert, remove, contains_key, entry, iter) | ✓ | n/a | n/a | n/a | n/a |
| String operations (chars, trim, starts_with, contains, concat) | ✓ | n/a | n/a | n/a | n/a |
| Option<T> / Result<T, E> case analysis | ✓ | n/a | n/a | n/a | n/a |
| Array / slice indexing with bounds proof | ✓ | n/a | n/a | n/a | n/a |
| Concurrency & Atomics | |||||
| Atomic load / store / CAS / CAS-weak / swap | ✓ | n/a | n/a | n/a | n/a |
| Atomic fetch_add / fetch_sub / fetch_or / fetch_and | ✓ | n/a | n/a | n/a | n/a |
| Memory ordering verification (Relaxed through SeqCst) | ✓ | n/a | n/a | n/a | n/a |
| Memory fences | ✓ | n/a | n/a | n/a | n/a |
| Lock ordering declaration & inversion detection | ✓ | n/a | n/a | n/a | n/a |
| All 13 atomic types (Bool, U8–U64, I8–I64, Usize, Isize) | ✓ | n/a | n/a | n/a | n/a |
| CachePadded<T> support | ✓ | n/a | n/a | n/a | n/a |
| Unsafe & Low-Level | |||||
| Pointer read / write with validity proofs | ✓ | n/a | n/a | n/a | n/a |
| Pointer dereference with alignment proof | ✓ | n/a | n/a | n/a | n/a |
| slice::from_raw_parts with range validity | ✓ | n/a | n/a | n/a | n/a |
| Transmute with size-match proof | ✓ | n/a | n/a | n/a | n/a |
| UnsafeCell::get with exclusive access proof | ✓ | n/a | n/a | n/a | n/a |
| MaybeUninit assume_init with initialization proof | ✓ | n/a | n/a | n/a | n/a |
| Assembly-Specific Features | |||||
| Register state pre/postconditions | n/a | ✓ | ✓ | ✓ | — |
| Flag state tracking (CF, ZF, OF, SF, NZCV) | n/a | ✓ | ✓ | n/a | n/a |
| Carry-aware arithmetic (ADC, SBB, ADCX, ADOX) | n/a | ✓ | n/a | n/a | n/a |
| Extended multiply (MULX / BMI2) | n/a | ✓ | n/a | n/a | n/a |
| SIMD register tracking (XMM/YMM/ZMM) | n/a | ✓ | n/a | n/a | n/a |
| Load/store exclusive (LDXR, STXR, LDAXR, STLXR) | n/a | n/a | ✓ | n/a | n/a |
| Sub-register aliasing (EAX–RAX, W0–X0) | n/a | ✓ | ✓ | n/a | n/a |
| Stack shadow / push-pop balance verification | n/a | ✓ | ✓ | ✓ | n/a |
| Memory layout / struct field offset mapping | n/a | ✓ | ✓ | ✓ | n/a |
| Cycle counting (min/max WCET bounds) | n/a | ✓ | ✓ | ✓ | n/a |
| Ghost variables for induction | n/a | ✓ | ✓ | ✓ | n/a |
| Memory corruption resilience mode | n/a | ✓ | ✓ | ✓ | n/a |
| Secret input / side-channel annotation | n/a | ✓ | ✓ | ✓ | n/a |
| Security & Analysis | |||||
| Taint analysis (secret value propagation) | ✓ | ✓ | ✓ | ✓ | — |
| Constant-time verification | ✓ | ✓ | ✓ | ✓ | — |
| Panic condition analysis | ✓ | n/a | n/a | n/a | n/a |
| Mutation tracking & inductive state proofs | ✓ | ✓ | ✓ | ✓ | — |
| Secret-dependent branch detection (timing leak) | ✓ | ✓ | ✓ | ✓ | — |
| Secret-dependent memory access (cache leak) | ✓ | ✓ | ✓ | ✓ | — |
| Secret-dependent variable-time instruction detection | ✓ | ✓ | ✓ | ✓ | — |
| Information flow (SECRET → public sink detection) | ✓ | n/a | n/a | n/a | n/a |
| Declassification enforcement | ✓ | n/a | n/a | n/a | n/a |
| MIR divergence detection | ✓ | n/a | n/a | n/a | n/a |
| Obligation Tracking (50 Violation Classes) | |||||
| Arithmetic overflow / underflow (Class 1) | ✓ | n/a | n/a | n/a | n/a |
| Cast truncation (Class 2) | ✓ | n/a | n/a | n/a | n/a |
| Division by zero (Class 3) | ✓ | n/a | n/a | n/a | n/a |
| Shift bounds (Class 4) | ✓ | n/a | n/a | n/a | n/a |
| Pointer validity (Class 6) | ✓ | n/a | n/a | n/a | n/a |
| Mutable aliasing without DISJOINT (Class 7) | ✓ | n/a | n/a | n/a | n/a |
| Array / tensor bounds (Class 8) | ✓ | n/a | n/a | n/a | n/a |
| Global / static access (Class 10) | ✓ | n/a | n/a | n/a | n/a |
| Trait contract violation / missing (Classes 39–40) | ✓ | n/a | n/a | n/a | n/a |
| Contradictory preconditions (Class 16) | ✓ | n/a | n/a | n/a | n/a |
| Unsafe path exploration (Classes 42–43) | ✓ | n/a | n/a | n/a | n/a |
| MIR divergence from proof model (Class 50) | ✓ | n/a | n/a | n/a | n/a |
| Panic Freedom | |||||
| Option::unwrap / expect without proof (Class 35) | ✓ | n/a | n/a | n/a | n/a |
| Result::unwrap / expect without proof (Class 36) | ✓ | n/a | n/a | n/a | n/a |
| Implicit panic call detection (Class 37) | ✓ | n/a | n/a | n/a | n/a |
| Transitive panic risk analysis (Class 38) | ✓ | n/a | n/a | n/a | n/a |
| Guard fact tracking (is_some, is_ok, bounds) | ✓ | n/a | n/a | n/a | n/a |
| catch_unwind boundary recognition | ✓ | n/a | n/a | n/a | n/a |
| Termination measure / decreases (Classes 33–34) | ✓ | n/a | n/a | n/a | n/a |
| Heap Verification | |||||
| Box allocation tracking | ✓ | n/a | n/a | n/a | n/a |
| Vec allocation tracking | ✓ | n/a | n/a | n/a | n/a |
| Raw allocation tracking (alloc / dealloc) | ✓ | n/a | n/a | n/a | n/a |
| Use-after-free detection (Class 25) | ✓ | n/a | n/a | n/a | n/a |
| Double-free detection (Class 23) | ✓ | n/a | n/a | n/a | n/a |
| Memory leak detection (Class 24) | ✓ | n/a | n/a | n/a | n/a |
| Scope-aware region promotion | ✓ | n/a | n/a | n/a | n/a |
| Resource Tracking | |||||
| File descriptor lifecycle (open / close) | ✓ | n/a | n/a | n/a | n/a |
| MMIO mapping lifecycle (map / unmap) | ✓ | n/a | n/a | n/a | n/a |
| DMA buffer lifecycle (alloc / free) | ✓ | n/a | n/a | n/a | n/a |
| IRQ handler lifecycle (register / unregister) | ✓ | n/a | n/a | n/a | n/a |
| Resource leak detection (Class 44) | ✓ | n/a | n/a | n/a | n/a |
| Use-after-release detection (Class 45) | ✓ | n/a | n/a | n/a | n/a |
| Double-release detection (Class 46) | ✓ | n/a | n/a | n/a | n/a |
| Deadlock Detection & Synchronization | |||||
| Lock ordering declaration & enforcement | ✓ | n/a | n/a | n/a | n/a |
| Local lock order violation (Class 28) | ✓ | n/a | n/a | n/a | n/a |
| Cross-function ABBA cycle detection (Class 29) | ✓ | n/a | n/a | n/a | n/a |
| Guard scope enforcement (Class 30) | ✓ | n/a | n/a | n/a | n/a |
| Bare condvar wait detection (Class 31) | ✓ | n/a | n/a | n/a | n/a |
| Mutex invariant enforcement (Class 32) | ✓ | n/a | n/a | n/a | n/a |
| Memory barrier sufficiency (Class 41) | ✓ | ✓ | ✓ | ✓ | — |
| Callee lock acquisition expansion | ✓ | n/a | n/a | n/a | n/a |
| Ownership & Lifetime | |||||
| Use-after-move detection (Class 19) | ✓ | n/a | n/a | n/a | n/a |
| Use-after-drop detection (Class 20) | ✓ | n/a | n/a | n/a | n/a |
| Double-drop detection (Class 21) | ✓ | n/a | n/a | n/a | n/a |
| Dangling borrow detection (Class 22) | ✓ | n/a | n/a | n/a | n/a |
| Read-after-write aliasing (Class 14) | ✓ | n/a | n/a | n/a | n/a |
| Hardware & I/O Effects | |||||
| MMIO write verification (Class 17) | n/a | ✓ | ✓ | ✓ | n/a |
| DMA aliasing detection (Class 18) | n/a | ✓ | ✓ | ✓ | n/a |
| Peripheral device state machine verification | n/a | ✓ | ✓ | ✓ | n/a |
| Interrupt controller models (APIC, I/O APIC, PIC) | n/a | ✓ | n/a | n/a | n/a |
| VT-x / VMX instruction verification | n/a | ✓ | n/a | n/a | n/a |
| VMCS field read / write | n/a | ✓ | n/a | n/a | n/a |
| EPT / VPID invalidation verification | n/a | ✓ | n/a | n/a | n/a |
| PCI configuration space modeling | n/a | ✓ | ✓ | ✓ | n/a |
| VirtIO device verification (Block, Net, GPU) | n/a | ✓ | ✓ | ✓ | n/a |
| Container Proofs | |||||
| Ring buffer capacity invariants (SPSC) | ✓ | n/a | n/a | n/a | n/a |
| MPMC slot sequence management | ✓ | n/a | n/a | n/a | n/a |
| Bounded queue count correctness | ✓ | n/a | n/a | n/a | n/a |
| Index wrapping proofs | ✓ | n/a | n/a | n/a | n/a |
| Free + available = capacity - 1 invariant | ✓ | n/a | n/a | n/a | n/a |
| Vec → HOL model (LEN, NTH, PUSH, POP, FILTER) | ✓ | n/a | n/a | n/a | n/a |
| HashMap / BTreeMap → HOL model (GET, INSERT, REMOVE, KEYS) | ✓ | n/a | n/a | n/a | n/a |
| String → HOL model (CHARS, TRIM, STARTS_WITH, CONTAINS) | ✓ | n/a | n/a | n/a | n/a |
| Proof Infrastructure | |||||
| 11 tactics (conj, disch, gen, spec, case_split, induction, arith, …) | ✓ | n/a | n/a | n/a | n/a |
| 28 derived inference rules | ✓ | n/a | n/a | n/a | n/a |
| Term normalization (canonicalization, constant folding) | ✓ | n/a | n/a | n/a | n/a |
| Commutativity / associativity normalization | ✓ | n/a | n/a | n/a | n/a |
| Proof-driven rewriting from theorem library | ✓ | n/a | n/a | n/a | n/a |
| Pattern matching with free variable instantiation | ✓ | n/a | n/a | n/a | n/a |
| Anticheat / tautological conclusion rejection | ✓ | n/a | n/a | n/a | n/a |
How We Compare
No other tool combines compile-time theorem proving, native Rust integration, assembly verification, and a pre-built proof library. Here is how the Pathways HOL Proof System compares to the leading formal verification tools:
| Capability | Pathways HOL | Verus | Kani | Creusot | Prusti | Dafny | SPARK/Ada | Coq/Rocq | F* | Lean 4 |
|---|---|---|---|---|---|---|---|---|---|---|
| Language & Integration | ||||||||||
| Verifies Rust directly | ✓ | ~ | ✓ | ~ | ~ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Compile-time (in cargo build) | ✓ | ✗ | ✗ | ✗ | ✗ | ✓ | ✓ | ✗ | ✗ | ✗ |
| No separate spec language required | ✓ | ~ | ✓ | ✗ | ~ | ✓ | ✓ | ✗ | ✓ | ✗ |
| Zero runtime overhead | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Proof Capabilities | ||||||||||
| Full theorem proving (not bounded) | ✓ | ✓ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Pre-built proof library | ✓ | ✓ | ✗ | ~ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Loop invariants | ✓ | ✓ | ~ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Termination proofs | ✓ | ✓ | ✗ | ~ | ✗ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Dependent types | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✓ | ✓ | ✓ |
| Counterexample generation | ✗ | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Rust Feature Coverage | ||||||||||
| Closures & generics | ✓ | ✓ | ~ | ~ | ~ | ✓ | ~ | ✓ | ✓ | ✓ |
| Trait / interface contracts | ✓ | ✓ | ~ | ✓ | ~ | ✓ | ✓ | ✓ | ~ | ✓ |
| Container types (Vec, Map, etc.) | ✓ | ✓ | ~ | ~ | ~ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Option / Result verification | ✓ | ✓ | ✓ | ✓ | ~ | ✓ | ~ | ✓ | ✓ | ✓ |
| Unsafe Rust verification | ✓ | ~ | ✓ | ✗ | ✗ | ✗ | ✗ | ✓ | ~ | ✗ |
| Memory & Ownership | ||||||||||
| Memory safety proofs | ✓ | ✓ | ✓ | ~ | ~ | ~ | ✓ | ✓ | ✓ | ~ |
| Ownership / borrow reasoning | ✓ | ✓ | ✗ | ✓ | ✓ | ~ | ✓ | ✓ | ✓ | ~ |
| Separation logic | ✓ | ~ | ✗ | ~ | ~ | ~ | ~ | ✓ | ✓ | ~ |
| Concurrency & Low-Level | ||||||||||
| Concurrency proofs | ✓ | ✓ | ✗ | ~ | ✗ | ~ | ✓ | ✓ | ✓ | ~ |
| Assembly verification | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✓ | ✓ | ✗ |
| Multi-architecture (x86, ARM, RISC-V, WASM) | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ~ | ✓ | ~ | ✗ |
| Security & Cryptography | ||||||||||
| Cryptographic verification | ✓ | ✗ | ✗ | ✗ | ✗ | ~ | ~ | ✓ | ✓ | ~ |
| Side-channel / constant-time analysis | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ~ | ~ | ✓ | ✗ |
| Information flow analysis | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✓ | ✗ | ~ | ✗ |
| Real-Time & Certification | ||||||||||
| WCET / real-time bounds | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ~ | ~ | ✗ | ✗ |
| Safety certification (DO-178C, CC) | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✓ | ~ | ✗ | ✗ |
| Obligation & Panic Analysis | ||||||||||
| Proof obligation tracking (50 classes) | ✓ | ✗ | ✗ | ✗ | ✗ | ~ | ✓ | ~ | ~ | ✗ |
| Panic freedom analysis | ✓ | ~ | ✓ | ✗ | ~ | ✓ | ✓ | ✗ | ✓ | ✗ |
| Arithmetic overflow / div-by-zero detection | ✓ | ✓ | ✓ | ~ | ✓ | ✓ | ✓ | ~ | ✓ | ~ |
| Heap & Resource Verification | ||||||||||
| Heap verification (use-after-free, double-free, leaks) | ✓ | ~ | ✓ | ~ | ~ | ~ | ✓ | ✓ | ✓ | ✗ |
| Resource lifecycle tracking (FD, MMIO, DMA, IRQ) | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ~ | ~ | ~ | ✗ |
| Deadlock detection (ABBA cycles, lock ordering) | ✓ | ✗ | ✗ | ✗ | ✗ | ~ | ✓ | ✓ | ~ | ✗ |
| Hardware & Device Verification | ||||||||||
| Peripheral device state machines | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ~ | ✗ | ✗ |
| VT-x / VMX hypervisor verification | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ~ | ✗ | ✗ |
| MMIO / DMA effect verification | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ~ | ✗ | ✗ |
| Instruction cycle cost accounting (WCET) | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ~ | ~ | ✗ | ✗ |
| Verified container library (10 families, 30+ types) | ✓ | ✓ | ✗ | ✗ | ✗ | ✓ | ✓ | ✓ | ~ | ✓ |
✓ = Full support
~ = Partial / limited
✗ = Not supported
Verus uses a verus! macro extending Rust syntax; Creusot uses Pearlite; Prusti uses proc-macro attributes with custom operators.
Dafny is a standalone verified language (not Rust) with integrated verification.
F* assembly support is via the Vale DSL (x86-64 and AArch64).
Coq/Rocq assembly and crypto via CompCert, Bedrock, and FIAT-Crypto (deployed in BoringSSL, Go, Firefox).
SPARK certification support covers DO-178C (Level A), Common Criteria (EAL 5+), EN 50128, ISO 26262, and IEC 61508.
Licensing & Pricing
The HOL proof system is distributed as a Rust crate via Cargo. License keys are cryptographically signed tokens validated at compile time. Each license is tied to a single user and can be activated on up to two unique machines.
Hobby / Student / Individual
#[proven]macro for Rust functions#[invariant]for loop proofs- Core HOL kernel & proof library
- Core theorem domains (math, logic, algorithms, data structures)
- Closures, generics, containers, Option/Result
- Concurrency & atomics verification
- Unsafe Rust verification
- No ASM verification
- No cryptography / security / financial / defense theorems
- No support included
- 1 user, up to 2 machines
Business
- Everything in Hobby/Student/Individual
- Full theorem library (all 77 domains)
- Cryptography, security, financial & defense theorems
- CI/CD license key support
- No ASM verification
- All Rust developers must be licensed *
- 1 user per seat, up to 2 machines each
Enterprise
- Everything in Business
asm_proven!for all architectures- x86_64, AArch64, RISC-V, & WASM verification
- WCET / cycle counting
- Side-channel & constant-time analysis
- Memory corruption resilience mode
- Priority bug fixes & feature requests
- All Rust developers must be licensed *
- 1 user per seat, up to 2 machines each
Government
- All Enterprise features
- Custom quote per use case
- Compliance documentation & audit support
- Dedicated proof engineering engagement
- Classified environment support
- On-premise deployment options
* “Rust developers” includes anyone who writes, reviews, modifies, or interacts with Rust code in any capacity — including through AI-assisted development tools.
Support Contracts
Support is available as a separate annual contract for Business and Enterprise tiers:
| Standard | Premium | Mission Critical | |
|---|---|---|---|
| Business Support | |||
| Annual cost | $10,000/yr | $20,000/yr | $36,000/yr |
| Coverage hours | 8×5 | 10×7 | 24/7 |
| Response SLA | 2 business days | 1 business day | 4 hours |
| Enterprise Support | |||
| Annual cost | $20,000/yr | $36,000/yr | $50,000/yr |
| Coverage hours | 8×5 | 10×7 | 24/7 |
| Response SLA | 4 hours | 2 hours | 1 hour |