Overview
The Context API provides functions for creating and managing Z3 contexts, which are the central objects for all Z3 operations. A context manages memory, configuration, and all Z3 objects.Types
Z3_config
Configuration object used to initialize logical contexts. Created before context creation to set parameters.Z3_context
Manager of all other Z3 objects, global configuration options, etc. All interaction with Z3 happens through a context.Z3_lbool
Lifted Boolean type for three-valued logic:Configuration Functions
Z3_mk_config
Z3_config
New configuration object
proof(Boolean) - Enable proof generationdebug_ref_count(Boolean) - Enable debug support for Z3_ast reference countingtrace(Boolean) - Tracing supporttimeout(unsigned) - Default timeout in milliseconds for solverswell_sorted_check(Boolean) - Type checkerauto_config(Boolean) - Use heuristics to automatically select solvermodel(Boolean) - Model generation for solversunsat_core(Boolean) - Unsat-core generation for solvers
Z3_del_config
Z3_set_param_value
Context Creation
Z3_mk_context
Z3_context
New Z3 context
Z3_mk_context_rc
Z3_context
New Z3 context with manual reference counting
Z3_inc_ref for any Z3_ast returned by Z3, and Z3_dec_ref when the Z3_ast is not needed anymore. This is more efficient but error-prone.
Example:
Z3_del_context
Reference Counting
Z3_inc_ref
Z3_mk_context.
Z3_dec_ref
Z3_mk_context.
Z3_enable_concurrent_dec_ref
Parameter Management
Z3_update_param_value
Z3_interrupt
Global Parameters
Z3_global_param_set
Z3_global_param_reset_all
Z3_global_param_get
bool
True if parameter exists, false otherwise
