Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsJul 4, 2026·3 min de lecture

Z3 — High-Performance SMT Solver by Microsoft Research

Z3 is a theorem prover and satisfiability modulo theories (SMT) solver used for software verification, constraint solving, and formal methods research.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Z3 Solver
Commande d'installation directe
npx -y tokrepo@latest install c6e455aa-7760-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

Z3 is an SMT (Satisfiability Modulo Theories) solver developed by Microsoft Research. It decides the satisfiability of logical formulas over integers, bit-vectors, arrays, floating-point numbers, and other data types. Z3 is widely used in program verification, symbolic execution, test generation, and constraint-based synthesis.

What Z3 Does

  • Solves satisfiability problems over arithmetic, bit-vectors, arrays, and strings
  • Powers program verification tools like Dafny, KLEE, and Seahorn
  • Supports optimization objectives (MaxSMT) for constrained optimization
  • Provides proof generation and unsatisfiable core extraction
  • Offers bindings for Python, C, C++, Java, .NET, and OCaml

Architecture Overview

Z3 implements a DPLL(T) architecture combining a SAT solver core with theory solvers for linear arithmetic, non-linear arithmetic, bit-vectors, arrays, datatypes, sequences, and floating-point. Theories communicate through an equality graph, and the solver supports incremental solving with push/pop scopes. The fixedpoint engine adds Datalog and CHC (constrained Horn clause) solving.

Self-Hosting & Configuration

  • Install the Python binding: pip install z3-solver
  • Pre-built binaries available for Linux, macOS, and Windows
  • Build from source with CMake for custom configurations
  • No external dependencies beyond a C++ compiler for source builds
  • Embeddable as a library via the C API in any application

Key Features

  • One of the fastest and most widely adopted SMT solvers in the world
  • Incremental solving for interactive verification workflows
  • Supports quantifiers with pattern-based and MBQI instantiation
  • Parallel solving mode for multi-core utilization
  • Extensive documentation and an active research community

Comparison with Similar Tools

  • CVC5 — competitive SMT solver; Z3 has broader industry adoption
  • Yices 2 — lightweight and fast for specific theories; Z3 covers more theory combinations
  • MathSAT — strong on interpolation; Z3 has wider language bindings
  • STP — specialized for bit-vector/array; Z3 is more general-purpose

FAQ

Q: Is Z3 suitable for production use? A: Yes. Z3 is used in production by Microsoft, Amazon, and others for verification, security analysis, and network configuration validation.

Q: Can Z3 solve optimization problems? A: Yes. Z3 supports optimization via its Optimize class, handling both hard constraints and soft objectives with priorities.

Q: What is the difference between SAT and SMT? A: SAT solves Boolean satisfiability. SMT extends SAT with theories like arithmetic and arrays, letting you reason about richer domains.

Q: Does Z3 support non-linear arithmetic? A: Yes, Z3 has a dedicated nlsat solver for non-linear real arithmetic and heuristic support for non-linear integer arithmetic.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires