Z3 Theorem Prover

Z3 Theorem Prover
Original author(s)Microsoft Research
Initial release2012; 12 years ago (2012)
Stable release
4.13.0 Edit this on Wikidata / 7 March 2024; 33 days ago (7 March 2024)
Written inC++
Operating systemWindows, FreeBSD, Linux (Debian, Ubuntu), macOS
PlatformIA-32, x86-64, WebAssembly, arm64
TypeTheorem prover
LicenseMIT License

Z3, also known as the Z3 Theorem Prover, is a satisfiability modulo theories (SMT) solver developed by Microsoft.


Z3 was developed in the Research in Software Engineering (RiSE) group at Microsoft Research Redmond and is targeted at solving problems that arise in software verification and program analysis. Z3 supports arithmetic, fixed-size bit-vectors, extensional arrays, datatypes, uninterpreted functions, and quantifiers. Its main applications are extended static checking, test case generation, and predicate abstraction.[citation needed]

Z3 was open sourced in the beginning of 2015. The source code is licensed under MIT License and hosted on GitHub. The solver can be built using Visual Studio, a makefile or using CMake and runs on Windows, FreeBSD, Linux, and macOS.

The default input format for Z3 is SMTLIB2. It also has officially supported bindings for several programming languages, including C, C++, Python, .NET, Java, and OCaml.


Propositional and predicate logic

In this example propositional logic assertions are checked using functions to represent the propositions a and b. The following Z3 script checks to see if :

(declare-fun a () Bool)
(declare-fun b () Bool)
(assert (not (= (not (and a b)) (or (not a)(not b)))))



Note that the script asserts the negation of the proposition of interest. The unsat result means that the negated proposition is not satisfiable, thus proving the desired result (De Morgan's law).

Solving equations

The following script solves the two given equations, finding suitable values for the variables a and b:

(declare-const a Int)
(declare-const b Int)
(assert (= (+ a b) 20))
(assert (= (+ a (* 2 b)) 10))


  (define-fun b () Int
  (define-fun a () Int


In 2015, Z3 received the Programming Languages Software Award from ACM SIGPLAN. In 2018, Z3 received the Test of Time Award from the European Joint Conferences on Theory and Practice of Software (ETAPS). Microsoft researchers Nikolaj Bjørner and Leonardo de Moura received the 2019 Herbrand Award for Distinguished Contributions to Automated Reasoning in recognition of their work in advancing theorem proving with Z3.

See also

This page was last updated at 2024-04-17 13:24 UTC. Update now. View original page.

All our content comes from Wikipedia and under the Creative Commons Attribution-ShareAlike License.


If mathematical, chemical, physical and other formulas are not displayed correctly on this page, please useFirefox or Safari