Z3 Theorem Prover

Short description: Software for solving satisfiability problems

Z3 Theorem Prover

Original author(s)| Microsoft Research
Developer(s)| Microsoft
Initial release| 2012; 14 years ago (2012)
Written in| C++
Operating system| Windows, FreeBSD, Linux (Debian, Ubuntu), macOS
Platform| IA-32, x86-64, WebAssembly, arm64
Type| Theorem prover
License| MIT License
Website| github.com/Z3Prover

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

## Contents

* 1 Overview
* 2 Examples
* 2.1 Propositional and predicate logic
* 2.2 Solving equations
* 3 Awards
* 4 See also
* 5 References
* 6 Further reading
* 7 External links

## Overview

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.[2] The source code is licensed under MIT License and hosted on GitHub.[3] 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.[4]

## 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 a∧b‾≡a‾∨b‾:

(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 (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))
(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.[5][6] In 2018, Z3 received the Test of Time Award from the European Joint Conferences on Theory and Practice of Software (ETAPS).[7] 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.[8][9]

## See also

* Formal verification

## References

1. ↑ "Using the SMT solver Z3". http://lim.univ-reunion.fr/staff/fred/Enseignement/AlgoAvancee/Exos/Z3-exercises.pdf.
2. ↑ "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. https://sdtimes.com/android/microsofts-visual-studio-timeline-and-z3-theorem-prover-google-cloud-launcher-facebooks-fresco-sd-times-news-digest-march-27-2015/.
3. ↑ "GitHub - Z3Prover/z3: The Z3 Theorem Prover". December 1, 2019. https://github.com/Z3Prover/z3.
4. ↑ Bjørner, Nikolaj; de Moura, Leonardo; Nachmanson, Lev; Wintersteiger, Christoph (2019). "Programming Z3". https://z3prover.github.io/papers/programmingz3.html.
5. ↑ "Programming Languages Software Award". http://www.sigplan.org/Awards/Software/.
6. ↑ Microsoft Z3 Theorem Prover Wins Award
7. ↑ ETAPS 2018 Test of Time Award
8. ↑ The inner magic behind the Z3 theorem prover - Microsoft Research
9. ↑ 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.
* Dennis Yurichev - SAT/SMT by Example
* The inner magic behind the Z3 theorem prover

## External links

* Z3 online playground

* v
* t
* e

Microsoft free and open-source software (FOSS)

Overview|

* Microsoft and open source
* Shared Source Initiative

Software|

| Applications|

* Atom
* Conference XP
* File Manager
* Open Live Writer
* PowerToys for Windows 10
* Windows Calculator
* Windows Console
* Windows Terminal
* WorldWide Telescope
* XML Notepad

|

Video games|

* Allegiance

Programming languages|

* Bosque
* C#
* Dafny
* F#
* F*
* IronPython
* IronRuby
* P
* PowerShell
* Q#
* R Open
* Small Basic
* TypeScript
* Visual Basic .NET

Frameworks and
development tools|

* .NET Bio
* .NET Core
* .NET Framework
* .NET Micro Framework
* AirSim
* ASP.NET
* ASP.NET AJAX
* ASP.NET Core
* ASP.NET MVC
* ASP.NET Razor
* ASP.NET Web Forms
* Blazor
* C++/WinRT
* ChakraCore
* CLR Profiler
* DiskSpd
* Dryad
* Electron
* Entity Framework
* Managed Extensibility Framework
* Microsoft Automatic Graph Layout
* Microsoft Cognitive Toolkit
* Microsoft Detours
* ML.NET
* Mono
* MonoDevelop
* MSBuild
* NuGet
* Open Management Infrastructure
* Orleans
* ProcDump
* R Tools for Visual Studio
* Roslyn
* Sandcastle
* SignalR
* StyleCop
* SVNBridge
* T2 Temporal Prover
* Text Template Transformation Toolkit
* vcpkg
* Virtual File System for Git
* Visual Studio Code
* Windows Communication Foundation
* Windows Driver Frameworks
* Windows Forms
* Windows Presentation Foundation
* Windows Template Library
* WinJS
* WiX
* Z3 Theorem Prover

Operating systems|

* MS-DOS
* Barrelfish

Licenses|

* Microsoft Public License
* Microsoft Reciprocal License

Related|

* .NET Foundation
* F Sharp Software Foundation
* Microsoft Open Specification Promise
* Outercurve Foundation

Category

* v
* t
* e

Microsoft Research (MSR)

Main
projects|

| Languages and compilers|

* Polyphonic C#
* Cω
* Spec#
* Sing#
* Bartok
* F*
* Phoenix

|

Distributed/grid computing|

* Bigtop
* Gridline
* BitVault
* Orleans

Internet and networking|

* AjaxView
* Avalanche
* Conference XP
* Gazelle
* HoneyMonkey
* Penny Black
* Wallop

Other projects|

* Cognitive Toolkit
* IllumiRoom
* Image Composite Editor
* MyLifeBits
* LiveStation
* SLAM
* Terminator
* WorldWide Telescope
* PhotoDNA
* Z3 Theorem Prover

Operating systems|

* Barrelfish
* HomeOS
* Midori
* Singularity
* Verve

APIs|

* Joins
* Accelerator
* Dryad
* SXM

Launched as products|

* C#
* Comic Chat
* Detours
* F#
* Sideshow
* PixelSense (TouchLight)
* SenseCam
* ClearType
* Group Shot
* Allegiance
* TrueSkill
* Songsmith
* Xbox
* Kinect

MSR Labs
applied
research|

| Live Labs|

| Current|

* Pivot
* Seadragon
* Deep Zoom
* DeepZoomPix

|

Discontinued|

* Deepfish
* Listas
* Live Clipboard
* Photosynth
* Volta

FUSE Labs|

* Bing Twitter
* Docs.com
* Kodu

Other labs|

* Academic Search
* adCenter Labs
* Office Labs

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Z3 Theorem Prover. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Z3_Theorem_Prover&oldid=761266"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template