{
  "id": "brick",
  "name": "BRiCk",
  "aka": [
    "SkyLabs BRiCk",
    "BRiCk C++ program logic"
  ],
  "summary": "Prove concurrent C++ code correct in the Rocq proof assistant, using a separation logic for C++ built on Iris.",
  "use_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."
  ],
  "avoid_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."
  ],
  "effort": "interactive",
  "open": "open-source",
  "license": "LGPL-2.1 with the BedRock network-use addendum (LICENSE-BedRock)",
  "maintainers": [
    "SkyLabs AI"
  ],
  "links": {
    "homepage": "https://skylabsai.github.io/BRiCk/",
    "repo": "https://github.com/SkyLabsAI/BRiCk",
    "docs": "https://skylabsai.github.io/BRiCk/features.html",
    "tutorial": "https://skylabsai.github.io/auto-docs/"
  },
  "components": [
    {
      "role": "frontend",
      "name": "cpp2v",
      "assurance": "trusted",
      "note": "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."
    },
    {
      "role": "semantics",
      "name": "BRiCk C++ program logic",
      "ref": "brick-cpp",
      "ref_kind": "semantics",
      "assurance": "trusted",
      "note": "The meaning of C++ is stated as about 450 Rocq axioms in weakest-precondition style."
    },
    {
      "role": "automation",
      "name": "SkyLabs AI proof automation",
      "assurance": "checked",
      "note": "Builds proofs that Rocq then checks. Available under commercial and academic licenses, not in the public repository."
    },
    {
      "role": "checker",
      "name": "Rocq",
      "ref": "rocq",
      "ref_kind": "prover",
      "assurance": "trusted"
    },
    {
      "role": "compiler",
      "name": "Clang (or another C++ compiler)",
      "assurance": "trusted",
      "note": "Not verified. BRiCk assumes the compiler is correct, stated as axioms such as code_at_ok."
    }
  ],
  "verifies": [
    {
      "target": "cpp",
      "note": "BRiCk reasons about Clang's syntax tree, and about templates only after they are instantiated."
    }
  ],
  "properties": {
    "no-ub": {
      "status": "full",
      "note": "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": "https://skylabsai.github.io/BRiCk/evaluation.html"
    },
    "functional": {
      "status": "full",
      "note": "Specifications are separation-logic pre- and postconditions; BlueRock's NOVA proofs go up to concurrent functional correctness.",
      "source": "https://bluerocksec.gitlab.io/formal-methods/blogs/2025-11-18-NOVA-proof-spec/"
    },
    "equivalence": {
      "status": "none",
      "note": "The logic reasons about one program at a time. The documentation describes no way to prove two programs equivalent.",
      "source": "https://skylabsai.github.io/BRiCk/evaluation.html"
    },
    "info-flow": {
      "status": "none",
      "note": "The documentation describes no support for information-flow or constant-time proofs.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "concurrency": {
      "status": "partial",
      "note": "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": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "termination": {
      "status": "none",
      "note": "The rules are weakest liberal preconditions: they say what holds if the code finishes, not that it finishes.",
      "source": "https://skylabsai.github.io/BRiCk/evaluation.html"
    }
  },
  "features": {
    "core.integers": {
      "status": "full",
      "note": "All integer types are modeled by size and signedness; the sizes come from the Clang target used to generate the syntax tree.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "core.floats": {
      "status": "partial",
      "note": "IEEE-754 half, single, double and quad precision are supported (semantics from the Flocq library); x87 long double is not.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "core.heap": {
      "status": "full",
      "note": "new, delete, pointers and pointer provenance are modeled; reinterpret_cast has no rule yet.",
      "source": "https://skylabsai.github.io/BRiCk/pointers.html"
    },
    "core.arrays": {
      "status": "partial",
      "note": "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": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "core.loops": {
      "status": "full",
      "note": "You write loop invariants by hand.",
      "source": "https://skylabsai.github.io/auto-docs/docs/control_flow/loop/"
    },
    "core.recursion": {
      "status": "unknown",
      "note": "The documentation we found does not discuss recursive functions."
    },
    "core.higher-order": {
      "status": "partial",
      "note": "Calls through function pointers are supported; calls through member function pointers have no rule.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "core.concurrency": {
      "status": "partial",
      "note": "Threads and atomics are supported, but every atomic access must be sequentially consistent. Compare-exchange works on integers, not pointers.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "core.io": {
      "status": "partial",
      "note": "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": "https://github.com/SkyLabsAI/brick-libcpp"
    },
    "core.stdlib": {
      "status": "partial",
      "note": "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": "https://github.com/SkyLabsAI/brick-libcpp"
    },
    "cpp.classes": {
      "status": "partial",
      "note": "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": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "cpp.templates": {
      "status": "partial",
      "note": "Only instantiated templates can be verified, one instantiation at a time. Template parameter packs and unresolved concepts are not supported.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "cpp.raii": {
      "status": "partial",
      "note": "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": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "cpp.exceptions": {
      "status": "none",
      "note": "throw and try are not supported, and every function call is assumed not to throw.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "cpp.stl": {
      "status": "partial",
      "note": "Specifications for parts of the standard library are in brick-libcpp, which is work in progress.",
      "source": "https://github.com/SkyLabsAI/brick-libcpp"
    },
    "cpp.lambdas": {
      "status": "partial",
      "note": "cpp2v translates lambdas, but the documentation does not describe their rules, and lambda types at global scope are dropped as unsupported.",
      "source": "https://github.com/SkyLabsAI/BRiCk/blob/main/CHANGES.md"
    }
  },
  "trust": {
    "checker": {
      "level": "green",
      "summary": "Rocq's kernel checks every proof, including those the automation builds.",
      "source": "https://rocq-prover.org/"
    },
    "semantics": {
      "level": "amber",
      "summary": "C++ is modeled by BRiCk's own axioms; no published validation against compilers.",
      "note": "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": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "frontend": {
      "level": "amber",
      "summary": "cpp2v prints Clang's syntax tree into Rocq; cpp2v itself is not verified.",
      "source": "https://github.com/SkyLabsAI/BRiCk/tree/main/rocq-skylabs-cpp2v"
    },
    "binary_gap": {
      "level": "red",
      "summary": "An unverified compiler builds the binary; BRiCk assumes it is correct.",
      "note": "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": "https://skylabsai.github.io/BRiCk/machine.html"
    },
    "escape_hatches": {
      "level": "amber",
      "summary": "Rocq Admitted and Axiom; Print Assumptions lists them, next to BRiCk's own axioms.",
      "note": "Real proofs use them: BlueRock's NOVA proofs assume the iRC11 rules as axioms and admit an open item about garbage collection.",
      "source": "https://bluerocksec.gitlab.io/formal-methods/blogs/2026-03-31-NOVA-relaxed-memory/"
    }
  },
  "stage_evidence": {
    "public_artifact": {
      "met": true,
      "evidence": "https://github.com/SkyLabsAI/BRiCk"
    },
    "published_use": {
      "met": true,
      "evidence": "https://bluerocksec.gitlab.io/formal-methods/tech_reports/specifying-and-verifying-the-nova-microhypervisor-in-concurrent-separation-logic/",
      "note": "Verification of the NOVA microhypervisor (RocqPL 2026)."
    },
    "installs_on_current": {
      "met": true,
      "evidence": "https://github.com/SkyLabsAI/BRiCk/tree/main/rocq-skylabs-cpp2v",
      "note": "The open-source logic and cpp2v build with dune and LLVM 20 to 23. The proof automation is not publicly installable."
    },
    "user_docs": {
      "met": true,
      "evidence": "https://skylabsai.github.io/auto-docs/",
      "note": "Language-support pages for the logic, and tutorials for the licensed automation."
    },
    "external_users": {
      "met": null,
      "note": "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)."
    },
    "soundness_channel": {
      "met": true,
      "evidence": "https://github.com/SkyLabsAI/BRiCk/issues?q=label%3Asoundness",
      "note": "Public GitHub issues; known soundness bugs and their fixes carry the soundness label."
    }
  },
  "production_users": [],
  "last_release": {
    "version": "main@5d7dacc",
    "date": "2026-11-26",
    "source": "https://github.com/SkyLabsAI/BRiCk/commits/main"
  },
  "used_for": [
    {
      "name": "NOVA microhypervisor (BlueRock Security)",
      "url": "https://bluerocksec.gitlab.io/formal-methods/tech_reports/specifying-and-verifying-the-nova-microhypervisor-in-concurrent-separation-logic/",
      "note": "Specification and ongoing verification of the hypercalls and kernel data structures."
    },
    {
      "name": "Developing with Formal Methods at BedRock Systems (IEEE S&P 2022)",
      "url": "https://bluerocksec.gitlab.io/formal-methods/tech_reports/developing-with-formal-methods-at-bedrock-systems/"
    },
    {
      "name": "Recursive mutexes in separation logic",
      "url": "https://arxiv.org/abs/2601.22557",
      "note": "Part of an effort to verify the C++ standard library's concurrency parts."
    },
    {
      "name": "brick-libcpp (C++ standard library specifications)",
      "url": "https://github.com/SkyLabsAI/brick-libcpp"
    }
  ],
  "last_checked": "2026-11-26",
  "attestation": "maintainer",
  "claimed_by_authors": false,
  "sources": [
    {
      "url": "https://github.com/SkyLabsAI/BRiCk",
      "title": "BRiCk repository",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://skylabsai.github.io/BRiCk/",
      "title": "The BRiCk C++ Program Logic (documentation)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://skylabsai.github.io/BRiCk/features.html",
      "title": "BRiCk language support",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://skylabsai.github.io/BRiCk/machine.html",
      "title": "BRiCk assembly interoperation and compiler correctness",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://skylabsai.github.io/BRiCk/evaluation.html",
      "title": "BRiCk evaluation rules",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/SkyLabsAI/BRiCk/blob/main/CHANGES.md",
      "title": "BRiCk changelog",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://skylabsai.github.io/auto-docs/setup/",
      "title": "SkyLabs AI automation setup (licensing)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://bluerocksec.gitlab.io/formal-methods/",
      "title": "BlueRock Security formal methods",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://bluerocksec.gitlab.io/formal-methods/blogs/2026-03-31-NOVA-relaxed-memory/",
      "title": "NOVA is getting relaxed-memory ready",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/SkyLabsAI/brick-libcpp",
      "title": "brick-libcpp",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://arxiv.org/abs/2601.22557",
      "title": "Recursive Mutexes in Separation Logic",
      "accessed": "2026-11-26"
    }
  ],
  "computed": {
    "kind": "toolchains",
    "methodology_version": "0.1",
    "built": "2026-11-26",
    "links": {
      "html": "/toolchains/brick/",
      "json": "/toolchains/brick.json",
      "markdown": "/toolchains/brick.md"
    },
    "stage": {
      "stage": 0,
      "name": "Research",
      "criteria": [
        {
          "key": "public_artifact",
          "stage": 0,
          "label": "Publicly available",
          "met": true,
          "evidence": "https://github.com/SkyLabsAI/BRiCk",
          "computed": false
        },
        {
          "key": "published_use",
          "stage": 0,
          "label": "At least one published verification uses it",
          "met": true,
          "evidence": "https://bluerocksec.gitlab.io/formal-methods/tech_reports/specifying-and-verifying-the-nova-microhypervisor-in-concurrent-separation-logic/",
          "note": "Verification of the NOVA microhypervisor (RocqPL 2026).",
          "computed": false
        },
        {
          "key": "recent_release",
          "stage": 1,
          "label": "Released or updated in the last 12 months",
          "met": true,
          "evidence": "https://github.com/SkyLabsAI/BRiCk/commits/main",
          "note": "Latest release: main@5d7dacc, 2026-11-26.",
          "computed": true
        },
        {
          "key": "installs_on_current",
          "stage": 1,
          "label": "Installs and runs on current platforms",
          "met": true,
          "evidence": "https://github.com/SkyLabsAI/BRiCk/tree/main/rocq-skylabs-cpp2v",
          "note": "The open-source logic and cpp2v build with dune and LLVM 20 to 23. The proof automation is not publicly installable.",
          "computed": false
        },
        {
          "key": "user_docs",
          "stage": 1,
          "label": "User documentation or tutorial",
          "met": true,
          "evidence": "https://skylabsai.github.io/auto-docs/",
          "note": "Language-support pages for the logic, and tutorials for the licensed automation.",
          "computed": false
        },
        {
          "key": "external_users",
          "stage": 1,
          "label": "Used by a group other than its authors",
          "met": null,
          "note": "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).",
          "computed": false
        },
        {
          "key": "production_users",
          "stage": 2,
          "label": "Verified code in production at two or more independent organizations",
          "met": false,
          "note": "None recorded.",
          "computed": true
        },
        {
          "key": "checker_not_red",
          "stage": 2,
          "label": "Checker axis is not red",
          "met": true,
          "computed": true
        },
        {
          "key": "semantics_not_red",
          "stage": 2,
          "label": "Semantics axis is not red",
          "met": true,
          "computed": true
        },
        {
          "key": "soundness_channel",
          "stage": 2,
          "label": "Public channel for soundness bugs",
          "met": true,
          "evidence": "https://github.com/SkyLabsAI/BRiCk/issues?q=label%3Asoundness",
          "note": "Public GitHub issues; known soundness bugs and their fixes carry the soundness label.",
          "computed": false
        }
      ],
      "missing_for_next": [
        "external_users"
      ]
    }
  }
}