{
  "id": "cbmc",
  "name": "CBMC",
  "aka": [
    "C Bounded Model Checker",
    "CProver"
  ],
  "summary": "Write a test-like harness for your C code; CBMC checks every execution up to a loop bound, giving a counterexample or a bounded proof.",
  "use_if": [
    "You want memory safety and assertion checks on C code with small or known loop bounds, such as parsers, data structures or boot code.",
    "You prefer writing test-like harnesses and assumptions over writing loop invariants.",
    "You want a concrete counterexample trace whenever a check fails."
  ],
  "avoid_if": [
    "Your loops have no small bound and you are not willing to write loop contracts; the result would only cover executions up to the bound.",
    "Your code is mostly modern C++; the C++ front end is limited.",
    "You need full functional correctness of complex algorithms; the solver often runs out of time or memory on large inputs."
  ],
  "effort": "push-button",
  "open": "open-source",
  "license": "BSD-4-Clause",
  "maintainers": [
    "CProver developers (github.com/diffblue/cbmc)"
  ],
  "links": {
    "homepage": "https://www.cprover.org/cbmc/",
    "repo": "https://github.com/diffblue/cbmc",
    "docs": "https://diffblue.github.io/cbmc/",
    "paper": "http://www-2.cs.cmu.edu/~svc/papers/view-publications-ckl2004.html",
    "tutorial": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/cbmc-tutorial.md"
  },
  "components": [
    {
      "role": "frontend",
      "name": "goto-cc (CBMC's own C/C++ parser)",
      "assurance": "trusted",
      "note": "A drop-in replacement for gcc that compiles C into CBMC's 'goto program' format; it is not the compiler that builds your binary."
    },
    {
      "role": "semantics",
      "name": "CBMC C memory and pointer model",
      "assurance": "trusted",
      "note": "Built into the tool; pointers are modeled as (object, offset) pairs."
    },
    {
      "role": "translation",
      "name": "Loop unwinding and symbolic execution to a SAT/SMT formula",
      "assurance": "trusted"
    },
    {
      "role": "checker",
      "name": "SAT solver (MiniSat 2 by default) or SMT solver (Z3, cvc5, Bitwuzla and others)",
      "ref": "z3",
      "ref_kind": "prover",
      "assurance": "trusted",
      "note": "The ref points to Z3, one of several selectable back ends; the default in CMake builds is MiniSat 2."
    },
    {
      "role": "compiler",
      "name": "gcc / clang (not part of CBMC)",
      "assurance": "trusted"
    }
  ],
  "verifies": [
    {
      "target": "c",
      "note": "Supports C89, C99, most of C11, C17, C23 and most gcc and Visual Studio extensions (README)."
    },
    {
      "target": "cpp",
      "note": "A C++ front end exists, but in 2025 the maintainers called its support 'spotty'; a large rework is still an open pull request (#8878)."
    }
  ],
  "properties": {
    "no-ub": {
      "status": "partial",
      "note": "Since CBMC 6.0 the default checks cover array bounds, pointer validity, pointer primitives, division by zero, signed overflow and over-wide shifts. Other checks (memory leaks, unsigned and pointer overflow, conversions, NaN) must be switched on. The result is a proof only up to the loop bounds (with unwinding assertions passing) or with loop contracts.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/src/ansi-c/goto-conversion/goto_check_c.h"
    },
    "functional": {
      "status": "partial",
      "note": "You state properties as assertions in a harness or as function contracts. Checks hold for all inputs allowed by the harness, but only up to the loop bounds unless loop contracts are used.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/src/goto-instrument/contracts/doc/user/contracts-loops.md"
    },
    "equivalence": {
      "status": "partial",
      "note": "No dedicated equivalence mode for two C functions; you write a harness that runs both on the same nondeterministic inputs and asserts equal results, within the loop bounds. The README also mentions checking C against Verilog.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/README.md"
    },
    "info-flow": {
      "status": "partial",
      "note": "No built-in non-interference or constant-time check. Symbolic shadow memory lets users build their own taint tracking (shown in the CBMC-SSM paper).",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/modeling-shadow-memory.md"
    },
    "concurrency": {
      "status": "partial",
      "note": "Threads (pthreads or __CPROVER_ASYNC) are explored up to the unwinding bound; sequential consistency by default, with --mm and goto-instrument options for weak memory models and race checks. AWS reported that code using concurrency was outside the scope of their CBMC proofs.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/api.md"
    },
    "termination": {
      "status": "partial",
      "note": "Unwinding assertions show that loops finish within the given bound. Proving termination of unbounded loops needs loop contracts with a decreases clause.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/src/goto-instrument/contracts/doc/user/contracts-loops.md"
    }
  },
  "features": {
    "core.integers": {
      "status": "full",
      "note": "Bit-precise machine integers.",
      "source": "https://discovery.ucl.ac.uk/10131088/1/spe.2949.pdf"
    },
    "core.floats": {
      "status": "full",
      "note": "Bit-accurate IEEE 754 for float and double. The math library has very limited support for elementary functions such as sin or exp.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/modeling-floating-point.md"
    },
    "core.heap": {
      "status": "full",
      "note": "malloc/free are modeled; malloc may return NULL by default since 6.0; use-after-free and double free are checked.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/modeling-pointers.md"
    },
    "core.arrays": {
      "status": "full",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/properties.md"
    },
    "core.loops": {
      "status": "partial",
      "note": "Loops are unrolled up to a bound. Unwinding assertions (on by default since 6.0) fail if the bound is too small, so a passing run is a proof for all executions. Loops without a small bound need loop contracts (goto-instrument --apply-loop-contracts) for an unbounded proof.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/cbmc-unwinding.md"
    },
    "core.recursion": {
      "status": "partial",
      "note": "Recursion is unrolled up to the bound like loops; function contracts can replace recursive calls.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/regression/cbmc/Recursion1/test.desc"
    },
    "core.higher-order": {
      "status": "full",
      "note": "Calls through function pointers become a case split over all functions of a matching type; every possible target must be in the model.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/architectural/goto-program-transformations.md"
    },
    "core.concurrency": {
      "status": "partial",
      "note": "Bounded exploration of thread interleavings only; no unbounded proofs for concurrent code.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/api.md"
    },
    "core.io": {
      "status": "partial",
      "note": "Many POSIX and C library calls have built-in models that mostly return nondeterministic values. Since 6.0 a call to a function with no body fails verification unless you add a stub.",
      "source": "https://github.com/diffblue/cbmc/pull/8292"
    },
    "core.stdlib": {
      "status": "partial",
      "note": "CBMC ships models for parts of the C library (string, stdlib, stdio, pthread and others); coverage is not complete and the math library is limited.",
      "source": "https://github.com/diffblue/cbmc/tree/develop/src/ansi-c/library"
    },
    "c.provenance": {
      "status": "partial",
      "note": "Pointers are (object, offset) pairs. The manual says converting a pointer to an integer is not supported, and integers cast to pointers are NULL or point into a special memory-mapped I/O region. Pointers to different objects are always treated as different, which the manual calls not sound.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/modeling-pointers.md"
    },
    "c.unions": {
      "status": "full",
      "note": "Byte-level memory model; reading a union through another member (including float/integer punning) is covered by the regression suite.",
      "source": "https://github.com/diffblue/cbmc/tree/develop/regression/cbmc/union-double-bits-fpa"
    },
    "c.bitfields": {
      "status": "full",
      "source": "https://github.com/diffblue/cbmc/tree/develop/regression/cbmc/Bitfields1"
    },
    "c.varargs": {
      "status": "full",
      "source": "https://github.com/diffblue/cbmc/tree/develop/regression/cbmc/Variadic1"
    },
    "c.setjmp": {
      "status": "none",
      "note": "The built-in longjmp model is a failing assertion (\"longjmp requires instrumentation\"), so code that reaches longjmp cannot be verified as is.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/src/ansi-c/library/setjmp.c"
    },
    "c.volatile": {
      "status": "partial",
      "note": "Memory-mapped I/O regions must be declared with __CPROVER_allocated_memory, and device behavior must be modeled by hand (for example by making reads nondeterministic).",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/modeling-mmio.md"
    },
    "c.inline-asm": {
      "status": "partial",
      "note": "Only a few x86 and Arm instructions (fences, xchg, FPU control word) are translated. Other inline assembly is dropped without a warning, so its effects are silently ignored.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/src/assembler/remove_asm.cpp"
    },
    "cpp.classes": {
      "status": "partial",
      "note": "Classes, inheritance and virtual calls are handled by the C++ front end, but the maintainers describe C++ support as spotty.",
      "source": "https://github.com/diffblue/cbmc/issues/8663"
    },
    "cpp.templates": {
      "status": "partial",
      "note": "Basic templates are in the regression suite; newer features (variadic templates, concepts, class template argument deduction) are part of an unmerged front-end rework.",
      "source": "https://github.com/diffblue/cbmc/pull/8878"
    },
    "cpp.raii": {
      "status": "partial",
      "note": "Constructors and destructors are in the regression suite; overall C++ support is described as spotty.",
      "source": "https://github.com/diffblue/cbmc/issues/8663"
    },
    "cpp.exceptions": {
      "status": "unknown",
      "note": "The README lists exceptions among the things CBMC can check, but how much of C++ throw/catch is supported is not documented.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/README.md"
    },
    "cpp.stl": {
      "status": "partial",
      "note": "In a 2025 user test with CBMC 6.6, 10 of 100 minimal programs using standard headers passed; most C++11/14 headers failed to compile. A maintainer confirmed support is spotty.",
      "source": "https://github.com/diffblue/cbmc/issues/8663"
    },
    "cpp.lambdas": {
      "status": "unknown",
      "note": "Lambda parsing is listed as new work in an open front-end pull request, which suggests released versions lack it; not confirmed.",
      "source": "https://github.com/diffblue/cbmc/pull/8878"
    }
  },
  "trust": {
    "checker": {
      "level": "amber",
      "summary": "A SAT or SMT solver decides; its answer is trusted and no proof certificate is kept.",
      "note": "Default SAT solver in CMake builds is MiniSat 2; CaDiCaL and SMT solvers (Z3, cvc5, Bitwuzla, Yices, MathSAT) can be selected. CBMC's own symbolic execution and encoding are also trusted. Release 6.10 added a workaround for a soundness bug in older Z3 releases.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/CMakeLists.txt"
    },
    "semantics": {
      "level": "amber",
      "summary": "C model built into CBMC; tested by its own regression suite.",
      "note": "Known simplifications: pointers to different objects are always distinct (the manual calls this not sound), and unknown inline assembly is ignored.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/modeling-pointers.md"
    },
    "frontend": {
      "level": "amber",
      "summary": "CBMC's own C/C++ parser (goto-cc), not the compiler that builds the binary.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/goto-cc.md"
    },
    "binary_gap": {
      "level": "red",
      "summary": "The binary comes from gcc or clang, which are not verified."
    },
    "escape_hatches": {
      "level": "amber",
      "summary": "__CPROVER_assume, stubs and unsound flags exist; CBMC warns on unsound flags.",
      "note": "Harness assumptions (__CPROVER_assume), hand-written stubs, --no-standard-checks and --no-unwinding-assertions can hide bugs. CBMC prints a warning for --unwind without unwinding assertions, --depth and other unsound options; assumptions in code are found by searching the source.",
      "source": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/unsound_options.md"
    }
  },
  "stage_evidence": {
    "public_artifact": {
      "met": true,
      "evidence": "https://github.com/diffblue/cbmc"
    },
    "published_use": {
      "met": true,
      "evidence": "https://discovery.ucl.ac.uk/10131088/1/spe.2949.pdf",
      "note": "Chong et al., memory-safety proofs of AWS C Common and other AWS libraries (Software: Practice and Experience, 2021)."
    },
    "installs_on_current": {
      "met": true,
      "evidence": "https://github.com/diffblue/cbmc/releases/tag/cbmc-6.11.0",
      "note": "Packages for Ubuntu 24.04, Windows and macOS (Homebrew), plus a container image."
    },
    "user_docs": {
      "met": true,
      "evidence": "https://diffblue.github.io/cbmc/"
    },
    "external_users": {
      "met": true,
      "evidence": "https://www-i2.moves.rwth-aachen.de/i2/pdfs/1699.pdf",
      "note": "RWTH Aachen master's thesis (2019) evaluating CBMC on two embedded C programs from Ford."
    },
    "soundness_channel": {
      "met": true,
      "evidence": "https://github.com/diffblue/cbmc/labels/soundness",
      "note": "Public GitHub issues with a \"soundness\" label."
    }
  },
  "production_users": [
    {
      "org": "Amazon Web Services",
      "what": "Initial boot code running in AWS data centers proved memory safe with CBMC.",
      "source": "https://ora.ox.ac.uk/objects/uuid:a4566b04-ad64-4bed-9bbe-20b5a4d98c2d"
    }
  ],
  "last_release": {
    "version": "6.11.0",
    "date": "2026-08-21",
    "source": "https://github.com/diffblue/cbmc/releases/tag/cbmc-6.11.0"
  },
  "used_for": [
    {
      "name": "Memory safety of AWS C Common (proofs in the aws-c-common repository)",
      "url": "https://discovery.ucl.ac.uk/10131088/1/spe.2949.pdf"
    },
    {
      "name": "Memory safety of boot code in AWS data centers",
      "url": "https://ora.ox.ac.uk/objects/uuid:a4566b04-ad64-4bed-9bbe-20b5a4d98c2d"
    }
  ],
  "last_checked": "2026-11-26",
  "attestation": "maintainer",
  "claimed_by_authors": false,
  "sources": [
    {
      "url": "https://github.com/diffblue/cbmc/blob/develop/CHANGELOG",
      "title": "CBMC changelog (6.0.0 default checks and unwinding assertions)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/diffblue/cbmc/blob/develop/src/cbmc/cbmc_parse_options.cpp",
      "title": "CBMC default analysis flags",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/cbmc-unwinding.md",
      "title": "Understanding loop unwinding",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/diffblue/cbmc/blob/develop/doc/cprover-manual/unsound_options.md",
      "title": "Unsound CLI options",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/diffblue/cbmc/blob/develop/src/goto-instrument/contracts/doc/user/contracts-loops.md",
      "title": "Loop contracts",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/diffblue/cbmc/issues/8663",
      "title": "C++ standard library and language version support (issue)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://discovery.ucl.ac.uk/10131088/1/spe.2949.pdf",
      "title": "Chong et al., Code-level model checking in the software development workflow at AWS",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://ora.ox.ac.uk/objects/uuid:a4566b04-ad64-4bed-9bbe-20b5a4d98c2d",
      "title": "Cook et al., Model checking boot code from AWS data centers (CAV 2018)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://www.cprover.org/cbmc/",
      "title": "CBMC homepage",
      "accessed": "2026-11-26"
    }
  ],
  "computed": {
    "kind": "toolchains",
    "methodology_version": "0.1",
    "built": "2026-11-26",
    "links": {
      "html": "/toolchains/cbmc/",
      "json": "/toolchains/cbmc.json",
      "markdown": "/toolchains/cbmc.md"
    },
    "stage": {
      "stage": 1,
      "name": "Usable",
      "criteria": [
        {
          "key": "public_artifact",
          "stage": 0,
          "label": "Publicly available",
          "met": true,
          "evidence": "https://github.com/diffblue/cbmc",
          "computed": false
        },
        {
          "key": "published_use",
          "stage": 0,
          "label": "At least one published verification uses it",
          "met": true,
          "evidence": "https://discovery.ucl.ac.uk/10131088/1/spe.2949.pdf",
          "note": "Chong et al., memory-safety proofs of AWS C Common and other AWS libraries (Software: Practice and Experience, 2021).",
          "computed": false
        },
        {
          "key": "recent_release",
          "stage": 1,
          "label": "Released or updated in the last 12 months",
          "met": true,
          "evidence": "https://github.com/diffblue/cbmc/releases/tag/cbmc-6.11.0",
          "note": "Latest release: 6.11.0, 2026-08-21.",
          "computed": true
        },
        {
          "key": "installs_on_current",
          "stage": 1,
          "label": "Installs and runs on current platforms",
          "met": true,
          "evidence": "https://github.com/diffblue/cbmc/releases/tag/cbmc-6.11.0",
          "note": "Packages for Ubuntu 24.04, Windows and macOS (Homebrew), plus a container image.",
          "computed": false
        },
        {
          "key": "user_docs",
          "stage": 1,
          "label": "User documentation or tutorial",
          "met": true,
          "evidence": "https://diffblue.github.io/cbmc/",
          "computed": false
        },
        {
          "key": "external_users",
          "stage": 1,
          "label": "Used by a group other than its authors",
          "met": true,
          "evidence": "https://www-i2.moves.rwth-aachen.de/i2/pdfs/1699.pdf",
          "note": "RWTH Aachen master's thesis (2019) evaluating CBMC on two embedded C programs from Ford.",
          "computed": false
        },
        {
          "key": "production_users",
          "stage": 2,
          "label": "Verified code in production at two or more independent organizations",
          "met": false,
          "note": "1 recorded: Amazon Web Services.",
          "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/diffblue/cbmc/labels/soundness",
          "note": "Public GitHub issues with a \"soundness\" label.",
          "computed": false
        }
      ],
      "missing_for_next": [
        "production_users"
      ]
    }
  }
}