Core Types
The Z3 C API uses opaque pointer types for all objects:Fundamental Types
opaque pointer
Configuration object used to initialize contexts. Set parameters before creating a context.
opaque pointer
Manager of all Z3 objects. Required for all API calls. Stores global configuration and manages memory.
opaque pointer
Lisp-like symbol used to name types, constants, and functions. Can be created from strings or integers.
opaque pointer
Abstract syntax tree node representing terms, formulas, and types. Base type for all expressions.
opaque pointer
Kind of AST representing types (Int, Real, Bool, etc.).
opaque pointer
Function declaration (symbol with signature).
opaque pointer
Function application (function symbol applied to arguments).
Solver Types
opaque pointer
Incremental solver for checking satisfiability of formulas.
opaque pointer
Model (satisfying assignment) for satisfiable formulas.
opaque pointer
Parameter set for configuring solvers, tactics, and other components.
Advanced Types
opaque pointer
Building block for custom solvers.
opaque pointer
Set of formulas that can be solved or transformed.
opaque pointer
Context for the recursive predicate solver (Datalog engine).
opaque pointer
Context for solving optimization queries (maximize/minimize).
Enumerations
Z3_lbool
Lifted Boolean type for satisfiability results:Z3_sort_kind
The different kinds of sorts (types):Context Management
Creating Contexts
function
Z3_set_param_value to set parameters.function
function
"model":"true"to enable model generation"proof":"true"to enable proof generation"timeout": milliseconds (e.g.,"1000")
function
function
Version Information
function
Symbols
function
function
Sorts (Types)
Basic Sorts
function
function
function
function
sz.Array Sorts
function
domain to range).Constants and Variables
function
function
function
num/den.Boolean Operations
function
true constant.function
false constant.function
function
function
function
t1 => t2.function
t1 <=> t2.Arithmetic Operations
function
function
function
function
function
Comparison Operations
function
l = r.function
function
t1 < t2.function
t1 <= t2.function
t1 > t2.function
t1 >= t2.Solver API
Creating Solvers
function
function
function
Adding Constraints
function
function
function
n scopes.Checking Satisfiability
function
Z3_L_TRUE, Z3_L_FALSE, or Z3_L_UNDEF.function
Getting Results
function
"model" parameter to be "true".function
"proof" parameter to be "true".function
Model API
function
function
function
t in model m. Result stored in v.String Conversion
function
function
function
SMT-LIB Parsing
function
Resources
Full C API Documentation
Official Z3 C API reference
C Examples
Complete examples in the Z3 repository
Header File
Browse the z3.h header file
Getting Started
Learn the basics of the C API
