Skip to content

Formal verification architecture

Four methods. Every boundary named.

Two 64-bit integers and a 16-byte buffer yield 2256 input states—beyond any load test. Engula proves core C modules directly with Frama-C and CBMC, naming what is proved today and what remains scoped.

01Evidenced
Frama-C / Eva

Derive safe value envelopes

0 runtime alarms on proved core index

02Evidenced
Frama-C / WP

Inductive contract proof

Unbounded C-source functional proofs

03Evidenced
CBMC 6.8.0

Exhaust 64-bit values

Bit-exact codecs & disjoint bounds

04Planned · Stage 3
TLA+ / TLC

Model thread interleavings

Target concurrency & epoch closure

Scope statement: Core index, block region isolation, and key codecs are proved on our C source today; concurrency, RDB recovery, and SIMD CBMC proofs are in phased rollout. Release-specific scope is pinned to each versioned audit report.

How each method works

Why each verifier is computationally feasible—and where it stops.

By Rice’s Theorem, no single analyzer is sound, precise, automatic, and always terminating for all programs. Engula composes four orthogonal tools so each stays decidable on its own slice.

Refinement: if (pos + len <= 64)
Out-of-bounds zonepos + len > 64poslen6464Coarse envelope (cvalue)Spills into OOB → ? [eva:alarm]Relational cut (octagon)Slices pos + len > 64 → Proved safe.M̂ ⊨ φ̂ ⟹ M ⊨ φS ⊆ γ(α(S)) · Sound over-approx

01 · ABSTRACT INTERPRETATION

Proves absence of C runtime crashes automatically

Eva replaces concrete values with sound mathematical envelopes (Galois connection S ⊆ γ(α(S))) and converges loops via widening. When coarse intervals raise a false ? alarm, stacking relational (octagon) or bitwise domains slices away unreachable corners.

Feasibility trade-off
Accepts occasional ? false alarms to achieve full automation & guaranteed termination.
Engula role & honest boundary
Confirms 0 runtime alarms (OOB, div-by-zero, signed overflow, uninitialized reads) on proved index paths. Strict aliasing is outside the proof; built with -fno-strict-aliasing.

Storage kernel verification map

What is proved on C source today—and what is still scoped.

Proved on C sourceDiff test / Scoped
01CORE BASELINE PROVED · EXPANDINGCBMC 6.8.0 · WP · Eva

Compact Encoding Layer

Record-header codecs, variable-length integers, and structured key-suffix encodings on our C source.

  • PROVEDRecord-header encode/decode, integer & UUID round-trip bijections (decode(encode(x)) = x), and rejection of malformed inputs.
  • METHODIndependent canonical format specification design prevents symmetric encode/decode bugs that pure round-trip checks miss (expanding in Stage 2).
  • SCOPED · STAGE 2Extending formal proof coverage across the remaining compact encoding sub-families and truncated-stream harnesses.
02CORE BASELINE PROVED · EXPANDINGFrama-C 33.0 · Alt-Ergo 2.4.3 · CBMC

Contiguous Memory Blocks & Core Index

Uniform fixed-size memory blocks and the dynamic core index mapping logical records to block locations.

  • PROVEDCore index structural well-formedness, read-after-write insert/lookup completeness (0 admit, 0 Eva alarms), block regions stay disjoint, and branchless lookup matches linear scan.
  • DIFF TESTHardware SIMD paths are verified against scalar reference implementations via differential equivalence tests today (CBMC bit-exact check scheduled in Stage 2).
  • UNPROVED · NEXTCore index delete frame conditions, ordering invariants, and cardinality equalities remain outside the current proved baseline.
03SCOPED · PLANNEDTLA+ / TLC · WP · Sync-Point CI (Target)

Background Compaction & Epoch Lifecycle

Concurrent defragmentation/recompression block replacement, arena epoch switching, and generation-tagged async free.

  • SCOPED · STAGE 1→3Compaction safety model: minimal block-replacement TLA+ closure starts in Stage 1 and expands in Stage 3 to verify that a foreground DEL or update never resurrects deleted keys.
  • SCOPED · STAGE 3Epoch switch model: drain background workers → atomic active switch → destroy old store → generation-checked async free (zero concurrent UAF).
  • SCOPED · STAGE 3C implementation closure: pair WP/Eva checks on tombstone reconciliation with deterministic sync-point CI regression tests.
04SCOPED · PLANNEDEva · CBMC · TLA+ (Target)

Multi-Mode RDB Snapshot Recovery

Untrusted snapshot parsing and atomic promotion across FAST, FILTERED, and REBUILD recovery modes.

  • SCOPED · STAGE 4Corruption-hardened parsing: model untrusted byte streams with overflow-free bounds checks before dereference.
  • SCOPED · STAGE 4Atomic visibility: verify partially validated state is never exposed and mid-load failures roll back temporary arenas cleanly.
  • SCOPED · STAGE 4Document explicit validation boundaries between FAST (deferred checks) and FILTERED / REBUILD (full startup checks).

ACCEPTANCE GATES & TRUSTED COMPUTING BASE

Five non-negotiable acceptance rules.

Offline static verification adds zero runtime overhead to the binary—and every assumption stays audited in plain sight.

01Timeout / Unknown never counts

Any solver returning Unknown or hitting timeout fails the gate outright—never silently waived as an inconclusive pass.

02Truncated unwinds never count

CBMC targets must run with and pass --unwinding-assertions; silently clipped loops cannot claim bounded completeness.

03Unaudited hypotheses never count

Every Frama-C property flagged Valid under hypotheses is traced recursively to its unproved premises and logged in the boundary register.

04Smoke-tests alone never count

-wp-smoke-tests is best-effort (solver Unknown/interrupt still prints Passed). Valid contracts require call-site precondition proof + CBMC/test satisfiable witnesses + human review, paired with Engula’s seeded-mutant calibration.

05Unreplayable runs never count

Commands, versions, compiler macros, shims, harnesses, solver flags, TLC configs, and logs are archived per tool. Experimental -audit-prepare serves as an Eva-specific attachment only—never replacing cross-tool bundles.

TARGET PIPELINE · THREE-TIER CI & FOUR-STAGE ROLLOUT

Commit · minutes

Target: fast CBMC + base Eva + cached WP regression on modified modules.

Nightly · hours

Target: deep CBMC unwinds + octagon Eva + multi-solver WP + extended TLC search.

Release · pinned

Target: lock commit & container image; archive replayable audit bundle.

  1. Stage 1 · Baseline & harnesses [ACTIVE] Driver & environment adaptation layer, shim audit, core-index/codec proof baseline, and initial minimal block-replacement TLA+ sketch.
  2. Stage 2 · Codecs, blocks & SIMD [IN PROGRESS] Expand to full encoding families, broader block invariants, delete/order/cardinality, and CBMC scalar-vs-SIMD equivalence.
  3. Stage 3 · Concurrency & epoch [PLANNED] Multi-generation compaction & epoch-switch TLA+ models paired with C critical-section mapping and sync-point CI.
  4. Stage 4 · RDB & release archive [PLANNED] Three-mode corruption-safe parsing + atomic publish/rollback + automated release-time audit bundles.

EXPLICIT TRUSTED COMPUTING BASE (TCB)

  • Evidenced toolchain: Frama-C 33.0, Alt-Ergo 2.4.3, and CBMC 6.8.0 (Z3, CVC5, and TLA+/TLC are scoped in our target pipeline).
  • Compiler, OS & hardware: C compiler codegen, OS/hardware memory model, allocator primitives, and typed memcpy/memmove shims—exercised by soak & ASAN, not proved.
  • Strict aliasing boundary: Strict aliasing and aggregate const qualifiers sit outside the proof; built with -fno-strict-aliasing.
  • Isolated external libraries: External ZSTD/LZ4 codecs and stackful coroutine assembly switches sit behind contracts and differential tests.

Enterprise auditability

Four white-box artifacts your security team can inspect.

01

Properties & Boundary Register

Exact matrix separating proved properties, differential tests, planned specs, and explicit Trusted Computing Base assumptions per release.

02

ACSL Contracts & Model Specs

Machine-checked functional contracts, frame conditions, and scoped concurrency specs inspectable under evaluation NDA.

03

Replayable Release Evidence Bundle

Commit-pinned container images, scripts, solver configs, and raw logs—re-runnable under source access or a supervised session.

04

Counterexamples & Calibration Suites

Seeded mutants, CBMC bit-level counterexamples, and regression harnesses archived alongside each verification ledger.

Review the audit register or test the binary on your own data.

Request the formal verification audit package under evaluation NDA, or start with Developer Edition.

Orthogonal division of labor

No single tool covers an entire storage kernel.

Low-cost automated tools clear routine checks and expose bit-level bugs before deductive proofs close the core logic.

DimensionFrama-C / EvaFrama-C / WPCBMCTLA+ / TLC
Inference mechanismForward abstract envelope + fixpointBackward WP calculus + inductionBounded unwind + bit-vector SAT/SMTAction state machine + explicit BFS
AutomationHigh (no loop invariants needed)Medium (contracts + invariants)High (automatic once harnessed)High (exhaustive over finite models)
Coverage scopeEntry domain + arbitrary loopsUnbounded inputs & loop lengthsAll 2⁶⁴ machine integers within KAll interleavings in finite instances
Bit & pointer precisionStrong (bitwise; no strict-aliasing)Typed structures; raw cast heavyExact (shifts, casts, byte layout)Abstracts memory; focuses on protocol
Failure artifact[eva:alarm] risk localizationUnclosed proof sub-obligationBit-exact input & execution traceShortest concurrent interleaving trace
Eva → WP → E-ACSL

Eva discharges the bulk of routine bounds and initialization checks automatically, focusing WP on coupled functional invariants; dynamic assertions instrument test builds via E-ACSL.

CBMC → WP

CBMC hunts 64-bit boundary bugs and contract typos in seconds on bounded harnesses—confirming zero counterexamples before investing in unbounded WP induction.

TLA+ → WP / CBMC → Sync-Point

Target Stage 3 flow: TLA+ models protocol interleavings and exports single-step C contracts to WP/CBMC, freezing critical sequences into deterministic sync-point suites.

REFERENCES & THEORETICAL FOUNDATIONS

Frama-C 33.0 Arsenic Eva & WP Plug-in Manuals (CEA-List, 2026) · Kosmatov, Prevosto & Signoles, Guide to Software Verification with Frama-C (Springer, 2024) · P. Cousot, Principles of Abstract Interpretation (MIT Press, 2021) · Kroening & Tautschnig, CBMC / CPROVER (arXiv:2302.02384) · L. Lamport, A High-Level View of TLA+ · Newcombe et al., How Amazon Web Services Uses Formal Methods (CACM 58(4), 2015).