Z3Prover/z3
Developer ToolsA general-purpose SMT solver for checking satisfiability and proving properties in program analysis and verification.
Z3 is Microsoft Research's open-source SMT solver, used when you need a tool to decide whether logical constraints can hold (satisfiability) or to prove that properties follow from them. That makes it useful for program analysis, language tooling, and formal verification rather than for everyday coding.
What it does and how you use it
Z3 accepts constraints and returns a verdict: satisfiable with an assignment, or unsatisfiable, and through that it supports proving properties indirectly. The default input format is SMTLIB2, and the project also documents native APIs for C, C++, .NET, Java, Python, OCaml, and Rust, plus community bindings for Julia and Smalltalk. Most users likely start from a language wrapper; the Python API is installable from PyPI as z3-solver, and a WebAssembly/TypeScript build is published on npm. An online guide is available for learning the basics.
A concrete workflow is the one described by an early commenter: while prototyping a language with contracts or refined types, assertions can be pushed onto a solver stack and cancelled afterwards, so each checked function does not require restarting the solver and re-declaring all variables one SMT usage report. That stack behaviour is the kind of mechanism that shapes how the tool fits into a compiler or analyser, and it is a 2015 user's account rather than a current benchmark.
Ways to obtain it
The README points to pre-built stable and nightly binaries, and the solver can also be built from source with CMake, vcpkg, or Bazel project README. CMake is described as the preferred and most complete build path; Z3 uses C++20, and on Windows the recommended compiler is Visual Studio 2019 or later. Build dependencies are modest: C++ runtime libraries including pthreads, and Python is required to build, while the Java, .NET, OCaml, and Julia APIs each need their own toolchain. Go bindings need CGO and Go 1.20 or later. GMP is optional because Z3 carries its own multi-precision implementation.
If you only want to try or embed the solver, the bindings and pre-built binaries avoid most of this; the compiler and build-system requirements belong to the source-build path. The online guide is the gentle on-ramp for learning the concepts Z3 guide.
Licensing and contribution conditions
Z3 is MIT-licensed, which matters for projects that previously had to weigh whether linking to Z3 was acceptable MIT license. Windows binary distributions include C++ runtime redistributables under Microsoft's terms C++ runtime terms.
A current maintenance policy targets fuzz reports: submissions that offer no more than a reproducer may be closed without further consideration, because triaging fuzz bugs competes with work users care about. This affects the kind of bug report worth filing.
The available material does not include benchmark results or an evaluation of solver performance, so choose based on the interfaces and build requirements rather than expected speed. The repository's GitHub popularity figures are not evidence of reliability.
Written by AI from the project's README, updated October 28, 2026. The project's own docs are the source of truth.