Toolchain verifies C++

BRiCk

Also known as SkyLabs BRiCk, BRiCk C++ program logic

Prove concurrent C++ code correct in the Rocq proof assistant, using a separation logic for C++ built on Iris.

Stage 0 · Research Interactive Open source · LGPL-2.1 with the BedRock netw… Last commit · today
Trust: Checker strong, Semantics partial, Frontend partial, Binary gap weak, Escape hatches partial CheckerSemanticsFrontendBinary gapEscape hatches 1 of 5 strong, 1 weak

Use it if

  • You need full functional-correctness proofs of low-level or concurrent C++ (such as kernels or lock-free code).
  • You can write Rocq proofs and separation-logic specifications, or work with people who can.

Look elsewhere if

  • Your code uses exceptions, coroutines, virtual inheritance or relaxed atomics; BRiCk does not cover them.
  • You need a fully open toolchain; the proof automation that makes BRiCk practical on real code needs a commercial or academic license.
  • You want push-button checking; every function needs a hand-written specification and a Rocq proof.

How it works

From your code to an accepted proof. Each step either has to be trusted or is checked by something else.

  1. Input
    C++ code
  2. Front end
    cpp2v Trusted Uses Clang to parse and type-check C++, then prints Clang's syntax tree as Rocq terms. It is not verified. Generate the tree with the same Clang flags and target as your build.
  3. Semantics
    BRiCk C++ program logic Trusted The meaning of C++ is stated as about 450 Rocq axioms in weakest-precondition style.
  4. Automation
    SkyLabs AI proof automation Checked Builds proofs that Rocq then checks. Available under commercial and academic licenses, not in the public repository.
  5. Checker
    Rocq Trusted
  6. Compiler
    Clang (or another C++ compiler) Trusted Not verified. BRiCk assumes the compiler is correct, stated as axioms such as code_at_ok.

Verified or checked: outside the trusted base Validated per run or by tests Trusted without proof

  • C++: BRiCk reasons about Clang's syntax tree, and about templates only after they are instantiated.

Trust

What a proof from this toolchain relies on: the trusted computing baseTrusted computing base (TCB). Everything that must be correct for a proof to mean what it says., one part at a time. How these are rated.

  1. Checker What has the final word on a proof?
    Strong

    Rocq's kernel checks every proof, including those the automation builds.

    source

  2. Semantics Is the tool's model of the language the real language?
    Partial

    C++ is modeled by BRiCk's own axioms; no published validation against compilers.

    About 450 axioms. A model of parts of them still has 8 unproved (Admitted) lemmas. Documented caveats: calls are assumed not to throw, and the code Clang generates for defaulted functions is taken as their meaning.

    source

  3. Frontend How does your source get into the model?
    Partial

    cpp2v prints Clang's syntax tree into Rocq; cpp2v itself is not verified.

    source

  4. Binary gap Does the proof cover what actually runs?
    Weak

    An unverified compiler builds the binary; BRiCk assumes it is correct.

    BRiCk connects C++ specifications to machine code only through axioms (code_at_ok and similar) that assume the compiled code behaves as the C++ rules say.

    source

  5. Escape hatches Can a proof silently rest on unchecked assumptions?
    Partial

    Rocq Admitted and Axiom; Print Assumptions lists them, next to BRiCk's own axioms.

    Real proofs use them: BlueRock's NOVA proofs assume the iRC11 rules as axioms and admit an open item about garbage collection.

    source

What it can prove

Kinds of guarantees, not how easy they are to get.

Properties
FeatureSupportNotes
No undefined behavior Memory safety and absence of runtime errors: no out-of-bounds access, use-after-free, overflow traps, panics or undefined behavior on any input allowed by the precondition. SupportedSupported.A proof shows the code is safe, which rules out undefined behavior, for the supported part of C++. A construct BRiCk does not support makes the proof get stuck, so it cannot be proved by mistake.
Source
A proof shows the code is safe, which rules out undefined behavior, for the supported part of C++. A construct BRiCk does not support makes the proof get stuck, so it cannot be proved by mistake. source
Functional correctness The code meets a written specification of its results, for example “returns the sorted list” or “implements this RFC”. SupportedSupported.Specifications are separation-logic pre- and postconditions; BlueRock's NOVA proofs go up to concurrent functional correctness.
Source
Specifications are separation-logic pre- and postconditions; BlueRock's NOVA proofs go up to concurrent functional correctness. source
Equivalence 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. Not supportedNot supported.The logic reasons about one program at a time. The documentation describes no way to prove two programs equivalent.
Source
The logic reasons about one program at a time. The documentation describes no way to prove two programs equivalent. source
Information flow Secrets do not influence public outputs, timing or memory access patterns (constant-time code, non-interference). Not supportedNot supported.The documentation describes no support for information-flow or constant-time proofs.
Source
The documentation describes no support for information-flow or constant-time proofs. source
Concurrency Correctness of code with threads or shared memory: absence of data races, deadlock freedom, linearizability of concurrent data structures. PartialPartial.Built for concurrent C++, but the logic requires every atomic access to be sequentially consistent. Weaker memory orders need extra axioms (BlueRock's NOVA proofs add the iRC11 relaxed-memory logic as axioms).
Source
Built for concurrent C++, but the logic requires every atomic access to be sequentially consistent. Weaker memory orders need extra axioms (BlueRock's NOVA proofs add the iRC11 relaxed-memory logic as axioms). source
Termination and liveness Every run finishes, or the system keeps making progress (liveness). Not supportedNot supported.The rules are weakest liberal preconditions: they say what holds if the code finishes, not that it finishes.
Source
The rules are weakest liberal preconditions: they say what holds if the code finishes, not that it finishes. source

Language coverage

Which parts of C++ it handles. Hover or focus a mark for details.

Common features

Common features
FeatureSupportNotes
Machine integers Fixed-width integer arithmetic, overflow and bit operations. SupportedSupported.All integer types are modeled by size and signedness; the sizes come from the Clang target used to generate the syntax tree.
Source
All integer types are modeled by size and signedness; the sizes come from the Clang target used to generate the syntax tree. source
Floating point IEEE 754 floating-point arithmetic, including rounding and NaNs. PartialPartial.IEEE-754 half, single, double and quad precision are supported (semantics from the Flocq library); x87 long double is not.
Source
IEEE-754 half, single, double and quad precision are supported (semantics from the Flocq library); x87 long double is not. source
Heap and pointers Dynamically allocated memory, pointers or references, and aliasing. SupportedSupported.new, delete, pointers and pointer provenance are modeled; reinterpret_cast has no rule yet.
Source
new, delete, pointers and pointer provenance are modeled; reinterpret_cast has no rule yet. source
Arrays and buffers Indexed memory such as arrays, slices, vectors and byte buffers. PartialPartial.Arrays are supported, but implicit copy assignment of byte arrays gets stuck. Variable-length arrays and flexible array members (compiler extensions) are not supported.
Source
Arrays are supported, but implicit copy assignment of byte arrays gets stuck. Variable-length arrays and flexible array members (compiler extensions) are not supported. source
Loops Unbounded loops, which need invariants or bounds to verify. SupportedSupported.You write loop invariants by hand.
Source
You write loop invariants by hand. source
Recursion Functions that call themselves, directly or through others. UnknownUnknown.The documentation we found does not discuss recursive functions. The documentation we found does not discuss recursive functions.
Higher-order code Function pointers, closures and callbacks. PartialPartial.Calls through function pointers are supported; calls through member function pointers have no rule.
Source
Calls through function pointers are supported; calls through member function pointers have no rule. source
Threads and shared memory Concurrent threads with locks, atomics or message passing. PartialPartial.Threads and atomics are supported, but every atomic access must be sequentially consistent. Compare-exchange works on integers, not pointers.
Source
Threads and atomics are supported, but every atomic access must be sequentially consistent. Compare-exchange works on integers, not pointers. source
I/O and system calls Files, network, system calls and foreign-function calls. PartialPartial.No built-in model of I/O or system calls. You give specifications for the outside functions you call; brick-libcpp has some, for example for parts of iostream and pthread mutexes.
Source
No built-in model of I/O or system calls. You give specifications for the outside functions you call; brick-libcpp has some, for example for parts of iostream and pthread mutexes. source
Standard library Specifications or models for the language's standard library. PartialPartial.brick-libcpp specifies parts of the standard library (mutexes, atomics, vector, string and others). It is work in progress, and building it needs SkyLabs AI's licensed automation.
Source
brick-libcpp specifies parts of the standard library (mutexes, atomics, vector, string and others). It is work in progress, and building it needs SkyLabs AI's licensed automation. source

C++-specific features

C++-specific features
FeatureSupportNotes
Classes and virtual calls Inheritance, virtual functions and dynamic dispatch. PartialPartial.Classes, inheritance and virtual calls are supported. Virtual inheritance is not; classes with bit-fields are opaque; member pointer operators have no rule; dynamic_cast and typeid are partial.
Source
Classes, inheritance and virtual calls are supported. Virtual inheritance is not; classes with bit-fields are opaque; member pointer operators have no rule; dynamic_cast and typeid are partial. source
Templates Generic code instantiated at compile time. PartialPartial.Only instantiated templates can be verified, one instantiation at a time. Template parameter packs and unresolved concepts are not supported.
Source
Only instantiated templates can be verified, one instantiation at a time. Template parameter packs and unresolved concepts are not supported. source
Constructors and destructors Object lifetimes, RAII and destructor ordering. PartialPartial.Constructors, destructors and implicit destruction are modeled. Lifetime-extended temporaries are not supported, and initialization of globals and function-local statics is not covered.
Source
Constructors, destructors and implicit destruction are modeled. Lifetime-extended temporaries are not supported, and initialization of globals and function-local statics is not covered. source
Exceptions throw, catch and stack unwinding. Not supportedNot supported.throw and try are not supported, and every function call is assumed not to throw.
Source
throw and try are not supported, and every function call is assumed not to throw. source
Standard library (STL) Containers, iterators and algorithms from the C++ standard library. PartialPartial.Specifications for parts of the standard library are in brick-libcpp, which is work in progress.
Source
Specifications for parts of the standard library are in brick-libcpp, which is work in progress. source
Lambdas Anonymous functions with captures. PartialPartial.cpp2v translates lambdas, but the documentation does not describe their rules, and lambda types at global scope are dropped as unsupported.
Source
cpp2v translates lambdas, but the documentation does not describe their rules, and lambda types at global scope are dropped as unsupported. source

Stage

Computed from the evidence below; see the criteria. 1criterion is missing for Stage 1.

Stage 0 Research Met
  • Met: Publicly available evidence
  • Met: At least one published verification uses it Verification of the NOVA microhypervisor (RocqPL 2026). evidence
Stage 1 Usable Next
  • Met: Released or updated in the last 12 months Latest release: main@5d7dacc, 2026-11-26. evidence
  • Met: Installs and runs on current platforms The open-source logic and cpp2v build with dune and LLVM 20 to 23. The proof automation is not publicly installable. evidence
  • Met: User documentation or tutorial Language-support pages for the logic, and tutorials for the licensed automation. evidence
  • Unknown: Used by a group other than its authors All published uses we found are by BRiCk's authors (BlueRock Security, SkyLabs AI). The one outside group, at the University of Illinois Chicago, published jointly with them (arXiv 2601.22557).
Stage 2 Production Later
  • Not met: Verified code in production at two or more independent organizations None recorded.
  • Met: Checker axis is not red
  • Met: Semantics axis is not red
  • Met: Public channel for soundness bugs Public GitHub issues; known soundness bugs and their fixes carry the soundness label. evidence

In use

Verified code in production, and notable verification projects.

In production

None recorded. Know one? Add it with a source.

Projects

Facts and sources

Effort
Interactive: You write proofs step by step in a proof assistant.
Licence
Open source, LGPL-2.1 with the BedRock network-use addendum (LICENSE-BedRock)
Maintained by
SkyLabs AI
Latest release
main@5d7dacc (26 Nov 2026) source
Last checked
26 Nov 2026

Further sources

esc