Skip to content
SPECIFICTION
Get listed

CBMC vs Stainless

CBMC

diffblue.github.io

Stainless

stainless.epfl.ch

Side by side

FigureCBMCStainless
Price fromFree—
Free planYes—
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
Self-hostedYes—
Plans published10
Spec score · Formal Verification Tools8.1 (#8)7.1 (#29)
LicenseThe repository identifies CBMC as licensed under the 4-clause BSD license.The repository states that Stainless is released under the Apache 2.0 license.
PurposeCBMC is a bounded model checker for C and C++ programs that explores possible execution paths and checks assertions.Stainless is a verification framework and tool for a subset of the Scala programming language.
Safety checksIt can check array bounds, pointer safety, exceptions, user-specified assertions, and some undefined behavior such as signed integer overflow.It checks array bounds and whether pattern matches cover all possible cases.
Solver supportCBMC supports an incremental SMT2 backend that can use an SMT-LIB 2.6 compliant solver, with examples for Z3 and CVC5.Stainless relies on Inox and supports SMT solvers including Z3, cvc5, and Princess.

Plans

CBMC

  • CBMCFree

CBMC pricing →

Stainless

No plans published.

Stainless pricing →

In their own words

CBMC

CBMC is a bounded model checker for C and C++ programs. It explores execution paths to check assertions, including array bounds, pointer safety, exceptions, and some undefined behavior such as signed integer overflow. Its analysis unwinds loops before sending the resulting equation to a decision procedure, and inputs may need a bounded size. The repository lists C89, C99, most of C11, C17, C23, GCC and Visual Studio extensions, and SystemC through Scoot; the listed input languages also include Java bytecode. CBMC supports contracts and can produce counterexamples. Its incremental SMT2 backend works with SMT-LIB 2.6-compliant solvers, with Z3 and CVC5 as examples. Distribution options include Homebrew instructions for macOS, Ubuntu DEB packages, Windows MSI installers, and Docker images. goto-cc can replace gcc or cl.exe in Makefiles to collect project models. The guide discusses routine development and continuous integration use. CBMC is free under the 4-clause BSD license.

Visit diffblue.github.io

Stainless

Stainless has no write-up on Specifiction yet; its figures are above.

Visit stainless.epfl.ch