{
  "id": "brick-cpp",
  "name": "BRiCk C++ semantics",
  "aka": [
    "BRiCk program logic"
  ],
  "summary": "A separation-logic semantics of a large part of C++, written as weakest-precondition rules in Rocq on top of Iris. It is the model behind the BRiCk toolchain.",
  "target": "cpp",
  "fragment": "C++ as seen through Clang's syntax tree, after template instantiation: classes, virtual calls, constructors and destructors, sequentially consistent atomics and IEEE floats. Not covered: exceptions, coroutines, virtual inheritance, member pointer operators, inline assembly, relaxed atomics and initialization of globals. The features page lists every gap.",
  "version": "C++ as parsed by Clang 20 to 23; the documentation names no single C++ standard version.",
  "framework": "Rocq (Iris separation logic)",
  "provers": [
    "rocq"
  ],
  "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"
  },
  "validation": "No published validation against compilers or conformance tests was found. The rules are stated as about 450 Rocq axioms, so they cannot be run on programs. A model of parts of the axioms exists, with 8 lemmas still unproved (Admitted). The project keeps its own regression tests, and known soundness bugs are tracked publicly with a \"soundness\" label.",
  "stage_evidence": {
    "mechanized": {
      "met": true,
      "evidence": "https://github.com/SkyLabsAI/BRiCk/tree/main/rocq-skylabs-brick/theories/lang/cpp"
    },
    "scope_stated": {
      "met": true,
      "evidence": "https://skylabsai.github.io/BRiCk/features.html",
      "note": "The features page lists supported and unsupported constructs as of October 2026, relative to Clang's syntax tree. It names no C++ standard version."
    },
    "executable": {
      "met": false,
      "note": "The semantics is a set of axioms in weakest-precondition style; it cannot run programs."
    },
    "validated": {
      "met": false,
      "note": "No published conformance or differential-testing results."
    },
    "adopted_by_owner": {
      "met": false,
      "note": "Not adopted or endorsed by the ISO C++ committee."
    },
    "full_coverage": {
      "met": false,
      "note": "Exceptions, coroutines, virtual inheritance and other features are not covered."
    },
    "tracks_versions": {
      "met": false,
      "note": "No stated policy for new C++ versions. cpp2v does follow new Clang releases (Clang 23 support added 2026-11-05)."
    }
  },
  "features": {
    "core.integers": {
      "status": "full",
      "note": "All integer types are modeled by size and signedness; the sizes come from the Clang target.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "core.floats": {
      "status": "partial",
      "note": "IEEE-754 half, single, double and quad precision via the Flocq library; x87 long double is abstract.",
      "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": "Implicit copy assignment of byte arrays has no working rule; variable-length arrays and flexible array members (compiler extensions) are not supported.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "core.loops": {
      "status": "full"
    },
    "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 modeled; calls through member function pointers are not.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "core.concurrency": {
      "status": "partial",
      "note": "Concurrency is modeled, but only sequentially consistent atomics; weak memory is planned.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "core.io": {
      "status": "partial",
      "note": "No model of I/O or system calls; calls to outside functions (including variadic ones such as printf) are given specifications by the user.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "core.stdlib": {
      "status": "partial",
      "note": "The standard library is not part of the semantics; the separate brick-libcpp project specifies parts of it.",
      "source": "https://github.com/SkyLabsAI/brick-libcpp"
    },
    "cpp.classes": {
      "status": "partial",
      "note": "Classes, inheritance and virtual dispatch are modeled. Virtual inheritance is not; classes with bit-fields are opaque; dynamic_cast and typeid are partial.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "cpp.templates": {
      "status": "partial",
      "note": "Only instantiated templates are modeled; parameter packs and unresolved concepts are not.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "cpp.raii": {
      "status": "partial",
      "note": "Constructors, destructors and implicit destruction are modeled; lifetime-extended temporaries and initialization of globals are not.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "cpp.exceptions": {
      "status": "none",
      "note": "throw and try are not modeled, and calls are assumed not to throw.",
      "source": "https://skylabsai.github.io/BRiCk/features.html"
    },
    "cpp.stl": {
      "status": "partial",
      "note": "Not part of the semantics; brick-libcpp specifies parts of the standard library.",
      "source": "https://github.com/SkyLabsAI/brick-libcpp"
    },
    "cpp.lambdas": {
      "status": "partial",
      "note": "cpp2v translates lambdas, but lambda types at global scope are dropped as unsupported.",
      "source": "https://github.com/SkyLabsAI/BRiCk/blob/main/CHANGES.md"
    }
  },
  "last_release": {
    "version": "main@5d7dacc",
    "date": "2026-11-26",
    "source": "https://github.com/SkyLabsAI/BRiCk/commits/main"
  },
  "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/features.html",
      "title": "BRiCk language support",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://skylabsai.github.io/BRiCk/evaluation.html",
      "title": "BRiCk evaluation rules",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://skylabsai.github.io/BRiCk/machine.html",
      "title": "BRiCk compiler correctness",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://skylabsai.github.io/BRiCk/bibliography.html",
      "title": "BRiCk related work",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/SkyLabsAI/BRiCk/blob/main/CHANGES.md",
      "title": "BRiCk changelog",
      "accessed": "2026-11-26"
    }
  ],
  "computed": {
    "kind": "semantics",
    "methodology_version": "0.1",
    "built": "2026-11-26",
    "links": {
      "html": "/semantics/brick-cpp/",
      "json": "/semantics/brick-cpp.json",
      "markdown": "/semantics/brick-cpp.md"
    },
    "stage": {
      "stage": 0,
      "name": "Mechanized",
      "criteria": [
        {
          "key": "mechanized",
          "stage": 0,
          "label": "Machine-checked or machine-readable definition",
          "met": true,
          "evidence": "https://github.com/SkyLabsAI/BRiCk/tree/main/rocq-skylabs-brick/theories/lang/cpp",
          "computed": false
        },
        {
          "key": "scope_stated",
          "stage": 0,
          "label": "Fragment and version are stated",
          "met": true,
          "evidence": "https://skylabsai.github.io/BRiCk/features.html",
          "note": "The features page lists supported and unsupported constructs as of October 2026, relative to Clang's syntax tree. It names no C++ standard version.",
          "computed": false
        },
        {
          "key": "executable",
          "stage": 1,
          "label": "Can be executed or tested",
          "met": false,
          "note": "The semantics is a set of axioms in weakest-precondition style; it cannot run programs.",
          "computed": false
        },
        {
          "key": "validated",
          "stage": 1,
          "label": "Published results against conformance tests or real implementations",
          "met": false,
          "note": "No published conformance or differential-testing results.",
          "computed": false
        },
        {
          "key": "authoritative",
          "stage": 2,
          "label": "Adopted by the language or ISA owner, or covers the full current version and tracks new ones",
          "met": false,
          "note": "Adopted by the owner: no; full coverage: no; tracks new versions: no. Not adopted or endorsed by the ISO C++ committee. Exceptions, coroutines, virtual inheritance and other features are not covered. No stated policy for new C++ versions. cpp2v does follow new Clang releases (Clang 23 support added 2026-11-05).",
          "computed": true
        }
      ],
      "missing_for_next": [
        "executable",
        "validated"
      ]
    },
    "used_by": [
      "brick"
    ]
  }
}