Overview
The Model API provides functions for extracting and interpreting models - satisfying assignments returned by the solver when a formula is satisfiable.Types
Z3_model
A model for the constraints asserted into the logical context. Contains interpretations for constants and functions.Z3_func_interp
Interpretation of a function in a model. Represents the graph of a function.Z3_func_entry
Representation of a function interpretation entry at a particular point.Model Creation and Reference Counting
Z3_mk_model
Z3_model
New empty model
Z3_model_inc_ref
Z3_model_dec_ref
Evaluating Expressions
Z3_model_eval
bool
True if evaluation succeeded
Constant Interpretation
Z3_model_get_num_consts
unsigned
Number of constants
Z3_model_get_const_decl
Z3_func_decl
Constant declaration
Z3_model_get_const_interp
Z3_ast
Value of the constant (NULL if not assigned)
Z3_model_has_interp
bool
True if interpretation exists
Function Interpretation
Z3_model_get_num_funcs
unsigned
Number of functions
Z3_model_get_func_decl
Z3_func_decl
Function declaration
Z3_model_get_func_interp
Z3_func_interp
Function interpretation
Function Interpretation Details
Z3_func_interp_get_num_entries
unsigned
Number of entries
Z3_func_interp_get_entry
Z3_func_entry
Function entry
Z3_func_interp_get_else
Z3_ast
Default value
Z3_func_entry_get_value
Z3_ast
Result value
Z3_func_entry_get_num_args
unsigned
Number of arguments
Z3_func_entry_get_arg
Z3_ast
Argument value
Sort Universe
Z3_model_get_num_sorts
unsigned
Number of sorts
Z3_model_get_sort
Z3_sort
Uninterpreted sort
Z3_model_get_sort_universe
Z3_ast_vector
Vector of elements in the sort’s universe
Model Conversion
Z3_model_to_string
Z3_string
String representation
