Z3 Theorem Prover
Original author(s) | Microsoft Research |
---|---|
Developer(s) | Microsoft |
Initial release | 2012 |
Stable release | 4.13.0[1]
/ 7 March 2024 |
Repository | |
Written in | arm64 |
Type | Theorem prover |
License | MIT License |
Website | github |
Z3, also known as the Z3 Theorem Prover, is a satisfiability modulo theories (SMT) solver developed by Microsoft.[2]
Overview
Z3 was developed in the Research in Software Engineering (RiSE) group at
Z3 was open sourced in the beginning of 2015.[3] The source code is licensed under MIT License and hosted on GitHub.[4] The solver can be built using
.The default input format for Z3 is
Examples
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))))) (check-sat)
Result:
unsat
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 (
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)) (check-sat) (get-model)
Result:
sat (model (define-fun b () Int -10) (define-fun a () Int 30) )
Awards
In 2015, Z3 received the Programming Languages Software Award from ACM SIGPLAN.[6][7] In 2018, Z3 received the Test of Time Award from the European Joint Conferences on Theory and Practice of Software (ETAPS).[8] 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.[9][10]
See also
References
- ^ "Release 4.13.0". 7 March 2024. Retrieved 26 March 2024.
- ^ "Using the SMT solver Z3" (PDF). Archived from the original (PDF) on 2020-11-17. Retrieved 2019-12-01.
- ^ "Microsoft's Visual Studio timeline and Z3 Theorem Prover, Google Cloud Launcher, Facebook's Fresco—SD Times news digest: March 27, 2015". March 27, 2015.
- ^ "GitHub - Z3Prover/z3: The Z3 Theorem Prover". December 1, 2019 – via GitHub.
- ^ Bjørner, Nikolaj; de Moura, Leonardo; Nachmanson, Lev; Wintersteiger, Christoph (2019). "Programming Z3". Programming Z3. Archived from the original on February 9, 2023. Retrieved May 21, 2023.
- ^ "Programming Languages Software Award". www.sigplan.org.
- ^ Microsoft Z3 Theorem Prover Wins Award
- ^ ETAPS 2018 Test of Time Award
- ^ The inner magic behind the Z3 theorem prover - Microsoft Research
- ^ Herbrand Award
Further reading
- Leonardo De Moura; Nikolaj Bjørner (2008). "Z3: an efficient SMT solver". Tools and Algorithms for the Construction and Analysis of Systems. 4963: 337–340.
- The inner magic behind the Z3 theorem prover