Overview
The Expression API provides functions for creating and manipulating Z3 abstract syntax trees (ASTs), which represent terms, formulas, and types.Types
Z3_ast
Abstract syntax tree node - the fundamental data structure in Z3 for representing terms, formulas, and types.Z3_app
A kind of AST used to represent function applications. Subtype of Z3_ast.Z3_ast_kind
The different kinds of Z3 AST nodes:Z3_symbol
Lisp-like symbol used to name types, constants, and functions. Can be created using strings or integers.Symbol Creation
Z3_mk_int_symbol
Z3_symbol
New symbol
Z3_mk_string_symbol
Z3_symbol
New symbol
Boolean Expressions
Z3_mk_true
Z3_ast
The true constant
Z3_mk_false
Z3_ast
The false constant
Z3_mk_eq
Z3_ast
Equality expression
Z3_mk_distinct
Z3_ast
Distinct predicate
Z3_mk_not
Z3_ast
Negated expression
Z3_mk_and
Z3_ast
Conjunction
Z3_mk_or
Z3_ast
Disjunction
Z3_mk_implies
Z3_ast
Implication
Z3_mk_ite
Z3_ast
If-then-else expression
Constants and Applications
Z3_mk_const
Z3_ast
Constant expression
Z3_mk_app
Z3_ast
Function application
Numeral Creation
Z3_mk_int
Z3_ast
Numeral expression
Z3_mk_unsigned_int
Z3_ast
Numeral expression
Z3_mk_int64
Z3_ast
Numeral expression
Z3_mk_numeral
Z3_ast
Numeral expression
AST Inspection
Z3_get_ast_kind
Z3_ast_kind
Kind of AST node
Z3_is_app
bool
True if application, false otherwise
Z3_to_app
Z3_app
Application
Z3_get_app_decl
Z3_func_decl
Function declaration
Z3_get_app_num_args
unsigned
Number of arguments
Z3_get_app_arg
Z3_ast
i-th argument
