Skip to main content

z3_sys/generated/
functions.rs

1// Auto-generated by z3-sys bindgen feature — do not edit manually.
2
3unsafe extern "C" {
4    /// Set a global (or module) parameter.
5    /// This setting is shared by all Z3 contexts.
6    ///
7    /// When a Z3 module is initialized it will use the value of these parameters
8    /// when Z3_params objects are not provided.
9    ///
10    /// The name of parameter can be composed of characters \[a-z]\[A-Z], digits \[0-9], '-' and '_'.
11    /// The character '.' is a delimiter (more later).
12    ///
13    /// The parameter names are case-insensitive. The character '-' should be viewed as an "alias" for '_'.
14    /// Thus, the following parameter names are considered equivalent: "pp.decimal-precision"  and "PP.DECIMAL_PRECISION".
15    ///
16    /// This function can be used to set parameters for a specific Z3 module.
17    /// This can be done by using `<module-name>.<parameter-name>`.
18    /// For example:
19    /// Z3_global_param_set('pp.decimal', 'true')
20    /// will set the parameter "decimal" in the module "pp" to true.
21    ///
22    /// # See also
23    ///
24    /// - [`Z3_global_param_get`]
25    /// - [`Z3_global_param_reset_all`]
26    pub fn Z3_global_param_set(param_id: Z3_string, param_value: Z3_string);
27    /// Restore the value of all global (and module) parameters.
28    /// This command will not affect already created objects (such as tactics and solvers).
29    ///
30    /// # See also
31    ///
32    /// - [`Z3_global_param_get`]
33    /// - [`Z3_global_param_set`]
34    pub fn Z3_global_param_reset_all();
35    /// Get a global (or module) parameter.
36    ///
37    /// Returns `false` if the parameter value does not exist.
38    ///
39    ///
40    /// **Remark:** This function cannot be invoked simultaneously from different threads without synchronization.
41    /// The result string stored in param_value is stored in shared location.
42    ///
43    /// # See also
44    ///
45    /// - [`Z3_global_param_reset_all`]
46    /// - [`Z3_global_param_set`]
47    pub fn Z3_global_param_get(param_id: Z3_string, param_value: Z3_string_ptr) -> bool;
48    /// Create a configuration object for the Z3 context object.
49    ///
50    /// Configurations are created in order to assign parameters prior to creating
51    /// contexts for Z3 interaction. For example, if the users wishes to use proof
52    /// generation, then call:
53    ///
54    /// `Z3_set_param_value(cfg, "proof", "true")`
55    ///
56    /// **Remark:** In previous versions of Z3, the `Z3_config` was used to store
57    /// global and module configurations. Now, we should use `Z3_global_param_set`.
58    ///
59    /// The following parameters can be set:
60    ///
61    /// - proof  (Boolean)           Enable proof generation
62    /// - debug_ref_count (Boolean)  Enable debug support for Z3_ast reference counting
63    /// - trace  (Boolean)           Tracing support for VCC
64    /// - trace_file_name (String)   Trace out file for VCC traces
65    /// - timeout (unsigned)         default timeout (in milliseconds) used for solvers
66    /// - well_sorted_check          type checker
67    /// - auto_config                use heuristics to automatically select solver and configure it
68    /// - model                      model generation for solvers, this parameter can be overwritten when creating a solver
69    /// - model_validate             validate models produced by solvers
70    /// - unsat_core                 unsat-core generation for solvers, this parameter can be overwritten when creating a solver
71    /// - encoding                   the string encoding used internally (must be either "unicode" - 18 bit, "bmp" - 16 bit or "ascii" - 8 bit)
72    ///
73    /// # See also
74    ///
75    /// - [`Z3_set_param_value`]
76    /// - [`Z3_del_config`]
77    pub fn Z3_mk_config() -> Option<Z3_config>;
78    /// Delete the given configuration object.
79    ///
80    /// # See also
81    ///
82    /// - [`Z3_mk_config`]
83    pub fn Z3_del_config(c: Z3_config);
84    /// Set a configuration parameter.
85    ///
86    /// The following parameters can be set for
87    ///
88    /// # See also
89    ///
90    /// - [`Z3_mk_config`]
91    pub fn Z3_set_param_value(c: Z3_config, param_id: Z3_string, param_value: Z3_string);
92    /// Create a context using the given configuration.
93    ///
94    /// After a context is created, the configuration cannot be changed,
95    /// although some parameters can be changed using [`Z3_update_param_value`].
96    /// All main interaction with Z3 happens in the context of a `Z3_context`.
97    ///
98    /// In contrast to `Z3_mk_context_rc` the life time of `Z3_ast` objects
99    /// persists with the life time of the context.
100    ///
101    /// Note that all other reference counted objects, including `Z3_model`,
102    /// `Z3_solver`, `Z3_func_interp` have to be managed by the caller.
103    /// Their reference counts are not handled by the context.
104    ///
105    /// **Remark:** Thread safety: objects created using a given context should not be
106    /// accessed from different threads without synchronization. In other words,
107    /// operations on a context are not thread safe. To use Z3 from different threads
108    /// create separate context objects. The `Z3_translate`, `Z3_solver_translate`,
109    /// `Z3_model_translate`, `Z3_goal_translate`
110    /// methods are exposed to allow copying state from one context to another.
111    ///
112    /// **Remark:**
113    /// - `Z3_sort`, `Z3_func_decl`, `Z3_app`, `Z3_pattern` are `Z3_ast`'s.
114    /// - Z3 uses hash-consing, i.e., when the same `Z3_ast` is created twice,
115    /// Z3 will return the same pointer twice.
116    ///
117    /// # See also
118    ///
119    /// - [`Z3_del_context`]
120    /// - [`Z3_set_error_handler`]
121    pub fn Z3_mk_context(c: Z3_config) -> Option<Z3_context>;
122    /// Create a context using the given configuration.
123    /// This function is similar to [`Z3_mk_context`]. However,
124    /// in the context returned by this function, the user
125    /// is responsible for managing `Z3_ast` reference counters.
126    /// Managing reference counters is a burden and error-prone,
127    /// but allows the user to use the memory more efficiently.
128    /// The user must invoke [`Z3_inc_ref`] for any `Z3_ast` returned
129    /// by Z3, and [`Z3_dec_ref`] whenever the `Z3_ast` is not needed
130    /// anymore. This idiom is similar to the one used in
131    /// BDD (binary decision diagrams) packages such as CUDD.
132    ///
133    /// Remarks:
134    ///
135    /// - `Z3_sort`, `Z3_func_decl`, `Z3_app`, `Z3_pattern` are `Z3_ast`'s.
136    /// - After a context is created, the configuration cannot be changed.
137    /// - All main interaction with Z3 happens in the context of a `Z3_context`.
138    /// - Z3 uses hash-consing, i.e., when the same `Z3_ast` is created twice,
139    /// Z3 will return the same pointer twice.
140    ///
141    /// # See also
142    ///
143    /// - [`Z3_del_context`]
144    /// - [`Z3_set_error_handler`]
145    pub fn Z3_mk_context_rc(c: Z3_config) -> Option<Z3_context>;
146    /// Delete the given logical context.
147    ///
148    /// # See also
149    ///
150    /// - [`Z3_mk_context`]
151    pub fn Z3_del_context(c: Z3_context);
152    /// Register a client proof checker for `c`.
153    ///
154    /// Replaces the previous callback and user data. Passing a null callback
155    /// unregisters it. The client owns the callback and user data and must keep
156    /// them alive until replacement, unregistration, or context destruction.
157    ///
158    /// SMT-LIB evaluation through [`Z3_eval_smtlib2_string`] invokes the callback
159    /// after an unsatisfiable check-sat,
160    /// check-sat-assuming, or check-sat-using command. Automatic reports go to the
161    /// command context's diagnostic stream, included in the returned evaluation
162    /// text. Ordinary [`Z3_solver_check`] calls do not invoke it automatically.
163    ///
164    /// Automatic checking requires proof production to be enabled before
165    /// assertions are added. An unavailable proof is reported as a command error.
166    /// The automatic assertion vector contains the active input assertions and
167    /// current check assumptions. Named assertions tracked for unsat cores are
168    /// represented by their guarded assertions and tracking literals, matching
169    /// the proof premises.
170    ///
171    /// Registration survives SMT-LIB reset commands. The report is opaque:
172    /// Z3 does not interpret it or change the solver's satisfiability result.
173    pub fn Z3_set_proof_check_callback(
174        c: Z3_context,
175        user_context: *mut ::core::ffi::c_void,
176        callback: Z3_proof_check_eh,
177    );
178    /// Increment the reference counter of the given AST.
179    /// The context `c` should have been created using [`Z3_mk_context_rc`].
180    /// This function is a NOOP if `c` was created using [`Z3_mk_context`].
181    pub fn Z3_inc_ref(c: Z3_context, a: Z3_ast);
182    /// Decrement the reference counter of the given AST.
183    /// The context `c` should have been created using [`Z3_mk_context_rc`].
184    /// This function is a NOOP if `c` was created using [`Z3_mk_context`].
185    pub fn Z3_dec_ref(c: Z3_context, a: Z3_ast);
186    /// Set a value of a context parameter.
187    ///
188    /// # See also
189    ///
190    /// - [`Z3_global_param_set`]
191    pub fn Z3_update_param_value(
192        c: Z3_context,
193        param_id: Z3_string,
194        param_value: Z3_string,
195    );
196    /// Retrieve description of global parameters.
197    pub fn Z3_get_global_param_descrs(c: Z3_context) -> Option<Z3_param_descrs>;
198    /// Interrupt the execution of a Z3 procedure.
199    /// This procedure can be used to interrupt: solvers, simplifiers and tactics.
200    pub fn Z3_interrupt(c: Z3_context);
201    /// use concurrency control for dec-ref.
202    /// Reference counting decrements are allowed in separate threads from the context.
203    /// If this setting is not invoked, reference counting decrements are not going to be thread safe.
204    pub fn Z3_enable_concurrent_dec_ref(c: Z3_context);
205    /// Create a Z3 (empty) parameter set.
206    /// Starting at Z3 4.0, parameter sets are used to configure many components such as:
207    /// simplifiers, tactics, solvers, etc.
208    ///
209    /// **Remark:** Reference counting must be used to manage parameter sets, even when the `Z3_context` was
210    /// created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
211    pub fn Z3_mk_params(c: Z3_context) -> Option<Z3_params>;
212    /// Increment the reference counter of the given parameter set.
213    pub fn Z3_params_inc_ref(c: Z3_context, p: Z3_params);
214    /// Decrement the reference counter of the given parameter set.
215    pub fn Z3_params_dec_ref(c: Z3_context, p: Z3_params);
216    /// Add a Boolean parameter `k` with value `v` to the parameter set `p`.
217    pub fn Z3_params_set_bool(c: Z3_context, p: Z3_params, k: Z3_symbol, v: bool);
218    /// Add a unsigned parameter `k` with value `v` to the parameter set `p`.
219    pub fn Z3_params_set_uint(
220        c: Z3_context,
221        p: Z3_params,
222        k: Z3_symbol,
223        v: ::core::ffi::c_uint,
224    );
225    /// Add a double parameter `k` with value `v` to the parameter set `p`.
226    pub fn Z3_params_set_double(c: Z3_context, p: Z3_params, k: Z3_symbol, v: f64);
227    /// Add a symbol parameter `k` with value `v` to the parameter set `p`.
228    pub fn Z3_params_set_symbol(c: Z3_context, p: Z3_params, k: Z3_symbol, v: Z3_symbol);
229    /// Convert a parameter set into a string. This function is mainly used for printing the
230    /// contents of a parameter set.
231    pub fn Z3_params_to_string(c: Z3_context, p: Z3_params) -> Z3_string;
232    /// Validate the parameter set `p` against the parameter description set `d`.
233    ///
234    /// The procedure invokes the error handler if `p` is invalid.
235    pub fn Z3_params_validate(c: Z3_context, p: Z3_params, d: Z3_param_descrs);
236    /// Increment the reference counter of the given parameter description set.
237    pub fn Z3_param_descrs_inc_ref(c: Z3_context, p: Z3_param_descrs);
238    /// Decrement the reference counter of the given parameter description set.
239    pub fn Z3_param_descrs_dec_ref(c: Z3_context, p: Z3_param_descrs);
240    /// Return the kind associated with the given parameter name `n`.
241    pub fn Z3_param_descrs_get_kind(
242        c: Z3_context,
243        p: Z3_param_descrs,
244        n: Z3_symbol,
245    ) -> Z3_param_kind;
246    /// Return the number of parameters in the given parameter description set.
247    pub fn Z3_param_descrs_size(
248        c: Z3_context,
249        p: Z3_param_descrs,
250    ) -> ::core::ffi::c_uint;
251    /// Return the name of the parameter at given index `i`.
252    ///
253    /// # Preconditions
254    ///
255    /// - `i < Z3_param_descrs_size(c, p)`
256    pub fn Z3_param_descrs_get_name(
257        c: Z3_context,
258        p: Z3_param_descrs,
259        i: ::core::ffi::c_uint,
260    ) -> Option<Z3_symbol>;
261    /// Retrieve documentation string corresponding to parameter name `s`.
262    pub fn Z3_param_descrs_get_documentation(
263        c: Z3_context,
264        p: Z3_param_descrs,
265        s: Z3_symbol,
266    ) -> Z3_string;
267    /// Convert a parameter description set into a string. This function is mainly used for printing the
268    /// contents of a parameter description set.
269    pub fn Z3_param_descrs_to_string(c: Z3_context, p: Z3_param_descrs) -> Z3_string;
270    /// Create a Z3 symbol using an integer.
271    ///
272    /// Symbols are used to name several term and type constructors.
273    ///
274    /// NB. Not all integers can be passed to this function.
275    /// The legal range of unsigned integers is 0 to 2^30-1.
276    ///
277    /// # See also
278    ///
279    /// - [`Z3_get_symbol_int`]
280    /// - [`Z3_mk_string_symbol`]
281    pub fn Z3_mk_int_symbol(c: Z3_context, i: ::core::ffi::c_int) -> Option<Z3_symbol>;
282    /// Create a Z3 symbol using a C string.
283    ///
284    /// Symbols are used to name several term and type constructors.
285    ///
286    /// # See also
287    ///
288    /// - [`Z3_get_symbol_string`]
289    /// - [`Z3_mk_int_symbol`]
290    pub fn Z3_mk_string_symbol(c: Z3_context, s: Z3_string) -> Option<Z3_symbol>;
291    /// Create a free (uninterpreted) type using the given name (symbol).
292    ///
293    /// Two free types are considered the same iff the have the same name.
294    pub fn Z3_mk_uninterpreted_sort(c: Z3_context, s: Z3_symbol) -> Option<Z3_sort>;
295    /// Create a type variable.
296    ///
297    /// Functions using type variables can be applied to instantiations that match the signature
298    /// of the function. Assertions using type variables correspond to assertions over all possible
299    /// instantiations.
300    pub fn Z3_mk_type_variable(c: Z3_context, s: Z3_symbol) -> Option<Z3_sort>;
301    /// Create the Boolean type.
302    ///
303    /// This type is used to create propositional variables and predicates.
304    pub fn Z3_mk_bool_sort(c: Z3_context) -> Option<Z3_sort>;
305    /// Create the integer type.
306    ///
307    /// This type is not the int type found in programming languages.
308    /// A machine integer can be represented using bit-vectors. The function
309    /// [`Z3_mk_bv_sort`] creates a bit-vector type.
310    ///
311    /// # See also
312    ///
313    /// - [`Z3_mk_bv_sort`]
314    pub fn Z3_mk_int_sort(c: Z3_context) -> Option<Z3_sort>;
315    /// Create the real type.
316    ///
317    /// Note that this type is not a floating point number.
318    pub fn Z3_mk_real_sort(c: Z3_context) -> Option<Z3_sort>;
319    /// Create the Complex sort. Complex numbers are pairs of Reals.
320    ///
321    /// Use `Z3_mk_complex` to construct values and `Z3_mk_real_part` and
322    /// `Z3_mk_imag_part` to access their components. The arithmetic APIs
323    /// for addition, subtraction, multiplication, negation, and division
324    /// accept Complex expressions. Ordering and exponentiation do not.
325    pub fn Z3_mk_complex_sort(c: Z3_context) -> Option<Z3_sort>;
326    /// Create a complex number with the given real and imaginary components.
327    /// Integer components are coerced to Real.
328    pub fn Z3_mk_complex(c: Z3_context, re: Z3_ast, im: Z3_ast) -> Option<Z3_ast>;
329    /// Return the real component of a Complex expression.
330    pub fn Z3_mk_real_part(c: Z3_context, z: Z3_ast) -> Option<Z3_ast>;
331    /// Return the imaginary component of a Complex expression.
332    pub fn Z3_mk_imag_part(c: Z3_context, z: Z3_ast) -> Option<Z3_ast>;
333    /// Create a bit-vector type of the given size.
334    ///
335    /// This type can also be seen as a machine integer.
336    ///
337    /// **Remark:** The size of the bit-vector type must be greater than zero.
338    pub fn Z3_mk_bv_sort(c: Z3_context, sz: ::core::ffi::c_uint) -> Option<Z3_sort>;
339    /// Create a named finite domain sort.
340    ///
341    /// To create constants that belong to the finite domain,
342    /// use the APIs for creating numerals and pass a numeric
343    /// constant together with the sort returned by this call.
344    /// The numeric constant should be between 0 and the less
345    /// than the size of the domain.
346    ///
347    /// # See also
348    ///
349    /// - [`Z3_get_finite_domain_sort_size`]
350    pub fn Z3_mk_finite_domain_sort(
351        c: Z3_context,
352        name: Z3_symbol,
353        size: u64,
354    ) -> Option<Z3_sort>;
355    /// Create a prime-field sort. Large moduli undergo probable-prime screening.
356    pub fn Z3_mk_finite_field_sort(c: Z3_context, prime: Z3_string) -> Option<Z3_sort>;
357    /// Return the decimal modulus of a finite-field sort.
358    pub fn Z3_get_finite_field_sort_size(c: Z3_context, s: Z3_sort) -> Z3_string;
359    /// Sum at least two elements of the same prime field.
360    pub fn Z3_mk_ff_add(
361        c: Z3_context,
362        n: ::core::ffi::c_uint,
363        args: *const Z3_ast,
364    ) -> Option<Z3_ast>;
365    /// Multiply at least two elements of the same prime field.
366    pub fn Z3_mk_ff_mul(
367        c: Z3_context,
368        n: ::core::ffi::c_uint,
369        args: *const Z3_ast,
370    ) -> Option<Z3_ast>;
371    /// Additive inverse in a prime field.
372    pub fn Z3_mk_ff_neg(c: Z3_context, a: Z3_ast) -> Option<Z3_ast>;
373    /// Weighted sum a0 + 2*a1 + 4*a2 + ... (does not constrain arguments to bits).
374    pub fn Z3_mk_ff_bitsum(
375        c: Z3_context,
376        n: ::core::ffi::c_uint,
377        args: *const Z3_ast,
378    ) -> Option<Z3_ast>;
379    /// Create an array type.
380    ///
381    /// We usually represent the array type as: `[domain -> range]`.
382    /// Arrays are usually used to model the heap/memory in software verification.
383    ///
384    /// # See also
385    ///
386    /// - [`Z3_mk_select`]
387    /// - [`Z3_mk_store`]
388    pub fn Z3_mk_array_sort(
389        c: Z3_context,
390        domain: Z3_sort,
391        range: Z3_sort,
392    ) -> Option<Z3_sort>;
393    /// Create an array type with N arguments
394    ///
395    /// # See also
396    ///
397    /// - [`Z3_mk_select_n`]
398    /// - [`Z3_mk_store_n`]
399    pub fn Z3_mk_array_sort_n(
400        c: Z3_context,
401        n: ::core::ffi::c_uint,
402        domain: *const Z3_sort,
403        range: Z3_sort,
404    ) -> Option<Z3_sort>;
405    /// Create a tuple type.
406    ///
407    /// A tuple with `n` fields has a constructor and `n` projections.
408    /// This function will also declare the constructor and projection functions.
409    ///
410    /// - `c`: logical context
411    /// - `mk_tuple_name`: name of the constructor function associated with the tuple type.
412    /// - `num_fields`: number of fields in the tuple type.
413    /// - `field_names`: name of the projection functions.
414    /// - `field_sorts`: type of the tuple fields.
415    /// - `mk_tuple_decl`: output parameter that will contain the constructor declaration.
416    /// - `proj_decl`: output parameter that will contain the projection function declarations. This field must be a buffer of size `num_fields` allocated by the user.
417    pub fn Z3_mk_tuple_sort(
418        c: Z3_context,
419        mk_tuple_name: Z3_symbol,
420        num_fields: ::core::ffi::c_uint,
421        field_names: *const Z3_symbol,
422        field_sorts: *const Z3_sort,
423        mk_tuple_decl: *mut Z3_func_decl,
424        proj_decl: *mut Z3_func_decl,
425    ) -> Option<Z3_sort>;
426    /// Create a enumeration sort.
427    ///
428    /// An enumeration sort with `n` elements.
429    /// This function will also declare the functions corresponding to the enumerations.
430    ///
431    /// - `c`: logical context
432    /// - `name`: name of the enumeration sort.
433    /// - `n`: number of elements in enumeration sort.
434    /// - `enum_names`: names of the enumerated elements.
435    /// - `enum_consts`: constants corresponding to the enumerated elements.
436    /// - `enum_testers`: predicates testing if terms of the enumeration sort correspond to an enumeration.
437    ///
438    /// For example, if this function is called with three symbols A, B, C and the name S, then
439    /// `s` is a sort whose name is S, and the function returns three terms corresponding to A, B, C in
440    /// `enum_consts`. The array `enum_testers` has three predicates of type `(s -> Bool)`.
441    /// The first predicate (corresponding to A) is true when applied to A, and false otherwise.
442    /// Similarly for the other predicates.
443    pub fn Z3_mk_enumeration_sort(
444        c: Z3_context,
445        name: Z3_symbol,
446        n: ::core::ffi::c_uint,
447        enum_names: *const Z3_symbol,
448        enum_consts: *mut Z3_func_decl,
449        enum_testers: *mut Z3_func_decl,
450    ) -> Option<Z3_sort>;
451    /// Create a list sort
452    ///
453    /// A list sort over `elem_sort`
454    /// This function declares the corresponding constructors and testers for lists.
455    ///
456    /// - `c`: logical context
457    /// - `name`: name of the list sort.
458    /// - `elem_sort`: sort of list elements.
459    /// - `nil_decl`: declaration for the empty list.
460    /// - `is_nil_decl`: test for the empty list.
461    /// - `cons_decl`: declaration for a cons cell.
462    /// - `is_cons_decl`: cons cell test.
463    /// - `head_decl`: list head.
464    /// - `tail_decl`: list tail.
465    pub fn Z3_mk_list_sort(
466        c: Z3_context,
467        name: Z3_symbol,
468        elem_sort: Z3_sort,
469        nil_decl: *mut Z3_func_decl,
470        is_nil_decl: *mut Z3_func_decl,
471        cons_decl: *mut Z3_func_decl,
472        is_cons_decl: *mut Z3_func_decl,
473        head_decl: *mut Z3_func_decl,
474        tail_decl: *mut Z3_func_decl,
475    ) -> Option<Z3_sort>;
476    /// Retrieve the number of fields of a constructor
477    ///
478    /// - `c`: logical context.
479    /// - `constr`: constructor.
480    pub fn Z3_constructor_num_fields(
481        c: Z3_context,
482        constr: Z3_constructor,
483    ) -> ::core::ffi::c_uint;
484    /// Reclaim memory allocated to constructor.
485    ///
486    /// - `c`: logical context.
487    /// - `constr`: constructor.
488    ///
489    /// # See also
490    ///
491    /// - [`Z3_mk_constructor`]
492    pub fn Z3_del_constructor(c: Z3_context, constr: Z3_constructor);
493    /// Create datatype, such as lists, trees, records, enumerations or unions of records.
494    /// The datatype may be recursive. Return the datatype sort.
495    ///
496    /// - `c`: logical context.
497    /// - `name`: name of datatype.
498    /// - `num_constructors`: number of constructors passed in.
499    /// - `constructors`: array of constructor containers.
500    ///
501    /// # See also
502    ///
503    /// - [`Z3_mk_constructor`]
504    /// - [`Z3_mk_constructor_list`]
505    /// - [`Z3_mk_datatypes`]
506    pub fn Z3_mk_datatype(
507        c: Z3_context,
508        name: Z3_symbol,
509        num_constructors: ::core::ffi::c_uint,
510        constructors: *mut Z3_constructor,
511    ) -> Option<Z3_sort>;
512    /// Create a parametric datatype with explicit type parameters.
513    ///
514    /// This function is similar to [`Z3_mk_datatype`], except it takes an explicit set of type parameters.
515    /// The parameters can be type variables created with [`Z3_mk_type_variable`], allowing the definition
516    /// of polymorphic datatypes that can be instantiated with different concrete types.
517    ///
518    /// - `c`: logical context
519    /// - `name`: name of the datatype
520    /// - `num_parameters`: number of type parameters (can be 0)
521    /// - `parameters`: array of type parameters (type variables or concrete sorts)
522    /// - `num_constructors`: number of constructors
523    /// - `constructors`: array of constructor specifications
524    ///
525    /// # See also
526    ///
527    /// - [`Z3_mk_datatype`]
528    /// - [`Z3_mk_type_variable`]
529    /// - [`Z3_mk_datatype_sort`]
530    pub fn Z3_mk_polymorphic_datatype(
531        c: Z3_context,
532        name: Z3_symbol,
533        num_parameters: ::core::ffi::c_uint,
534        parameters: *mut Z3_sort,
535        num_constructors: ::core::ffi::c_uint,
536        constructors: *mut Z3_constructor,
537    ) -> Option<Z3_sort>;
538    /// create a forward reference to a recursive datatype being declared.
539    /// The forward reference can be used in a nested occurrence: the range of an array
540    /// or as element sort of a sequence. The forward reference should only be used when
541    /// used in an accessor for a recursive datatype that gets declared.
542    ///
543    /// Forward references can replace the use sort references, that are unsigned integers
544    /// in the `Z3_mk_constructor` call
545    ///
546    /// - `c`: logical context
547    /// - `name`: name of the datatype
548    /// - `num_params`: number of sort parameters
549    /// - `params`: array of sort parameters
550    pub fn Z3_mk_datatype_sort(
551        c: Z3_context,
552        name: Z3_symbol,
553        num_params: ::core::ffi::c_uint,
554        params: *const Z3_sort,
555    ) -> Option<Z3_sort>;
556    /// Create list of constructors.
557    ///
558    /// - `c`: logical context.
559    /// - `num_constructors`: number of constructors in list.
560    /// - `constructors`: list of constructors.
561    ///
562    /// # See also
563    ///
564    /// - [`Z3_del_constructor_list`]
565    /// - [`Z3_mk_constructor`]
566    pub fn Z3_mk_constructor_list(
567        c: Z3_context,
568        num_constructors: ::core::ffi::c_uint,
569        constructors: *const Z3_constructor,
570    ) -> Option<Z3_constructor_list>;
571    /// Reclaim memory allocated for constructor list.
572    ///
573    /// Each constructor inside the constructor list must be independently reclaimed using [`Z3_del_constructor`].
574    ///
575    /// - `c`: logical context.
576    /// - `clist`: constructor list container.
577    ///
578    /// # See also
579    ///
580    /// - [`Z3_mk_constructor_list`]
581    pub fn Z3_del_constructor_list(c: Z3_context, clist: Z3_constructor_list);
582    /// Create mutually recursive datatypes.
583    ///
584    /// - `c`: logical context.
585    /// - `num_sorts`: number of datatype sorts.
586    /// - `sort_names`: names of datatype sorts.
587    /// - `sorts`: array of datatype sorts.
588    /// - `constructor_lists`: list of constructors, one list per sort.
589    ///
590    /// # See also
591    ///
592    /// - [`Z3_mk_constructor`]
593    /// - [`Z3_mk_constructor_list`]
594    /// - [`Z3_mk_datatype`]
595    pub fn Z3_mk_datatypes(
596        c: Z3_context,
597        num_sorts: ::core::ffi::c_uint,
598        sort_names: *const Z3_symbol,
599        sorts: *mut Z3_sort,
600        constructor_lists: *mut Z3_constructor_list,
601    );
602    /// Query constructor for declared functions.
603    ///
604    /// - `c`: logical context.
605    /// - `constr`: constructor container. The container must have been passed into a [`Z3_mk_datatype`] call.
606    /// - `num_fields`: number of accessor fields in the constructor.
607    /// - `constructor`: constructor function declaration, allocated by user.
608    /// - `tester`: constructor test function declaration, allocated by user.
609    /// - `accessors`: array of accessor function declarations allocated by user. The array must contain num_fields elements.
610    ///
611    /// # See also
612    ///
613    /// - [`Z3_mk_constructor`]
614    pub fn Z3_query_constructor(
615        c: Z3_context,
616        constr: Z3_constructor,
617        num_fields: ::core::ffi::c_uint,
618        constructor: *mut Z3_func_decl,
619        tester: *mut Z3_func_decl,
620        accessors: *mut Z3_func_decl,
621    );
622    /// Declare a constant or function.
623    ///
624    /// - `c`: logical context.
625    /// - `s`: name of the constant or function.
626    /// - `domain_size`: number of arguments. It is 0 when declaring a constant.
627    /// - `domain`: array containing the sort of each argument. The array must contain domain_size elements. It is 0 when declaring a constant.
628    /// - `range`: sort of the constant or the return sort of the function.
629    ///
630    /// After declaring a constant or function, the function
631    /// [`Z3_mk_app`] can be used to create a constant or function
632    /// application.
633    ///
634    /// # See also
635    ///
636    /// - [`Z3_mk_app`]
637    /// - [`Z3_mk_fresh_func_decl`]
638    /// - [`Z3_mk_rec_func_decl`]
639    pub fn Z3_mk_func_decl(
640        c: Z3_context,
641        s: Z3_symbol,
642        domain_size: ::core::ffi::c_uint,
643        domain: *const Z3_sort,
644        range: Z3_sort,
645    ) -> Option<Z3_func_decl>;
646    /// Create a constant or function application.
647    ///
648    /// # See also
649    ///
650    /// - [`Z3_mk_fresh_func_decl`]
651    /// - [`Z3_mk_func_decl`]
652    /// - [`Z3_mk_rec_func_decl`]
653    pub fn Z3_mk_app(
654        c: Z3_context,
655        d: Z3_func_decl,
656        num_args: ::core::ffi::c_uint,
657        args: *const Z3_ast,
658    ) -> Option<Z3_ast>;
659    /// Declare and create a constant.
660    ///
661    /// This function is a shorthand for:
662    /// ```c
663    /// Z3_func_decl d = Z3_mk_func_decl(c, s, 0, 0, ty);
664    /// Z3_ast n            = Z3_mk_app(c, d, 0, 0);
665    /// ```
666    ///
667    /// # See also
668    ///
669    /// - [`Z3_mk_app`]
670    /// - [`Z3_mk_fresh_const`]
671    /// - [`Z3_mk_func_decl`]
672    pub fn Z3_mk_const(c: Z3_context, s: Z3_symbol, ty: Z3_sort) -> Option<Z3_ast>;
673    /// Declare a fresh constant or function.
674    ///
675    /// Z3 will generate an unique name for this function declaration.
676    /// If prefix is different from `NULL`, then the name generate by Z3 will start with `prefix`.
677    ///
678    /// **Remark:** If `prefix` is `NULL`, then it is assumed to be the empty string.
679    ///
680    /// # See also
681    ///
682    /// - [`Z3_mk_func_decl`]
683    pub fn Z3_mk_fresh_func_decl(
684        c: Z3_context,
685        prefix: Z3_string,
686        domain_size: ::core::ffi::c_uint,
687        domain: *const Z3_sort,
688        range: Z3_sort,
689    ) -> Option<Z3_func_decl>;
690    /// Declare and create a fresh constant.
691    ///
692    /// This function is a shorthand for:
693    /// `Z3_func_decl d = Z3_mk_fresh_func_decl(c, prefix, 0, 0, ty); Z3_ast n = Z3_mk_app(c, d, 0, 0);`
694    ///
695    /// **Remark:** If `prefix` is `NULL`, then it is assumed to be the empty string.
696    ///
697    /// # See also
698    ///
699    /// - [`Z3_mk_app`]
700    /// - [`Z3_mk_const`]
701    /// - [`Z3_mk_fresh_func_decl`]
702    /// - [`Z3_mk_func_decl`]
703    pub fn Z3_mk_fresh_const(
704        c: Z3_context,
705        prefix: Z3_string,
706        ty: Z3_sort,
707    ) -> Option<Z3_ast>;
708    /// Declare a recursive function
709    ///
710    /// - `c`: logical context.
711    /// - `s`: name of the function.
712    /// - `domain_size`: number of arguments. It should be greater than 0.
713    /// - `domain`: array containing the sort of each argument. The array must contain domain_size elements.
714    /// - `range`: sort of the constant or the return sort of the function.
715    ///
716    /// After declaring recursive function, it should be associated with a recursive definition [`Z3_add_rec_def`].
717    /// The function [`Z3_mk_app`] can be used to create a constant or function
718    /// application.
719    ///
720    /// # See also
721    ///
722    /// - [`Z3_add_rec_def`]
723    /// - [`Z3_mk_app`]
724    /// - [`Z3_mk_func_decl`]
725    pub fn Z3_mk_rec_func_decl(
726        c: Z3_context,
727        s: Z3_symbol,
728        domain_size: ::core::ffi::c_uint,
729        domain: *const Z3_sort,
730        range: Z3_sort,
731    ) -> Option<Z3_func_decl>;
732    /// Define the body of a recursive function.
733    ///
734    /// - `c`: logical context.
735    /// - `f`: function declaration.
736    /// - `n`: number of arguments to the function
737    /// - `args`: constants that are used as arguments to the recursive function in the definition.
738    /// - `body`: body of the recursive function
739    ///
740    /// After declaring a recursive function or a collection of mutually recursive functions, use
741    /// this function to provide the definition for the recursive function.
742    ///
743    /// # See also
744    ///
745    /// - [`Z3_mk_rec_func_decl`]
746    pub fn Z3_add_rec_def(
747        c: Z3_context,
748        f: Z3_func_decl,
749        n: ::core::ffi::c_uint,
750        args: *mut Z3_ast,
751        body: Z3_ast,
752    );
753    /// Create an AST node representing `true`.
754    pub fn Z3_mk_true(c: Z3_context) -> Option<Z3_ast>;
755    /// Create an AST node representing `false`.
756    pub fn Z3_mk_false(c: Z3_context) -> Option<Z3_ast>;
757    /// Create an AST node representing `l = r`.
758    ///
759    /// The nodes `l` and `r` must have the same type.
760    pub fn Z3_mk_eq(c: Z3_context, l: Z3_ast, r: Z3_ast) -> Option<Z3_ast>;
761    /// Create an AST node representing `distinct(args[0], ..., args[num_args-1])`.
762    ///
763    /// The `distinct` construct is used for declaring the arguments pairwise distinct.
764    /// That is, `Forall 0 <= i < j < num_args. not args[i] = args[j]`.
765    ///
766    /// All arguments must have the same sort.
767    ///
768    /// **Remark:** The number of arguments of a distinct construct must be greater than one.
769    pub fn Z3_mk_distinct(
770        c: Z3_context,
771        num_args: ::core::ffi::c_uint,
772        args: *const Z3_ast,
773    ) -> Option<Z3_ast>;
774    /// Create an AST node representing `not(a)`.
775    ///
776    /// The node `a` must have Boolean sort.
777    pub fn Z3_mk_not(c: Z3_context, a: Z3_ast) -> Option<Z3_ast>;
778    /// Create an AST node representing an if-then-else: `ite(t1, t2, t3)`.
779    ///
780    /// The node `t1` must have Boolean sort, `t2` and `t3` must have the same sort.
781    /// The sort of the new node is equal to the sort of `t2` and `t3`.
782    pub fn Z3_mk_ite(
783        c: Z3_context,
784        t1: Z3_ast,
785        t2: Z3_ast,
786        t3: Z3_ast,
787    ) -> Option<Z3_ast>;
788    /// Create an AST node representing `t1 iff t2`.
789    ///
790    /// The nodes `t1` and `t2` must have Boolean sort.
791    pub fn Z3_mk_iff(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
792    /// Create an AST node representing `t1 implies t2`.
793    ///
794    /// The nodes `t1` and `t2` must have Boolean sort.
795    pub fn Z3_mk_implies(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
796    /// Create an AST node representing `t1 xor t2`.
797    ///
798    /// The nodes `t1` and `t2` must have Boolean sort.
799    pub fn Z3_mk_xor(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
800    /// Create an AST node representing `args[0] and ... and args[num_args-1]`.
801    ///
802    /// The array `args` must have `num_args` elements.
803    /// All arguments must have Boolean sort.
804    ///
805    /// **Remark:** The number of arguments must be greater than zero.
806    pub fn Z3_mk_and(
807        c: Z3_context,
808        num_args: ::core::ffi::c_uint,
809        args: *const Z3_ast,
810    ) -> Option<Z3_ast>;
811    /// Create an AST node representing `args[0] or ... or args[num_args-1]`.
812    ///
813    /// The array `args` must have `num_args` elements.
814    /// All arguments must have Boolean sort.
815    ///
816    /// **Remark:** The number of arguments must be greater than zero.
817    pub fn Z3_mk_or(
818        c: Z3_context,
819        num_args: ::core::ffi::c_uint,
820        args: *const Z3_ast,
821    ) -> Option<Z3_ast>;
822    /// Create an AST node representing `args[0] + ... + args[num_args-1]`.
823    ///
824    /// The array `args` must have `num_args` elements.
825    /// All arguments must have Int, Real, or Complex sort.
826    ///
827    /// **Remark:** The number of arguments must be greater than zero.
828    pub fn Z3_mk_add(
829        c: Z3_context,
830        num_args: ::core::ffi::c_uint,
831        args: *const Z3_ast,
832    ) -> Option<Z3_ast>;
833    /// Create an AST node representing `args[0] * ... * args[num_args-1]`.
834    ///
835    /// The array `args` must have `num_args` elements.
836    /// All arguments must have Int, Real, or Complex sort.
837    ///
838    /// **Remark:** Z3 has limited support for non-linear arithmetic.
839    /// **Remark:** The number of arguments must be greater than zero.
840    pub fn Z3_mk_mul(
841        c: Z3_context,
842        num_args: ::core::ffi::c_uint,
843        args: *const Z3_ast,
844    ) -> Option<Z3_ast>;
845    /// Create an AST node representing `args[0] - ... - args[num_args - 1]`.
846    ///
847    /// The array `args` must have `num_args` elements.
848    /// All arguments must have Int, Real, or Complex sort.
849    ///
850    /// **Remark:** The number of arguments must be greater than zero.
851    pub fn Z3_mk_sub(
852        c: Z3_context,
853        num_args: ::core::ffi::c_uint,
854        args: *const Z3_ast,
855    ) -> Option<Z3_ast>;
856    /// Create an AST node representing `- arg`.
857    ///
858    /// The argument must have Int, Real, or Complex sort.
859    pub fn Z3_mk_unary_minus(c: Z3_context, arg: Z3_ast) -> Option<Z3_ast>;
860    /// Create an AST node representing `arg1 div arg2`.
861    ///
862    /// The arguments must have Int, Real, or Complex sort. Int arguments use
863    /// integer division. Real and Complex arguments use their respective division
864    /// operations, with Int embedded in Real and Int/Real embedded in Complex.
865    /// Complex division is lowered to Real component division; at a zero Complex
866    /// denominator, both components are the same totalized Real `0`/0 value.
867    pub fn Z3_mk_div(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Option<Z3_ast>;
868    /// Create an AST node representing `arg1 mod arg2`.
869    ///
870    /// The arguments must have int type.
871    pub fn Z3_mk_mod(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Option<Z3_ast>;
872    /// Create an AST node representing `arg1 rem arg2`.
873    ///
874    /// The arguments must have int type.
875    pub fn Z3_mk_rem(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Option<Z3_ast>;
876    /// Create an AST node representing `arg1 ^ arg2`.
877    ///
878    /// The arguments must have int or real type.
879    pub fn Z3_mk_power(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Option<Z3_ast>;
880    /// Take the absolute value of an integer
881    pub fn Z3_mk_abs(c: Z3_context, arg: Z3_ast) -> Option<Z3_ast>;
882    /// Create less than.
883    ///
884    /// The nodes `t1` and `t2` must have the same sort, and must be int or real.
885    pub fn Z3_mk_lt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
886    /// Create less than or equal to.
887    ///
888    /// The nodes `t1` and `t2` must have the same sort, and must be int or real.
889    pub fn Z3_mk_le(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
890    /// Create greater than.
891    ///
892    /// The nodes `t1` and `t2` must have the same sort, and must be int or real.
893    pub fn Z3_mk_gt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
894    /// Create greater than or equal to.
895    ///
896    /// The nodes `t1` and `t2` must have the same sort, and must be int or real.
897    pub fn Z3_mk_ge(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
898    /// Create division predicate.
899    ///
900    /// The nodes `t1` and `t2` must be of integer sort.
901    /// The predicate is true when `t1` divides `t2`. For the predicate to be part of
902    /// linear integer arithmetic, the first argument `t1` must be a non-zero integer.
903    pub fn Z3_mk_divides(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
904    /// Coerce an integer to a real.
905    ///
906    /// There is also a converse operation exposed.
907    /// It follows the semantics prescribed by the SMT-LIB standard.
908    ///
909    /// You can take the floor of a real by
910    /// creating an auxiliary integer constant `k` and
911    /// and asserting `mk_int2real(k) <= t1 < mk_int2real(k)+1`.
912    ///
913    /// The node `t1` must have sort integer.
914    ///
915    /// # See also
916    ///
917    /// - [`Z3_mk_real2int`]
918    /// - [`Z3_mk_is_int`]
919    pub fn Z3_mk_int2real(c: Z3_context, t1: Z3_ast) -> Option<Z3_ast>;
920    /// Coerce a real to an integer.
921    ///
922    /// The semantics of this function follows the SMT-LIB standard
923    /// for the function to_int
924    ///
925    /// # See also
926    ///
927    /// - [`Z3_mk_int2real`]
928    /// - [`Z3_mk_is_int`]
929    pub fn Z3_mk_real2int(c: Z3_context, t1: Z3_ast) -> Option<Z3_ast>;
930    /// Check if a real number is an integer.
931    ///
932    /// # See also
933    ///
934    /// - [`Z3_mk_int2real`]
935    /// - [`Z3_mk_real2int`]
936    pub fn Z3_mk_is_int(c: Z3_context, t1: Z3_ast) -> Option<Z3_ast>;
937    /// Bitwise negation.
938    ///
939    /// The node `t1` must have a bit-vector sort.
940    pub fn Z3_mk_bvnot(c: Z3_context, t1: Z3_ast) -> Option<Z3_ast>;
941    /// Take conjunction of bits in vector, return vector of length 1.
942    ///
943    /// The node `t1` must have a bit-vector sort.
944    pub fn Z3_mk_bvredand(c: Z3_context, t1: Z3_ast) -> Option<Z3_ast>;
945    /// Take disjunction of bits in vector, return vector of length 1.
946    ///
947    /// The node `t1` must have a bit-vector sort.
948    pub fn Z3_mk_bvredor(c: Z3_context, t1: Z3_ast) -> Option<Z3_ast>;
949    /// Bitwise and.
950    ///
951    /// The nodes `t1` and `t2` must have the same bit-vector sort.
952    pub fn Z3_mk_bvand(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
953    /// Bitwise or.
954    ///
955    /// The nodes `t1` and `t2` must have the same bit-vector sort.
956    pub fn Z3_mk_bvor(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
957    /// Bitwise exclusive-or.
958    ///
959    /// The nodes `t1` and `t2` must have the same bit-vector sort.
960    pub fn Z3_mk_bvxor(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
961    /// Bitwise nand.
962    ///
963    /// The nodes `t1` and `t2` must have the same bit-vector sort.
964    pub fn Z3_mk_bvnand(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
965    /// Bitwise nor.
966    ///
967    /// The nodes `t1` and `t2` must have the same bit-vector sort.
968    pub fn Z3_mk_bvnor(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
969    /// Bitwise xnor.
970    ///
971    /// The nodes `t1` and `t2` must have the same bit-vector sort.
972    pub fn Z3_mk_bvxnor(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
973    /// Standard two's complement unary minus.
974    ///
975    /// The node `t1` must have bit-vector sort.
976    pub fn Z3_mk_bvneg(c: Z3_context, t1: Z3_ast) -> Option<Z3_ast>;
977    /// Standard two's complement addition.
978    ///
979    /// The nodes `t1` and `t2` must have the same bit-vector sort.
980    pub fn Z3_mk_bvadd(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
981    /// Standard two's complement subtraction.
982    ///
983    /// The nodes `t1` and `t2` must have the same bit-vector sort.
984    pub fn Z3_mk_bvsub(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
985    /// Standard two's complement multiplication.
986    ///
987    /// The nodes `t1` and `t2` must have the same bit-vector sort.
988    pub fn Z3_mk_bvmul(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
989    /// Unsigned division.
990    ///
991    /// It is defined as the `floor` of `t1/t2` if `t2` is
992    /// different from zero. If `t2` is zero, then the result
993    /// is undefined.
994    ///
995    /// The nodes `t1` and `t2` must have the same bit-vector sort.
996    pub fn Z3_mk_bvudiv(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
997    /// Two's complement signed division.
998    ///
999    /// It is defined in the following way:
1000    ///
1001    /// - The `floor` of `t1/t2` if `t2` is different from zero, and `t1*t2 >= 0`.
1002    ///
1003    /// - The `ceiling` of `t1/t2` if `t2` is different from zero, and `t1*t2 < 0`.
1004    ///
1005    /// If `t2` is zero, then the result is undefined.
1006    ///
1007    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1008    pub fn Z3_mk_bvsdiv(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1009    /// Unsigned remainder.
1010    ///
1011    /// It is defined as `t1 - (t1 /u t2) * t2`, where `/u` represents unsigned division.
1012    ///
1013    /// If `t2` is zero, then the result is undefined.
1014    ///
1015    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1016    pub fn Z3_mk_bvurem(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1017    /// Two's complement signed remainder (sign follows dividend).
1018    ///
1019    /// It is defined as `t1 - (t1 /s t2) * t2`, where `/s` represents signed division.
1020    /// The most significant bit (sign) of the result is equal to the most significant bit of `t1`.
1021    ///
1022    /// If `t2` is zero, then the result is undefined.
1023    ///
1024    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1025    ///
1026    /// # See also
1027    ///
1028    /// - [`Z3_mk_bvsmod`]
1029    pub fn Z3_mk_bvsrem(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1030    /// Two's complement signed remainder (sign follows divisor).
1031    ///
1032    /// If `t2` is zero, then the result is undefined.
1033    ///
1034    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1035    ///
1036    /// # See also
1037    ///
1038    /// - [`Z3_mk_bvsrem`]
1039    pub fn Z3_mk_bvsmod(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1040    /// Unsigned less than.
1041    ///
1042    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1043    pub fn Z3_mk_bvult(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1044    /// Two's complement signed less than.
1045    ///
1046    /// It abbreviates:
1047    /// ```c
1048    /// (or (and (= (extract[|m-1|:|m-1|] t1) bit1)
1049    /// (= (extract[|m-1|:|m-1|] t2) bit0))
1050    /// (and (= (extract[|m-1|:|m-1|] t1) (extract[|m-1|:|m-1|] t2))
1051    /// (bvult t1 t2)))
1052    /// ```
1053    ///
1054    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1055    pub fn Z3_mk_bvslt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1056    /// Unsigned less than or equal to.
1057    ///
1058    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1059    pub fn Z3_mk_bvule(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1060    /// Two's complement signed less than or equal to.
1061    ///
1062    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1063    pub fn Z3_mk_bvsle(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1064    /// Unsigned greater than or equal to.
1065    ///
1066    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1067    pub fn Z3_mk_bvuge(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1068    /// Two's complement signed greater than or equal to.
1069    ///
1070    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1071    pub fn Z3_mk_bvsge(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1072    /// Unsigned greater than.
1073    ///
1074    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1075    pub fn Z3_mk_bvugt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1076    /// Two's complement signed greater than.
1077    ///
1078    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1079    pub fn Z3_mk_bvsgt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1080    /// Concatenate the given bit-vectors.
1081    ///
1082    /// The nodes `t1` and `t2` must have (possibly different) bit-vector sorts
1083    ///
1084    /// The result is a bit-vector of size `n1+n2`, where `n1` (`n2`) is the size
1085    /// of `t1` (`t2`).
1086    pub fn Z3_mk_concat(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1087    /// Extract the bits `high` down to `low` from a bit-vector of
1088    /// size `m` to yield a new bit-vector of size `n`, where `n = high - low + 1`.
1089    ///
1090    /// The node `t1` must have a bit-vector sort.
1091    pub fn Z3_mk_extract(
1092        c: Z3_context,
1093        high: ::core::ffi::c_uint,
1094        low: ::core::ffi::c_uint,
1095        t1: Z3_ast,
1096    ) -> Option<Z3_ast>;
1097    /// Sign-extend of the given bit-vector to the (signed) equivalent bit-vector of
1098    /// size `m+i`, where `m` is the size of the given
1099    /// bit-vector.
1100    ///
1101    /// The node `t1` must have a bit-vector sort.
1102    pub fn Z3_mk_sign_ext(
1103        c: Z3_context,
1104        i: ::core::ffi::c_uint,
1105        t1: Z3_ast,
1106    ) -> Option<Z3_ast>;
1107    /// Extend the given bit-vector with zeros to the (unsigned) equivalent
1108    /// bit-vector of size `m+i`, where `m` is the size of the
1109    /// given bit-vector.
1110    ///
1111    /// The node `t1` must have a bit-vector sort.
1112    pub fn Z3_mk_zero_ext(
1113        c: Z3_context,
1114        i: ::core::ffi::c_uint,
1115        t1: Z3_ast,
1116    ) -> Option<Z3_ast>;
1117    /// Repeat the given bit-vector up length `i`.
1118    ///
1119    /// The node `t1` must have a bit-vector sort.
1120    pub fn Z3_mk_repeat(
1121        c: Z3_context,
1122        i: ::core::ffi::c_uint,
1123        t1: Z3_ast,
1124    ) -> Option<Z3_ast>;
1125    /// Extracts the bit at position `i` of a bit-vector and
1126    /// yields a boolean.
1127    ///
1128    /// The node `t1` must have a bit-vector sort.
1129    pub fn Z3_mk_bit2bool(
1130        c: Z3_context,
1131        i: ::core::ffi::c_uint,
1132        t1: Z3_ast,
1133    ) -> Option<Z3_ast>;
1134    /// Shift left.
1135    ///
1136    /// It is equivalent to multiplication by `2^x` where `x` is the value of the
1137    /// third argument.
1138    ///
1139    /// NB. The semantics of shift operations varies between environments. This
1140    /// definition does not necessarily capture directly the semantics of the
1141    /// programming language or assembly architecture you are modeling.
1142    ///
1143    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1144    pub fn Z3_mk_bvshl(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1145    /// Logical shift right.
1146    ///
1147    /// It is equivalent to unsigned division by `2^x` where `x` is the
1148    /// value of the third argument.
1149    ///
1150    /// NB. The semantics of shift operations varies between environments. This
1151    /// definition does not necessarily capture directly the semantics of the
1152    /// programming language or assembly architecture you are modeling.
1153    ///
1154    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1155    pub fn Z3_mk_bvlshr(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1156    /// Arithmetic shift right.
1157    ///
1158    /// It is like logical shift right except that the most significant
1159    /// bits of the result always copy the most significant bit of the
1160    /// second argument.
1161    ///
1162    /// The semantics of shift operations varies between environments. This
1163    /// definition does not necessarily capture directly the semantics of the
1164    /// programming language or assembly architecture you are modeling.
1165    ///
1166    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1167    pub fn Z3_mk_bvashr(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
1168    /// Rotate bits of `t1` to the left `i` times.
1169    ///
1170    /// The node `t1` must have a bit-vector sort.
1171    pub fn Z3_mk_rotate_left(
1172        c: Z3_context,
1173        i: ::core::ffi::c_uint,
1174        t1: Z3_ast,
1175    ) -> Option<Z3_ast>;
1176    /// Rotate bits of `t1` to the right `i` times.
1177    ///
1178    /// The node `t1` must have a bit-vector sort.
1179    pub fn Z3_mk_rotate_right(
1180        c: Z3_context,
1181        i: ::core::ffi::c_uint,
1182        t1: Z3_ast,
1183    ) -> Option<Z3_ast>;
1184    /// Rotate bits of `t1` to the left `t2` times.
1185    ///
1186    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1187    pub fn Z3_mk_ext_rotate_left(
1188        c: Z3_context,
1189        t1: Z3_ast,
1190        t2: Z3_ast,
1191    ) -> Option<Z3_ast>;
1192    /// Rotate bits of `t1` to the right `t2` times.
1193    ///
1194    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1195    pub fn Z3_mk_ext_rotate_right(
1196        c: Z3_context,
1197        t1: Z3_ast,
1198        t2: Z3_ast,
1199    ) -> Option<Z3_ast>;
1200    /// Create an `n` bit bit-vector from the integer argument `t1`.
1201    ///
1202    /// The resulting bit-vector has `n` bits, where the i'th bit (counting
1203    /// from 0 to `n`-1) is 1 if `(t1 div 2^i)` mod 2 is 1.
1204    ///
1205    /// The node `t1` must have integer sort.
1206    pub fn Z3_mk_int2bv(
1207        c: Z3_context,
1208        n: ::core::ffi::c_uint,
1209        t1: Z3_ast,
1210    ) -> Option<Z3_ast>;
1211    /// Create an integer from the bit-vector argument `t1`.
1212    /// If `is_signed` is false, then the bit-vector `t1` is treated as unsigned.
1213    /// So the result is non-negative
1214    /// and in the range `[0..2^N-1]`, where N are the number of bits in `t1`.
1215    /// If `is_signed` is true, `t1` is treated as a signed bit-vector.
1216    ///
1217    ///
1218    /// The node `t1` must have a bit-vector sort.
1219    pub fn Z3_mk_bv2int(c: Z3_context, t1: Z3_ast, is_signed: bool) -> Option<Z3_ast>;
1220    /// Create a predicate that checks that the bit-wise addition
1221    /// of `t1` and `t2` does not overflow.
1222    ///
1223    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1224    /// The returned node is of sort Bool.
1225    pub fn Z3_mk_bvadd_no_overflow(
1226        c: Z3_context,
1227        t1: Z3_ast,
1228        t2: Z3_ast,
1229        is_signed: bool,
1230    ) -> Option<Z3_ast>;
1231    /// Create a predicate that checks that the bit-wise signed addition
1232    /// of `t1` and `t2` does not underflow.
1233    ///
1234    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1235    /// The returned node is of sort Bool.
1236    pub fn Z3_mk_bvadd_no_underflow(
1237        c: Z3_context,
1238        t1: Z3_ast,
1239        t2: Z3_ast,
1240    ) -> Option<Z3_ast>;
1241    /// Create a predicate that checks that the bit-wise signed subtraction
1242    /// of `t1` and `t2` does not overflow.
1243    ///
1244    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1245    /// The returned node is of sort Bool.
1246    pub fn Z3_mk_bvsub_no_overflow(
1247        c: Z3_context,
1248        t1: Z3_ast,
1249        t2: Z3_ast,
1250    ) -> Option<Z3_ast>;
1251    /// Create a predicate that checks that the bit-wise subtraction
1252    /// of `t1` and `t2` does not underflow.
1253    ///
1254    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1255    /// The returned node is of sort Bool.
1256    pub fn Z3_mk_bvsub_no_underflow(
1257        c: Z3_context,
1258        t1: Z3_ast,
1259        t2: Z3_ast,
1260        is_signed: bool,
1261    ) -> Option<Z3_ast>;
1262    /// Create a predicate that checks that the bit-wise signed division
1263    /// of `t1` and `t2` does not overflow.
1264    ///
1265    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1266    /// The returned node is of sort Bool.
1267    pub fn Z3_mk_bvsdiv_no_overflow(
1268        c: Z3_context,
1269        t1: Z3_ast,
1270        t2: Z3_ast,
1271    ) -> Option<Z3_ast>;
1272    /// Check that bit-wise negation does not overflow when
1273    /// `t1` is interpreted as a signed bit-vector.
1274    ///
1275    /// The node `t1` must have bit-vector sort.
1276    /// The returned node is of sort Bool.
1277    pub fn Z3_mk_bvneg_no_overflow(c: Z3_context, t1: Z3_ast) -> Option<Z3_ast>;
1278    /// Create a predicate that checks that the bit-wise multiplication
1279    /// of `t1` and `t2` does not overflow.
1280    ///
1281    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1282    /// The returned node is of sort Bool.
1283    pub fn Z3_mk_bvmul_no_overflow(
1284        c: Z3_context,
1285        t1: Z3_ast,
1286        t2: Z3_ast,
1287        is_signed: bool,
1288    ) -> Option<Z3_ast>;
1289    /// Create a predicate that checks that the bit-wise signed multiplication
1290    /// of `t1` and `t2` does not underflow.
1291    ///
1292    /// The nodes `t1` and `t2` must have the same bit-vector sort.
1293    /// The returned node is of sort Bool.
1294    pub fn Z3_mk_bvmul_no_underflow(
1295        c: Z3_context,
1296        t1: Z3_ast,
1297        t2: Z3_ast,
1298    ) -> Option<Z3_ast>;
1299    /// Array read.
1300    /// The argument `a` is the array and `i` is the index of the array that gets read.
1301    ///
1302    /// The node `a` must have an array sort `[domain -> range]`,
1303    /// and `i` must have the sort `domain`.
1304    /// The sort of the result is `range`.
1305    ///
1306    /// # See also
1307    ///
1308    /// - [`Z3_mk_array_sort`]
1309    /// - [`Z3_mk_store`]
1310    pub fn Z3_mk_select(c: Z3_context, a: Z3_ast, i: Z3_ast) -> Option<Z3_ast>;
1311    /// n-ary Array read.
1312    /// The argument `a` is the array and `idxs` are the indices of the array that gets read.
1313    pub fn Z3_mk_select_n(
1314        c: Z3_context,
1315        a: Z3_ast,
1316        n: ::core::ffi::c_uint,
1317        idxs: *const Z3_ast,
1318    ) -> Option<Z3_ast>;
1319    /// Array update.
1320    ///
1321    /// The node `a` must have an array sort `[domain -> range]`, `i` must have sort `domain`,
1322    /// `v` must have sort range. The sort of the result is `[domain -> range]`.
1323    /// The semantics of this function is given by the theory of arrays described in the SMT-LIB
1324    /// standard. See <http://smtlib.org> for more details.
1325    /// The result of this function is an array that is equal to `a` (with respect to `select`)
1326    /// on all indices except for `i`, where it maps to `v` (and the `select` of `a` with
1327    /// respect to `i` may be a different value).
1328    ///
1329    /// # See also
1330    ///
1331    /// - [`Z3_mk_array_sort`]
1332    /// - [`Z3_mk_select`]
1333    pub fn Z3_mk_store(c: Z3_context, a: Z3_ast, i: Z3_ast, v: Z3_ast) -> Option<Z3_ast>;
1334    /// n-ary Array update.
1335    pub fn Z3_mk_store_n(
1336        c: Z3_context,
1337        a: Z3_ast,
1338        n: ::core::ffi::c_uint,
1339        idxs: *const Z3_ast,
1340        v: Z3_ast,
1341    ) -> Option<Z3_ast>;
1342    /// Create the constant array.
1343    ///
1344    /// The resulting term is an array, such that a `select` on an arbitrary index
1345    /// produces the value `v`.
1346    ///
1347    /// - `c`: logical context.
1348    /// - `domain`: domain sort for the array.
1349    /// - `v`: value that the array maps to.
1350    pub fn Z3_mk_const_array(
1351        c: Z3_context,
1352        domain: Z3_sort,
1353        v: Z3_ast,
1354    ) -> Option<Z3_ast>;
1355    /// Map f on the argument arrays.
1356    ///
1357    /// The `n` nodes `args` must be of array sorts `[domain_i -> range_i]`.
1358    /// The function declaration `f` must have type ` range_1 .. range_n -> range`.
1359    /// `v` must have sort range. The sort of the result is `[domain_i -> range]`.
1360    ///
1361    /// # See also
1362    ///
1363    /// - [`Z3_mk_array_sort`]
1364    /// - [`Z3_mk_store`]
1365    /// - [`Z3_mk_select`]
1366    pub fn Z3_mk_map(
1367        c: Z3_context,
1368        f: Z3_func_decl,
1369        n: ::core::ffi::c_uint,
1370        args: *const Z3_ast,
1371    ) -> Option<Z3_ast>;
1372    /// Access the array default value.
1373    /// Produces the default range value, for arrays that can be represented as
1374    /// finite maps with a default range value.
1375    ///
1376    /// - `c`: logical context.
1377    /// - `array`: array value whose default range value is accessed.
1378    pub fn Z3_mk_array_default(c: Z3_context, array: Z3_ast) -> Option<Z3_ast>;
1379    /// Create array with the same interpretation as a function.
1380    /// The array satisfies the property (f x) = (select (_ as-array f) x)
1381    /// for every argument x.
1382    pub fn Z3_mk_as_array(c: Z3_context, f: Z3_func_decl) -> Option<Z3_ast>;
1383    /// Create Set type.
1384    pub fn Z3_mk_set_sort(c: Z3_context, ty: Z3_sort) -> Option<Z3_sort>;
1385    /// Create the empty set.
1386    pub fn Z3_mk_empty_set(c: Z3_context, domain: Z3_sort) -> Option<Z3_ast>;
1387    /// Create the full set.
1388    pub fn Z3_mk_full_set(c: Z3_context, domain: Z3_sort) -> Option<Z3_ast>;
1389    /// Add an element to a set.
1390    ///
1391    /// The first argument must be a set, the second an element.
1392    pub fn Z3_mk_set_add(c: Z3_context, set: Z3_ast, elem: Z3_ast) -> Option<Z3_ast>;
1393    /// Remove an element to a set.
1394    ///
1395    /// The first argument must be a set, the second an element.
1396    pub fn Z3_mk_set_del(c: Z3_context, set: Z3_ast, elem: Z3_ast) -> Option<Z3_ast>;
1397    /// Take the union of a list of sets.
1398    pub fn Z3_mk_set_union(
1399        c: Z3_context,
1400        num_args: ::core::ffi::c_uint,
1401        args: *const Z3_ast,
1402    ) -> Option<Z3_ast>;
1403    /// Take the intersection of a list of sets.
1404    pub fn Z3_mk_set_intersect(
1405        c: Z3_context,
1406        num_args: ::core::ffi::c_uint,
1407        args: *const Z3_ast,
1408    ) -> Option<Z3_ast>;
1409    /// Take the set difference between two sets.
1410    pub fn Z3_mk_set_difference(
1411        c: Z3_context,
1412        arg1: Z3_ast,
1413        arg2: Z3_ast,
1414    ) -> Option<Z3_ast>;
1415    /// Take the complement of a set.
1416    pub fn Z3_mk_set_complement(c: Z3_context, arg: Z3_ast) -> Option<Z3_ast>;
1417    /// Check for set membership.
1418    ///
1419    /// The first argument should be an element type of the set.
1420    pub fn Z3_mk_set_member(c: Z3_context, elem: Z3_ast, set: Z3_ast) -> Option<Z3_ast>;
1421    /// Check for subsetness of sets.
1422    pub fn Z3_mk_set_subset(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Option<Z3_ast>;
1423    /// Create array extensionality index given two arrays with the same sort.
1424    /// The meaning is given by the axiom:
1425    /// (=> (= (select A (array-ext A B)) (select B (array-ext A B))) (= A B))
1426    pub fn Z3_mk_array_ext(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Option<Z3_ast>;
1427    /// Create a finite set sort.
1428    pub fn Z3_mk_finite_set_sort(c: Z3_context, elem_sort: Z3_sort) -> Option<Z3_sort>;
1429    /// Check if a sort is a finite set sort.
1430    pub fn Z3_is_finite_set_sort(c: Z3_context, s: Z3_sort) -> bool;
1431    /// Get the element sort of a finite set sort.
1432    pub fn Z3_get_finite_set_sort_basis(c: Z3_context, s: Z3_sort) -> Option<Z3_sort>;
1433    /// Create an empty finite set of the given sort.
1434    pub fn Z3_mk_finite_set_empty(c: Z3_context, set_sort: Z3_sort) -> Option<Z3_ast>;
1435    /// Create a singleton finite set.
1436    pub fn Z3_mk_finite_set_singleton(c: Z3_context, elem: Z3_ast) -> Option<Z3_ast>;
1437    /// Create the union of two finite sets.
1438    pub fn Z3_mk_finite_set_union(
1439        c: Z3_context,
1440        s1: Z3_ast,
1441        s2: Z3_ast,
1442    ) -> Option<Z3_ast>;
1443    /// Create the intersection of two finite sets.
1444    pub fn Z3_mk_finite_set_intersect(
1445        c: Z3_context,
1446        s1: Z3_ast,
1447        s2: Z3_ast,
1448    ) -> Option<Z3_ast>;
1449    /// Create the set difference of two finite sets.
1450    pub fn Z3_mk_finite_set_difference(
1451        c: Z3_context,
1452        s1: Z3_ast,
1453        s2: Z3_ast,
1454    ) -> Option<Z3_ast>;
1455    /// Check if an element is a member of a finite set.
1456    pub fn Z3_mk_finite_set_member(
1457        c: Z3_context,
1458        elem: Z3_ast,
1459        set: Z3_ast,
1460    ) -> Option<Z3_ast>;
1461    /// Get the size (cardinality) of a finite set.
1462    pub fn Z3_mk_finite_set_size(c: Z3_context, set: Z3_ast) -> Option<Z3_ast>;
1463    /// Check if one finite set is a subset of another.
1464    pub fn Z3_mk_finite_set_subset(
1465        c: Z3_context,
1466        s1: Z3_ast,
1467        s2: Z3_ast,
1468    ) -> Option<Z3_ast>;
1469    /// Apply a function to all elements of a finite set.
1470    pub fn Z3_mk_finite_set_map(c: Z3_context, f: Z3_ast, set: Z3_ast) -> Option<Z3_ast>;
1471    /// Filter a finite set using a predicate.
1472    pub fn Z3_mk_finite_set_filter(
1473        c: Z3_context,
1474        f: Z3_ast,
1475        set: Z3_ast,
1476    ) -> Option<Z3_ast>;
1477    /// Create a finite set of integers in the range [low, high].
1478    pub fn Z3_mk_finite_set_range(
1479        c: Z3_context,
1480        low: Z3_ast,
1481        high: Z3_ast,
1482    ) -> Option<Z3_ast>;
1483    /// Create a numeral of a given sort.
1484    ///
1485    /// - `c`: logical context.
1486    /// - `numeral`: A string representing the numeral value in decimal notation. The string may be of the form `[num]*[.[num]*][E[+|-][num]+]`.
1487    /// If the given sort is a real, then the numeral can be a rational, that is, a string of the form `[num]* / [num]*` .
1488    /// - `ty`: The sort of the numeral. In the current implementation, the given sort can be an int, real, finite-domain, or bit-vectors of arbitrary size.
1489    ///
1490    /// # See also
1491    ///
1492    /// - [`Z3_mk_int`]
1493    /// - [`Z3_mk_unsigned_int`]
1494    pub fn Z3_mk_numeral(
1495        c: Z3_context,
1496        numeral: Z3_string,
1497        ty: Z3_sort,
1498    ) -> Option<Z3_ast>;
1499    /// Create a real from a fraction.
1500    ///
1501    /// - `c`: logical context.
1502    /// - `num`: numerator of rational.
1503    /// - `den`: denominator of rational.
1504    ///
1505    /// # Preconditions
1506    ///
1507    /// - `den != 0`
1508    ///
1509    /// # See also
1510    ///
1511    /// - [`Z3_mk_numeral`]
1512    /// - [`Z3_mk_int`]
1513    /// - [`Z3_mk_real_int64`]
1514    /// - [`Z3_mk_unsigned_int`]
1515    pub fn Z3_mk_real(
1516        c: Z3_context,
1517        num: ::core::ffi::c_int,
1518        den: ::core::ffi::c_int,
1519    ) -> Option<Z3_ast>;
1520    /// Create a real from a fraction of int64.
1521    ///
1522    /// # See also
1523    ///
1524    /// - [`Z3_mk_real`]
1525    pub fn Z3_mk_real_int64(c: Z3_context, num: i64, den: i64) -> Option<Z3_ast>;
1526    /// Create a numeral of an int, bit-vector, or finite-domain sort.
1527    ///
1528    /// This function can be used to create numerals that fit in a machine integer.
1529    /// It is slightly faster than [`Z3_mk_numeral`] since it is not necessary to parse a string.
1530    ///
1531    /// # See also
1532    ///
1533    /// - [`Z3_mk_numeral`]
1534    pub fn Z3_mk_int(
1535        c: Z3_context,
1536        v: ::core::ffi::c_int,
1537        ty: Z3_sort,
1538    ) -> Option<Z3_ast>;
1539    /// Create a numeral of a int, bit-vector, or finite-domain sort.
1540    ///
1541    /// This function can be used to create numerals that fit in a machine unsigned integer.
1542    /// It is slightly faster than [`Z3_mk_numeral`] since it is not necessary to parse a string.
1543    ///
1544    /// # See also
1545    ///
1546    /// - [`Z3_mk_numeral`]
1547    pub fn Z3_mk_unsigned_int(
1548        c: Z3_context,
1549        v: ::core::ffi::c_uint,
1550        ty: Z3_sort,
1551    ) -> Option<Z3_ast>;
1552    /// Create a numeral of a int, bit-vector, or finite-domain sort.
1553    ///
1554    /// This function can be used to create numerals that fit in a machine `int64_t` integer.
1555    /// It is slightly faster than [`Z3_mk_numeral`] since it is not necessary to parse a string.
1556    ///
1557    /// # See also
1558    ///
1559    /// - [`Z3_mk_numeral`]
1560    pub fn Z3_mk_int64(c: Z3_context, v: i64, ty: Z3_sort) -> Option<Z3_ast>;
1561    /// Create a numeral of a int, bit-vector, or finite-domain sort.
1562    ///
1563    /// This function can be used to create numerals that fit in a machine `uint64_t` integer.
1564    /// It is slightly faster than [`Z3_mk_numeral`] since it is not necessary to parse a string.
1565    ///
1566    /// # See also
1567    ///
1568    /// - [`Z3_mk_numeral`]
1569    pub fn Z3_mk_unsigned_int64(c: Z3_context, v: u64, ty: Z3_sort) -> Option<Z3_ast>;
1570    /// create a bit-vector numeral from a vector of Booleans.
1571    ///
1572    /// # See also
1573    ///
1574    /// - [`Z3_mk_numeral`]
1575    pub fn Z3_mk_bv_numeral(
1576        c: Z3_context,
1577        sz: ::core::ffi::c_uint,
1578        bits: *const bool,
1579    ) -> Option<Z3_ast>;
1580    /// Create a sequence sort out of the sort for the elements.
1581    pub fn Z3_mk_seq_sort(c: Z3_context, s: Z3_sort) -> Option<Z3_sort>;
1582    /// Check if `s` is a sequence sort.
1583    pub fn Z3_is_seq_sort(c: Z3_context, s: Z3_sort) -> bool;
1584    /// Retrieve basis sort for sequence sort.
1585    pub fn Z3_get_seq_sort_basis(c: Z3_context, s: Z3_sort) -> Option<Z3_sort>;
1586    /// Create a regular expression sort out of a sequence sort.
1587    pub fn Z3_mk_re_sort(c: Z3_context, seq: Z3_sort) -> Option<Z3_sort>;
1588    /// Check if `s` is a regular expression sort.
1589    pub fn Z3_is_re_sort(c: Z3_context, s: Z3_sort) -> bool;
1590    /// Retrieve basis sort for regex sort.
1591    pub fn Z3_get_re_sort_basis(c: Z3_context, s: Z3_sort) -> Option<Z3_sort>;
1592    /// Create a sort for unicode strings.
1593    ///
1594    /// The sort for characters can be changed to ASCII by setting
1595    /// the global parameter `encoding` to `ascii`, or alternative
1596    /// to 16 bit characters by setting `encoding` to `bmp`.
1597    pub fn Z3_mk_string_sort(c: Z3_context) -> Option<Z3_sort>;
1598    /// Create a sort for unicode characters.
1599    ///
1600    /// The sort for characters can be changed to ASCII by setting
1601    /// the global parameter `encoding` to `ascii`, or alternative
1602    /// to 16 bit characters by setting `encoding` to `bmp`.
1603    pub fn Z3_mk_char_sort(c: Z3_context) -> Option<Z3_sort>;
1604    /// Check if `s` is a string sort.
1605    pub fn Z3_is_string_sort(c: Z3_context, s: Z3_sort) -> bool;
1606    /// Check if `s` is a character sort.
1607    pub fn Z3_is_char_sort(c: Z3_context, s: Z3_sort) -> bool;
1608    /// Create a string constant out of the string that is passed in
1609    /// The string may contain escape encoding for non-printable characters
1610    /// or characters outside of the basic printable ASCII range. For example,
1611    /// the escape encoding \\u{0} represents the character 0 and the encoding
1612    /// \\u{100} represents the character 256.
1613    pub fn Z3_mk_string(c: Z3_context, s: Z3_string) -> Option<Z3_ast>;
1614    /// Create a string constant out of the string that is passed in
1615    /// It takes the length of the string as well to take into account
1616    /// 0 characters. The string is treated as if it is unescaped so a sequence
1617    /// of characters \\u{0} is treated as 5 characters and not the character 0.
1618    pub fn Z3_mk_lstring(
1619        c: Z3_context,
1620        len: ::core::ffi::c_uint,
1621        s: Z3_string,
1622    ) -> Option<Z3_ast>;
1623    /// Create a string constant out of the string that is passed in
1624    /// It takes the length of the string as well to take into account
1625    /// 0 characters. The string is unescaped.
1626    pub fn Z3_mk_u32string(
1627        c: Z3_context,
1628        len: ::core::ffi::c_uint,
1629        chars: *const ::core::ffi::c_uint,
1630    ) -> Option<Z3_ast>;
1631    /// Determine if `s` is a string constant.
1632    pub fn Z3_is_string(c: Z3_context, s: Z3_ast) -> bool;
1633    /// Retrieve the string constant stored in `s`.
1634    /// Characters outside the basic printable ASCII range are escaped.
1635    ///
1636    /// # Preconditions
1637    ///
1638    /// - ` Z3_is_string(c, s)`
1639    pub fn Z3_get_string(c: Z3_context, s: Z3_ast) -> Z3_string;
1640    /// Retrieve the string constant stored in `s`. The string can contain escape sequences.
1641    /// Characters in the range 1 to 255 are literal.
1642    /// Characters in the range 0, and 256 above are escaped.
1643    ///
1644    /// # Preconditions
1645    ///
1646    /// - ` Z3_is_string(c, s)`
1647    pub fn Z3_get_lstring(
1648        c: Z3_context,
1649        s: Z3_ast,
1650        length: *mut ::core::ffi::c_uint,
1651    ) -> Z3_char_ptr;
1652    /// Retrieve the length of the unescaped string constant stored in `s`.
1653    ///
1654    /// # Preconditions
1655    ///
1656    /// - ` Z3_is_string(c, s)`
1657    pub fn Z3_get_string_length(c: Z3_context, s: Z3_ast) -> ::core::ffi::c_uint;
1658    /// Retrieve the unescaped string constant stored in `s`.
1659    ///
1660    /// # Preconditions
1661    ///
1662    /// - ` Z3_is_string(c, s)`
1663    /// - `length contains the number of characters in s`
1664    pub fn Z3_get_string_contents(
1665        c: Z3_context,
1666        s: Z3_ast,
1667        length: ::core::ffi::c_uint,
1668        contents: *mut ::core::ffi::c_uint,
1669    );
1670    /// Create an empty sequence of the sequence sort `seq`.
1671    ///
1672    /// # Preconditions
1673    ///
1674    /// - `s is a sequence sort.`
1675    pub fn Z3_mk_seq_empty(c: Z3_context, seq: Z3_sort) -> Option<Z3_ast>;
1676    /// Create a unit sequence of `a`.
1677    pub fn Z3_mk_seq_unit(c: Z3_context, a: Z3_ast) -> Option<Z3_ast>;
1678    /// Concatenate sequences.
1679    ///
1680    /// # Preconditions
1681    ///
1682    /// - `n > 0`
1683    pub fn Z3_mk_seq_concat(
1684        c: Z3_context,
1685        n: ::core::ffi::c_uint,
1686        args: *const Z3_ast,
1687    ) -> Option<Z3_ast>;
1688    /// Check if `prefix` is a prefix of `s`.
1689    ///
1690    /// # Preconditions
1691    ///
1692    /// - `prefix and s are the same sequence sorts.`
1693    pub fn Z3_mk_seq_prefix(c: Z3_context, prefix: Z3_ast, s: Z3_ast) -> Option<Z3_ast>;
1694    /// Check if `suffix` is a suffix of `s`.
1695    ///
1696    /// # Preconditions
1697    ///
1698    /// - ``suffix` and `s` are the same sequence sorts.`
1699    pub fn Z3_mk_seq_suffix(c: Z3_context, suffix: Z3_ast, s: Z3_ast) -> Option<Z3_ast>;
1700    /// Check if `container` contains `containee`.
1701    ///
1702    /// # Preconditions
1703    ///
1704    /// - ``container` and `containee` are the same sequence sorts.`
1705    pub fn Z3_mk_seq_contains(
1706        c: Z3_context,
1707        container: Z3_ast,
1708        containee: Z3_ast,
1709    ) -> Option<Z3_ast>;
1710    /// Check if `s1` is lexicographically strictly less than `s2`.
1711    ///
1712    /// # Preconditions
1713    ///
1714    /// - ``s1` and `s2` are strings`
1715    pub fn Z3_mk_str_lt(c: Z3_context, prefix: Z3_ast, s: Z3_ast) -> Option<Z3_ast>;
1716    /// Check if `s1` is equal or lexicographically strictly less than `s2`.
1717    ///
1718    /// # Preconditions
1719    ///
1720    /// - ``s1` and `s2` are strings`
1721    pub fn Z3_mk_str_le(c: Z3_context, prefix: Z3_ast, s: Z3_ast) -> Option<Z3_ast>;
1722    /// Extract subsequence starting at `offset` of `length`.
1723    pub fn Z3_mk_seq_extract(
1724        c: Z3_context,
1725        s: Z3_ast,
1726        offset: Z3_ast,
1727        length: Z3_ast,
1728    ) -> Option<Z3_ast>;
1729    /// Replace the first occurrence of `src` with `dst` in `s`.
1730    pub fn Z3_mk_seq_replace(
1731        c: Z3_context,
1732        s: Z3_ast,
1733        src: Z3_ast,
1734        dst: Z3_ast,
1735    ) -> Option<Z3_ast>;
1736    /// Replace all occurrences of `src` with `dst` in `s`.
1737    pub fn Z3_mk_seq_replace_all(
1738        c: Z3_context,
1739        s: Z3_ast,
1740        src: Z3_ast,
1741        dst: Z3_ast,
1742    ) -> Option<Z3_ast>;
1743    /// Replace the first occurrence of regular expression `re` with `dst` in `s`.
1744    pub fn Z3_mk_seq_replace_re(
1745        c: Z3_context,
1746        s: Z3_ast,
1747        re: Z3_ast,
1748        dst: Z3_ast,
1749    ) -> Option<Z3_ast>;
1750    /// Replace all occurrences of regular expression `re` with `dst` in `s`.
1751    pub fn Z3_mk_seq_replace_re_all(
1752        c: Z3_context,
1753        s: Z3_ast,
1754        re: Z3_ast,
1755        dst: Z3_ast,
1756    ) -> Option<Z3_ast>;
1757    /// Retrieve from `s` the unit sequence positioned at position `index`.
1758    /// The sequence is empty if the index is out of bounds.
1759    pub fn Z3_mk_seq_at(c: Z3_context, s: Z3_ast, index: Z3_ast) -> Option<Z3_ast>;
1760    /// Retrieve from `s` the element positioned at position `index`.
1761    /// The function is under-specified if the index is out of bounds.
1762    pub fn Z3_mk_seq_nth(c: Z3_context, s: Z3_ast, index: Z3_ast) -> Option<Z3_ast>;
1763    /// Create the sequence `s` concatenated `n` times with itself.
1764    /// The result is the empty sequence when `n` is not positive.
1765    pub fn Z3_mk_seq_power(c: Z3_context, s: Z3_ast, n: Z3_ast) -> Option<Z3_ast>;
1766    /// Return the length of the sequence `s`.
1767    pub fn Z3_mk_seq_length(c: Z3_context, s: Z3_ast) -> Option<Z3_ast>;
1768    /// Return index of the first occurrence of `substr` in `s` starting from offset `offset`.
1769    /// If `s` does not contain `substr`, then the value is -1, if `offset` is the length of `s`, then the value is -1 as well.
1770    /// The value is -1 if `offset` is negative or larger than the length of `s`.
1771    pub fn Z3_mk_seq_index(
1772        c: Z3_context,
1773        s: Z3_ast,
1774        substr: Z3_ast,
1775        offset: Z3_ast,
1776    ) -> Option<Z3_ast>;
1777    /// Return index of the last occurrence of `substr` in `s`.
1778    /// If `s` does not contain `substr`, then the value is -1,
1779    pub fn Z3_mk_seq_last_index(
1780        c: Z3_context,
1781        s: Z3_ast,
1782        substr: Z3_ast,
1783    ) -> Option<Z3_ast>;
1784    /// Create a map of the function `f` over the sequence `s`.
1785    pub fn Z3_mk_seq_map(c: Z3_context, f: Z3_ast, s: Z3_ast) -> Option<Z3_ast>;
1786    /// Create a map of the function `f` over the sequence `s` starting at index `i`.
1787    pub fn Z3_mk_seq_mapi(
1788        c: Z3_context,
1789        f: Z3_ast,
1790        i: Z3_ast,
1791        s: Z3_ast,
1792    ) -> Option<Z3_ast>;
1793    /// Create a fold of the function `f` over the sequence `s` with accumulator a.
1794    pub fn Z3_mk_seq_foldl(
1795        c: Z3_context,
1796        f: Z3_ast,
1797        a: Z3_ast,
1798        s: Z3_ast,
1799    ) -> Option<Z3_ast>;
1800    /// Create a fold with index tracking of the function `f` over the sequence `s` with accumulator `a` starting at index `i`.
1801    pub fn Z3_mk_seq_foldli(
1802        c: Z3_context,
1803        f: Z3_ast,
1804        i: Z3_ast,
1805        a: Z3_ast,
1806        s: Z3_ast,
1807    ) -> Option<Z3_ast>;
1808    /// Convert string to integer.
1809    pub fn Z3_mk_str_to_int(c: Z3_context, s: Z3_ast) -> Option<Z3_ast>;
1810    /// Integer to string conversion.
1811    pub fn Z3_mk_int_to_str(c: Z3_context, s: Z3_ast) -> Option<Z3_ast>;
1812    /// String to code conversion.
1813    pub fn Z3_mk_string_to_code(c: Z3_context, a: Z3_ast) -> Option<Z3_ast>;
1814    /// Code to string conversion.
1815    pub fn Z3_mk_string_from_code(c: Z3_context, a: Z3_ast) -> Option<Z3_ast>;
1816    /// Unsigned bit-vector to string conversion.
1817    pub fn Z3_mk_ubv_to_str(c: Z3_context, s: Z3_ast) -> Option<Z3_ast>;
1818    /// Signed bit-vector to string conversion.
1819    pub fn Z3_mk_sbv_to_str(c: Z3_context, s: Z3_ast) -> Option<Z3_ast>;
1820    /// Create a regular expression that accepts the sequence `seq`.
1821    pub fn Z3_mk_seq_to_re(c: Z3_context, seq: Z3_ast) -> Option<Z3_ast>;
1822    /// Check if `seq` is in the language generated by the regular expression `re`.
1823    pub fn Z3_mk_seq_in_re(c: Z3_context, seq: Z3_ast, re: Z3_ast) -> Option<Z3_ast>;
1824    /// Create the regular language `re`+.
1825    pub fn Z3_mk_re_plus(c: Z3_context, re: Z3_ast) -> Option<Z3_ast>;
1826    /// Create the regular language `re`*.
1827    pub fn Z3_mk_re_star(c: Z3_context, re: Z3_ast) -> Option<Z3_ast>;
1828    /// Create the regular language `[re]`.
1829    pub fn Z3_mk_re_option(c: Z3_context, re: Z3_ast) -> Option<Z3_ast>;
1830    /// Create the union of the regular languages.
1831    ///
1832    /// # Preconditions
1833    ///
1834    /// - `n > 0`
1835    pub fn Z3_mk_re_union(
1836        c: Z3_context,
1837        n: ::core::ffi::c_uint,
1838        args: *const Z3_ast,
1839    ) -> Option<Z3_ast>;
1840    /// Create the concatenation of the regular languages.
1841    ///
1842    /// # Preconditions
1843    ///
1844    /// - `n > 0`
1845    pub fn Z3_mk_re_concat(
1846        c: Z3_context,
1847        n: ::core::ffi::c_uint,
1848        args: *const Z3_ast,
1849    ) -> Option<Z3_ast>;
1850    /// Create the range regular expression over two sequences of length 1.
1851    pub fn Z3_mk_re_range(c: Z3_context, lo: Z3_ast, hi: Z3_ast) -> Option<Z3_ast>;
1852    /// Create a regular expression that accepts all singleton sequences of the regular expression sort
1853    pub fn Z3_mk_re_allchar(c: Z3_context, regex_sort: Z3_sort) -> Option<Z3_ast>;
1854    /// Create a regular expression loop. The supplied regular expression `r` is repeated
1855    /// between `lo` and `hi` times. The `lo` should be below `hi` with one exception: when
1856    /// supplying the value `hi` as 0, the meaning is to repeat the argument `r` at least
1857    /// `lo` number of times, and with an unbounded upper bound.
1858    pub fn Z3_mk_re_loop(
1859        c: Z3_context,
1860        r: Z3_ast,
1861        lo: ::core::ffi::c_uint,
1862        hi: ::core::ffi::c_uint,
1863    ) -> Option<Z3_ast>;
1864    /// Create a power regular expression.
1865    pub fn Z3_mk_re_power(
1866        c: Z3_context,
1867        re: Z3_ast,
1868        n: ::core::ffi::c_uint,
1869    ) -> Option<Z3_ast>;
1870    /// Create the intersection of the regular languages.
1871    ///
1872    /// # Preconditions
1873    ///
1874    /// - `n > 0`
1875    pub fn Z3_mk_re_intersect(
1876        c: Z3_context,
1877        n: ::core::ffi::c_uint,
1878        args: *const Z3_ast,
1879    ) -> Option<Z3_ast>;
1880    /// Create the complement of the regular language `re`.
1881    pub fn Z3_mk_re_complement(c: Z3_context, re: Z3_ast) -> Option<Z3_ast>;
1882    /// Create the difference of regular expressions.
1883    pub fn Z3_mk_re_diff(c: Z3_context, re1: Z3_ast, re2: Z3_ast) -> Option<Z3_ast>;
1884    /// Create an empty regular expression of sort `re`.
1885    ///
1886    /// # Preconditions
1887    ///
1888    /// - `re is a regular expression sort.`
1889    pub fn Z3_mk_re_empty(c: Z3_context, re: Z3_sort) -> Option<Z3_ast>;
1890    /// Create an universal regular expression of sort `re`.
1891    ///
1892    /// # Preconditions
1893    ///
1894    /// - `re is a regular expression sort.`
1895    pub fn Z3_mk_re_full(c: Z3_context, re: Z3_sort) -> Option<Z3_ast>;
1896    /// Create a character literal
1897    pub fn Z3_mk_char(c: Z3_context, ch: ::core::ffi::c_uint) -> Option<Z3_ast>;
1898    /// Create less than or equal to between two characters.
1899    pub fn Z3_mk_char_le(c: Z3_context, ch1: Z3_ast, ch2: Z3_ast) -> Option<Z3_ast>;
1900    /// Create an integer (code point) from character.
1901    pub fn Z3_mk_char_to_int(c: Z3_context, ch: Z3_ast) -> Option<Z3_ast>;
1902    /// Create a bit-vector (code point) from character.
1903    pub fn Z3_mk_char_to_bv(c: Z3_context, ch: Z3_ast) -> Option<Z3_ast>;
1904    /// Create a character from a bit-vector (code point).
1905    pub fn Z3_mk_char_from_bv(c: Z3_context, bv: Z3_ast) -> Option<Z3_ast>;
1906    /// Create a check if the character is a digit.
1907    pub fn Z3_mk_char_is_digit(c: Z3_context, ch: Z3_ast) -> Option<Z3_ast>;
1908    /// create a linear ordering relation over signature `a`.
1909    /// The relation is identified by the index `id`.
1910    pub fn Z3_mk_linear_order(
1911        c: Z3_context,
1912        a: Z3_sort,
1913        id: ::core::ffi::c_uint,
1914    ) -> Option<Z3_func_decl>;
1915    /// create a partial ordering relation over signature `a` and index `id`.
1916    pub fn Z3_mk_partial_order(
1917        c: Z3_context,
1918        a: Z3_sort,
1919        id: ::core::ffi::c_uint,
1920    ) -> Option<Z3_func_decl>;
1921    /// create a piecewise linear ordering relation over signature `a` and index `id`.
1922    pub fn Z3_mk_piecewise_linear_order(
1923        c: Z3_context,
1924        a: Z3_sort,
1925        id: ::core::ffi::c_uint,
1926    ) -> Option<Z3_func_decl>;
1927    /// create a tree ordering relation over signature `a` identified using index `id`.
1928    pub fn Z3_mk_tree_order(
1929        c: Z3_context,
1930        a: Z3_sort,
1931        id: ::core::ffi::c_uint,
1932    ) -> Option<Z3_func_decl>;
1933    /// create transitive closure of binary relation.
1934    ///
1935    ///
1936    /// The resulting relation f+ represents the transitive closure of f.
1937    ///
1938    /// # Preconditions
1939    ///
1940    /// - `f is a binary relation, such that the two arguments have the same sorts.`
1941    pub fn Z3_mk_transitive_closure(
1942        c: Z3_context,
1943        f: Z3_func_decl,
1944    ) -> Option<Z3_func_decl>;
1945    /// Create a pattern for quantifier instantiation.
1946    ///
1947    /// Z3 uses pattern matching to instantiate quantifiers. If a
1948    /// pattern is not provided for a quantifier, then Z3 will
1949    /// automatically compute a set of patterns for it. However, for
1950    /// optimal performance, the user should provide the patterns.
1951    ///
1952    /// Patterns comprise a list of terms. The list should be
1953    /// non-empty.  If the list comprises of more than one term, it is
1954    /// a called a multi-pattern.
1955    ///
1956    /// In general, one can pass in a list of (multi-)patterns in the
1957    /// quantifier constructor.
1958    ///
1959    /// # See also
1960    ///
1961    /// - [`Z3_mk_forall`]
1962    /// - [`Z3_mk_exists`]
1963    pub fn Z3_mk_pattern(
1964        c: Z3_context,
1965        num_patterns: ::core::ffi::c_uint,
1966        terms: *const Z3_ast,
1967    ) -> Option<Z3_pattern>;
1968    /// Create a variable.
1969    ///
1970    /// Variables are intended to be bound by a scope created by a quantifier. So we call them bound variables
1971    /// even if they appear as free variables in the expression produced by `Z3_mk_bound`.
1972    ///
1973    /// Bound variables are indexed by de-Bruijn indices. It is perhaps easiest to explain
1974    /// the meaning of de-Bruijn indices by indicating the compilation process from
1975    /// non-de-Bruijn formulas to de-Bruijn format.
1976    ///
1977    /// ```text
1978    /// abs(forall (x1) phi) = forall (x1) abs1(phi, x1, 0)
1979    /// abs(forall (x1, x2) phi) = abs(forall (x1) abs(forall (x2) phi))
1980    /// abs1(x, x, n) = b_n
1981    /// abs1(y, x, n) = y
1982    /// abs1(f(t1,...,tn), x, n) = f(abs1(t1,x,n), ..., abs1(tn,x,n))
1983    /// abs1(forall (x1) phi, x, n) = forall (x1) (abs1(phi, x, n+1))
1984    /// ```
1985    ///
1986    /// The last line is significant: the index of a bound variable is different depending
1987    /// on the scope in which it appears. The deeper x appears, the higher is its
1988    /// index.
1989    ///
1990    /// - `c`: logical context
1991    /// - `index`: de-Bruijn index
1992    /// - `ty`: sort of the bound variable
1993    ///
1994    /// # See also
1995    ///
1996    /// - [`Z3_mk_forall`]
1997    /// - [`Z3_mk_exists`]
1998    pub fn Z3_mk_bound(
1999        c: Z3_context,
2000        index: ::core::ffi::c_uint,
2001        ty: Z3_sort,
2002    ) -> Option<Z3_ast>;
2003    /// Create a forall formula. It takes an expression `body` that contains bound variables
2004    /// of the same sorts as the sorts listed in the array `sorts`. The bound variables are de-Bruijn indices created
2005    /// using [`Z3_mk_bound`]. The array `decl_names` contains the names that the quantified formula uses for the
2006    /// bound variables. Z3 applies the convention that the last element in the `decl_names` and `sorts` array
2007    /// refers to the variable with index 0, the second to last element of `decl_names` and `sorts` refers
2008    /// to the variable with index 1, etc.
2009    ///
2010    /// - `c`: logical context.
2011    /// - `weight`: quantifiers are associated with weights indicating the importance of using the quantifier during instantiation. By default, pass the weight 0.
2012    /// - `num_patterns`: number of patterns.
2013    /// - `patterns`: array containing the patterns created using [`Z3_mk_pattern`].
2014    /// - `num_decls`: number of variables to be bound.
2015    /// - `sorts`: the sorts of the bound variables.
2016    /// - `decl_names`: names of the bound variables
2017    /// - `body`: the body of the quantifier.
2018    ///
2019    /// # See also
2020    ///
2021    /// - [`Z3_mk_pattern`]
2022    /// - [`Z3_mk_bound`]
2023    /// - [`Z3_mk_exists`]
2024    pub fn Z3_mk_forall(
2025        c: Z3_context,
2026        weight: ::core::ffi::c_uint,
2027        num_patterns: ::core::ffi::c_uint,
2028        patterns: *const Z3_pattern,
2029        num_decls: ::core::ffi::c_uint,
2030        sorts: *const Z3_sort,
2031        decl_names: *const Z3_symbol,
2032        body: Z3_ast,
2033    ) -> Option<Z3_ast>;
2034    /// Create an exists formula. Similar to [`Z3_mk_forall`].
2035    ///
2036    /// # See also
2037    ///
2038    /// - [`Z3_mk_pattern`]
2039    /// - [`Z3_mk_bound`]
2040    /// - [`Z3_mk_forall`]
2041    /// - [`Z3_mk_quantifier`]
2042    pub fn Z3_mk_exists(
2043        c: Z3_context,
2044        weight: ::core::ffi::c_uint,
2045        num_patterns: ::core::ffi::c_uint,
2046        patterns: *const Z3_pattern,
2047        num_decls: ::core::ffi::c_uint,
2048        sorts: *const Z3_sort,
2049        decl_names: *const Z3_symbol,
2050        body: Z3_ast,
2051    ) -> Option<Z3_ast>;
2052    /// Create a quantifier - universal or existential, with pattern hints.
2053    /// See the documentation for [`Z3_mk_forall`] for an explanation of the parameters.
2054    ///
2055    /// - `c`: logical context.
2056    /// - `is_forall`: flag to indicate if this is a universal or existential quantifier.
2057    /// - `weight`: quantifiers are associated with weights indicating the importance of using the quantifier during instantiation. By default, pass the weight 0.
2058    /// - `num_patterns`: number of patterns.
2059    /// - `patterns`: array containing the patterns created using [`Z3_mk_pattern`].
2060    /// - `num_decls`: number of variables to be bound.
2061    /// - `sorts`: array of sorts of the bound variables.
2062    /// - `decl_names`: names of the bound variables.
2063    /// - `body`: the body of the quantifier.
2064    ///
2065    /// # See also
2066    ///
2067    /// - [`Z3_mk_pattern`]
2068    /// - [`Z3_mk_bound`]
2069    /// - [`Z3_mk_forall`]
2070    /// - [`Z3_mk_exists`]
2071    pub fn Z3_mk_quantifier(
2072        c: Z3_context,
2073        is_forall: bool,
2074        weight: ::core::ffi::c_uint,
2075        num_patterns: ::core::ffi::c_uint,
2076        patterns: *const Z3_pattern,
2077        num_decls: ::core::ffi::c_uint,
2078        sorts: *const Z3_sort,
2079        decl_names: *const Z3_symbol,
2080        body: Z3_ast,
2081    ) -> Option<Z3_ast>;
2082    /// Create a quantifier - universal or existential, with pattern hints, no patterns, and attributes
2083    ///
2084    /// - `c`: logical context.
2085    /// - `is_forall`: flag to indicate if this is a universal or existential quantifier.
2086    /// - `quantifier_id`: identifier to identify quantifier
2087    /// - `skolem_id`: identifier to identify skolem constants introduced by quantifier.
2088    /// - `weight`: quantifiers are associated with weights indicating the importance of using the quantifier during instantiation. By default, pass the weight 0.
2089    /// - `num_patterns`: number of patterns.
2090    /// - `patterns`: array containing the patterns created using [`Z3_mk_pattern`].
2091    /// - `num_no_patterns`: number of no_patterns.
2092    /// - `no_patterns`: array containing subexpressions to be excluded from inferred patterns.
2093    /// - `num_decls`: number of variables to be bound.
2094    /// - `sorts`: array of sorts of the bound variables.
2095    /// - `decl_names`: names of the bound variables.
2096    /// - `body`: the body of the quantifier.
2097    ///
2098    /// # See also
2099    ///
2100    /// - [`Z3_mk_pattern`]
2101    /// - [`Z3_mk_bound`]
2102    /// - [`Z3_mk_forall`]
2103    /// - [`Z3_mk_exists`]
2104    pub fn Z3_mk_quantifier_ex(
2105        c: Z3_context,
2106        is_forall: bool,
2107        weight: ::core::ffi::c_uint,
2108        quantifier_id: Z3_symbol,
2109        skolem_id: Z3_symbol,
2110        num_patterns: ::core::ffi::c_uint,
2111        patterns: *const Z3_pattern,
2112        num_no_patterns: ::core::ffi::c_uint,
2113        no_patterns: *const Z3_ast,
2114        num_decls: ::core::ffi::c_uint,
2115        sorts: *const Z3_sort,
2116        decl_names: *const Z3_symbol,
2117        body: Z3_ast,
2118    ) -> Option<Z3_ast>;
2119    /// Create a universal quantifier using a list of constants that
2120    /// will form the set of bound variables.
2121    ///
2122    /// - `c`: logical context.
2123    /// - `weight`: quantifiers are associated with weights indicating the importance of using
2124    /// the quantifier during instantiation. By default, pass the weight 0.
2125    /// - `num_bound`: number of constants to be abstracted into bound variables.
2126    /// - `bound`: array of constants to be abstracted into bound variables.
2127    /// - `num_patterns`: number of patterns.
2128    /// - `patterns`: array containing the patterns created using [`Z3_mk_pattern`].
2129    /// - `body`: the body of the quantifier.
2130    ///
2131    /// # See also
2132    ///
2133    /// - [`Z3_mk_pattern`]
2134    /// - [`Z3_mk_exists_const`]
2135    pub fn Z3_mk_forall_const(
2136        c: Z3_context,
2137        weight: ::core::ffi::c_uint,
2138        num_bound: ::core::ffi::c_uint,
2139        bound: *const Z3_app,
2140        num_patterns: ::core::ffi::c_uint,
2141        patterns: *const Z3_pattern,
2142        body: Z3_ast,
2143    ) -> Option<Z3_ast>;
2144    /// Similar to [`Z3_mk_forall_const`].
2145    ///
2146    /// Create an existential quantifier using a list of constants that
2147    /// will form the set of bound variables.
2148    ///
2149    /// - `c`: logical context.
2150    /// - `weight`: quantifiers are associated with weights indicating the importance of using
2151    /// the quantifier during instantiation. By default, pass the weight 0.
2152    /// - `num_bound`: number of constants to be abstracted into bound variables.
2153    /// - `bound`: array of constants to be abstracted into bound variables.
2154    /// - `num_patterns`: number of patterns.
2155    /// - `patterns`: array containing the patterns created using [`Z3_mk_pattern`].
2156    /// - `body`: the body of the quantifier.
2157    ///
2158    /// # See also
2159    ///
2160    /// - [`Z3_mk_pattern`]
2161    /// - [`Z3_mk_forall_const`]
2162    pub fn Z3_mk_exists_const(
2163        c: Z3_context,
2164        weight: ::core::ffi::c_uint,
2165        num_bound: ::core::ffi::c_uint,
2166        bound: *const Z3_app,
2167        num_patterns: ::core::ffi::c_uint,
2168        patterns: *const Z3_pattern,
2169        body: Z3_ast,
2170    ) -> Option<Z3_ast>;
2171    /// Create a universal or existential quantifier using a list of
2172    /// constants that will form the set of bound variables.
2173    pub fn Z3_mk_quantifier_const(
2174        c: Z3_context,
2175        is_forall: bool,
2176        weight: ::core::ffi::c_uint,
2177        num_bound: ::core::ffi::c_uint,
2178        bound: *const Z3_app,
2179        num_patterns: ::core::ffi::c_uint,
2180        patterns: *const Z3_pattern,
2181        body: Z3_ast,
2182    ) -> Option<Z3_ast>;
2183    /// Create a universal or existential quantifier using a list of
2184    /// constants that will form the set of bound variables.
2185    pub fn Z3_mk_quantifier_const_ex(
2186        c: Z3_context,
2187        is_forall: bool,
2188        weight: ::core::ffi::c_uint,
2189        quantifier_id: Z3_symbol,
2190        skolem_id: Z3_symbol,
2191        num_bound: ::core::ffi::c_uint,
2192        bound: *const Z3_app,
2193        num_patterns: ::core::ffi::c_uint,
2194        patterns: *const Z3_pattern,
2195        num_no_patterns: ::core::ffi::c_uint,
2196        no_patterns: *const Z3_ast,
2197        body: Z3_ast,
2198    ) -> Option<Z3_ast>;
2199    /// Create a lambda expression. It takes an expression `body` that contains bound variables
2200    /// of the same sorts as the sorts listed in the array `sorts`. The bound variables are de-Bruijn indices created
2201    /// using [`Z3_mk_bound`]. The array `decl_names` contains the names that the quantified formula uses for the
2202    /// bound variables. Z3 applies the convention that the last element in the `decl_names` and `sorts` array
2203    /// refers to the variable with index 0, the second to last element of `decl_names` and `sorts` refers
2204    /// to the variable with index 1, etc.
2205    /// The sort of the resulting expression is `(Array sorts range)` where `range` is the sort of `body`.
2206    /// For example, if the lambda binds two variables of sort `Int` and `Bool`, and the `body` has sort `Real`,
2207    /// the sort of the expression is `(Array Int Bool Real)`.
2208    ///
2209    /// - `c`: logical context
2210    /// - `num_decls`: number of variables to be bound.
2211    /// - `sorts`: the sorts of the bound variables.
2212    /// - `decl_names`: names of the bound variables
2213    /// - `body`: the body of the lambda expression.
2214    ///
2215    /// # See also
2216    ///
2217    /// - [`Z3_mk_bound`]
2218    /// - [`Z3_mk_forall`]
2219    /// - [`Z3_mk_lambda_const`]
2220    pub fn Z3_mk_lambda(
2221        c: Z3_context,
2222        num_decls: ::core::ffi::c_uint,
2223        sorts: *const Z3_sort,
2224        decl_names: *const Z3_symbol,
2225        body: Z3_ast,
2226    ) -> Option<Z3_ast>;
2227    /// Create a lambda expression using a list of constants that form the set
2228    /// of bound variables
2229    ///
2230    /// - `c`: logical context.
2231    /// - `num_bound`: number of constants to be abstracted into bound variables.
2232    /// - `bound`: array of constants to be abstracted into bound variables.
2233    /// - `body`: the body of the lambda expression.
2234    ///
2235    /// # See also
2236    ///
2237    /// - [`Z3_mk_bound`]
2238    /// - [`Z3_mk_forall`]
2239    /// - [`Z3_mk_lambda`]
2240    pub fn Z3_mk_lambda_const(
2241        c: Z3_context,
2242        num_bound: ::core::ffi::c_uint,
2243        bound: *const Z3_app,
2244        body: Z3_ast,
2245    ) -> Option<Z3_ast>;
2246    /// Return `Z3_INT_SYMBOL` if the symbol was constructed
2247    /// using [`Z3_mk_int_symbol`], and `Z3_STRING_SYMBOL` if the symbol
2248    /// was constructed using [`Z3_mk_string_symbol`].
2249    pub fn Z3_get_symbol_kind(c: Z3_context, s: Z3_symbol) -> Z3_symbol_kind;
2250    /// Return the symbol int value.
2251    ///
2252    /// # Preconditions
2253    ///
2254    /// - `Z3_get_symbol_kind(s) == Z3_INT_SYMBOL`
2255    ///
2256    /// # See also
2257    ///
2258    /// - [`Z3_mk_int_symbol`]
2259    pub fn Z3_get_symbol_int(c: Z3_context, s: Z3_symbol) -> ::core::ffi::c_int;
2260    /// Return the symbol name.
2261    ///
2262    ///
2263    /// \warning The returned buffer is statically allocated by Z3. It will
2264    /// be automatically deallocated when [`Z3_del_context`] is invoked.
2265    /// So, the buffer is invalidated in the next call to `Z3_get_symbol_string`.
2266    ///
2267    /// # Preconditions
2268    ///
2269    /// - `Z3_get_symbol_kind(s) == Z3_STRING_SYMBOL`
2270    ///
2271    /// # See also
2272    ///
2273    /// - [`Z3_mk_string_symbol`]
2274    pub fn Z3_get_symbol_string(c: Z3_context, s: Z3_symbol) -> Z3_string;
2275    /// Return the sort name as a symbol.
2276    pub fn Z3_get_sort_name(c: Z3_context, d: Z3_sort) -> Option<Z3_symbol>;
2277    /// Return a unique identifier for `s`.
2278    pub fn Z3_get_sort_id(c: Z3_context, s: Z3_sort) -> ::core::ffi::c_uint;
2279    /// Convert a `Z3_sort` into `Z3_ast`. This is just type casting.
2280    pub fn Z3_sort_to_ast(c: Z3_context, s: Z3_sort) -> Option<Z3_ast>;
2281    /// compare sorts.
2282    pub fn Z3_is_eq_sort(c: Z3_context, s1: Z3_sort, s2: Z3_sort) -> bool;
2283    /// Return the sort kind (e.g., array, tuple, int, bool, etc).
2284    ///
2285    /// # See also
2286    ///
2287    /// - [`Z3_sort_kind`]
2288    pub fn Z3_get_sort_kind(c: Z3_context, t: Z3_sort) -> Z3_sort_kind;
2289    /// Return the size of the given bit-vector sort.
2290    ///
2291    /// # Preconditions
2292    ///
2293    /// - `Z3_get_sort_kind(c, t) == Z3_BV_SORT`
2294    ///
2295    /// # See also
2296    ///
2297    /// - [`Z3_mk_bv_sort`]
2298    /// - [`Z3_get_sort_kind`]
2299    pub fn Z3_get_bv_sort_size(c: Z3_context, t: Z3_sort) -> ::core::ffi::c_uint;
2300    /// Store the size of the sort in `r`. Return `false` if the call failed.
2301    /// That is, Z3_get_sort_kind(s) == Z3_FINITE_DOMAIN_SORT
2302    pub fn Z3_get_finite_domain_sort_size(
2303        c: Z3_context,
2304        s: Z3_sort,
2305        r: *mut u64,
2306    ) -> bool;
2307    /// Return the arity (number of dimensions) of the given array sort.
2308    ///
2309    /// # Preconditions
2310    ///
2311    /// - `Z3_get_sort_kind(s) == Z3_ARRAY_SORT`
2312    ///
2313    /// # See also
2314    ///
2315    /// - [`Z3_get_array_sort_domain_n`]
2316    pub fn Z3_get_array_arity(c: Z3_context, s: Z3_sort) -> ::core::ffi::c_uint;
2317    /// Return the domain of the given array sort.
2318    /// In the case of a multi-dimensional array, this function returns the sort of the first dimension.
2319    ///
2320    /// # Preconditions
2321    ///
2322    /// - `Z3_get_sort_kind(c, t) == Z3_ARRAY_SORT`
2323    ///
2324    /// # See also
2325    ///
2326    /// - [`Z3_mk_array_sort`]
2327    /// - [`Z3_get_sort_kind`]
2328    /// - [`Z3_get_array_sort_domain_n`]
2329    pub fn Z3_get_array_sort_domain(c: Z3_context, t: Z3_sort) -> Option<Z3_sort>;
2330    /// Return the i'th domain sort of an n-dimensional array.
2331    ///
2332    /// # Preconditions
2333    ///
2334    /// - `Z3_get_sort_kind(c, t) == Z3_ARRAY_SORT`
2335    ///
2336    /// # See also
2337    ///
2338    /// - [`Z3_mk_array_sort`]
2339    /// - [`Z3_get_sort_kind`]
2340    /// - [`Z3_get_array_sort_domain`]
2341    pub fn Z3_get_array_sort_domain_n(
2342        c: Z3_context,
2343        t: Z3_sort,
2344        idx: ::core::ffi::c_uint,
2345    ) -> Option<Z3_sort>;
2346    /// Return the range of the given array sort.
2347    ///
2348    /// # Preconditions
2349    ///
2350    /// - `Z3_get_sort_kind(c, t) == Z3_ARRAY_SORT`
2351    ///
2352    /// # See also
2353    ///
2354    /// - [`Z3_mk_array_sort`]
2355    /// - [`Z3_get_sort_kind`]
2356    pub fn Z3_get_array_sort_range(c: Z3_context, t: Z3_sort) -> Option<Z3_sort>;
2357    /// Return the constructor declaration of the given tuple
2358    /// sort.
2359    ///
2360    /// # Preconditions
2361    ///
2362    /// - `Z3_get_sort_kind(c, t) == Z3_DATATYPE_SORT`
2363    ///
2364    /// # See also
2365    ///
2366    /// - [`Z3_mk_tuple_sort`]
2367    /// - [`Z3_get_sort_kind`]
2368    pub fn Z3_get_tuple_sort_mk_decl(c: Z3_context, t: Z3_sort) -> Option<Z3_func_decl>;
2369    /// Return the number of fields of the given tuple sort.
2370    ///
2371    /// # Preconditions
2372    ///
2373    /// - `Z3_get_sort_kind(c, t) == Z3_DATATYPE_SORT`
2374    ///
2375    /// # See also
2376    ///
2377    /// - [`Z3_mk_tuple_sort`]
2378    /// - [`Z3_get_sort_kind`]
2379    pub fn Z3_get_tuple_sort_num_fields(
2380        c: Z3_context,
2381        t: Z3_sort,
2382    ) -> ::core::ffi::c_uint;
2383    /// Return the i-th field declaration (i.e., projection function declaration)
2384    /// of the given tuple sort.
2385    ///
2386    /// # Preconditions
2387    ///
2388    /// - `Z3_get_sort_kind(t) == Z3_DATATYPE_SORT`
2389    /// - `i < Z3_get_tuple_sort_num_fields(c, t)`
2390    ///
2391    /// # See also
2392    ///
2393    /// - [`Z3_mk_tuple_sort`]
2394    /// - [`Z3_get_sort_kind`]
2395    pub fn Z3_get_tuple_sort_field_decl(
2396        c: Z3_context,
2397        t: Z3_sort,
2398        i: ::core::ffi::c_uint,
2399    ) -> Option<Z3_func_decl>;
2400    /// Check if `s` is a recursive datatype sort.
2401    pub fn Z3_is_recursive_datatype_sort(c: Z3_context, s: Z3_sort) -> bool;
2402    /// Return number of constructors for datatype.
2403    ///
2404    /// # Preconditions
2405    ///
2406    /// - `Z3_get_sort_kind(t) == Z3_DATATYPE_SORT`
2407    ///
2408    /// # See also
2409    ///
2410    /// - [`Z3_get_datatype_sort_constructor`]
2411    /// - [`Z3_get_datatype_sort_recognizer`]
2412    /// - [`Z3_get_datatype_sort_constructor_accessor`]
2413    pub fn Z3_get_datatype_sort_num_constructors(
2414        c: Z3_context,
2415        t: Z3_sort,
2416    ) -> ::core::ffi::c_uint;
2417    /// Return idx'th constructor.
2418    ///
2419    /// # Preconditions
2420    ///
2421    /// - `Z3_get_sort_kind(t) == Z3_DATATYPE_SORT`
2422    /// - `idx < Z3_get_datatype_sort_num_constructors(c, t)`
2423    ///
2424    /// # See also
2425    ///
2426    /// - [`Z3_get_datatype_sort_num_constructors`]
2427    /// - [`Z3_get_datatype_sort_recognizer`]
2428    /// - [`Z3_get_datatype_sort_constructor_accessor`]
2429    pub fn Z3_get_datatype_sort_constructor(
2430        c: Z3_context,
2431        t: Z3_sort,
2432        idx: ::core::ffi::c_uint,
2433    ) -> Option<Z3_func_decl>;
2434    /// Return idx'th recognizer.
2435    ///
2436    /// # Preconditions
2437    ///
2438    /// - `Z3_get_sort_kind(t) == Z3_DATATYPE_SORT`
2439    /// - `idx < Z3_get_datatype_sort_num_constructors(c, t)`
2440    ///
2441    /// # See also
2442    ///
2443    /// - [`Z3_get_datatype_sort_num_constructors`]
2444    /// - [`Z3_get_datatype_sort_constructor`]
2445    /// - [`Z3_get_datatype_sort_constructor_accessor`]
2446    pub fn Z3_get_datatype_sort_recognizer(
2447        c: Z3_context,
2448        t: Z3_sort,
2449        idx: ::core::ffi::c_uint,
2450    ) -> Option<Z3_func_decl>;
2451    /// Return idx_a'th accessor for the idx_c'th constructor.
2452    ///
2453    /// # Preconditions
2454    ///
2455    /// - `Z3_get_sort_kind(t) == Z3_DATATYPE_SORT`
2456    /// - `idx_c < Z3_get_datatype_sort_num_constructors(c, t)`
2457    /// - `idx_a < Z3_get_domain_size(c, Z3_get_datatype_sort_constructor(c, idx_c))`
2458    ///
2459    /// # See also
2460    ///
2461    /// - [`Z3_get_datatype_sort_num_constructors`]
2462    /// - [`Z3_get_datatype_sort_constructor`]
2463    /// - [`Z3_get_datatype_sort_recognizer`]
2464    pub fn Z3_get_datatype_sort_constructor_accessor(
2465        c: Z3_context,
2466        t: Z3_sort,
2467        idx_c: ::core::ffi::c_uint,
2468        idx_a: ::core::ffi::c_uint,
2469    ) -> Option<Z3_func_decl>;
2470    /// Update record field with a value.
2471    ///
2472    /// This corresponds to the 'with' construct in OCaml.
2473    /// It has the effect of updating a record field with a given value.
2474    /// The remaining fields are left unchanged. It is the record
2475    /// equivalent of an array store (see \sa Z3_mk_store).
2476    /// If the datatype has more than one constructor, then the update function
2477    /// behaves as identity if there is a mismatch between the accessor and
2478    /// constructor. For example ((_ update-field car) nil 1) is nil,
2479    /// while ((_ update-field car) (cons 2 nil) 1) is (cons 1 nil).
2480    ///
2481    /// # Preconditions
2482    ///
2483    /// - `Z3_get_sort_kind(Z3_get_sort(c, t)) == Z3_get_domain(c, field_access, 1) == Z3_DATATYPE_SORT`
2484    /// - `Z3_get_sort(c, value) == Z3_get_range(c, field_access)`
2485    pub fn Z3_datatype_update_field(
2486        c: Z3_context,
2487        field_access: Z3_func_decl,
2488        t: Z3_ast,
2489        value: Z3_ast,
2490    ) -> Option<Z3_ast>;
2491    /// Return arity of relation.
2492    ///
2493    /// # Preconditions
2494    ///
2495    /// - `Z3_get_sort_kind(s) == Z3_RELATION_SORT`
2496    ///
2497    /// # See also
2498    ///
2499    /// - [`Z3_get_relation_column`]
2500    pub fn Z3_get_relation_arity(c: Z3_context, s: Z3_sort) -> ::core::ffi::c_uint;
2501    /// Return sort at i'th column of relation sort.
2502    ///
2503    /// # Preconditions
2504    ///
2505    /// - `Z3_get_sort_kind(c, s) == Z3_RELATION_SORT`
2506    /// - `col < Z3_get_relation_arity(c, s)`
2507    ///
2508    /// # See also
2509    ///
2510    /// - [`Z3_get_relation_arity`]
2511    pub fn Z3_get_relation_column(
2512        c: Z3_context,
2513        s: Z3_sort,
2514        col: ::core::ffi::c_uint,
2515    ) -> Option<Z3_sort>;
2516    /// Pseudo-Boolean relations.
2517    ///
2518    /// Encode p1 + p2 + ... + pn <= k
2519    pub fn Z3_mk_atmost(
2520        c: Z3_context,
2521        num_args: ::core::ffi::c_uint,
2522        args: *const Z3_ast,
2523        k: ::core::ffi::c_uint,
2524    ) -> Option<Z3_ast>;
2525    /// Pseudo-Boolean relations.
2526    ///
2527    /// Encode p1 + p2 + ... + pn >= k
2528    pub fn Z3_mk_atleast(
2529        c: Z3_context,
2530        num_args: ::core::ffi::c_uint,
2531        args: *const Z3_ast,
2532        k: ::core::ffi::c_uint,
2533    ) -> Option<Z3_ast>;
2534    /// Pseudo-Boolean relations.
2535    ///
2536    /// Encode k1*p1 + k2*p2 + ... + kn*pn <= k
2537    pub fn Z3_mk_pble(
2538        c: Z3_context,
2539        num_args: ::core::ffi::c_uint,
2540        args: *const Z3_ast,
2541        coeffs: *const ::core::ffi::c_int,
2542        k: ::core::ffi::c_int,
2543    ) -> Option<Z3_ast>;
2544    /// Pseudo-Boolean relations.
2545    ///
2546    /// Encode k1*p1 + k2*p2 + ... + kn*pn >= k
2547    pub fn Z3_mk_pbge(
2548        c: Z3_context,
2549        num_args: ::core::ffi::c_uint,
2550        args: *const Z3_ast,
2551        coeffs: *const ::core::ffi::c_int,
2552        k: ::core::ffi::c_int,
2553    ) -> Option<Z3_ast>;
2554    /// Pseudo-Boolean relations.
2555    ///
2556    /// Encode k1*p1 + k2*p2 + ... + kn*pn = k
2557    pub fn Z3_mk_pbeq(
2558        c: Z3_context,
2559        num_args: ::core::ffi::c_uint,
2560        args: *const Z3_ast,
2561        coeffs: *const ::core::ffi::c_int,
2562        k: ::core::ffi::c_int,
2563    ) -> Option<Z3_ast>;
2564    /// Convert a `Z3_func_decl` into `Z3_ast`. This is just type casting.
2565    pub fn Z3_func_decl_to_ast(c: Z3_context, f: Z3_func_decl) -> Option<Z3_ast>;
2566    /// Compare terms.
2567    pub fn Z3_is_eq_func_decl(c: Z3_context, f1: Z3_func_decl, f2: Z3_func_decl) -> bool;
2568    /// Return a unique identifier for `f`.
2569    pub fn Z3_get_func_decl_id(c: Z3_context, f: Z3_func_decl) -> ::core::ffi::c_uint;
2570    /// Return the constant declaration name as a symbol.
2571    pub fn Z3_get_decl_name(c: Z3_context, d: Z3_func_decl) -> Option<Z3_symbol>;
2572    /// Return declaration kind corresponding to declaration.
2573    pub fn Z3_get_decl_kind(c: Z3_context, d: Z3_func_decl) -> Z3_decl_kind;
2574    /// Return the number of parameters of the given declaration.
2575    ///
2576    /// # See also
2577    ///
2578    /// - [`Z3_get_arity`]
2579    pub fn Z3_get_domain_size(c: Z3_context, d: Z3_func_decl) -> ::core::ffi::c_uint;
2580    /// Alias for `Z3_get_domain_size`.
2581    ///
2582    /// # See also
2583    ///
2584    /// - [`Z3_get_domain_size`]
2585    pub fn Z3_get_arity(c: Z3_context, d: Z3_func_decl) -> ::core::ffi::c_uint;
2586    /// Return the sort of the i-th parameter of the given function declaration.
2587    ///
2588    /// # Preconditions
2589    ///
2590    /// - `i < Z3_get_domain_size(d)`
2591    ///
2592    /// # See also
2593    ///
2594    /// - [`Z3_get_domain_size`]
2595    pub fn Z3_get_domain(
2596        c: Z3_context,
2597        d: Z3_func_decl,
2598        i: ::core::ffi::c_uint,
2599    ) -> Option<Z3_sort>;
2600    /// Return the range of the given declaration.
2601    ///
2602    /// If `d` is a constant (i.e., has zero arguments), then this
2603    /// function returns the sort of the constant.
2604    pub fn Z3_get_range(c: Z3_context, d: Z3_func_decl) -> Option<Z3_sort>;
2605    /// Return the number of parameters associated with a declaration.
2606    pub fn Z3_get_decl_num_parameters(
2607        c: Z3_context,
2608        d: Z3_func_decl,
2609    ) -> ::core::ffi::c_uint;
2610    /// Return the parameter type associated with a declaration.
2611    ///
2612    /// - `c`: the context
2613    /// - `d`: the function declaration
2614    /// - `idx`: is the index of the named parameter it should be between 0 and the number of parameters.
2615    pub fn Z3_get_decl_parameter_kind(
2616        c: Z3_context,
2617        d: Z3_func_decl,
2618        idx: ::core::ffi::c_uint,
2619    ) -> Z3_parameter_kind;
2620    /// Return the integer value associated with an integer parameter.
2621    ///
2622    /// # Preconditions
2623    ///
2624    /// - `Z3_get_decl_parameter_kind(c, d, idx) == Z3_PARAMETER_INT`
2625    pub fn Z3_get_decl_int_parameter(
2626        c: Z3_context,
2627        d: Z3_func_decl,
2628        idx: ::core::ffi::c_uint,
2629    ) -> ::core::ffi::c_int;
2630    /// Return the double value associated with an double parameter.
2631    ///
2632    /// # Preconditions
2633    ///
2634    /// - `Z3_get_decl_parameter_kind(c, d, idx) == Z3_PARAMETER_DOUBLE`
2635    pub fn Z3_get_decl_double_parameter(
2636        c: Z3_context,
2637        d: Z3_func_decl,
2638        idx: ::core::ffi::c_uint,
2639    ) -> f64;
2640    /// Return the double value associated with an double parameter.
2641    ///
2642    /// # Preconditions
2643    ///
2644    /// - `Z3_get_decl_parameter_kind(c, d, idx) == Z3_PARAMETER_SYMBOL`
2645    pub fn Z3_get_decl_symbol_parameter(
2646        c: Z3_context,
2647        d: Z3_func_decl,
2648        idx: ::core::ffi::c_uint,
2649    ) -> Option<Z3_symbol>;
2650    /// Return the sort value associated with a sort parameter.
2651    ///
2652    /// # Preconditions
2653    ///
2654    /// - `Z3_get_decl_parameter_kind(c, d, idx) == Z3_PARAMETER_SORT`
2655    pub fn Z3_get_decl_sort_parameter(
2656        c: Z3_context,
2657        d: Z3_func_decl,
2658        idx: ::core::ffi::c_uint,
2659    ) -> Option<Z3_sort>;
2660    /// Return the expression value associated with an expression parameter.
2661    ///
2662    /// # Preconditions
2663    ///
2664    /// - `Z3_get_decl_parameter_kind(c, d, idx) == Z3_PARAMETER_AST`
2665    pub fn Z3_get_decl_ast_parameter(
2666        c: Z3_context,
2667        d: Z3_func_decl,
2668        idx: ::core::ffi::c_uint,
2669    ) -> Option<Z3_ast>;
2670    /// Return the expression value associated with an expression parameter.
2671    ///
2672    /// # Preconditions
2673    ///
2674    /// - `Z3_get_decl_parameter_kind(c, d, idx) == Z3_PARAMETER_FUNC_DECL`
2675    pub fn Z3_get_decl_func_decl_parameter(
2676        c: Z3_context,
2677        d: Z3_func_decl,
2678        idx: ::core::ffi::c_uint,
2679    ) -> Option<Z3_func_decl>;
2680    /// Return the rational value, as a string, associated with a rational parameter.
2681    ///
2682    /// # Preconditions
2683    ///
2684    /// - `Z3_get_decl_parameter_kind(c, d, idx) == Z3_PARAMETER_RATIONAL`
2685    pub fn Z3_get_decl_rational_parameter(
2686        c: Z3_context,
2687        d: Z3_func_decl,
2688        idx: ::core::ffi::c_uint,
2689    ) -> Z3_string;
2690    /// Convert a `Z3_app` into `Z3_ast`. This is just type casting.
2691    pub fn Z3_app_to_ast(c: Z3_context, a: Z3_app) -> Option<Z3_ast>;
2692    /// Return the declaration of a constant or function application.
2693    pub fn Z3_get_app_decl(c: Z3_context, a: Z3_app) -> Option<Z3_func_decl>;
2694    /// Return the number of argument of an application. If `t`
2695    /// is an constant, then the number of arguments is 0.
2696    ///
2697    /// # See also
2698    ///
2699    /// - [`Z3_get_app_arg`]
2700    pub fn Z3_get_app_num_args(c: Z3_context, a: Z3_app) -> ::core::ffi::c_uint;
2701    /// Return the i-th argument of the given application.
2702    ///
2703    /// # Preconditions
2704    ///
2705    /// - `i < Z3_get_app_num_args(c, a)`
2706    ///
2707    /// # See also
2708    ///
2709    /// - [`Z3_get_app_num_args`]
2710    pub fn Z3_get_app_arg(
2711        c: Z3_context,
2712        a: Z3_app,
2713        i: ::core::ffi::c_uint,
2714    ) -> Option<Z3_ast>;
2715    /// Compare terms.
2716    pub fn Z3_is_eq_ast(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> bool;
2717    /// Return a unique identifier for `t`.
2718    /// The identifier is unique up to structural equality. Thus, two ast nodes
2719    /// created by the same context and having the same children and same function symbols
2720    /// have the same identifiers. Ast nodes created in the same context, but having
2721    /// different children or different functions have different identifiers.
2722    /// Variables and quantifiers are also assigned different identifiers according to
2723    /// their structure.
2724    pub fn Z3_get_ast_id(c: Z3_context, t: Z3_ast) -> ::core::ffi::c_uint;
2725    /// Return a hash code for the given AST.
2726    /// The hash code is structural but two different AST objects can map to the same hash.
2727    /// The result of `Z3_get_ast_id` returns an identifier that is unique over the
2728    /// set of live AST objects.
2729    pub fn Z3_get_ast_hash(c: Z3_context, a: Z3_ast) -> ::core::ffi::c_uint;
2730    /// Return the sort of an AST node.
2731    ///
2732    /// The AST node must be a constant, application, numeral, bound variable, or quantifier.
2733    pub fn Z3_get_sort(c: Z3_context, a: Z3_ast) -> Option<Z3_sort>;
2734    /// Return `true` if the given expression `t` is well sorted.
2735    pub fn Z3_is_well_sorted(c: Z3_context, t: Z3_ast) -> bool;
2736    /// Return `Z3_L_TRUE` if `a` is true, `Z3_L_FALSE` if it is false, and `Z3_L_UNDEF` otherwise.
2737    pub fn Z3_get_bool_value(c: Z3_context, a: Z3_ast) -> Z3_lbool;
2738    /// Return the kind of the given AST.
2739    pub fn Z3_get_ast_kind(c: Z3_context, a: Z3_ast) -> Z3_ast_kind;
2740    pub fn Z3_is_app(c: Z3_context, a: Z3_ast) -> bool;
2741    pub fn Z3_is_ground(c: Z3_context, a: Z3_ast) -> bool;
2742    pub fn Z3_get_depth(c: Z3_context, a: Z3_ast) -> ::core::ffi::c_uint;
2743    pub fn Z3_is_numeral_ast(c: Z3_context, a: Z3_ast) -> bool;
2744    /// Return `true` if the given AST is a real algebraic number.
2745    pub fn Z3_is_algebraic_number(c: Z3_context, a: Z3_ast) -> bool;
2746    /// Convert an `ast` into an `APP_AST`. This is just type casting.
2747    ///
2748    /// # Preconditions
2749    ///
2750    /// - ``Z3_get_ast_kind(c, a) == `Z3_APP_AST```
2751    pub fn Z3_to_app(c: Z3_context, a: Z3_ast) -> Option<Z3_app>;
2752    /// Convert an AST into a FUNC_DECL_AST. This is just type casting.
2753    ///
2754    /// # Preconditions
2755    ///
2756    /// - ``Z3_get_ast_kind(c, a) == Z3_FUNC_DECL_AST``
2757    pub fn Z3_to_func_decl(c: Z3_context, a: Z3_ast) -> Option<Z3_func_decl>;
2758    /// Return numeral value, as a decimal string of a numeric constant term
2759    ///
2760    /// # Preconditions
2761    ///
2762    /// - `Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST`
2763    pub fn Z3_get_numeral_string(c: Z3_context, a: Z3_ast) -> Z3_string;
2764    /// Return numeral value, as a binary string of a numeric constant term
2765    ///
2766    /// # Preconditions
2767    ///
2768    /// - `Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST`
2769    /// - `a represents a non-negative integer`
2770    pub fn Z3_get_numeral_binary_string(c: Z3_context, a: Z3_ast) -> Z3_string;
2771    /// Return numeral as a string in decimal notation.
2772    /// The result has at most `precision` decimal places.
2773    ///
2774    /// # Preconditions
2775    ///
2776    /// - `Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST || Z3_is_algebraic_number(c, a)`
2777    pub fn Z3_get_numeral_decimal_string(
2778        c: Z3_context,
2779        a: Z3_ast,
2780        precision: ::core::ffi::c_uint,
2781    ) -> Z3_string;
2782    /// Return numeral as a double.
2783    ///
2784    /// # Preconditions
2785    ///
2786    /// - `Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST || Z3_is_algebraic_number(c, a)`
2787    pub fn Z3_get_numeral_double(c: Z3_context, a: Z3_ast) -> f64;
2788    /// Return the numerator (as a numeral AST) of a numeral AST of sort Real.
2789    ///
2790    /// # Preconditions
2791    ///
2792    /// - `Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST`
2793    pub fn Z3_get_numerator(c: Z3_context, a: Z3_ast) -> Option<Z3_ast>;
2794    /// Return the denominator (as a numeral AST) of a numeral AST of sort Real.
2795    ///
2796    /// # Preconditions
2797    ///
2798    /// - `Z3_get_ast_kind(c, a) == Z3_NUMERAL_AST`
2799    pub fn Z3_get_denominator(c: Z3_context, a: Z3_ast) -> Option<Z3_ast>;
2800    /// Return numeral value, as a pair of 64 bit numbers if the representation fits.
2801    ///
2802    /// - `c`: logical context.
2803    /// - `a`: term.
2804    /// - `num`: numerator.
2805    /// - `den`: denominator.
2806    ///
2807    /// Return `true` if the numeral value fits in 64 bit numerals, `false` otherwise.
2808    ///
2809    /// Equivalent to `Z3_get_numeral_rational_int64` except that for unsupported expression arguments `Z3_get_numeral_small` signals an error while `Z3_get_numeral_rational_int64` returns `false`.
2810    ///
2811    /// # Preconditions
2812    ///
2813    /// - `Z3_get_ast_kind(a) == Z3_NUMERAL_AST`
2814    pub fn Z3_get_numeral_small(
2815        c: Z3_context,
2816        a: Z3_ast,
2817        num: *mut i64,
2818        den: *mut i64,
2819    ) -> bool;
2820    /// Similar to [`Z3_get_numeral_string`], but only succeeds if
2821    /// the value can fit in a machine int. Return `true` if the call succeeded.
2822    ///
2823    /// # Preconditions
2824    ///
2825    /// - `Z3_get_ast_kind(c, v) == Z3_NUMERAL_AST`
2826    ///
2827    /// # See also
2828    ///
2829    /// - [`Z3_get_numeral_string`]
2830    pub fn Z3_get_numeral_int(
2831        c: Z3_context,
2832        v: Z3_ast,
2833        i: *mut ::core::ffi::c_int,
2834    ) -> bool;
2835    /// Similar to [`Z3_get_numeral_string`], but only succeeds if
2836    /// the value can fit in a machine unsigned int. Return `true` if the call succeeded.
2837    ///
2838    /// # Preconditions
2839    ///
2840    /// - `Z3_get_ast_kind(c, v) == Z3_NUMERAL_AST`
2841    ///
2842    /// # See also
2843    ///
2844    /// - [`Z3_get_numeral_string`]
2845    pub fn Z3_get_numeral_uint(
2846        c: Z3_context,
2847        v: Z3_ast,
2848        u: *mut ::core::ffi::c_uint,
2849    ) -> bool;
2850    /// Similar to [`Z3_get_numeral_string`], but only succeeds if
2851    /// the value can fit in a machine `uint64_t` int. Return `true` if the call succeeded.
2852    ///
2853    /// # Preconditions
2854    ///
2855    /// - `Z3_get_ast_kind(c, v) == Z3_NUMERAL_AST`
2856    ///
2857    /// # See also
2858    ///
2859    /// - [`Z3_get_numeral_string`]
2860    pub fn Z3_get_numeral_uint64(c: Z3_context, v: Z3_ast, u: *mut u64) -> bool;
2861    /// Similar to [`Z3_get_numeral_string`], but only succeeds if
2862    /// the value can fit in a machine `int64_t` int. Return `true` if the call succeeded.
2863    ///
2864    /// # Preconditions
2865    ///
2866    /// - `Z3_get_ast_kind(c, v) == Z3_NUMERAL_AST`
2867    ///
2868    /// # See also
2869    ///
2870    /// - [`Z3_get_numeral_string`]
2871    pub fn Z3_get_numeral_int64(c: Z3_context, v: Z3_ast, i: *mut i64) -> bool;
2872    /// Similar to [`Z3_get_numeral_string`], but only succeeds if
2873    /// the value can fit as a rational number as machine `int64_t` int. Return `true` if the call succeeded.
2874    ///
2875    /// # Preconditions
2876    ///
2877    /// - `Z3_get_ast_kind(c, v) == Z3_NUMERAL_AST`
2878    ///
2879    /// # See also
2880    ///
2881    /// - [`Z3_get_numeral_string`]
2882    pub fn Z3_get_numeral_rational_int64(
2883        c: Z3_context,
2884        v: Z3_ast,
2885        num: *mut i64,
2886        den: *mut i64,
2887    ) -> bool;
2888    /// Return a lower bound for the given real algebraic number.
2889    /// The interval isolating the number is smaller than 1/10^precision.
2890    /// The result is a numeral AST of sort Real.
2891    ///
2892    /// # Preconditions
2893    ///
2894    /// - `Z3_is_algebraic_number(c, a)`
2895    pub fn Z3_get_algebraic_number_lower(
2896        c: Z3_context,
2897        a: Z3_ast,
2898        precision: ::core::ffi::c_uint,
2899    ) -> Option<Z3_ast>;
2900    /// Return a upper bound for the given real algebraic number.
2901    /// The interval isolating the number is smaller than 1/10^precision.
2902    /// The result is a numeral AST of sort Real.
2903    ///
2904    /// # Preconditions
2905    ///
2906    /// - `Z3_is_algebraic_number(c, a)`
2907    pub fn Z3_get_algebraic_number_upper(
2908        c: Z3_context,
2909        a: Z3_ast,
2910        precision: ::core::ffi::c_uint,
2911    ) -> Option<Z3_ast>;
2912    /// Convert a Z3_pattern into Z3_ast. This is just type casting.
2913    pub fn Z3_pattern_to_ast(c: Z3_context, p: Z3_pattern) -> Option<Z3_ast>;
2914    /// Return number of terms in pattern.
2915    pub fn Z3_get_pattern_num_terms(c: Z3_context, p: Z3_pattern) -> ::core::ffi::c_uint;
2916    /// Return i'th ast in pattern.
2917    pub fn Z3_get_pattern(
2918        c: Z3_context,
2919        p: Z3_pattern,
2920        idx: ::core::ffi::c_uint,
2921    ) -> Option<Z3_ast>;
2922    /// Return index of de-Bruijn bound variable.
2923    ///
2924    /// # Preconditions
2925    ///
2926    /// - `Z3_get_ast_kind(a) == Z3_VAR_AST`
2927    pub fn Z3_get_index_value(c: Z3_context, a: Z3_ast) -> ::core::ffi::c_uint;
2928    /// Determine if an ast is a universal quantifier.
2929    pub fn Z3_is_quantifier_forall(c: Z3_context, a: Z3_ast) -> bool;
2930    /// Determine if ast is an existential quantifier.
2931    pub fn Z3_is_quantifier_exists(c: Z3_context, a: Z3_ast) -> bool;
2932    /// Determine if ast is a lambda expression.
2933    ///
2934    /// # Preconditions
2935    ///
2936    /// - `Z3_get_ast_kind(a) == Z3_QUANTIFIER_AST`
2937    pub fn Z3_is_lambda(c: Z3_context, a: Z3_ast) -> bool;
2938    /// Obtain weight of quantifier.
2939    ///
2940    /// # Preconditions
2941    ///
2942    /// - `Z3_get_ast_kind(a) == Z3_QUANTIFIER_AST`
2943    pub fn Z3_get_quantifier_weight(c: Z3_context, a: Z3_ast) -> ::core::ffi::c_uint;
2944    /// Obtain skolem id of quantifier.
2945    ///
2946    /// # Preconditions
2947    ///
2948    /// - `Z3_get_ast_kind(a) == Z3_QUANTIFIER_AST`
2949    pub fn Z3_get_quantifier_skolem_id(c: Z3_context, a: Z3_ast) -> Option<Z3_symbol>;
2950    /// Obtain id of quantifier.
2951    ///
2952    /// # Preconditions
2953    ///
2954    /// - `Z3_get_ast_kind(a) == Z3_QUANTIFIER_AST`
2955    pub fn Z3_get_quantifier_id(c: Z3_context, a: Z3_ast) -> Option<Z3_symbol>;
2956    /// Return number of patterns used in quantifier.
2957    ///
2958    /// # Preconditions
2959    ///
2960    /// - `Z3_get_ast_kind(a) == Z3_QUANTIFIER_AST`
2961    pub fn Z3_get_quantifier_num_patterns(
2962        c: Z3_context,
2963        a: Z3_ast,
2964    ) -> ::core::ffi::c_uint;
2965    /// Return i'th pattern.
2966    ///
2967    /// # Preconditions
2968    ///
2969    /// - `Z3_get_ast_kind(a) == Z3_QUANTIFIER_AST`
2970    pub fn Z3_get_quantifier_pattern_ast(
2971        c: Z3_context,
2972        a: Z3_ast,
2973        i: ::core::ffi::c_uint,
2974    ) -> Option<Z3_pattern>;
2975    /// Return number of no_patterns used in quantifier.
2976    ///
2977    /// # Preconditions
2978    ///
2979    /// - `Z3_get_ast_kind(a) == Z3_QUANTIFIER_AST`
2980    pub fn Z3_get_quantifier_num_no_patterns(
2981        c: Z3_context,
2982        a: Z3_ast,
2983    ) -> ::core::ffi::c_uint;
2984    /// Return i'th no_pattern.
2985    ///
2986    /// # Preconditions
2987    ///
2988    /// - `Z3_get_ast_kind(a) == Z3_QUANTIFIER_AST`
2989    pub fn Z3_get_quantifier_no_pattern_ast(
2990        c: Z3_context,
2991        a: Z3_ast,
2992        i: ::core::ffi::c_uint,
2993    ) -> Option<Z3_ast>;
2994    /// Return number of bound variables of quantifier.
2995    ///
2996    /// # Preconditions
2997    ///
2998    /// - `Z3_get_ast_kind(a) == Z3_QUANTIFIER_AST`
2999    pub fn Z3_get_quantifier_num_bound(c: Z3_context, a: Z3_ast) -> ::core::ffi::c_uint;
3000    /// Return symbol of the i'th bound variable.
3001    ///
3002    /// # Preconditions
3003    ///
3004    /// - `Z3_get_ast_kind(a) == Z3_QUANTIFIER_AST`
3005    pub fn Z3_get_quantifier_bound_name(
3006        c: Z3_context,
3007        a: Z3_ast,
3008        i: ::core::ffi::c_uint,
3009    ) -> Option<Z3_symbol>;
3010    /// Return sort of the i'th bound variable.
3011    ///
3012    /// # Preconditions
3013    ///
3014    /// - `Z3_get_ast_kind(a) == Z3_QUANTIFIER_AST`
3015    pub fn Z3_get_quantifier_bound_sort(
3016        c: Z3_context,
3017        a: Z3_ast,
3018        i: ::core::ffi::c_uint,
3019    ) -> Option<Z3_sort>;
3020    /// Return body of quantifier.
3021    ///
3022    /// # Preconditions
3023    ///
3024    /// - `Z3_get_ast_kind(a) == Z3_QUANTIFIER_AST`
3025    pub fn Z3_get_quantifier_body(c: Z3_context, a: Z3_ast) -> Option<Z3_ast>;
3026    /// Interface to simplifier.
3027    ///
3028    /// Provides an interface to the AST simplifier used by Z3.
3029    /// It returns an AST object which is equal to the argument.
3030    /// The returned AST is simplified using algebraic simplification rules,
3031    /// such as constant propagation (propagating true/false over logical connectives).
3032    ///
3033    /// # See also
3034    ///
3035    /// - [`Z3_simplify_ex`]
3036    pub fn Z3_simplify(c: Z3_context, a: Z3_ast) -> Option<Z3_ast>;
3037    /// Interface to simplifier.
3038    ///
3039    /// Provides an interface to the AST simplifier used by Z3.
3040    /// This procedure is similar to [`Z3_simplify`], but the behavior of the simplifier
3041    /// can be configured using the given parameter set.
3042    ///
3043    /// # See also
3044    ///
3045    /// - [`Z3_simplify`]
3046    /// - [`Z3_simplify_get_help`]
3047    /// - [`Z3_simplify_get_param_descrs`]
3048    pub fn Z3_simplify_ex(c: Z3_context, a: Z3_ast, p: Z3_params) -> Option<Z3_ast>;
3049    /// Return a string describing all available parameters.
3050    ///
3051    /// # See also
3052    ///
3053    /// - [`Z3_simplify_ex`]
3054    /// - [`Z3_simplify_get_param_descrs`]
3055    pub fn Z3_simplify_get_help(c: Z3_context) -> Z3_string;
3056    /// Return the parameter description set for the simplify procedure.
3057    ///
3058    /// # See also
3059    ///
3060    /// - [`Z3_simplify_ex`]
3061    /// - [`Z3_simplify_get_help`]
3062    pub fn Z3_simplify_get_param_descrs(c: Z3_context) -> Option<Z3_param_descrs>;
3063    /// Update the arguments of term `a` using the arguments `args`.
3064    /// The number of arguments `num_args` should coincide
3065    /// with the number of arguments to `a`.
3066    /// If `a` is a quantifier, then num_args has to be 1.
3067    pub fn Z3_update_term(
3068        c: Z3_context,
3069        a: Z3_ast,
3070        num_args: ::core::ffi::c_uint,
3071        args: *const Z3_ast,
3072    ) -> Option<Z3_ast>;
3073    /// Substitute every occurrence of `from[i]` in `a` with `to[i]`, for `i` smaller than `num_exprs`.
3074    /// The result is the new AST. The arrays `from` and `to` must have size `num_exprs`.
3075    /// For every `i` smaller than `num_exprs`, we must have that sort of `from[i]` must be equal to sort of `to[i]`.
3076    pub fn Z3_substitute(
3077        c: Z3_context,
3078        a: Z3_ast,
3079        num_exprs: ::core::ffi::c_uint,
3080        from: *const Z3_ast,
3081        to: *const Z3_ast,
3082    ) -> Option<Z3_ast>;
3083    /// Substitute the variables in `a` with the expressions in `to`.
3084    /// For every `i` smaller than `num_exprs`, the variable with de-Bruijn index `i` is replaced with term `to[i]`.
3085    /// Note that a variable is created using the function \ref Z3_mk_bound.
3086    pub fn Z3_substitute_vars(
3087        c: Z3_context,
3088        a: Z3_ast,
3089        num_exprs: ::core::ffi::c_uint,
3090        to: *const Z3_ast,
3091    ) -> Option<Z3_ast>;
3092    /// Substitute functions in `from` with new expressions in `to`.
3093    ///
3094    /// The expressions in `to` can have free variables. The free variable in `to` at index 0
3095    /// refers to the first argument of `from`, the free variable at index 1 corresponds to the second argument.
3096    pub fn Z3_substitute_funs(
3097        c: Z3_context,
3098        a: Z3_ast,
3099        num_funs: ::core::ffi::c_uint,
3100        from: *const Z3_func_decl,
3101        to: *const Z3_ast,
3102    ) -> Option<Z3_ast>;
3103    /// Translate/Copy the AST `a` from context `source` to context `target`.
3104    /// AST `a` must have been created using context `source`.
3105    ///
3106    /// # Preconditions
3107    ///
3108    /// - `source != target`
3109    pub fn Z3_translate(
3110        source: Z3_context,
3111        a: Z3_ast,
3112        target: Z3_context,
3113    ) -> Option<Z3_ast>;
3114    /// Create a fresh model object. It has reference count 0.
3115    pub fn Z3_mk_model(c: Z3_context) -> Option<Z3_model>;
3116    /// Increment the reference counter of the given model.
3117    pub fn Z3_model_inc_ref(c: Z3_context, m: Z3_model);
3118    /// Decrement the reference counter of the given model.
3119    pub fn Z3_model_dec_ref(c: Z3_context, m: Z3_model);
3120    /// Evaluate the AST node `t` in the given model.
3121    /// Return `true` if succeeded, and store the result in `v`.
3122    ///
3123    /// If `model_completion` is `true`, then Z3 will assign an interpretation for any constant or function that does
3124    /// not have an interpretation in `m`. These constants and functions were essentially don't cares.
3125    ///
3126    /// If `model_completion` is `false`, then Z3 will not assign interpretations to constants for functions that do
3127    /// not have interpretations in `m`. Evaluation behaves as the identify function in this case.
3128    ///
3129    /// The evaluation may fail for the following reasons:
3130    ///
3131    /// - `t` contains a quantifier.
3132    ///
3133    /// - the model `m` is partial, that is, it doesn't have a complete interpretation for uninterpreted functions.
3134    /// That is, the option `MODEL_PARTIAL=true` was used.
3135    ///
3136    /// - `t` is type incorrect.
3137    ///
3138    /// - `Z3_interrupt` was invoked during evaluation.
3139    pub fn Z3_model_eval(
3140        c: Z3_context,
3141        m: Z3_model,
3142        t: Z3_ast,
3143        model_completion: bool,
3144        v: *mut Z3_ast,
3145    ) -> bool;
3146    /// Return the interpretation (i.e., assignment) of constant `a` in the model `m`.
3147    /// Return `NULL`, if the model does not assign an interpretation for `a`.
3148    /// That should be interpreted as: the value of `a` does not matter.
3149    ///
3150    /// # Preconditions
3151    ///
3152    /// - `Z3_get_arity(c, a) == 0`
3153    pub fn Z3_model_get_const_interp(
3154        c: Z3_context,
3155        m: Z3_model,
3156        a: Z3_func_decl,
3157    ) -> Option<Z3_ast>;
3158    /// Test if there exists an interpretation (i.e., assignment) for `a` in the model `m`.
3159    pub fn Z3_model_has_interp(c: Z3_context, m: Z3_model, a: Z3_func_decl) -> bool;
3160    /// Return the interpretation of the function `f` in the model `m`.
3161    /// Return `NULL`, if the model does not assign an interpretation for `f`.
3162    /// That should be interpreted as: the `f` does not matter.
3163    ///
3164    ///
3165    /// **Remark:** Reference counting must be used to manage Z3_func_interp objects, even when the Z3_context was
3166    /// created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
3167    ///
3168    /// # Preconditions
3169    ///
3170    /// - `Z3_get_arity(c, f) > 0`
3171    pub fn Z3_model_get_func_interp(
3172        c: Z3_context,
3173        m: Z3_model,
3174        f: Z3_func_decl,
3175    ) -> Option<Z3_func_interp>;
3176    /// Return the number of constants assigned by the given model.
3177    ///
3178    /// # See also
3179    ///
3180    /// - [`Z3_model_get_const_decl`]
3181    pub fn Z3_model_get_num_consts(c: Z3_context, m: Z3_model) -> ::core::ffi::c_uint;
3182    /// Return the i-th constant in the given model.
3183    ///
3184    /// # Preconditions
3185    ///
3186    /// - `i < Z3_model_get_num_consts(c, m)`
3187    ///
3188    /// # See also
3189    ///
3190    /// - [`Z3_model_eval`]
3191    /// - [`Z3_model_get_num_consts`]
3192    pub fn Z3_model_get_const_decl(
3193        c: Z3_context,
3194        m: Z3_model,
3195        i: ::core::ffi::c_uint,
3196    ) -> Option<Z3_func_decl>;
3197    /// Return the number of function interpretations in the given model.
3198    ///
3199    /// A function interpretation is represented as a finite map and an 'else' value.
3200    /// Each entry in the finite map represents the value of a function given a set of arguments.
3201    ///
3202    /// # See also
3203    ///
3204    /// - [`Z3_model_get_func_decl`]
3205    pub fn Z3_model_get_num_funcs(c: Z3_context, m: Z3_model) -> ::core::ffi::c_uint;
3206    /// Return the declaration of the i-th function in the given model.
3207    ///
3208    /// # Preconditions
3209    ///
3210    /// - `i < Z3_model_get_num_funcs(c, m)`
3211    ///
3212    /// # See also
3213    ///
3214    /// - [`Z3_model_get_num_funcs`]
3215    pub fn Z3_model_get_func_decl(
3216        c: Z3_context,
3217        m: Z3_model,
3218        i: ::core::ffi::c_uint,
3219    ) -> Option<Z3_func_decl>;
3220    /// Return the number of uninterpreted sorts that `m` assigns an interpretation to.
3221    ///
3222    /// Z3 also provides an interpretation for uninterpreted sorts used in a formula.
3223    /// The interpretation for a sort `s` is a finite set of distinct values. We say this finite set is
3224    /// the "universe" of `s`.
3225    ///
3226    /// # See also
3227    ///
3228    /// - [`Z3_model_get_sort`]
3229    /// - [`Z3_model_get_sort_universe`]
3230    pub fn Z3_model_get_num_sorts(c: Z3_context, m: Z3_model) -> ::core::ffi::c_uint;
3231    /// Return a uninterpreted sort that `m` assigns an interpretation.
3232    ///
3233    /// # Preconditions
3234    ///
3235    /// - `i < Z3_model_get_num_sorts(c, m)`
3236    ///
3237    /// # See also
3238    ///
3239    /// - [`Z3_model_get_num_sorts`]
3240    /// - [`Z3_model_get_sort_universe`]
3241    pub fn Z3_model_get_sort(
3242        c: Z3_context,
3243        m: Z3_model,
3244        i: ::core::ffi::c_uint,
3245    ) -> Option<Z3_sort>;
3246    /// Return the finite set of distinct values that represent the interpretation for sort `s`.
3247    ///
3248    /// # See also
3249    ///
3250    /// - [`Z3_model_get_num_sorts`]
3251    /// - [`Z3_model_get_sort`]
3252    pub fn Z3_model_get_sort_universe(
3253        c: Z3_context,
3254        m: Z3_model,
3255        s: Z3_sort,
3256    ) -> Option<Z3_ast_vector>;
3257    /// translate model from context `c` to context `dst`.
3258    ///
3259    /// **Remark:** Use this method for cloning state between contexts. Note that
3260    /// operations on contexts are not thread safe and therefore all operations
3261    /// that related to a given context have to be synchronized (or run in the same thread).
3262    pub fn Z3_model_translate(
3263        c: Z3_context,
3264        m: Z3_model,
3265        dst: Z3_context,
3266    ) -> Option<Z3_model>;
3267    /// The `(_ as-array f)` AST node is a construct for assigning interpretations for arrays in Z3.
3268    /// It is the array such that forall indices `i` we have that `(select (_ as-array f) i)` is equal to `(f i)`.
3269    /// This procedure returns `true` if the `a` is an `as`-array AST node.
3270    ///
3271    /// Z3 current solvers have minimal support for `as_array` nodes.
3272    ///
3273    /// # See also
3274    ///
3275    /// - [`Z3_get_as_array_func_decl`]
3276    pub fn Z3_is_as_array(c: Z3_context, a: Z3_ast) -> bool;
3277    /// Return the function declaration `f` associated with a `(_ as_array f)` node.
3278    ///
3279    /// # See also
3280    ///
3281    /// - [`Z3_is_as_array`]
3282    pub fn Z3_get_as_array_func_decl(c: Z3_context, a: Z3_ast) -> Option<Z3_func_decl>;
3283    /// Create a fresh func_interp object, add it to a model for a specified function.
3284    /// It has reference count 0.
3285    ///
3286    /// - `c`: context
3287    /// - `m`: model
3288    /// - `f`: function declaration
3289    /// - `default_value`: default value for function interpretation
3290    pub fn Z3_add_func_interp(
3291        c: Z3_context,
3292        m: Z3_model,
3293        f: Z3_func_decl,
3294        default_value: Z3_ast,
3295    ) -> Option<Z3_func_interp>;
3296    /// Add a constant interpretation.
3297    pub fn Z3_add_const_interp(c: Z3_context, m: Z3_model, f: Z3_func_decl, a: Z3_ast);
3298    /// Increment the reference counter of the given `Z3_func_interp` object.
3299    pub fn Z3_func_interp_inc_ref(c: Z3_context, f: Z3_func_interp);
3300    /// Decrement the reference counter of the given `Z3_func_interp` object.
3301    pub fn Z3_func_interp_dec_ref(c: Z3_context, f: Z3_func_interp);
3302    /// Return the number of entries in the given function interpretation.
3303    ///
3304    /// A function interpretation is represented as a finite map and an 'else' value.
3305    /// Each entry in the finite map represents the value of a function given a set of arguments.
3306    /// This procedure return the number of element in the finite map of `f`.
3307    ///
3308    /// # See also
3309    ///
3310    /// - [`Z3_func_interp_get_entry`]
3311    pub fn Z3_func_interp_get_num_entries(
3312        c: Z3_context,
3313        f: Z3_func_interp,
3314    ) -> ::core::ffi::c_uint;
3315    /// Return a "point" of the given function interpretation. It represents the
3316    /// value of `f` in a particular point.
3317    ///
3318    /// # Preconditions
3319    ///
3320    /// - `i < Z3_func_interp_get_num_entries(c, f)`
3321    ///
3322    /// # See also
3323    ///
3324    /// - [`Z3_func_interp_get_num_entries`]
3325    pub fn Z3_func_interp_get_entry(
3326        c: Z3_context,
3327        f: Z3_func_interp,
3328        i: ::core::ffi::c_uint,
3329    ) -> Option<Z3_func_entry>;
3330    /// Return the 'else' value of the given function interpretation.
3331    ///
3332    /// A function interpretation is represented as a finite map and an 'else' value.
3333    /// This procedure returns the 'else' value.
3334    pub fn Z3_func_interp_get_else(c: Z3_context, f: Z3_func_interp) -> Option<Z3_ast>;
3335    /// Return the 'else' value of the given function interpretation.
3336    ///
3337    /// A function interpretation is represented as a finite map and an 'else' value.
3338    /// This procedure can be used to update the 'else' value.
3339    pub fn Z3_func_interp_set_else(c: Z3_context, f: Z3_func_interp, else_value: Z3_ast);
3340    /// Return the arity (number of arguments) of the given function interpretation.
3341    pub fn Z3_func_interp_get_arity(
3342        c: Z3_context,
3343        f: Z3_func_interp,
3344    ) -> ::core::ffi::c_uint;
3345    /// add a function entry to a function interpretation.
3346    ///
3347    /// - `c`: logical context
3348    /// - `fi`: a function interpretation to be updated.
3349    /// - `args`: list of arguments. They should be constant values (such as integers) and be of the same types as the domain of the function.
3350    /// - `value`: value of the function when the parameters match args.
3351    ///
3352    /// It is assumed that entries added to a function cover disjoint arguments.
3353    /// If an two entries are added with the same arguments, only the second insertion survives and the
3354    /// first inserted entry is removed.
3355    pub fn Z3_func_interp_add_entry(
3356        c: Z3_context,
3357        fi: Z3_func_interp,
3358        args: Z3_ast_vector,
3359        value: Z3_ast,
3360    );
3361    /// Increment the reference counter of the given `Z3_func_entry` object.
3362    pub fn Z3_func_entry_inc_ref(c: Z3_context, e: Z3_func_entry);
3363    /// Decrement the reference counter of the given `Z3_func_entry` object.
3364    pub fn Z3_func_entry_dec_ref(c: Z3_context, e: Z3_func_entry);
3365    /// Return the value of this point.
3366    ///
3367    /// A `Z3_func_entry` object represents an element in the finite map used to encode
3368    /// a function interpretation.
3369    ///
3370    /// # See also
3371    ///
3372    /// - [`Z3_func_interp_get_entry`]
3373    pub fn Z3_func_entry_get_value(c: Z3_context, e: Z3_func_entry) -> Option<Z3_ast>;
3374    /// Return the number of arguments in a `Z3_func_entry` object.
3375    ///
3376    /// # See also
3377    ///
3378    /// - [`Z3_func_entry_get_arg`]
3379    /// - [`Z3_func_interp_get_entry`]
3380    pub fn Z3_func_entry_get_num_args(
3381        c: Z3_context,
3382        e: Z3_func_entry,
3383    ) -> ::core::ffi::c_uint;
3384    /// Return an argument of a `Z3_func_entry` object.
3385    ///
3386    /// # Preconditions
3387    ///
3388    /// - `i < Z3_func_entry_get_num_args(c, e)`
3389    ///
3390    /// # See also
3391    ///
3392    /// - [`Z3_func_entry_get_num_args`]
3393    /// - [`Z3_func_interp_get_entry`]
3394    pub fn Z3_func_entry_get_arg(
3395        c: Z3_context,
3396        e: Z3_func_entry,
3397        i: ::core::ffi::c_uint,
3398    ) -> Option<Z3_ast>;
3399    /// Log interaction to a file.
3400    ///
3401    ///
3402    /// extra_API('Z3_open_log', BOOL, (_in(STRING),))
3403    ///
3404    /// # See also
3405    ///
3406    /// - [`Z3_append_log`]
3407    /// - [`Z3_close_log`]
3408    pub fn Z3_open_log(filename: Z3_string) -> bool;
3409    /// Append user-defined string to interaction log.
3410    ///
3411    /// The interaction log is opened using [`Z3_open_log`].
3412    /// It contains the formulas that are checked using Z3.
3413    /// You can use this command to append comments, for instance.
3414    ///
3415    ///
3416    /// extra_API('Z3_append_log', VOID, (_in(STRING),))
3417    ///
3418    /// # See also
3419    ///
3420    /// - [`Z3_open_log`]
3421    /// - [`Z3_close_log`]
3422    pub fn Z3_append_log(string: Z3_string);
3423    /// Close interaction log.
3424    ///
3425    ///
3426    /// extra_API('Z3_close_log', VOID, ())
3427    ///
3428    /// # See also
3429    ///
3430    /// - [`Z3_open_log`]
3431    /// - [`Z3_append_log`]
3432    pub fn Z3_close_log();
3433    /// Enable/disable printing warning messages to the console.
3434    ///
3435    /// Warnings are printed after passing `true`, warning messages are
3436    /// suppressed after calling this method with `false`.
3437    pub fn Z3_toggle_warning_messages(enabled: bool);
3438    /// Select mode for the format used for pretty-printing AST nodes.
3439    ///
3440    /// The default mode for pretty printing AST nodes is to produce
3441    /// SMT-LIB style output where common subexpressions are printed
3442    /// at each occurrence. The mode is called `Z3_PRINT_SMTLIB_FULL`.
3443    /// To print shared common subexpressions only once,
3444    /// use the `Z3_PRINT_LOW_LEVEL` mode.
3445    /// To print in way that conforms to SMT-LIB standards and uses let
3446    /// expressions to share common sub-expressions use `Z3_PRINT_SMTLIB2_COMPLIANT`.
3447    ///
3448    /// # See also
3449    ///
3450    /// - [`Z3_ast_to_string`]
3451    /// - [`Z3_pattern_to_string`]
3452    /// - [`Z3_func_decl_to_string`]
3453    pub fn Z3_set_ast_print_mode(c: Z3_context, mode: Z3_ast_print_mode);
3454    /// Convert the given AST node into a string.
3455    ///
3456    /// \warning The result buffer is statically allocated by Z3. It will
3457    /// be automatically deallocated when [`Z3_del_context`] is invoked.
3458    /// So, the buffer is invalidated in the next call to `Z3_ast_to_string`.
3459    ///
3460    /// # See also
3461    ///
3462    /// - [`Z3_pattern_to_string`]
3463    /// - [`Z3_sort_to_string`]
3464    pub fn Z3_ast_to_string(c: Z3_context, a: Z3_ast) -> Z3_string;
3465    pub fn Z3_pattern_to_string(c: Z3_context, p: Z3_pattern) -> Z3_string;
3466    pub fn Z3_sort_to_string(c: Z3_context, s: Z3_sort) -> Z3_string;
3467    pub fn Z3_func_decl_to_string(c: Z3_context, d: Z3_func_decl) -> Z3_string;
3468    /// Convert the given model into a string.
3469    ///
3470    /// \warning The result buffer is statically allocated by Z3. It will
3471    /// be automatically deallocated when [`Z3_del_context`] is invoked.
3472    /// So, the buffer is invalidated in the next call to `Z3_model_to_string`.
3473    pub fn Z3_model_to_string(c: Z3_context, m: Z3_model) -> Z3_string;
3474    /// Convert the given benchmark into SMT-LIB formatted string.
3475    ///
3476    /// \warning The result buffer is statically allocated by Z3. It will
3477    /// be automatically deallocated when [`Z3_del_context`] is invoked.
3478    /// So, the buffer is invalidated in the next call to `Z3_benchmark_to_smtlib_string`.
3479    ///
3480    /// - `c`: - context.
3481    /// - `name`: - name of benchmark. The argument is optional.
3482    /// - `logic`: - the benchmark logic.
3483    /// - `status`: - the status string (sat, unsat, or unknown)
3484    /// - `attributes`: - other attributes, such as source, difficulty or category.
3485    /// - `num_assumptions`: - number of assumptions.
3486    /// - `assumptions`: - auxiliary assumptions.
3487    /// - `formula`: - formula to be checked for consistency in conjunction with assumptions.
3488    pub fn Z3_benchmark_to_smtlib_string(
3489        c: Z3_context,
3490        name: Z3_string,
3491        logic: Z3_string,
3492        status: Z3_string,
3493        attributes: Z3_string,
3494        num_assumptions: ::core::ffi::c_uint,
3495        assumptions: *const Z3_ast,
3496        formula: Z3_ast,
3497    ) -> Z3_string;
3498    /// Parse the given string using the SMT-LIB2 parser.
3499    ///
3500    /// It returns a formula comprising of the conjunction of assertions in the scope
3501    /// (up to push/pop) at the end of the string.
3502    pub fn Z3_parse_smtlib2_string(
3503        c: Z3_context,
3504        str_: Z3_string,
3505        num_sorts: ::core::ffi::c_uint,
3506        sort_names: *const Z3_symbol,
3507        sorts: *const Z3_sort,
3508        num_decls: ::core::ffi::c_uint,
3509        decl_names: *const Z3_symbol,
3510        decls: *const Z3_func_decl,
3511    ) -> Option<Z3_ast_vector>;
3512    /// Similar to [`Z3_parse_smtlib2_string`], but reads the benchmark from a file.
3513    pub fn Z3_parse_smtlib2_file(
3514        c: Z3_context,
3515        file_name: Z3_string,
3516        num_sorts: ::core::ffi::c_uint,
3517        sort_names: *const Z3_symbol,
3518        sorts: *const Z3_sort,
3519        num_decls: ::core::ffi::c_uint,
3520        decl_names: *const Z3_symbol,
3521        decls: *const Z3_func_decl,
3522    ) -> Option<Z3_ast_vector>;
3523    /// Parse and evaluate and SMT-LIB2 command sequence. The state from a previous call is saved so the next
3524    /// evaluation builds on top of the previous call.
3525    ///
3526    ///
3527    /// **Returns:** output generated from processing commands.
3528    pub fn Z3_eval_smtlib2_string(c: Z3_context, str_: Z3_string) -> Z3_string;
3529    /// Create a parser context.
3530    ///
3531    /// A parser context maintains state between calls to `Z3_parser_context_parse_string`
3532    /// where the caller can pass in a set of SMTLIB2 commands.
3533    /// It maintains all the declarations from previous calls together with
3534    /// of sorts and function declarations (including 0-ary) that are added directly to the context.
3535    pub fn Z3_mk_parser_context(c: Z3_context) -> Option<Z3_parser_context>;
3536    /// Increment the reference counter of the given `Z3_parser_context` object.
3537    pub fn Z3_parser_context_inc_ref(c: Z3_context, pc: Z3_parser_context);
3538    /// Decrement the reference counter of the given `Z3_parser_context` object.
3539    pub fn Z3_parser_context_dec_ref(c: Z3_context, pc: Z3_parser_context);
3540    /// Add a sort declaration.
3541    pub fn Z3_parser_context_add_sort(c: Z3_context, pc: Z3_parser_context, s: Z3_sort);
3542    /// Add a function declaration.
3543    pub fn Z3_parser_context_add_decl(
3544        c: Z3_context,
3545        pc: Z3_parser_context,
3546        f: Z3_func_decl,
3547    );
3548    /// Parse a string of SMTLIB2 commands. Return assertions.
3549    pub fn Z3_parser_context_from_string(
3550        c: Z3_context,
3551        pc: Z3_parser_context,
3552        s: Z3_string,
3553    ) -> Option<Z3_ast_vector>;
3554    /// Return the error code for the last API call.
3555    ///
3556    /// A call to a Z3 function may return a non Z3_OK error code,
3557    /// when it is not used correctly.
3558    ///
3559    /// # See also
3560    ///
3561    /// - [`Z3_set_error_handler`]
3562    pub fn Z3_get_error_code(c: Z3_context) -> Z3_error_code;
3563    /// Register a Z3 error handler.
3564    ///
3565    /// A call to a Z3 function may return a non `Z3_OK` error code, when
3566    /// it is not used correctly.  An error handler can be registered
3567    /// and will be called in this case.  To disable the use of the
3568    /// error handler, simply register with `h`=NULL.
3569    ///
3570    /// By default, newly created contexts install an internal default error
3571    /// handler that prints the error message and terminates the process via
3572    /// `exit`(1). While suitable for standalone CLI programs, calling
3573    /// raw `exit`() is unsafe when Z3 is invoked from within a managed
3574    /// runtime environment (such as Java/JNI under Android ART or the JVM,
3575    /// or .NET/CLR) or multi-threaded embedders: process termination can race
3576    /// with background runtime threads (e.g., JIT compilation or GC threads),
3577    /// producing crashes (SIGSEGV) in unrelated runtime threads. Embedders
3578    /// in managed runtimes should always register their own error handler or
3579    /// disable it by passing `h`=NULL and inspecting [`Z3_get_error_code`].
3580    ///
3581    /// \warning Log files, created using [`Z3_open_log`], may be potentially incomplete/incorrect if error handlers are used.
3582    ///
3583    /// # See also
3584    ///
3585    /// - [`Z3_get_error_code`]
3586    /// - [`Z3_mk_context`]
3587    /// - [`Z3_mk_context_rc`]
3588    pub fn Z3_set_error_handler(c: Z3_context, h: Z3_error_handler);
3589    /// Set an error.
3590    pub fn Z3_set_error(c: Z3_context, e: Z3_error_code);
3591    /// Return a string describing the given error code.
3592    pub fn Z3_get_error_msg(c: Z3_context, err: Z3_error_code) -> Z3_string;
3593    /// Return Z3 version number information.
3594    ///
3595    /// # See also
3596    ///
3597    /// - [`Z3_get_full_version`]
3598    pub fn Z3_get_version(
3599        major: *mut ::core::ffi::c_uint,
3600        minor: *mut ::core::ffi::c_uint,
3601        build_number: *mut ::core::ffi::c_uint,
3602        revision_number: *mut ::core::ffi::c_uint,
3603    );
3604    /// Return a string that fully describes the version of Z3 in use.
3605    ///
3606    /// # See also
3607    ///
3608    /// - [`Z3_get_version`]
3609    pub fn Z3_get_full_version() -> Z3_string;
3610    /// Enable tracing messages tagged as `tag` when Z3 is compiled in debug mode.
3611    /// It is a NOOP otherwise
3612    ///
3613    /// # See also
3614    ///
3615    /// - [`Z3_disable_trace`]
3616    pub fn Z3_enable_trace(tag: Z3_string);
3617    /// Disable tracing messages tagged as `tag` when Z3 is compiled in debug mode.
3618    /// It is a NOOP otherwise
3619    ///
3620    /// # See also
3621    ///
3622    /// - [`Z3_enable_trace`]
3623    pub fn Z3_disable_trace(tag: Z3_string);
3624    /// Reset all allocated resources.
3625    ///
3626    /// Use this facility on out-of memory errors.
3627    /// It allows discharging the previous state and resuming afresh.
3628    /// Any pointers previously returned by the API
3629    /// become invalid.
3630    pub fn Z3_reset_memory();
3631    /// Destroy all allocated resources.
3632    ///
3633    /// Any pointers previously returned by the API become invalid.
3634    /// Can be used for memory leak detection.
3635    pub fn Z3_finalize_memory();
3636    /// Create a goal (aka problem). A goal is essentially a set
3637    /// of formulas, that can be solved and/or transformed using
3638    /// tactics and solvers.
3639    ///
3640    /// If `models` is `true`, then model generation is enabled for the new goal.
3641    ///
3642    /// If `unsat_cores` is `true`, then unsat core generation is enabled for the new goal.
3643    ///
3644    /// If `proofs` is `true`, then proof generation is enabled for the new goal. Remark, the
3645    /// Z3 context `c` must have been created with proof generation support.
3646    ///
3647    /// **Remark:** Reference counting must be used to manage goals, even when the `Z3_context` was
3648    /// created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
3649    pub fn Z3_mk_goal(
3650        c: Z3_context,
3651        models: bool,
3652        unsat_cores: bool,
3653        proofs: bool,
3654    ) -> Option<Z3_goal>;
3655    /// Increment the reference counter of the given goal.
3656    pub fn Z3_goal_inc_ref(c: Z3_context, g: Z3_goal);
3657    /// Decrement the reference counter of the given goal.
3658    pub fn Z3_goal_dec_ref(c: Z3_context, g: Z3_goal);
3659    /// Return the "precision" of the given goal. Goals can be transformed using over and under approximations.
3660    /// A under approximation is applied when the objective is to find a model for a given goal.
3661    /// An over approximation is applied when the objective is to find a proof for a given goal.
3662    pub fn Z3_goal_precision(c: Z3_context, g: Z3_goal) -> Z3_goal_prec;
3663    /// Add a new formula `a` to the given goal.
3664    /// The formula is split according to the following procedure that is applied
3665    /// until a fixed-point:
3666    /// Conjunctions are split into separate formulas.
3667    /// Negations are distributed over disjunctions, resulting in separate formulas.
3668    /// If the goal is `false`, adding new formulas is a no-op.
3669    /// If the formula `a` is `true`, then nothing is added.
3670    /// If the formula `a` is `false`, then the entire goal is replaced by the formula `false`.
3671    pub fn Z3_goal_assert(c: Z3_context, g: Z3_goal, a: Z3_ast);
3672    /// Return `true` if the given goal contains the formula `false`.
3673    pub fn Z3_goal_inconsistent(c: Z3_context, g: Z3_goal) -> bool;
3674    /// Return the depth of the given goal. It tracks how many transformations were applied to it.
3675    pub fn Z3_goal_depth(c: Z3_context, g: Z3_goal) -> ::core::ffi::c_uint;
3676    /// Erase all formulas from the given goal.
3677    pub fn Z3_goal_reset(c: Z3_context, g: Z3_goal);
3678    /// Return the number of formulas in the given goal.
3679    pub fn Z3_goal_size(c: Z3_context, g: Z3_goal) -> ::core::ffi::c_uint;
3680    /// Return a formula from the given goal.
3681    ///
3682    /// # Preconditions
3683    ///
3684    /// - `idx < Z3_goal_size(c, g)`
3685    pub fn Z3_goal_formula(
3686        c: Z3_context,
3687        g: Z3_goal,
3688        idx: ::core::ffi::c_uint,
3689    ) -> Option<Z3_ast>;
3690    /// Return the number of formulas, subformulas and terms in the given goal.
3691    pub fn Z3_goal_num_exprs(c: Z3_context, g: Z3_goal) -> ::core::ffi::c_uint;
3692    /// Return `true` if the goal is empty, and it is precise or the product of a under approximation.
3693    pub fn Z3_goal_is_decided_sat(c: Z3_context, g: Z3_goal) -> bool;
3694    /// Return `true` if the goal contains false, and it is precise or the product of an over approximation.
3695    pub fn Z3_goal_is_decided_unsat(c: Z3_context, g: Z3_goal) -> bool;
3696    /// Copy a goal `g` from the context `source` to the context `target`.
3697    pub fn Z3_goal_translate(
3698        source: Z3_context,
3699        g: Z3_goal,
3700        target: Z3_context,
3701    ) -> Option<Z3_goal>;
3702    /// Convert a model of the formulas of a goal to a model of an original goal.
3703    /// The model may be null, in which case the returned model is valid if the goal was
3704    /// established satisfiable.
3705    ///
3706    /// When using this feature it is advisable to set the parameter `model`.compact to `false`.
3707    /// It is by default true, which erases variables created by the solver from models.
3708    /// Without access to model values for intermediary variables, values of other variables
3709    /// may end up having the wrong values.
3710    pub fn Z3_goal_convert_model(
3711        c: Z3_context,
3712        g: Z3_goal,
3713        m: Z3_model,
3714    ) -> Option<Z3_model>;
3715    /// Convert a goal into a string.
3716    pub fn Z3_goal_to_string(c: Z3_context, g: Z3_goal) -> Z3_string;
3717    /// Convert a goal into a DIMACS formatted string.
3718    /// The goal must be in CNF. You can convert a goal to CNF
3719    /// by applying the tseitin-cnf tactic. Bit-vectors are not automatically
3720    /// converted to Booleans either, so if the caller intends to
3721    /// preserve satisfiability, it should apply bit-blasting tactics.
3722    /// Quantifiers and theory atoms will not be encoded.
3723    pub fn Z3_goal_to_dimacs_string(
3724        c: Z3_context,
3725        g: Z3_goal,
3726        include_names: bool,
3727    ) -> Z3_string;
3728    /// Return a tactic associated with the given name.
3729    /// The complete list of tactics may be obtained using the procedures [`Z3_get_num_tactics`] and [`Z3_get_tactic_name`].
3730    /// It may also be obtained using the command `(help-tactic)` in the SMT 2.0 front-end.
3731    ///
3732    /// Tactics are the basic building block for creating custom solvers for specific problem domains.
3733    pub fn Z3_mk_tactic(c: Z3_context, name: Z3_string) -> Option<Z3_tactic>;
3734    /// Increment the reference counter of the given tactic.
3735    pub fn Z3_tactic_inc_ref(c: Z3_context, t: Z3_tactic);
3736    /// Decrement the reference counter of the given tactic.
3737    pub fn Z3_tactic_dec_ref(c: Z3_context, g: Z3_tactic);
3738    /// Return a probe associated with the given name.
3739    /// The complete list of probes may be obtained using the procedures [`Z3_get_num_probes`] and [`Z3_get_probe_name`].
3740    /// It may also be obtained using the command `(help-tactic)` in the SMT 2.0 front-end.
3741    ///
3742    /// Probes are used to inspect a goal (aka problem) and collect information that may be used to decide
3743    /// which solver and/or preprocessing step will be used.
3744    pub fn Z3_mk_probe(c: Z3_context, name: Z3_string) -> Option<Z3_probe>;
3745    /// Increment the reference counter of the given probe.
3746    pub fn Z3_probe_inc_ref(c: Z3_context, p: Z3_probe);
3747    /// Decrement the reference counter of the given probe.
3748    pub fn Z3_probe_dec_ref(c: Z3_context, p: Z3_probe);
3749    /// Return a tactic that applies `t1` to a given goal and `t2`
3750    /// to every subgoal produced by `t1`.
3751    pub fn Z3_tactic_and_then(
3752        c: Z3_context,
3753        t1: Z3_tactic,
3754        t2: Z3_tactic,
3755    ) -> Option<Z3_tactic>;
3756    /// Return a tactic that first applies `t1` to a given goal,
3757    /// if it fails then returns the result of `t2` applied to the given goal.
3758    pub fn Z3_tactic_or_else(
3759        c: Z3_context,
3760        t1: Z3_tactic,
3761        t2: Z3_tactic,
3762    ) -> Option<Z3_tactic>;
3763    /// Return a tactic that applies the given tactics in parallel.
3764    pub fn Z3_tactic_par_or(
3765        c: Z3_context,
3766        num: ::core::ffi::c_uint,
3767        ts: *const Z3_tactic,
3768    ) -> Option<Z3_tactic>;
3769    /// Return a tactic that applies `t1` to a given goal and then `t2`
3770    /// to every subgoal produced by `t1`. The subgoals are processed in parallel.
3771    pub fn Z3_tactic_par_and_then(
3772        c: Z3_context,
3773        t1: Z3_tactic,
3774        t2: Z3_tactic,
3775    ) -> Option<Z3_tactic>;
3776    /// Return a tactic that applies `t` to a given goal for `ms` milliseconds.
3777    /// If `t` does not terminate in `ms` milliseconds, then it fails.
3778    pub fn Z3_tactic_try_for(
3779        c: Z3_context,
3780        t: Z3_tactic,
3781        ms: ::core::ffi::c_uint,
3782    ) -> Option<Z3_tactic>;
3783    /// Return a tactic that applies `t` to a given goal is the probe `p` evaluates to true.
3784    /// If `p` evaluates to false, then the new tactic behaves like the skip tactic.
3785    pub fn Z3_tactic_when(c: Z3_context, p: Z3_probe, t: Z3_tactic) -> Option<Z3_tactic>;
3786    /// Return a tactic that applies `t1` to a given goal if the probe `p` evaluates to true,
3787    /// and `t2` if `p` evaluates to false.
3788    pub fn Z3_tactic_cond(
3789        c: Z3_context,
3790        p: Z3_probe,
3791        t1: Z3_tactic,
3792        t2: Z3_tactic,
3793    ) -> Option<Z3_tactic>;
3794    /// Return a tactic that keeps applying `t` until the goal is not modified anymore or the maximum
3795    /// number of iterations `max` is reached.
3796    pub fn Z3_tactic_repeat(
3797        c: Z3_context,
3798        t: Z3_tactic,
3799        max: ::core::ffi::c_uint,
3800    ) -> Option<Z3_tactic>;
3801    /// Return a tactic that just return the given goal.
3802    pub fn Z3_tactic_skip(c: Z3_context) -> Option<Z3_tactic>;
3803    /// Return a tactic that always fails.
3804    pub fn Z3_tactic_fail(c: Z3_context) -> Option<Z3_tactic>;
3805    /// Return a tactic that fails if the probe `p` evaluates to false.
3806    pub fn Z3_tactic_fail_if(c: Z3_context, p: Z3_probe) -> Option<Z3_tactic>;
3807    /// Return a tactic that fails if the goal is not trivially satisfiable (i.e., empty) or
3808    /// trivially unsatisfiable (i.e., contains false).
3809    pub fn Z3_tactic_fail_if_not_decided(c: Z3_context) -> Option<Z3_tactic>;
3810    /// Return a tactic that applies `t` using the given set of parameters.
3811    pub fn Z3_tactic_using_params(
3812        c: Z3_context,
3813        t: Z3_tactic,
3814        p: Z3_params,
3815    ) -> Option<Z3_tactic>;
3816    /// Return a simplifier associated with the given name.
3817    /// The complete list of simplifiers may be obtained using the procedures [`Z3_get_num_simplifiers`] and [`Z3_get_simplifier_name`].
3818    /// It may also be obtained using the command `(help-simplifier)` in the SMT 2.0 front-end.
3819    ///
3820    /// Simplifiers are the basic building block for creating custom solvers for specific problem domains.
3821    pub fn Z3_mk_simplifier(c: Z3_context, name: Z3_string) -> Option<Z3_simplifier>;
3822    /// Increment the reference counter of the given simplifier.
3823    pub fn Z3_simplifier_inc_ref(c: Z3_context, t: Z3_simplifier);
3824    /// Decrement the reference counter of the given simplifier.
3825    pub fn Z3_simplifier_dec_ref(c: Z3_context, g: Z3_simplifier);
3826    /// Attach simplifier to a solver. The solver will use the simplifier for incremental pre-processing.
3827    pub fn Z3_solver_add_simplifier(
3828        c: Z3_context,
3829        solver: Z3_solver,
3830        simplifier: Z3_simplifier,
3831    ) -> Option<Z3_solver>;
3832    /// Return a simplifier that applies `t1` to a given goal and `t2`
3833    /// to every subgoal produced by `t1`.
3834    pub fn Z3_simplifier_and_then(
3835        c: Z3_context,
3836        t1: Z3_simplifier,
3837        t2: Z3_simplifier,
3838    ) -> Option<Z3_simplifier>;
3839    /// Return a simplifier that applies `t` using the given set of parameters.
3840    pub fn Z3_simplifier_using_params(
3841        c: Z3_context,
3842        t: Z3_simplifier,
3843        p: Z3_params,
3844    ) -> Option<Z3_simplifier>;
3845    /// Return the number of builtin simplifiers available in Z3.
3846    ///
3847    /// # See also
3848    ///
3849    /// - [`Z3_get_simplifier_name`]
3850    pub fn Z3_get_num_simplifiers(c: Z3_context) -> ::core::ffi::c_uint;
3851    /// Return the name of the idx simplifier.
3852    ///
3853    /// # Preconditions
3854    ///
3855    /// - `i < Z3_get_num_simplifiers(c)`
3856    ///
3857    /// # See also
3858    ///
3859    /// - [`Z3_get_num_simplifiers`]
3860    pub fn Z3_get_simplifier_name(c: Z3_context, i: ::core::ffi::c_uint) -> Z3_string;
3861    /// Return a string containing a description of parameters accepted by the given simplifier.
3862    pub fn Z3_simplifier_get_help(c: Z3_context, t: Z3_simplifier) -> Z3_string;
3863    /// Return the parameter description set for the given simplifier object.
3864    pub fn Z3_simplifier_get_param_descrs(
3865        c: Z3_context,
3866        t: Z3_simplifier,
3867    ) -> Option<Z3_param_descrs>;
3868    /// Return a string containing a description of the simplifier with the given name.
3869    pub fn Z3_simplifier_get_descr(c: Z3_context, name: Z3_string) -> Z3_string;
3870    /// Return a probe that always evaluates to val.
3871    pub fn Z3_probe_const(x: Z3_context, val: f64) -> Option<Z3_probe>;
3872    /// Return a probe that evaluates to "true" when the value returned by `p1` is less than the value returned by `p2`.
3873    ///
3874    /// **Remark:** For probes, "true" is any value different from 0.0.
3875    pub fn Z3_probe_lt(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Option<Z3_probe>;
3876    /// Return a probe that evaluates to "true" when the value returned by `p1` is greater than the value returned by `p2`.
3877    ///
3878    /// **Remark:** For probes, "true" is any value different from 0.0.
3879    pub fn Z3_probe_gt(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Option<Z3_probe>;
3880    /// Return a probe that evaluates to "true" when the value returned by `p1` is less than or equal to the value returned by `p2`.
3881    ///
3882    /// **Remark:** For probes, "true" is any value different from 0.0.
3883    pub fn Z3_probe_le(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Option<Z3_probe>;
3884    /// Return a probe that evaluates to "true" when the value returned by `p1` is greater than or equal to the value returned by `p2`.
3885    ///
3886    /// **Remark:** For probes, "true" is any value different from 0.0.
3887    pub fn Z3_probe_ge(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Option<Z3_probe>;
3888    /// Return a probe that evaluates to "true" when the value returned by `p1` is equal to the value returned by `p2`.
3889    ///
3890    /// **Remark:** For probes, "true" is any value different from 0.0.
3891    pub fn Z3_probe_eq(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Option<Z3_probe>;
3892    /// Return a probe that evaluates to "true" when `p1` and `p2` evaluates to true.
3893    ///
3894    /// **Remark:** For probes, "true" is any value different from 0.0.
3895    pub fn Z3_probe_and(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Option<Z3_probe>;
3896    /// Return a probe that evaluates to "true" when `p1` or `p2` evaluates to true.
3897    ///
3898    /// **Remark:** For probes, "true" is any value different from 0.0.
3899    pub fn Z3_probe_or(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Option<Z3_probe>;
3900    /// Return a probe that evaluates to "true" when `p` does not evaluate to true.
3901    ///
3902    /// **Remark:** For probes, "true" is any value different from 0.0.
3903    pub fn Z3_probe_not(x: Z3_context, p: Z3_probe) -> Option<Z3_probe>;
3904    /// Return the number of builtin tactics available in Z3.
3905    ///
3906    /// # See also
3907    ///
3908    /// - [`Z3_get_tactic_name`]
3909    pub fn Z3_get_num_tactics(c: Z3_context) -> ::core::ffi::c_uint;
3910    /// Return the name of the idx tactic.
3911    ///
3912    /// # Preconditions
3913    ///
3914    /// - `i < Z3_get_num_tactics(c)`
3915    ///
3916    /// # See also
3917    ///
3918    /// - [`Z3_get_num_tactics`]
3919    pub fn Z3_get_tactic_name(c: Z3_context, i: ::core::ffi::c_uint) -> Z3_string;
3920    /// Return the number of builtin probes available in Z3.
3921    ///
3922    /// # See also
3923    ///
3924    /// - [`Z3_get_probe_name`]
3925    pub fn Z3_get_num_probes(c: Z3_context) -> ::core::ffi::c_uint;
3926    /// Return the name of the `i` probe.
3927    ///
3928    /// # Preconditions
3929    ///
3930    /// - `i < Z3_get_num_probes(c)`
3931    ///
3932    /// # See also
3933    ///
3934    /// - [`Z3_get_num_probes`]
3935    pub fn Z3_get_probe_name(c: Z3_context, i: ::core::ffi::c_uint) -> Z3_string;
3936    /// Return a string containing a description of parameters accepted by the given tactic.
3937    pub fn Z3_tactic_get_help(c: Z3_context, t: Z3_tactic) -> Z3_string;
3938    /// Return the parameter description set for the given tactic object.
3939    pub fn Z3_tactic_get_param_descrs(
3940        c: Z3_context,
3941        t: Z3_tactic,
3942    ) -> Option<Z3_param_descrs>;
3943    /// Return a string containing a description of the tactic with the given name.
3944    pub fn Z3_tactic_get_descr(c: Z3_context, name: Z3_string) -> Z3_string;
3945    /// Return a string containing a description of the probe with the given name.
3946    pub fn Z3_probe_get_descr(c: Z3_context, name: Z3_string) -> Z3_string;
3947    /// Execute the probe over the goal. The probe always produce a double value.
3948    /// "Boolean" probes return 0.0 for false, and a value different from 0.0 for true.
3949    pub fn Z3_probe_apply(c: Z3_context, p: Z3_probe, g: Z3_goal) -> f64;
3950    /// Apply tactic `t` to the goal `g`.
3951    ///
3952    /// # See also
3953    ///
3954    /// - [`Z3_tactic_apply_ex`]
3955    pub fn Z3_tactic_apply(
3956        c: Z3_context,
3957        t: Z3_tactic,
3958        g: Z3_goal,
3959    ) -> Option<Z3_apply_result>;
3960    /// Apply tactic `t` to the goal `g` using the parameter set `p`.
3961    ///
3962    /// # See also
3963    ///
3964    /// - [`Z3_tactic_apply`]
3965    pub fn Z3_tactic_apply_ex(
3966        c: Z3_context,
3967        t: Z3_tactic,
3968        g: Z3_goal,
3969        p: Z3_params,
3970    ) -> Option<Z3_apply_result>;
3971    /// Increment the reference counter of the given `Z3_apply_result` object.
3972    pub fn Z3_apply_result_inc_ref(c: Z3_context, r: Z3_apply_result);
3973    /// Decrement the reference counter of the given `Z3_apply_result` object.
3974    pub fn Z3_apply_result_dec_ref(c: Z3_context, r: Z3_apply_result);
3975    /// Convert the `Z3_apply_result` object returned by [`Z3_tactic_apply`] into a string.
3976    pub fn Z3_apply_result_to_string(c: Z3_context, r: Z3_apply_result) -> Z3_string;
3977    /// Return the number of subgoals in the `Z3_apply_result` object returned by [`Z3_tactic_apply`].
3978    ///
3979    /// # See also
3980    ///
3981    /// - [`Z3_apply_result_get_subgoal`]
3982    pub fn Z3_apply_result_get_num_subgoals(
3983        c: Z3_context,
3984        r: Z3_apply_result,
3985    ) -> ::core::ffi::c_uint;
3986    /// Return one of the subgoals in the `Z3_apply_result` object returned by [`Z3_tactic_apply`].
3987    ///
3988    /// # Preconditions
3989    ///
3990    /// - `i < Z3_apply_result_get_num_subgoals(c, r)`
3991    ///
3992    /// # See also
3993    ///
3994    /// - [`Z3_apply_result_get_num_subgoals`]
3995    pub fn Z3_apply_result_get_subgoal(
3996        c: Z3_context,
3997        r: Z3_apply_result,
3998        i: ::core::ffi::c_uint,
3999    ) -> Option<Z3_goal>;
4000    /// Create a new solver. This solver is a "combined solver" (see
4001    /// combined_solver module) that internally uses a non-incremental (solver1) and an
4002    /// incremental solver (solver2). This combined solver changes its behaviour based
4003    /// on how it is used and how its parameters are set.
4004    ///
4005    /// If the solver is used in a non incremental way (i.e. no calls to
4006    /// [`Z3_solver_push`] or [`Z3_solver_pop`], and no calls to
4007    /// [`Z3_solver_assert`] or [`Z3_solver_assert_and_track`] after checking
4008    /// satisfiability without an intervening [`Z3_solver_reset`]) then solver1
4009    /// will be used. This solver will apply Z3's "default" tactic.
4010    ///
4011    /// The "default" tactic will attempt to probe the logic used by the
4012    /// assertions and will apply a specialized tactic if one is supported.
4013    /// Otherwise the general `(and-then simplify smt)` tactic will be used.
4014    ///
4015    /// If the solver is used in an incremental way then the combined solver
4016    /// will switch to using solver2 (which behaves similarly to the general
4017    /// "smt" tactic).
4018    ///
4019    /// Note however it is possible to set the `solver2_timeout`,
4020    /// `solver2_unknown`, and `ignore_solver1` parameters of the combined
4021    /// solver to change its behaviour.
4022    ///
4023    /// The function [`Z3_solver_get_model`] retrieves a model if the
4024    /// assertions is satisfiable (i.e., the result is `Z3_L_TRUE`) and model construction is enabled.
4025    /// The function [`Z3_solver_get_model`] can also be used even
4026    /// if the result is `Z3_L_UNDEF`, but the returned model
4027    /// is not guaranteed to satisfy quantified assertions.
4028    ///
4029    /// **Remark:** User must use [`Z3_solver_inc_ref`] and [`Z3_solver_dec_ref`] to manage solver objects.
4030    /// Even if the context was created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
4031    ///
4032    /// # See also
4033    ///
4034    /// - [`Z3_mk_simple_solver`]
4035    /// - [`Z3_mk_solver_for_logic`]
4036    /// - [`Z3_mk_solver_from_tactic`]
4037    pub fn Z3_mk_solver(c: Z3_context) -> Option<Z3_solver>;
4038    /// Create a new incremental solver.
4039    ///
4040    /// This is equivalent to applying the "smt" tactic.
4041    ///
4042    /// Unlike [`Z3_mk_solver`] this solver
4043    /// - Does not attempt to apply any logic specific tactics.
4044    /// - Does not change its behaviour based on whether it used
4045    /// incrementally/non-incrementally.
4046    ///
4047    /// Note that these differences can result in very different performance
4048    /// compared to [`Z3_mk_solver`].
4049    ///
4050    /// The function [`Z3_solver_get_model`] retrieves a model if the
4051    /// assertions is satisfiable (i.e., the result is `Z3_L_TRUE`) and model construction is enabled.
4052    /// The function [`Z3_solver_get_model`] can also be used even
4053    /// if the result is `Z3_L_UNDEF`, but the returned model
4054    /// is not guaranteed to satisfy quantified assertions.
4055    ///
4056    /// **Remark:** User must use [`Z3_solver_inc_ref`] and [`Z3_solver_dec_ref`] to manage solver objects.
4057    /// Even if the context was created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
4058    ///
4059    /// # See also
4060    ///
4061    /// - [`Z3_mk_solver`]
4062    /// - [`Z3_mk_solver_for_logic`]
4063    /// - [`Z3_mk_solver_from_tactic`]
4064    pub fn Z3_mk_simple_solver(c: Z3_context) -> Option<Z3_solver>;
4065    /// Create a new solver customized for the given logic.
4066    /// It behaves like [`Z3_mk_solver`] if the logic is unknown or unsupported.
4067    ///
4068    /// **Remark:** User must use [`Z3_solver_inc_ref`] and [`Z3_solver_dec_ref`] to manage solver objects.
4069    /// Even if the context was created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
4070    ///
4071    /// # See also
4072    ///
4073    /// - [`Z3_mk_solver`]
4074    /// - [`Z3_mk_simple_solver`]
4075    /// - [`Z3_mk_solver_from_tactic`]
4076    pub fn Z3_mk_solver_for_logic(c: Z3_context, logic: Z3_symbol) -> Option<Z3_solver>;
4077    /// Create a new solver that is implemented using the given tactic.
4078    /// The solver supports the commands [`Z3_solver_push`] and [`Z3_solver_pop`], but it
4079    /// will always solve each [`Z3_solver_check`] from scratch.
4080    ///
4081    /// **Remark:** User must use [`Z3_solver_inc_ref`] and [`Z3_solver_dec_ref`] to manage solver objects.
4082    /// Even if the context was created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
4083    ///
4084    /// # See also
4085    ///
4086    /// - [`Z3_mk_solver`]
4087    /// - [`Z3_mk_simple_solver`]
4088    /// - [`Z3_mk_solver_for_logic`]
4089    pub fn Z3_mk_solver_from_tactic(c: Z3_context, t: Z3_tactic) -> Option<Z3_solver>;
4090    /// Copy a solver `s` from the context `source` to the context `target`.
4091    pub fn Z3_solver_translate(
4092        source: Z3_context,
4093        s: Z3_solver,
4094        target: Z3_context,
4095    ) -> Option<Z3_solver>;
4096    /// Ad-hoc method for importing model conversion from solver.
4097    ///
4098    /// This method is used for scenarios where `src` has been used to solve a set
4099    /// of formulas and was interrupted. The `dst` solver may be a strengthening of `src`
4100    /// obtained from cubing (assigning a subset of literals or adding constraints over the
4101    /// assertions available in `src`). If `dst` ends up being satisfiable, the model for `dst`
4102    /// may not correspond to a model of the original formula due to inprocessing in `src`.
4103    /// This method is used to take the side-effect of inprocessing into account when returning
4104    /// a model for `dst`.
4105    pub fn Z3_solver_import_model_converter(
4106        ctx: Z3_context,
4107        src: Z3_solver,
4108        dst: Z3_solver,
4109    );
4110    /// Return a string describing all solver available parameters.
4111    ///
4112    /// # See also
4113    ///
4114    /// - [`Z3_solver_get_param_descrs`]
4115    /// - [`Z3_solver_set_params`]
4116    pub fn Z3_solver_get_help(c: Z3_context, s: Z3_solver) -> Z3_string;
4117    /// Return the parameter description set for the given solver object.
4118    ///
4119    /// # See also
4120    ///
4121    /// - [`Z3_solver_get_help`]
4122    /// - [`Z3_solver_set_params`]
4123    pub fn Z3_solver_get_param_descrs(
4124        c: Z3_context,
4125        s: Z3_solver,
4126    ) -> Option<Z3_param_descrs>;
4127    /// Set the given solver using the given parameters.
4128    ///
4129    /// # See also
4130    ///
4131    /// - [`Z3_solver_get_help`]
4132    /// - [`Z3_solver_get_param_descrs`]
4133    pub fn Z3_solver_set_params(c: Z3_context, s: Z3_solver, p: Z3_params);
4134    /// Increment the reference counter of the given solver.
4135    pub fn Z3_solver_inc_ref(c: Z3_context, s: Z3_solver);
4136    /// Decrement the reference counter of the given solver.
4137    pub fn Z3_solver_dec_ref(c: Z3_context, s: Z3_solver);
4138    /// Solver local interrupt.
4139    /// Normally you should use Z3_interrupt to cancel solvers because only
4140    /// one solver is enabled concurrently per context.
4141    /// However, per GitHub issue #1006, there are use cases where
4142    /// it is more convenient to cancel a specific solver. Solvers
4143    /// that are not selected for interrupts are left alone.
4144    pub fn Z3_solver_interrupt(c: Z3_context, s: Z3_solver);
4145    /// Create a backtracking point.
4146    ///
4147    /// The solver contains a stack of assertions.
4148    ///
4149    /// # See also
4150    ///
4151    /// - [`Z3_solver_get_num_scopes`]
4152    /// - [`Z3_solver_pop`]
4153    pub fn Z3_solver_push(c: Z3_context, s: Z3_solver);
4154    /// Backtrack `n` backtracking points.
4155    ///
4156    /// # Preconditions
4157    ///
4158    /// - `n <= Z3_solver_get_num_scopes(c, s)`
4159    ///
4160    /// # See also
4161    ///
4162    /// - [`Z3_solver_get_num_scopes`]
4163    /// - [`Z3_solver_push`]
4164    pub fn Z3_solver_pop(c: Z3_context, s: Z3_solver, n: ::core::ffi::c_uint);
4165    /// Remove all assertions from the solver.
4166    ///
4167    /// # See also
4168    ///
4169    /// - [`Z3_solver_assert`]
4170    /// - [`Z3_solver_assert_and_track`]
4171    pub fn Z3_solver_reset(c: Z3_context, s: Z3_solver);
4172    /// Return the number of backtracking points.
4173    ///
4174    /// # See also
4175    ///
4176    /// - [`Z3_solver_push`]
4177    /// - [`Z3_solver_pop`]
4178    pub fn Z3_solver_get_num_scopes(c: Z3_context, s: Z3_solver) -> ::core::ffi::c_uint;
4179    /// Assert a constraint into the solver.
4180    ///
4181    /// The functions [`Z3_solver_check`] and [`Z3_solver_check_assumptions`] should be
4182    /// used to check whether the logical context is consistent or not.
4183    ///
4184    /// # See also
4185    ///
4186    /// - [`Z3_solver_assert_and_track`]
4187    /// - [`Z3_solver_reset`]
4188    pub fn Z3_solver_assert(c: Z3_context, s: Z3_solver, a: Z3_ast);
4189    /// Assert a constraint `a` into the solver, and track it (in the unsat) core using
4190    /// the Boolean constant `p`.
4191    ///
4192    /// This API is an alternative to [`Z3_solver_check_assumptions`] for extracting unsat cores.
4193    /// Both APIs can be used in the same solver. The unsat core will contain a combination
4194    /// of the Boolean variables provided using Z3_solver_assert_and_track and the Boolean literals
4195    /// provided using [`Z3_solver_check_assumptions`].
4196    ///
4197    /// # Preconditions
4198    ///
4199    /// - ``a` must be a Boolean expression`
4200    /// - ``p` must be a Boolean constant (aka variable).`
4201    ///
4202    /// # See also
4203    ///
4204    /// - [`Z3_solver_assert`]
4205    /// - [`Z3_solver_reset`]
4206    pub fn Z3_solver_assert_and_track(c: Z3_context, s: Z3_solver, a: Z3_ast, p: Z3_ast);
4207    /// load solver assertions from a file.
4208    ///
4209    /// # See also
4210    ///
4211    /// - [`Z3_solver_from_string`]
4212    /// - [`Z3_solver_to_string`]
4213    pub fn Z3_solver_from_file(c: Z3_context, s: Z3_solver, file_name: Z3_string);
4214    /// load solver assertions from a string.
4215    ///
4216    /// # See also
4217    ///
4218    /// - [`Z3_solver_from_file`]
4219    /// - [`Z3_solver_to_string`]
4220    pub fn Z3_solver_from_string(c: Z3_context, s: Z3_solver, str_: Z3_string);
4221    /// Return the set of asserted formulas on the solver.
4222    pub fn Z3_solver_get_assertions(
4223        c: Z3_context,
4224        s: Z3_solver,
4225    ) -> Option<Z3_ast_vector>;
4226    /// Return the set of units modulo model conversion.
4227    pub fn Z3_solver_get_units(c: Z3_context, s: Z3_solver) -> Option<Z3_ast_vector>;
4228    /// Return the trail modulo model conversion, in order of decision level
4229    /// The decision level can be retrieved using `Z3_solver_get_level` based on the trail.
4230    pub fn Z3_solver_get_trail(c: Z3_context, s: Z3_solver) -> Option<Z3_ast_vector>;
4231    /// Return the set of non units in the solver state.
4232    pub fn Z3_solver_get_non_units(c: Z3_context, s: Z3_solver) -> Option<Z3_ast_vector>;
4233    /// retrieve the decision depth of Boolean literals (variables or their negations).
4234    /// Assumes a check-sat call and no other calls (to extract models) have been invoked.
4235    pub fn Z3_solver_get_levels(
4236        c: Z3_context,
4237        s: Z3_solver,
4238        literals: Z3_ast_vector,
4239        sz: ::core::ffi::c_uint,
4240        levels: *mut ::core::ffi::c_uint,
4241    );
4242    /// retrieve the congruence closure root of an expression.
4243    /// The root is retrieved relative to the state where the solver was in when it completed.
4244    /// If it completed during a set of case splits, the congruence roots are relative to these case splits.
4245    /// That is, the congruences are not consequences but they are true under the current state.
4246    pub fn Z3_solver_congruence_root(
4247        c: Z3_context,
4248        s: Z3_solver,
4249        a: Z3_ast,
4250    ) -> Option<Z3_ast>;
4251    /// retrieve the next expression in the congruence class. The set of congruent siblings form a cyclic list.
4252    /// Repeated calls on the siblings will result in returning to the original expression.
4253    pub fn Z3_solver_congruence_next(
4254        c: Z3_context,
4255        s: Z3_solver,
4256        a: Z3_ast,
4257    ) -> Option<Z3_ast>;
4258    /// retrieve explanation for congruence.
4259    ///
4260    /// # Preconditions
4261    ///
4262    /// - `root(a) = root(b)`
4263    pub fn Z3_solver_congruence_explain(
4264        c: Z3_context,
4265        s: Z3_solver,
4266        a: Z3_ast,
4267        b: Z3_ast,
4268    ) -> Option<Z3_ast>;
4269    /// retrieve a 'solution' for `variables` as defined by equalities in maintained by solvers.
4270    /// At this point, only linear solution are supported.
4271    /// The solution to `variables` may be presented in triangular form, such that
4272    /// variables used in solutions themselves have solutions.
4273    pub fn Z3_solver_solve_for(
4274        c: Z3_context,
4275        s: Z3_solver,
4276        variables: Z3_ast_vector,
4277        terms: Z3_ast_vector,
4278        guards: Z3_ast_vector,
4279    );
4280    /// register a callback to that retrieves assumed, inferred and deleted clauses during search.
4281    ///
4282    /// - `c`: - context.
4283    /// - `s`: - solver object.
4284    /// - `user_context`: - a context used to maintain state for callbacks.
4285    /// - `on_clause_eh`: - a callback that is invoked by when a clause is
4286    /// - asserted to the CDCL engine (corresponding to an input clause after pre-processing)
4287    /// - inferred by CDCL(T) using either a SAT or theory conflict/propagation
4288    /// - deleted by the CDCL(T) engine
4289    pub fn Z3_solver_register_on_clause(
4290        c: Z3_context,
4291        s: Z3_solver,
4292        user_context: *mut ::core::ffi::c_void,
4293        on_clause_eh: Z3_on_clause_eh,
4294    );
4295    /// register a user-propagator with the solver.
4296    ///
4297    /// - `c`: - context.
4298    /// - `s`: - solver object.
4299    /// - `user_context`: - a context used to maintain state for callbacks.
4300    /// - `push_eh`: - a callback invoked when scopes are pushed
4301    /// - `pop_eh`: - a callback invoked when scopes are popped
4302    /// - `fresh_eh`: - a solver may spawn new solvers internally. This callback is used to produce a fresh user_context to be associated with fresh solvers.
4303    pub fn Z3_solver_propagate_init(
4304        c: Z3_context,
4305        s: Z3_solver,
4306        user_context: *mut ::core::ffi::c_void,
4307        push_eh: Z3_push_eh,
4308        pop_eh: Z3_pop_eh,
4309        fresh_eh: Z3_fresh_eh,
4310    );
4311    /// register a callback for when an expression is bound to a fixed value.
4312    /// The supported expression types are
4313    /// - Booleans
4314    /// - Bit-vectors
4315    pub fn Z3_solver_propagate_fixed(c: Z3_context, s: Z3_solver, fixed_eh: Z3_fixed_eh);
4316    /// register a callback on final check.
4317    /// This provides freedom to the propagator to delay actions or implement a branch-and bound solver.
4318    /// The final check is invoked when all decision variables have been assigned by the solver.
4319    ///
4320    /// The `final_eh` callback takes as argument the original user_context that was used
4321    /// when calling `Z3_solver_propagate_init`, and it takes a callback context with the
4322    /// opaque type `Z3_solver_callback`.
4323    /// The callback context is passed as argument to invoke the `Z3_solver_propagate_consequence` function.
4324    /// The callback context can only be accessed (for propagation and for dynamically registering expressions) within a callback.
4325    /// If the callback context gets used for propagation or conflicts, those propagations take effect and
4326    /// may trigger new decision variables to be set.
4327    pub fn Z3_solver_propagate_final(c: Z3_context, s: Z3_solver, final_eh: Z3_final_eh);
4328    /// register a callback on expression equalities.
4329    pub fn Z3_solver_propagate_eq(c: Z3_context, s: Z3_solver, eq_eh: Z3_eq_eh);
4330    /// register a callback on expression dis-equalities.
4331    pub fn Z3_solver_propagate_diseq(c: Z3_context, s: Z3_solver, eq_eh: Z3_eq_eh);
4332    /// register a callback when a new expression with a registered function is used by the solver
4333    /// The registered function appears at the top level and is created using \ref Z3_solver_propagate_declare.
4334    pub fn Z3_solver_propagate_created(
4335        c: Z3_context,
4336        s: Z3_solver,
4337        created_eh: Z3_created_eh,
4338    );
4339    /// register a callback when the solver decides to split on a registered expression.
4340    /// The callback may change the arguments by providing other values by calling \ref Z3_solver_next_split
4341    pub fn Z3_solver_propagate_decide(
4342        c: Z3_context,
4343        s: Z3_solver,
4344        decide_eh: Z3_decide_eh,
4345    );
4346    /// register a callback when the solver instantiates a quantifier.
4347    /// If the callback returns false, the actual instantiation of the quantifier is blocked.
4348    /// This allows the user propagator selectively prioritize instantiations without relying on default
4349    /// or configured weights.
4350    pub fn Z3_solver_propagate_on_binding(
4351        c: Z3_context,
4352        s: Z3_solver,
4353        on_binding_eh: Z3_on_binding_eh,
4354    );
4355    /// Sets the next (registered) expression to split on.
4356    /// The function returns false and ignores the given expression in case the expression is already assigned internally
4357    /// (due to relevancy propagation, this assignments might not have been reported yet by the fixed callback).
4358    /// In case the function is called in the decide callback, it overrides the currently selected variable and phase.
4359    pub fn Z3_solver_next_split(
4360        c: Z3_context,
4361        cb: Z3_solver_callback,
4362        t: Z3_ast,
4363        idx: ::core::ffi::c_uint,
4364        phase: Z3_lbool,
4365    ) -> bool;
4366    /// Create uninterpreted function declaration for the user propagator.
4367    /// When expressions using the function are created by the solver invoke a callback
4368    /// to \ref Z3_solver_propagate_created with arguments
4369    /// 1. context and callback solve
4370    /// 2. declared_expr: expression using function that was used as the top-level symbol
4371    /// 3. declared_id: a unique identifier (unique within the current scope) to track the expression.
4372    pub fn Z3_solver_propagate_declare(
4373        c: Z3_context,
4374        name: Z3_symbol,
4375        n: ::core::ffi::c_uint,
4376        domain: *mut Z3_sort,
4377        range: Z3_sort,
4378    ) -> Option<Z3_func_decl>;
4379    /// register an expression to propagate on with the solver.
4380    /// Only expressions of type Bool and type Bit-Vector can be registered for propagation.
4381    pub fn Z3_solver_propagate_register(c: Z3_context, s: Z3_solver, e: Z3_ast);
4382    /// register an expression to propagate on with the solver.
4383    /// Only expressions of type Bool and type Bit-Vector can be registered for propagation.
4384    /// Unlike \ref Z3_solver_propagate_register, this function takes a solver callback context
4385    /// as argument. It can be invoked during a callback to register new expressions.
4386    pub fn Z3_solver_propagate_register_cb(
4387        c: Z3_context,
4388        cb: Z3_solver_callback,
4389        e: Z3_ast,
4390    );
4391    /// propagate a consequence based on fixed values and equalities.
4392    /// A client may invoke it during the `propagate_fixed`, `propagate_eq`, `propagate_diseq`, and `propagate_final` callbacks.
4393    /// The callback adds a propagation consequence based on the fixed values passed in `fixed` and equalities between `eq_lhs` and `eq_rhs`.
4394    ///
4395    /// The solver might discard the propagation in case it is true in the current state.
4396    /// The function returns false in this case; otw. the function returns true.
4397    /// At least one propagation in the final callback has to return true in order to
4398    /// prevent the solver from finishing.
4399    ///
4400    /// - `c`: - context
4401    /// - `cb`: - solver callback
4402    /// - `num_fixed`: - number of fixed terms used as premise to propagation
4403    /// - `fixed`: - array of length `num_fixed` containing terms that are fixed in the current scope
4404    /// - `num_eqs`: - number of equalities used as premise to propagation
4405    /// - `eq_lhs`: - left side of equalities
4406    /// - `eq_rhs`: - right side of equalities
4407    /// - `conseq`: - consequence to propagate. It is typically an atomic formula, but it can be an arbitrary formula.
4408    pub fn Z3_solver_propagate_consequence(
4409        c: Z3_context,
4410        cb: Z3_solver_callback,
4411        num_fixed: ::core::ffi::c_uint,
4412        fixed: *const Z3_ast,
4413        num_eqs: ::core::ffi::c_uint,
4414        eq_lhs: *const Z3_ast,
4415        eq_rhs: *const Z3_ast,
4416        conseq: Z3_ast,
4417    ) -> bool;
4418    /// provide an initialization hint to the solver. The initialization hint is used to calibrate an initial value of the expression that
4419    /// represents a variable. If the variable is Boolean, the initial phase is set according to `value`. If the variable is an integer or real,
4420    /// the initial Simplex tableau is recalibrated to attempt to follow the value assignment.
4421    pub fn Z3_solver_set_initial_value(
4422        c: Z3_context,
4423        s: Z3_solver,
4424        v: Z3_ast,
4425        val: Z3_ast,
4426    );
4427    /// Check whether the assertions in a given solver are consistent or not.
4428    ///
4429    /// The function [`Z3_solver_get_model`] retrieves a model if the
4430    /// assertions is satisfiable (i.e., the result is `Z3_L_TRUE`) and model construction is enabled.
4431    /// Note that if the call returns `Z3_L_UNDEF`, Z3 does not
4432    /// ensure that calls to [`Z3_solver_get_model`] succeed and any models
4433    /// produced in this case are not guaranteed to satisfy the assertions.
4434    ///
4435    /// The function [`Z3_solver_get_proof`] retrieves a proof if proof
4436    /// generation was enabled when the context was created, and the
4437    /// assertions are unsatisfiable (i.e., the result is `Z3_L_FALSE`).
4438    ///
4439    /// # See also
4440    ///
4441    /// - [`Z3_solver_check_assumptions`]
4442    pub fn Z3_solver_check(c: Z3_context, s: Z3_solver) -> Z3_lbool;
4443    /// Check whether the assertions in the given solver and
4444    /// optional assumptions are consistent or not.
4445    ///
4446    /// The function [`Z3_solver_get_unsat_core`] retrieves the subset of the
4447    /// assumptions used in the unsatisfiability proof produced by Z3.
4448    ///
4449    /// # See also
4450    ///
4451    /// - [`Z3_solver_check`]
4452    pub fn Z3_solver_check_assumptions(
4453        c: Z3_context,
4454        s: Z3_solver,
4455        num_assumptions: ::core::ffi::c_uint,
4456        assumptions: *const Z3_ast,
4457    ) -> Z3_lbool;
4458    /// Retrieve congruence class representatives for terms.
4459    ///
4460    /// The function can be used for relying on Z3 to identify equal terms under the current
4461    /// set of assumptions. The array of terms and array of class identifiers should have
4462    /// the same length. The class identifiers are numerals that are assigned to the same
4463    /// value for their corresponding terms if the current context forces the terms to be
4464    /// equal. You cannot deduce that terms corresponding to different numerals must be all different,
4465    /// (especially when using non-convex theories).
4466    /// All implied equalities are returned by this call.
4467    /// This means that two terms map to the same class identifier if and only if
4468    /// the current context implies that they are equal.
4469    ///
4470    /// A side-effect of the function is a satisfiability check on the assertions on the solver that is passed in.
4471    /// The function return `Z3_L_FALSE` if the current assertions are not satisfiable.
4472    pub fn Z3_get_implied_equalities(
4473        c: Z3_context,
4474        s: Z3_solver,
4475        num_terms: ::core::ffi::c_uint,
4476        terms: *const Z3_ast,
4477        class_ids: *mut ::core::ffi::c_uint,
4478    ) -> Z3_lbool;
4479    /// retrieve consequences from solver that determine values of the supplied function symbols.
4480    pub fn Z3_solver_get_consequences(
4481        c: Z3_context,
4482        s: Z3_solver,
4483        assumptions: Z3_ast_vector,
4484        variables: Z3_ast_vector,
4485        consequences: Z3_ast_vector,
4486    ) -> Z3_lbool;
4487    /// extract a next cube for a solver. The last cube is the constant `true` or `false`.
4488    /// The number of (non-constant) cubes is by default 1. For the sat solver cubing is controlled
4489    /// using parameters sat.lookahead.cube.cutoff and sat.lookahead.cube.fraction.
4490    ///
4491    /// The third argument is a vector of variables that may be used for cubing.
4492    /// The contents of the vector is only used in the first call. The initial list of variables
4493    /// is used in subsequent calls until it returns the unsatisfiable cube.
4494    /// The vector is modified to contain a set of Autarky variables that occur in clauses that
4495    /// are affected by the (last literal in the) cube. These variables could be used by a different
4496    /// cuber (on a different solver object) for further recursive cubing.
4497    ///
4498    /// The last argument is a backtracking level. It instructs the cube process to backtrack below
4499    /// the indicated level for the next cube.
4500    pub fn Z3_solver_cube(
4501        c: Z3_context,
4502        s: Z3_solver,
4503        vars: Z3_ast_vector,
4504        backtrack_level: ::core::ffi::c_uint,
4505    ) -> Option<Z3_ast_vector>;
4506    /// Retrieve the model for the last [`Z3_solver_check`] or [`Z3_solver_check_assumptions`]
4507    ///
4508    /// The error handler is invoked if a model is not available because
4509    /// the commands above were not invoked for the given solver, or if the result was `Z3_L_FALSE`.
4510    pub fn Z3_solver_get_model(c: Z3_context, s: Z3_solver) -> Option<Z3_model>;
4511    /// Retrieve the proof for the last [`Z3_solver_check`] or [`Z3_solver_check_assumptions`]
4512    ///
4513    /// The error handler is invoked if proof generation is not enabled,
4514    /// or if the commands above were not invoked for the given solver,
4515    /// or if the result was different from `Z3_L_FALSE`.
4516    pub fn Z3_solver_get_proof(c: Z3_context, s: Z3_solver) -> Option<Z3_ast>;
4517    /// Retrieve the unsat core for the last [`Z3_solver_check_assumptions`]
4518    /// The unsat core is a subset of the assumptions `a`.
4519    ///
4520    /// By default, the unsat core will not be minimized. Generation of a minimized
4521    /// unsat core can be enabled via the `"sat.core.minimize"` and `"smt.core.minimize"`
4522    /// settings for SAT and SMT cores respectively. Generation of minimized unsat cores
4523    /// will be more expensive.
4524    pub fn Z3_solver_get_unsat_core(
4525        c: Z3_context,
4526        s: Z3_solver,
4527    ) -> Option<Z3_ast_vector>;
4528    /// Return a brief justification for an "unknown" result (i.e., `Z3_L_UNDEF`) for
4529    /// the commands [`Z3_solver_check`] and [`Z3_solver_check_assumptions`]
4530    pub fn Z3_solver_get_reason_unknown(c: Z3_context, s: Z3_solver) -> Z3_string;
4531    /// Return statistics for the given solver.
4532    ///
4533    /// **Remark:** User must use [`Z3_stats_inc_ref`] and [`Z3_stats_dec_ref`] to manage Z3_stats objects.
4534    pub fn Z3_solver_get_statistics(c: Z3_context, s: Z3_solver) -> Option<Z3_stats>;
4535    /// Convert a solver into a string.
4536    ///
4537    /// # See also
4538    ///
4539    /// - [`Z3_solver_from_file`]
4540    /// - [`Z3_solver_from_string`]
4541    pub fn Z3_solver_to_string(c: Z3_context, s: Z3_solver) -> Z3_string;
4542    /// Convert a solver into a DIMACS formatted string.
4543    ///
4544    /// # See also
4545    ///
4546    /// - [`Z3_goal_to_dimacs_string`]
4547    pub fn Z3_solver_to_dimacs_string(
4548        c: Z3_context,
4549        s: Z3_solver,
4550        include_names: bool,
4551    ) -> Z3_string;
4552    /// Convert a statistics into a string.
4553    pub fn Z3_stats_to_string(c: Z3_context, s: Z3_stats) -> Z3_string;
4554    /// Increment the reference counter of the given statistics object.
4555    pub fn Z3_stats_inc_ref(c: Z3_context, s: Z3_stats);
4556    /// Decrement the reference counter of the given statistics object.
4557    pub fn Z3_stats_dec_ref(c: Z3_context, s: Z3_stats);
4558    /// Return the number of statistical data in `s`.
4559    pub fn Z3_stats_size(c: Z3_context, s: Z3_stats) -> ::core::ffi::c_uint;
4560    /// Return the key (a string) for a particular statistical data.
4561    ///
4562    /// # Preconditions
4563    ///
4564    /// - `idx < Z3_stats_size(c, s)`
4565    pub fn Z3_stats_get_key(
4566        c: Z3_context,
4567        s: Z3_stats,
4568        idx: ::core::ffi::c_uint,
4569    ) -> Z3_string;
4570    /// Return `true` if the given statistical data is a unsigned integer.
4571    ///
4572    /// # Preconditions
4573    ///
4574    /// - `idx < Z3_stats_size(c, s)`
4575    pub fn Z3_stats_is_uint(
4576        c: Z3_context,
4577        s: Z3_stats,
4578        idx: ::core::ffi::c_uint,
4579    ) -> bool;
4580    /// Return `true` if the given statistical data is a double.
4581    ///
4582    /// # Preconditions
4583    ///
4584    /// - `idx < Z3_stats_size(c, s)`
4585    pub fn Z3_stats_is_double(
4586        c: Z3_context,
4587        s: Z3_stats,
4588        idx: ::core::ffi::c_uint,
4589    ) -> bool;
4590    /// Return the unsigned value of the given statistical data.
4591    ///
4592    /// # Preconditions
4593    ///
4594    /// - `idx < Z3_stats_size(c, s) && Z3_stats_is_uint(c, s)`
4595    pub fn Z3_stats_get_uint_value(
4596        c: Z3_context,
4597        s: Z3_stats,
4598        idx: ::core::ffi::c_uint,
4599    ) -> ::core::ffi::c_uint;
4600    /// Return the double value of the given statistical data.
4601    ///
4602    /// # Preconditions
4603    ///
4604    /// - `idx < Z3_stats_size(c, s) && Z3_stats_is_double(c, s)`
4605    pub fn Z3_stats_get_double_value(
4606        c: Z3_context,
4607        s: Z3_stats,
4608        idx: ::core::ffi::c_uint,
4609    ) -> f64;
4610    /// Return the estimated allocated memory in bytes.
4611    pub fn Z3_get_estimated_alloc_size() -> u64;
4612    /// Return an empty AST vector.
4613    ///
4614    /// **Remark:** Reference counting must be used to manage AST vectors, even when the Z3_context was
4615    /// created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
4616    pub fn Z3_mk_ast_vector(c: Z3_context) -> Option<Z3_ast_vector>;
4617    /// Increment the reference counter of the given AST vector.
4618    pub fn Z3_ast_vector_inc_ref(c: Z3_context, v: Z3_ast_vector);
4619    /// Decrement the reference counter of the given AST vector.
4620    pub fn Z3_ast_vector_dec_ref(c: Z3_context, v: Z3_ast_vector);
4621    /// Return the size of the given AST vector.
4622    pub fn Z3_ast_vector_size(c: Z3_context, v: Z3_ast_vector) -> ::core::ffi::c_uint;
4623    /// Return the AST at position `i` in the AST vector `v`.
4624    ///
4625    /// # Preconditions
4626    ///
4627    /// - `i < Z3_ast_vector_size(c, v)`
4628    pub fn Z3_ast_vector_get(
4629        c: Z3_context,
4630        v: Z3_ast_vector,
4631        i: ::core::ffi::c_uint,
4632    ) -> Option<Z3_ast>;
4633    /// Update position `i` of the AST vector `v` with the AST `a`.
4634    ///
4635    /// # Preconditions
4636    ///
4637    /// - `i < Z3_ast_vector_size(c, v)`
4638    pub fn Z3_ast_vector_set(
4639        c: Z3_context,
4640        v: Z3_ast_vector,
4641        i: ::core::ffi::c_uint,
4642        a: Z3_ast,
4643    );
4644    /// Resize the AST vector `v`.
4645    pub fn Z3_ast_vector_resize(c: Z3_context, v: Z3_ast_vector, n: ::core::ffi::c_uint);
4646    /// Add the AST `a` in the end of the AST vector `v`. The size of `v` is increased by one.
4647    pub fn Z3_ast_vector_push(c: Z3_context, v: Z3_ast_vector, a: Z3_ast);
4648    /// Translate the AST vector `v` from context `s` into an AST vector in context `t`.
4649    pub fn Z3_ast_vector_translate(
4650        s: Z3_context,
4651        v: Z3_ast_vector,
4652        t: Z3_context,
4653    ) -> Option<Z3_ast_vector>;
4654    /// Convert AST vector into a string.
4655    pub fn Z3_ast_vector_to_string(c: Z3_context, v: Z3_ast_vector) -> Z3_string;
4656    /// Return an empty mapping from AST to AST
4657    ///
4658    /// **Remark:** Reference counting must be used to manage AST maps, even when the Z3_context was
4659    /// created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
4660    pub fn Z3_mk_ast_map(c: Z3_context) -> Option<Z3_ast_map>;
4661    /// Increment the reference counter of the given AST map.
4662    pub fn Z3_ast_map_inc_ref(c: Z3_context, m: Z3_ast_map);
4663    /// Decrement the reference counter of the given AST map.
4664    pub fn Z3_ast_map_dec_ref(c: Z3_context, m: Z3_ast_map);
4665    /// Return true if the map `m` contains the AST key `k`.
4666    pub fn Z3_ast_map_contains(c: Z3_context, m: Z3_ast_map, k: Z3_ast) -> bool;
4667    /// Return the value associated with the key `k`.
4668    ///
4669    /// The procedure invokes the error handler if `k` is not in the map.
4670    pub fn Z3_ast_map_find(c: Z3_context, m: Z3_ast_map, k: Z3_ast) -> Option<Z3_ast>;
4671    /// Store/Replace a new key, value pair in the given map.
4672    pub fn Z3_ast_map_insert(c: Z3_context, m: Z3_ast_map, k: Z3_ast, v: Z3_ast);
4673    /// Erase a key from the map.
4674    pub fn Z3_ast_map_erase(c: Z3_context, m: Z3_ast_map, k: Z3_ast);
4675    /// Remove all keys from the given map.
4676    pub fn Z3_ast_map_reset(c: Z3_context, m: Z3_ast_map);
4677    /// Return the size of the given map.
4678    pub fn Z3_ast_map_size(c: Z3_context, m: Z3_ast_map) -> ::core::ffi::c_uint;
4679    /// Return the keys stored in the given map.
4680    pub fn Z3_ast_map_keys(c: Z3_context, m: Z3_ast_map) -> Option<Z3_ast_vector>;
4681    /// Convert the given map into a string.
4682    pub fn Z3_ast_map_to_string(c: Z3_context, m: Z3_ast_map) -> Z3_string;
4683    /// Return `true` if `a` can be used as value in the Z3 real algebraic
4684    /// number package.
4685    pub fn Z3_algebraic_is_value(c: Z3_context, a: Z3_ast) -> bool;
4686    /// Return `true` if `a` is positive, and `false` otherwise.
4687    ///
4688    /// # Preconditions
4689    ///
4690    /// - `Z3_algebraic_is_value(c, a)`
4691    pub fn Z3_algebraic_is_pos(c: Z3_context, a: Z3_ast) -> bool;
4692    /// Return `true` if `a` is negative, and `false` otherwise.
4693    ///
4694    /// # Preconditions
4695    ///
4696    /// - `Z3_algebraic_is_value(c, a)`
4697    pub fn Z3_algebraic_is_neg(c: Z3_context, a: Z3_ast) -> bool;
4698    /// Return `true` if `a` is zero, and `false` otherwise.
4699    ///
4700    /// # Preconditions
4701    ///
4702    /// - `Z3_algebraic_is_value(c, a)`
4703    pub fn Z3_algebraic_is_zero(c: Z3_context, a: Z3_ast) -> bool;
4704    /// Return 1 if `a` is positive, 0 if `a` is zero, and -1 if `a` is negative.
4705    ///
4706    /// # Preconditions
4707    ///
4708    /// - `Z3_algebraic_is_value(c, a)`
4709    pub fn Z3_algebraic_sign(c: Z3_context, a: Z3_ast) -> ::core::ffi::c_int;
4710    /// Return the value a + b.
4711    ///
4712    /// \post Z3_algebraic_is_value(c, result)
4713    ///
4714    /// # Preconditions
4715    ///
4716    /// - `Z3_algebraic_is_value(c, a)`
4717    /// - `Z3_algebraic_is_value(c, b)`
4718    pub fn Z3_algebraic_add(c: Z3_context, a: Z3_ast, b: Z3_ast) -> Option<Z3_ast>;
4719    /// Return the value a - b.
4720    ///
4721    /// \post Z3_algebraic_is_value(c, result)
4722    ///
4723    /// # Preconditions
4724    ///
4725    /// - `Z3_algebraic_is_value(c, a)`
4726    /// - `Z3_algebraic_is_value(c, b)`
4727    pub fn Z3_algebraic_sub(c: Z3_context, a: Z3_ast, b: Z3_ast) -> Option<Z3_ast>;
4728    /// Return the value a * b.
4729    ///
4730    /// \post Z3_algebraic_is_value(c, result)
4731    ///
4732    /// # Preconditions
4733    ///
4734    /// - `Z3_algebraic_is_value(c, a)`
4735    /// - `Z3_algebraic_is_value(c, b)`
4736    pub fn Z3_algebraic_mul(c: Z3_context, a: Z3_ast, b: Z3_ast) -> Option<Z3_ast>;
4737    /// Return the value a / b.
4738    ///
4739    /// \post Z3_algebraic_is_value(c, result)
4740    ///
4741    /// # Preconditions
4742    ///
4743    /// - `Z3_algebraic_is_value(c, a)`
4744    /// - `Z3_algebraic_is_value(c, b)`
4745    /// - `!Z3_algebraic_is_zero(c, b)`
4746    pub fn Z3_algebraic_div(c: Z3_context, a: Z3_ast, b: Z3_ast) -> Option<Z3_ast>;
4747    /// Return the a^(1/k)
4748    ///
4749    /// \post Z3_algebraic_is_value(c, result)
4750    ///
4751    /// # Preconditions
4752    ///
4753    /// - `Z3_algebraic_is_value(c, a)`
4754    /// - `k is even => !Z3_algebraic_is_neg(c, a)`
4755    pub fn Z3_algebraic_root(
4756        c: Z3_context,
4757        a: Z3_ast,
4758        k: ::core::ffi::c_uint,
4759    ) -> Option<Z3_ast>;
4760    /// Return the a^k
4761    ///
4762    /// \post Z3_algebraic_is_value(c, result)
4763    ///
4764    /// # Preconditions
4765    ///
4766    /// - `Z3_algebraic_is_value(c, a)`
4767    pub fn Z3_algebraic_power(
4768        c: Z3_context,
4769        a: Z3_ast,
4770        k: ::core::ffi::c_uint,
4771    ) -> Option<Z3_ast>;
4772    /// Return `true` if a < b, and `false` otherwise.
4773    ///
4774    /// # Preconditions
4775    ///
4776    /// - `Z3_algebraic_is_value(c, a)`
4777    /// - `Z3_algebraic_is_value(c, b)`
4778    pub fn Z3_algebraic_lt(c: Z3_context, a: Z3_ast, b: Z3_ast) -> bool;
4779    /// Return `true` if a > b, and `false` otherwise.
4780    ///
4781    /// # Preconditions
4782    ///
4783    /// - `Z3_algebraic_is_value(c, a)`
4784    /// - `Z3_algebraic_is_value(c, b)`
4785    pub fn Z3_algebraic_gt(c: Z3_context, a: Z3_ast, b: Z3_ast) -> bool;
4786    /// Return `true` if a <= b, and `false` otherwise.
4787    ///
4788    /// # Preconditions
4789    ///
4790    /// - `Z3_algebraic_is_value(c, a)`
4791    /// - `Z3_algebraic_is_value(c, b)`
4792    pub fn Z3_algebraic_le(c: Z3_context, a: Z3_ast, b: Z3_ast) -> bool;
4793    /// Return `true` if a >= b, and `false` otherwise.
4794    ///
4795    /// # Preconditions
4796    ///
4797    /// - `Z3_algebraic_is_value(c, a)`
4798    /// - `Z3_algebraic_is_value(c, b)`
4799    pub fn Z3_algebraic_ge(c: Z3_context, a: Z3_ast, b: Z3_ast) -> bool;
4800    /// Return `true` if a == b, and `false` otherwise.
4801    ///
4802    /// # Preconditions
4803    ///
4804    /// - `Z3_algebraic_is_value(c, a)`
4805    /// - `Z3_algebraic_is_value(c, b)`
4806    pub fn Z3_algebraic_eq(c: Z3_context, a: Z3_ast, b: Z3_ast) -> bool;
4807    /// Return `true` if a != b, and `false` otherwise.
4808    ///
4809    /// # Preconditions
4810    ///
4811    /// - `Z3_algebraic_is_value(c, a)`
4812    /// - `Z3_algebraic_is_value(c, b)`
4813    pub fn Z3_algebraic_neq(c: Z3_context, a: Z3_ast, b: Z3_ast) -> bool;
4814    /// Given a multivariate polynomial p(x_0, ..., x_{n-1}, x_n), returns the
4815    /// roots of the univariate polynomial p(a\[0], ..., a\[n-1], x_n).
4816    ///
4817    /// \post forall r in result Z3_algebraic_is_value(c, result)
4818    ///
4819    /// # Preconditions
4820    ///
4821    /// - `p is a Z3 expression that contains only arithmetic terms and free variables.`
4822    /// - `forall i in [0, n) Z3_algebraic_is_value(c, a\[i])`
4823    pub fn Z3_algebraic_roots(
4824        c: Z3_context,
4825        p: Z3_ast,
4826        n: ::core::ffi::c_uint,
4827        a: *mut Z3_ast,
4828    ) -> Option<Z3_ast_vector>;
4829    /// Given a multivariate polynomial p(x_0, ..., x_{n-1}), return the
4830    /// sign of p(a\[0], ..., a\[n-1]).
4831    ///
4832    /// # Preconditions
4833    ///
4834    /// - `p is a Z3 expression that contains only arithmetic terms and free variables.`
4835    /// - `forall i in [0, n) Z3_algebraic_is_value(c, a\[i])`
4836    pub fn Z3_algebraic_eval(
4837        c: Z3_context,
4838        p: Z3_ast,
4839        n: ::core::ffi::c_uint,
4840        a: *mut Z3_ast,
4841    ) -> ::core::ffi::c_int;
4842    /// Return the coefficients of the defining polynomial.
4843    ///
4844    /// # Preconditions
4845    ///
4846    /// - `Z3_is_algebraic_number(c, a)`
4847    pub fn Z3_algebraic_get_poly(c: Z3_context, a: Z3_ast) -> Option<Z3_ast_vector>;
4848    /// Return which root of the polynomial the algebraic number represents.
4849    ///
4850    /// # Preconditions
4851    ///
4852    /// - `Z3_is_algebraic_number(c, a)`
4853    pub fn Z3_algebraic_get_i(c: Z3_context, a: Z3_ast) -> ::core::ffi::c_uint;
4854    /// Return the nonzero subresultants of `p` and `q` with respect to the "variable" `x`.
4855    ///
4856    /// Note that, any subterm that cannot be viewed as a polynomial is assumed to be a variable.
4857    /// Example: `f(a)` is a considered to be a variable in the polynomial \ccode{
4858    /// f(a)*f(a) + 2*f(a) + 1}
4859    ///
4860    /// # Preconditions
4861    ///
4862    /// - ``p`, `q` and `x` are Z3 expressions where `p` and `q` are arithmetic terms.`
4863    pub fn Z3_polynomial_subresultants(
4864        c: Z3_context,
4865        p: Z3_ast,
4866        q: Z3_ast,
4867        x: Z3_ast,
4868    ) -> Option<Z3_ast_vector>;
4869    /// Delete a RCF numeral created using the RCF API.
4870    pub fn Z3_rcf_del(c: Z3_context, a: Z3_rcf_num);
4871    /// Return a RCF rational using the given string.
4872    pub fn Z3_rcf_mk_rational(c: Z3_context, val: Z3_string) -> Option<Z3_rcf_num>;
4873    /// Return a RCF small integer.
4874    pub fn Z3_rcf_mk_small_int(
4875        c: Z3_context,
4876        val: ::core::ffi::c_int,
4877    ) -> Option<Z3_rcf_num>;
4878    /// Return Pi
4879    pub fn Z3_rcf_mk_pi(c: Z3_context) -> Option<Z3_rcf_num>;
4880    /// Return e (Euler's constant)
4881    pub fn Z3_rcf_mk_e(c: Z3_context) -> Option<Z3_rcf_num>;
4882    /// Return a new infinitesimal that is smaller than all elements in the Z3 field.
4883    pub fn Z3_rcf_mk_infinitesimal(c: Z3_context) -> Option<Z3_rcf_num>;
4884    /// Store in roots the roots of the polynomial `a[n-1]*x^{n-1` + ... + a\[0]}.
4885    /// The output vector `roots` must have size `n`.
4886    /// It returns the number of roots of the polynomial.
4887    ///
4888    /// # Preconditions
4889    ///
4890    /// - `The input polynomial is not the zero polynomial.`
4891    pub fn Z3_rcf_mk_roots(
4892        c: Z3_context,
4893        n: ::core::ffi::c_uint,
4894        a: *const Z3_rcf_num,
4895        roots: *mut Z3_rcf_num,
4896    ) -> ::core::ffi::c_uint;
4897    /// Return the value `a + b`.
4898    pub fn Z3_rcf_add(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> Option<Z3_rcf_num>;
4899    /// Return the value `a - b`.
4900    pub fn Z3_rcf_sub(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> Option<Z3_rcf_num>;
4901    /// Return the value `a * b`.
4902    pub fn Z3_rcf_mul(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> Option<Z3_rcf_num>;
4903    /// Return the value `a / b`.
4904    pub fn Z3_rcf_div(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> Option<Z3_rcf_num>;
4905    /// Return the value `-a`.
4906    pub fn Z3_rcf_neg(c: Z3_context, a: Z3_rcf_num) -> Option<Z3_rcf_num>;
4907    /// Return the value `1/a`.
4908    pub fn Z3_rcf_inv(c: Z3_context, a: Z3_rcf_num) -> Option<Z3_rcf_num>;
4909    /// Return the value `a^k`.
4910    pub fn Z3_rcf_power(
4911        c: Z3_context,
4912        a: Z3_rcf_num,
4913        k: ::core::ffi::c_uint,
4914    ) -> Option<Z3_rcf_num>;
4915    /// Return `true` if `a < b`.
4916    pub fn Z3_rcf_lt(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> bool;
4917    /// Return `true` if `a > b`.
4918    pub fn Z3_rcf_gt(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> bool;
4919    /// Return `true` if `a <= b`.
4920    pub fn Z3_rcf_le(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> bool;
4921    /// Return `true` if `a >= b`.
4922    pub fn Z3_rcf_ge(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> bool;
4923    /// Return `true` if `a == b`.
4924    pub fn Z3_rcf_eq(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> bool;
4925    /// Return `true` if `a != b`.
4926    pub fn Z3_rcf_neq(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> bool;
4927    /// Convert the RCF numeral into a string.
4928    pub fn Z3_rcf_num_to_string(
4929        c: Z3_context,
4930        a: Z3_rcf_num,
4931        compact: bool,
4932        html: bool,
4933    ) -> Z3_string;
4934    /// Convert the RCF numeral into a string in decimal notation.
4935    pub fn Z3_rcf_num_to_decimal_string(
4936        c: Z3_context,
4937        a: Z3_rcf_num,
4938        prec: ::core::ffi::c_uint,
4939    ) -> Z3_string;
4940    /// Extract the "numerator" and "denominator" of the given RCF numeral.
4941    /// We have that `a = n/d`, moreover `n` and `d` are not represented using rational functions.
4942    pub fn Z3_rcf_get_numerator_denominator(
4943        c: Z3_context,
4944        a: Z3_rcf_num,
4945        n: *mut Z3_rcf_num,
4946        d: *mut Z3_rcf_num,
4947    );
4948    /// Return `true` if `a` represents a rational number.
4949    pub fn Z3_rcf_is_rational(c: Z3_context, a: Z3_rcf_num) -> bool;
4950    /// Return `true` if `a` represents an algebraic number.
4951    pub fn Z3_rcf_is_algebraic(c: Z3_context, a: Z3_rcf_num) -> bool;
4952    /// Return `true` if `a` represents an infinitesimal.
4953    pub fn Z3_rcf_is_infinitesimal(c: Z3_context, a: Z3_rcf_num) -> bool;
4954    /// Return `true` if `a` represents a transcendental number.
4955    pub fn Z3_rcf_is_transcendental(c: Z3_context, a: Z3_rcf_num) -> bool;
4956    /// Return the index of a field extension.
4957    pub fn Z3_rcf_extension_index(c: Z3_context, a: Z3_rcf_num) -> ::core::ffi::c_uint;
4958    /// Return the name of a transcendental.
4959    ///
4960    /// # Preconditions
4961    ///
4962    /// - `Z3_rcf_is_transcendtal(ctx, a);`
4963    pub fn Z3_rcf_transcendental_name(c: Z3_context, a: Z3_rcf_num) -> Option<Z3_symbol>;
4964    /// Return the name of an infinitesimal.
4965    ///
4966    /// # Preconditions
4967    ///
4968    /// - `Z3_rcf_is_infinitesimal(ctx, a);`
4969    pub fn Z3_rcf_infinitesimal_name(c: Z3_context, a: Z3_rcf_num) -> Option<Z3_symbol>;
4970    /// Return the number of coefficients in an algebraic number.
4971    ///
4972    /// # Preconditions
4973    ///
4974    /// - `Z3_rcf_is_algebraic(ctx, a);`
4975    pub fn Z3_rcf_num_coefficients(c: Z3_context, a: Z3_rcf_num) -> ::core::ffi::c_uint;
4976    /// Extract a coefficient from an algebraic number.
4977    ///
4978    /// # Preconditions
4979    ///
4980    /// - `Z3_rcf_is_algebraic(ctx, a);`
4981    pub fn Z3_rcf_coefficient(
4982        c: Z3_context,
4983        a: Z3_rcf_num,
4984        i: ::core::ffi::c_uint,
4985    ) -> Option<Z3_rcf_num>;
4986    /// Extract an interval from an algebraic number.
4987    ///
4988    /// # Preconditions
4989    ///
4990    /// - `Z3_rcf_is_algebraic(ctx, a);`
4991    pub fn Z3_rcf_interval(
4992        c: Z3_context,
4993        a: Z3_rcf_num,
4994        lower_is_inf: *mut bool,
4995        lower_is_open: *mut bool,
4996        lower: *mut Z3_rcf_num,
4997        upper_is_inf: *mut bool,
4998        upper_is_open: *mut bool,
4999        upper: *mut Z3_rcf_num,
5000    ) -> ::core::ffi::c_int;
5001    /// Return the number of sign conditions of an algebraic number.
5002    ///
5003    /// # Preconditions
5004    ///
5005    /// - `Z3_rcf_is_algebraic(ctx, a);`
5006    pub fn Z3_rcf_num_sign_conditions(
5007        c: Z3_context,
5008        a: Z3_rcf_num,
5009    ) -> ::core::ffi::c_uint;
5010    /// Extract the sign of a sign condition from an algebraic number.
5011    ///
5012    /// # Preconditions
5013    ///
5014    /// - `Z3_rcf_is_algebraic(ctx, a);`
5015    pub fn Z3_rcf_sign_condition_sign(
5016        c: Z3_context,
5017        a: Z3_rcf_num,
5018        i: ::core::ffi::c_uint,
5019    ) -> ::core::ffi::c_int;
5020    /// Return the number of sign condition polynomial coefficients of an algebraic number.
5021    ///
5022    /// # Preconditions
5023    ///
5024    /// - `Z3_rcf_is_algebraic(ctx, a);`
5025    pub fn Z3_rcf_num_sign_condition_coefficients(
5026        c: Z3_context,
5027        a: Z3_rcf_num,
5028        i: ::core::ffi::c_uint,
5029    ) -> ::core::ffi::c_uint;
5030    /// Extract the j-th polynomial coefficient of the i-th sign condition.
5031    ///
5032    /// # Preconditions
5033    ///
5034    /// - `Z3_rcf_is_algebraic(ctx, a);`
5035    pub fn Z3_rcf_sign_condition_coefficient(
5036        c: Z3_context,
5037        a: Z3_rcf_num,
5038        i: ::core::ffi::c_uint,
5039        j: ::core::ffi::c_uint,
5040    ) -> Option<Z3_rcf_num>;
5041    /// Create a new fixedpoint context.
5042    ///
5043    /// **Remark:** User must use [`Z3_fixedpoint_inc_ref`] and [`Z3_fixedpoint_dec_ref`] to manage fixedpoint objects.
5044    /// Even if the context was created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
5045    pub fn Z3_mk_fixedpoint(c: Z3_context) -> Option<Z3_fixedpoint>;
5046    /// Increment the reference counter of the given fixedpoint context
5047    pub fn Z3_fixedpoint_inc_ref(c: Z3_context, d: Z3_fixedpoint);
5048    /// Decrement the reference counter of the given fixedpoint context.
5049    pub fn Z3_fixedpoint_dec_ref(c: Z3_context, d: Z3_fixedpoint);
5050    /// Add a Database fact.
5051    ///
5052    /// - `c`: - context
5053    /// - `d`: - fixed point context
5054    /// - `r`: - relation signature for the row.
5055    /// - `num_args`: - number of columns for the given row.
5056    /// - `args`: - array of the row elements.
5057    ///
5058    /// The number of arguments `num_args` should be equal to the number
5059    /// of sorts in the domain of `r`. Each sort in the domain should be an integral
5060    /// (bit-vector, Boolean or or finite domain sort).
5061    ///
5062    /// The call has the same effect as adding a rule where `r` is applied to the arguments.
5063    pub fn Z3_fixedpoint_add_fact(
5064        c: Z3_context,
5065        d: Z3_fixedpoint,
5066        r: Z3_func_decl,
5067        num_args: ::core::ffi::c_uint,
5068        args: *mut ::core::ffi::c_uint,
5069    );
5070    /// Assert a constraint to the fixedpoint context.
5071    ///
5072    /// The constraints are used as background axioms when the fixedpoint engine uses the PDR mode.
5073    /// They are ignored for standard Datalog mode.
5074    pub fn Z3_fixedpoint_assert(c: Z3_context, d: Z3_fixedpoint, axiom: Z3_ast);
5075    /// Pose a query against the asserted rules.
5076    ///
5077    /// ```c
5078    /// query ::= (exists (bound-vars) query)
5079    /// |  literals
5080    /// ```
5081    ///
5082    /// query returns
5083    /// - `Z3_L_FALSE` if the query is unsatisfiable.
5084    /// - `Z3_L_TRUE` if the query is satisfiable. Obtain the answer by calling [`Z3_fixedpoint_get_answer`].
5085    /// - `Z3_L_UNDEF` if the query was interrupted, timed out or otherwise failed.
5086    pub fn Z3_fixedpoint_query(
5087        c: Z3_context,
5088        d: Z3_fixedpoint,
5089        query: Z3_ast,
5090    ) -> Z3_lbool;
5091    /// Pose multiple queries against the asserted rules.
5092    ///
5093    /// The queries are encoded as relations (function declarations).
5094    ///
5095    /// query returns
5096    /// - `Z3_L_FALSE` if the query is unsatisfiable.
5097    /// - `Z3_L_TRUE` if the query is satisfiable. Obtain the answer by calling [`Z3_fixedpoint_get_answer`].
5098    /// - `Z3_L_UNDEF` if the query was interrupted, timed out or otherwise failed.
5099    pub fn Z3_fixedpoint_query_relations(
5100        c: Z3_context,
5101        d: Z3_fixedpoint,
5102        num_relations: ::core::ffi::c_uint,
5103        relations: *const Z3_func_decl,
5104    ) -> Z3_lbool;
5105    /// Retrieve a formula that encodes satisfying answers to the query.
5106    ///
5107    ///
5108    /// When used in Datalog mode, the returned answer is a disjunction of conjuncts.
5109    /// Each conjunct encodes values of the bound variables of the query that are satisfied.
5110    /// In PDR mode, the returned answer is a single conjunction.
5111    ///
5112    /// When used in Datalog mode the previous call to [`Z3_fixedpoint_query`] must have returned `Z3_L_TRUE`.
5113    /// When used with the PDR engine, the previous call must have been either `Z3_L_TRUE` or `Z3_L_FALSE`.
5114    pub fn Z3_fixedpoint_get_answer(c: Z3_context, d: Z3_fixedpoint) -> Option<Z3_ast>;
5115    /// Retrieve a string that describes the last status returned by [`Z3_fixedpoint_query`].
5116    ///
5117    /// Use this method when [`Z3_fixedpoint_query`] returns `Z3_L_UNDEF`.
5118    pub fn Z3_fixedpoint_get_reason_unknown(
5119        c: Z3_context,
5120        d: Z3_fixedpoint,
5121    ) -> Z3_string;
5122    /// Update a named rule.
5123    /// A rule with the same name must have been previously created.
5124    pub fn Z3_fixedpoint_update_rule(
5125        c: Z3_context,
5126        d: Z3_fixedpoint,
5127        a: Z3_ast,
5128        name: Z3_symbol,
5129    );
5130    /// Query the PDR engine for the maximal levels properties are known about predicate.
5131    ///
5132    /// This call retrieves the maximal number of relevant unfoldings
5133    /// of `pred` with respect to the current exploration state.
5134    /// Note: this functionality is PDR specific.
5135    pub fn Z3_fixedpoint_get_num_levels(
5136        c: Z3_context,
5137        d: Z3_fixedpoint,
5138        pred: Z3_func_decl,
5139    ) -> ::core::ffi::c_uint;
5140    /// Retrieve the current cover of `pred` up to `level` unfoldings.
5141    /// Return just the delta that is known at `level`. To
5142    /// obtain the full set of properties of `pred` one should query
5143    /// at `level`+1 , `level`+2 etc, and include `level`=-1.
5144    ///
5145    /// Note: this functionality is PDR specific.
5146    pub fn Z3_fixedpoint_get_cover_delta(
5147        c: Z3_context,
5148        d: Z3_fixedpoint,
5149        level: ::core::ffi::c_int,
5150        pred: Z3_func_decl,
5151    ) -> Option<Z3_ast>;
5152    /// Add property about the predicate `pred`.
5153    /// Add a property of predicate `pred` at `level`.
5154    /// It gets pushed forward when possible.
5155    ///
5156    /// Note: level = -1 is treated as the fixedpoint. So passing -1 for the `level`
5157    /// means that the property is true of the fixed-point unfolding with respect to `pred`.
5158    ///
5159    /// Note: this functionality is PDR specific.
5160    pub fn Z3_fixedpoint_add_cover(
5161        c: Z3_context,
5162        d: Z3_fixedpoint,
5163        level: ::core::ffi::c_int,
5164        pred: Z3_func_decl,
5165        property: Z3_ast,
5166    );
5167    /// Retrieve statistics information from the last call to [`Z3_fixedpoint_query`].
5168    pub fn Z3_fixedpoint_get_statistics(
5169        c: Z3_context,
5170        d: Z3_fixedpoint,
5171    ) -> Option<Z3_stats>;
5172    /// Register relation as Fixedpoint defined.
5173    /// Fixedpoint defined relations have least-fixedpoint semantics.
5174    /// For example, the relation is empty if it does not occur
5175    /// in a head or a fact.
5176    pub fn Z3_fixedpoint_register_relation(
5177        c: Z3_context,
5178        d: Z3_fixedpoint,
5179        f: Z3_func_decl,
5180    );
5181    /// Configure the predicate representation.
5182    ///
5183    /// It sets the predicate to use a set of domains given by the list of symbols.
5184    /// The domains given by the list of symbols must belong to a set
5185    /// of built-in domains.
5186    pub fn Z3_fixedpoint_set_predicate_representation(
5187        c: Z3_context,
5188        d: Z3_fixedpoint,
5189        f: Z3_func_decl,
5190        num_relations: ::core::ffi::c_uint,
5191        relation_kinds: *const Z3_symbol,
5192    );
5193    /// Retrieve set of rules from fixedpoint context.
5194    pub fn Z3_fixedpoint_get_rules(
5195        c: Z3_context,
5196        f: Z3_fixedpoint,
5197    ) -> Option<Z3_ast_vector>;
5198    /// Retrieve set of background assertions from fixedpoint context.
5199    pub fn Z3_fixedpoint_get_assertions(
5200        c: Z3_context,
5201        f: Z3_fixedpoint,
5202    ) -> Option<Z3_ast_vector>;
5203    /// Set parameters on fixedpoint context.
5204    ///
5205    /// # See also
5206    ///
5207    /// - [`Z3_fixedpoint_get_help`]
5208    /// - [`Z3_fixedpoint_get_param_descrs`]
5209    pub fn Z3_fixedpoint_set_params(c: Z3_context, f: Z3_fixedpoint, p: Z3_params);
5210    /// Return a string describing all fixedpoint available parameters.
5211    ///
5212    /// # See also
5213    ///
5214    /// - [`Z3_fixedpoint_get_param_descrs`]
5215    /// - [`Z3_fixedpoint_set_params`]
5216    pub fn Z3_fixedpoint_get_help(c: Z3_context, f: Z3_fixedpoint) -> Z3_string;
5217    /// Return the parameter description set for the given fixedpoint object.
5218    ///
5219    /// # See also
5220    ///
5221    /// - [`Z3_fixedpoint_get_help`]
5222    /// - [`Z3_fixedpoint_set_params`]
5223    pub fn Z3_fixedpoint_get_param_descrs(
5224        c: Z3_context,
5225        f: Z3_fixedpoint,
5226    ) -> Option<Z3_param_descrs>;
5227    /// Print the current rules and background axioms as a string.
5228    /// - `c`: - context.
5229    /// - `f`: - fixedpoint context.
5230    /// - `num_queries`: - number of additional queries to print.
5231    /// - `queries`: - additional queries.
5232    ///
5233    /// # See also
5234    ///
5235    /// - [`Z3_fixedpoint_from_file`]
5236    /// - [`Z3_fixedpoint_from_string`]
5237    pub fn Z3_fixedpoint_to_string(
5238        c: Z3_context,
5239        f: Z3_fixedpoint,
5240        num_queries: ::core::ffi::c_uint,
5241        queries: *mut Z3_ast,
5242    ) -> Z3_string;
5243    /// Parse an SMT-LIB2 string with fixedpoint rules.
5244    /// Add the rules to the current fixedpoint context.
5245    /// Return the set of queries in the string.
5246    ///
5247    /// - `c`: - context.
5248    /// - `f`: - fixedpoint context.
5249    /// - `s`: - string containing SMT2 specification.
5250    ///
5251    /// # See also
5252    ///
5253    /// - [`Z3_fixedpoint_from_file`]
5254    /// - [`Z3_fixedpoint_to_string`]
5255    pub fn Z3_fixedpoint_from_string(
5256        c: Z3_context,
5257        f: Z3_fixedpoint,
5258        s: Z3_string,
5259    ) -> Option<Z3_ast_vector>;
5260    /// Parse an SMT-LIB2 file with fixedpoint rules.
5261    /// Add the rules to the current fixedpoint context.
5262    /// Return the set of queries in the file.
5263    ///
5264    /// - `c`: - context.
5265    /// - `f`: - fixedpoint context.
5266    /// - `s`: - path to file containing SMT2 specification.
5267    ///
5268    /// # See also
5269    ///
5270    /// - [`Z3_fixedpoint_from_string`]
5271    /// - [`Z3_fixedpoint_to_string`]
5272    pub fn Z3_fixedpoint_from_file(
5273        c: Z3_context,
5274        f: Z3_fixedpoint,
5275        s: Z3_string,
5276    ) -> Option<Z3_ast_vector>;
5277    /// Initialize the context with a user-defined state.
5278    pub fn Z3_fixedpoint_init(
5279        c: Z3_context,
5280        d: Z3_fixedpoint,
5281        state: *mut ::core::ffi::c_void,
5282    );
5283    /// Register a callback to destructive updates.
5284    ///
5285    /// Registers are identified with terms encoded as fresh constants,
5286    pub fn Z3_fixedpoint_set_reduce_assign_callback(
5287        c: Z3_context,
5288        d: Z3_fixedpoint,
5289        cb: Z3_fixedpoint_reduce_assign_callback_fptr,
5290    );
5291    /// Register a callback for building terms based on the relational operators.
5292    pub fn Z3_fixedpoint_set_reduce_app_callback(
5293        c: Z3_context,
5294        d: Z3_fixedpoint,
5295        cb: Z3_fixedpoint_reduce_app_callback_fptr,
5296    );
5297    /// set export callback for lemmas
5298    pub fn Z3_fixedpoint_add_callback(
5299        ctx: Z3_context,
5300        f: Z3_fixedpoint,
5301        state: *mut ::core::ffi::c_void,
5302        new_lemma_eh: Z3_fixedpoint_new_lemma_eh,
5303        predecessor_eh: Z3_fixedpoint_predecessor_eh,
5304        unfold_eh: Z3_fixedpoint_unfold_eh,
5305    );
5306    pub fn Z3_fixedpoint_add_constraint(
5307        c: Z3_context,
5308        d: Z3_fixedpoint,
5309        e: Z3_ast,
5310        lvl: ::core::ffi::c_uint,
5311    );
5312    /// Create a new optimize context.
5313    ///
5314    /// **Remark:** User must use [`Z3_optimize_inc_ref`] and [`Z3_optimize_dec_ref`] to manage optimize objects.
5315    /// Even if the context was created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
5316    pub fn Z3_mk_optimize(c: Z3_context) -> Option<Z3_optimize>;
5317    /// Increment the reference counter of the given optimize context
5318    pub fn Z3_optimize_inc_ref(c: Z3_context, d: Z3_optimize);
5319    /// Decrement the reference counter of the given optimize context.
5320    pub fn Z3_optimize_dec_ref(c: Z3_context, d: Z3_optimize);
5321    /// Assert hard constraint to the optimization context.
5322    ///
5323    /// # See also
5324    ///
5325    /// - [`Z3_optimize_assert_soft`]
5326    /// - [`Z3_optimize_assert_and_track`]
5327    pub fn Z3_optimize_assert(c: Z3_context, o: Z3_optimize, a: Z3_ast);
5328    /// Assert tracked hard constraint to the optimization context.
5329    ///
5330    /// # See also
5331    ///
5332    /// - [`Z3_optimize_assert`]
5333    /// - [`Z3_optimize_assert_soft`]
5334    pub fn Z3_optimize_assert_and_track(
5335        c: Z3_context,
5336        o: Z3_optimize,
5337        a: Z3_ast,
5338        t: Z3_ast,
5339    );
5340    /// Add a maximization constraint.
5341    /// - `c`: - context
5342    /// - `o`: - optimization context
5343    /// - `t`: - arithmetical term
5344    ///
5345    /// # See also
5346    ///
5347    /// - [`Z3_optimize_minimize`]
5348    pub fn Z3_optimize_maximize(
5349        c: Z3_context,
5350        o: Z3_optimize,
5351        t: Z3_ast,
5352    ) -> ::core::ffi::c_uint;
5353    /// Add a minimization constraint.
5354    /// - `c`: - context
5355    /// - `o`: - optimization context
5356    /// - `t`: - arithmetical term
5357    ///
5358    /// # See also
5359    ///
5360    /// - [`Z3_optimize_maximize`]
5361    pub fn Z3_optimize_minimize(
5362        c: Z3_context,
5363        o: Z3_optimize,
5364        t: Z3_ast,
5365    ) -> ::core::ffi::c_uint;
5366    /// Create a backtracking point.
5367    ///
5368    /// The optimize solver contains a set of rules, added facts and assertions.
5369    /// The set of rules, facts and assertions are restored upon calling [`Z3_optimize_pop`].
5370    ///
5371    /// # See also
5372    ///
5373    /// - [`Z3_optimize_pop`]
5374    pub fn Z3_optimize_push(c: Z3_context, d: Z3_optimize);
5375    /// Backtrack one level.
5376    ///
5377    /// # Preconditions
5378    ///
5379    /// - `The number of calls to pop cannot exceed calls to push.`
5380    ///
5381    /// # See also
5382    ///
5383    /// - [`Z3_optimize_push`]
5384    pub fn Z3_optimize_pop(c: Z3_context, d: Z3_optimize);
5385    /// provide an initialization hint to the solver.
5386    /// The initialization hint is used to calibrate an initial value of the expression that
5387    /// represents a variable. If the variable is Boolean, the initial phase is set
5388    /// according to `value`. If the variable is an integer or real,
5389    /// the initial Simplex tableau is recalibrated to attempt to follow the value assignment.
5390    pub fn Z3_optimize_set_initial_value(
5391        c: Z3_context,
5392        o: Z3_optimize,
5393        v: Z3_ast,
5394        val: Z3_ast,
5395    );
5396    /// Check consistency and produce optimal values.
5397    /// - `c`: - context
5398    /// - `o`: - optimization context
5399    /// - `num_assumptions`: - number of additional assumptions
5400    /// - `assumptions`: - the additional assumptions
5401    ///
5402    /// # See also
5403    ///
5404    /// - [`Z3_optimize_get_reason_unknown`]
5405    /// - [`Z3_optimize_get_model`]
5406    /// - [`Z3_optimize_get_statistics`]
5407    /// - [`Z3_optimize_get_unsat_core`]
5408    pub fn Z3_optimize_check(
5409        c: Z3_context,
5410        o: Z3_optimize,
5411        num_assumptions: ::core::ffi::c_uint,
5412        assumptions: *const Z3_ast,
5413    ) -> Z3_lbool;
5414    /// Retrieve a string that describes the last status returned by [`Z3_optimize_check`].
5415    ///
5416    /// Use this method when [`Z3_optimize_check`] returns `Z3_L_UNDEF`.
5417    pub fn Z3_optimize_get_reason_unknown(c: Z3_context, d: Z3_optimize) -> Z3_string;
5418    /// Retrieve the model for the last [`Z3_optimize_check`]
5419    ///
5420    /// The error handler is invoked if a model is not available because
5421    /// the commands above were not invoked for the given optimization
5422    /// solver, or if the result was `Z3_L_FALSE`.
5423    pub fn Z3_optimize_get_model(c: Z3_context, o: Z3_optimize) -> Option<Z3_model>;
5424    /// Retrieve the unsat core for the last [`Z3_optimize_check`]
5425    /// The unsat core is a subset of the assumptions `a`.
5426    pub fn Z3_optimize_get_unsat_core(
5427        c: Z3_context,
5428        o: Z3_optimize,
5429    ) -> Option<Z3_ast_vector>;
5430    /// Set parameters on optimization context, including parameters for
5431    /// the underlying SMT solver.
5432    ///
5433    /// - `c`: - context
5434    /// - `o`: - optimization context
5435    /// - `p`: - parameters
5436    ///
5437    /// # See also
5438    ///
5439    /// - [`Z3_optimize_get_help`]
5440    /// - [`Z3_optimize_get_param_descrs`]
5441    pub fn Z3_optimize_set_params(c: Z3_context, o: Z3_optimize, p: Z3_params);
5442    /// Return the parameter description set for the given optimize object.
5443    ///
5444    /// - `c`: - context
5445    /// - `o`: - optimization context
5446    ///
5447    /// # See also
5448    ///
5449    /// - [`Z3_optimize_get_help`]
5450    /// - [`Z3_optimize_set_params`]
5451    pub fn Z3_optimize_get_param_descrs(
5452        c: Z3_context,
5453        o: Z3_optimize,
5454    ) -> Option<Z3_param_descrs>;
5455    /// Retrieve lower bound value or approximation for the i'th optimization objective.
5456    ///
5457    /// An attained, certified irrational algebraic optimum is returned as an
5458    /// exact algebraic numeral by both [`Z3_optimize_get_lower`] and
5459    /// [`Z3_optimize_get_upper`]. Use [`Z3_get_algebraic_number_lower`] and
5460    /// [`Z3_get_algebraic_number_upper`] to obtain rational approximations.
5461    ///
5462    /// A certified finite limit that is not attained includes an infinitesimal
5463    /// term: for example, `sqrt(2) - epsilon` for a supremum. The finite
5464    /// part can be algebraic even though the whole expression is not an
5465    /// algebraic numeral. Use [`Z3_optimize_get_lower_as_vector`] to inspect
5466    /// the finite part and the infinitesimal coefficient separately.
5467    ///
5468    /// - `c`: - context
5469    /// - `o`: - optimization context
5470    /// - `idx`: - index of optimization objective
5471    ///
5472    /// # See also
5473    ///
5474    /// - [`Z3_optimize_get_upper`]
5475    /// - [`Z3_optimize_get_lower_as_vector`]
5476    /// - [`Z3_optimize_get_upper_as_vector`]
5477    pub fn Z3_optimize_get_lower(
5478        c: Z3_context,
5479        o: Z3_optimize,
5480        idx: ::core::ffi::c_uint,
5481    ) -> Option<Z3_ast>;
5482    /// Retrieve upper bound value or approximation for the i'th optimization objective.
5483    ///
5484    /// Certified algebraic optima and finite open limits are returned
5485    /// as described for [`Z3_optimize_get_lower`].
5486    ///
5487    /// - `c`: - context
5488    /// - `o`: - optimization context
5489    /// - `idx`: - index of optimization objective
5490    ///
5491    /// # See also
5492    ///
5493    /// - [`Z3_optimize_get_lower`]
5494    /// - [`Z3_optimize_get_lower_as_vector`]
5495    /// - [`Z3_optimize_get_upper_as_vector`]
5496    pub fn Z3_optimize_get_upper(
5497        c: Z3_context,
5498        o: Z3_optimize,
5499        idx: ::core::ffi::c_uint,
5500    ) -> Option<Z3_ast>;
5501    /// Retrieve lower bound value or approximation for the i'th optimization objective.
5502    /// The returned vector is of length 3.
5503    /// Its entries are coefficients `a`, `b`, `c` and encode the result of
5504    /// [`Z3_optimize_get_lower`] `a * infinity + b + c * epsilon`.
5505    /// The coefficients `a` and `c` are rational numerals. The finite
5506    /// part `b` is a rational numeral or an exact irrational algebraic
5507    /// numeral when such a bound has been certified.
5508    /// For a finite attained optimum, `a` and `c` are zero. A finite
5509    /// open limit has `a` equal to zero and a nonzero infinitesimal
5510    /// coefficient `c`, even when `b` is algebraic.
5511    ///
5512    /// - `c`: - context
5513    /// - `o`: - optimization context
5514    /// - `idx`: - index of optimization objective
5515    ///
5516    /// # See also
5517    ///
5518    /// - [`Z3_optimize_get_lower`]
5519    /// - [`Z3_optimize_get_upper`]
5520    /// - [`Z3_optimize_get_upper_as_vector`]
5521    pub fn Z3_optimize_get_lower_as_vector(
5522        c: Z3_context,
5523        o: Z3_optimize,
5524        idx: ::core::ffi::c_uint,
5525    ) -> Option<Z3_ast_vector>;
5526    /// Retrieve upper bound value or approximation for the i'th optimization objective.
5527    ///
5528    /// The returned vector has the same coefficient and algebraic-value
5529    /// semantics as [`Z3_optimize_get_lower_as_vector`], and encodes the result
5530    /// of [`Z3_optimize_get_upper`].
5531    ///
5532    /// - `c`: - context
5533    /// - `o`: - optimization context
5534    /// - `idx`: - index of optimization objective
5535    ///
5536    /// # See also
5537    ///
5538    /// - [`Z3_optimize_get_lower`]
5539    /// - [`Z3_optimize_get_upper`]
5540    /// - [`Z3_optimize_get_lower_as_vector`]
5541    pub fn Z3_optimize_get_upper_as_vector(
5542        c: Z3_context,
5543        o: Z3_optimize,
5544        idx: ::core::ffi::c_uint,
5545    ) -> Option<Z3_ast_vector>;
5546    /// Print the current context as a string.
5547    /// - `c`: - context.
5548    /// - `o`: - optimization context.
5549    ///
5550    /// # See also
5551    ///
5552    /// - [`Z3_optimize_from_file`]
5553    /// - [`Z3_optimize_from_string`]
5554    pub fn Z3_optimize_to_string(c: Z3_context, o: Z3_optimize) -> Z3_string;
5555    /// Parse an SMT-LIB2 string with assertions,
5556    /// soft constraints and optimization objectives.
5557    /// Add the parsed constraints and objectives to the optimization context.
5558    ///
5559    /// - `c`: - context.
5560    /// - `o`: - optimize context.
5561    /// - `s`: - string containing SMT2 specification.
5562    ///
5563    /// # See also
5564    ///
5565    /// - [`Z3_optimize_from_file`]
5566    /// - [`Z3_optimize_to_string`]
5567    pub fn Z3_optimize_from_string(c: Z3_context, o: Z3_optimize, s: Z3_string);
5568    /// Parse an SMT-LIB2 file with assertions,
5569    /// soft constraints and optimization objectives.
5570    /// Add the parsed constraints and objectives to the optimization context.
5571    ///
5572    /// - `c`: - context.
5573    /// - `o`: - optimize context.
5574    /// - `s`: - path to file containing SMT2 specification.
5575    ///
5576    /// # See also
5577    ///
5578    /// - [`Z3_optimize_from_string`]
5579    /// - [`Z3_optimize_to_string`]
5580    pub fn Z3_optimize_from_file(c: Z3_context, o: Z3_optimize, s: Z3_string);
5581    /// Return a string containing a description of parameters accepted by optimize.
5582    ///
5583    /// # See also
5584    ///
5585    /// - [`Z3_optimize_get_param_descrs`]
5586    /// - [`Z3_optimize_set_params`]
5587    pub fn Z3_optimize_get_help(c: Z3_context, t: Z3_optimize) -> Z3_string;
5588    /// Retrieve statistics information from the last call to [`Z3_optimize_check`]
5589    pub fn Z3_optimize_get_statistics(c: Z3_context, d: Z3_optimize) -> Option<Z3_stats>;
5590    /// Return the set of asserted formulas on the optimization context.
5591    pub fn Z3_optimize_get_assertions(
5592        c: Z3_context,
5593        o: Z3_optimize,
5594    ) -> Option<Z3_ast_vector>;
5595    /// Return objectives on the optimization context.
5596    /// If the objective function is a max-sat objective it is returned
5597    /// as a Pseudo-Boolean (minimization) sum of the form `(+ (if f1 w1 0) (if f2 w2 0) ...)`
5598    /// If the objective function is entered as a maximization objective, then return
5599    /// the corresponding minimization objective. In this way the resulting objective
5600    /// function is always returned as a minimization objective.
5601    pub fn Z3_optimize_get_objectives(
5602        c: Z3_context,
5603        o: Z3_optimize,
5604    ) -> Option<Z3_ast_vector>;
5605    /// register a model event handler for new models.
5606    pub fn Z3_optimize_register_model_eh(
5607        c: Z3_context,
5608        o: Z3_optimize,
5609        m: Z3_model,
5610        ctx: *mut ::core::ffi::c_void,
5611        model_eh: Z3_model_eh,
5612    );
5613    /// Copy an optimization context from a source to a target context.
5614    ///
5615    /// This function allows translating an optimization context from one Z3_context
5616    /// to another. This is useful when working with multiple contexts and needing to
5617    /// transfer optimization problems between them.
5618    ///
5619    /// - `c`: Source context containing the optimization context to translate
5620    /// - `o`: The optimization context to translate from the source context
5621    /// - `target`: Target context where the optimization context will be created
5622    ///
5623    /// \return A new optimization context in the target context with the same state
5624    pub fn Z3_optimize_translate(
5625        c: Z3_context,
5626        o: Z3_optimize,
5627        target: Z3_context,
5628    ) -> Option<Z3_optimize>;
5629    /// Create the RoundingMode sort.
5630    ///
5631    /// - `c`: logical context
5632    ///
5633    /// # See also
5634    ///
5635    /// - [`Z3_mk_fpa_round_nearest_ties_to_away`]
5636    /// - [`Z3_mk_fpa_rna`]
5637    /// - [`Z3_mk_fpa_round_nearest_ties_to_even`]
5638    /// - [`Z3_mk_fpa_rne`]
5639    /// - [`Z3_mk_fpa_round_toward_negative`]
5640    /// - [`Z3_mk_fpa_rtn`]
5641    /// - [`Z3_mk_fpa_round_toward_positive`]
5642    /// - [`Z3_mk_fpa_rtp`]
5643    /// - [`Z3_mk_fpa_round_toward_zero`]
5644    /// - [`Z3_mk_fpa_rtz`]
5645    pub fn Z3_mk_fpa_rounding_mode_sort(c: Z3_context) -> Option<Z3_sort>;
5646    /// Create a numeral of RoundingMode sort which represents the NearestTiesToEven rounding mode.
5647    ///
5648    /// This is the same as [`Z3_mk_fpa_rne`].
5649    ///
5650    /// - `c`: logical context
5651    ///
5652    /// # See also
5653    ///
5654    /// - [`Z3_mk_fpa_rounding_mode_sort`]
5655    /// - [`Z3_mk_fpa_round_nearest_ties_to_away`]
5656    /// - [`Z3_mk_fpa_round_toward_negative`]
5657    /// - [`Z3_mk_fpa_round_toward_positive`]
5658    /// - [`Z3_mk_fpa_round_toward_zero`]
5659    pub fn Z3_mk_fpa_round_nearest_ties_to_even(c: Z3_context) -> Option<Z3_ast>;
5660    /// Create a numeral of RoundingMode sort which represents the NearestTiesToEven rounding mode.
5661    ///
5662    /// This is the same as [`Z3_mk_fpa_round_nearest_ties_to_even`].
5663    ///
5664    /// - `c`: logical context
5665    ///
5666    /// # See also
5667    ///
5668    /// - [`Z3_mk_fpa_rounding_mode_sort`]
5669    /// - [`Z3_mk_fpa_rna`]
5670    /// - [`Z3_mk_fpa_rtn`]
5671    /// - [`Z3_mk_fpa_rtp`]
5672    /// - [`Z3_mk_fpa_rtz`]
5673    pub fn Z3_mk_fpa_rne(c: Z3_context) -> Option<Z3_ast>;
5674    /// Create a numeral of RoundingMode sort which represents the NearestTiesToAway rounding mode.
5675    ///
5676    /// This is the same as [`Z3_mk_fpa_rna`].
5677    ///
5678    /// - `c`: logical context
5679    ///
5680    /// # See also
5681    ///
5682    /// - [`Z3_mk_fpa_rounding_mode_sort`]
5683    /// - [`Z3_mk_fpa_round_nearest_ties_to_even`]
5684    /// - [`Z3_mk_fpa_round_toward_negative`]
5685    /// - [`Z3_mk_fpa_round_toward_positive`]
5686    /// - [`Z3_mk_fpa_round_toward_zero`]
5687    pub fn Z3_mk_fpa_round_nearest_ties_to_away(c: Z3_context) -> Option<Z3_ast>;
5688    /// Create a numeral of RoundingMode sort which represents the NearestTiesToAway rounding mode.
5689    ///
5690    /// This is the same as [`Z3_mk_fpa_round_nearest_ties_to_away`].
5691    ///
5692    /// - `c`: logical context
5693    ///
5694    /// # See also
5695    ///
5696    /// - [`Z3_mk_fpa_rounding_mode_sort`]
5697    /// - [`Z3_mk_fpa_rne`]
5698    /// - [`Z3_mk_fpa_rtn`]
5699    /// - [`Z3_mk_fpa_rtp`]
5700    /// - [`Z3_mk_fpa_rtz`]
5701    pub fn Z3_mk_fpa_rna(c: Z3_context) -> Option<Z3_ast>;
5702    /// Create a numeral of RoundingMode sort which represents the TowardPositive rounding mode.
5703    ///
5704    /// This is the same as [`Z3_mk_fpa_rtp`].
5705    ///
5706    /// - `c`: logical context
5707    ///
5708    /// # See also
5709    ///
5710    /// - [`Z3_mk_fpa_rounding_mode_sort`]
5711    /// - [`Z3_mk_fpa_round_nearest_ties_to_away`]
5712    /// - [`Z3_mk_fpa_round_nearest_ties_to_even`]
5713    /// - [`Z3_mk_fpa_round_toward_negative`]
5714    /// - [`Z3_mk_fpa_round_toward_zero`]
5715    pub fn Z3_mk_fpa_round_toward_positive(c: Z3_context) -> Option<Z3_ast>;
5716    /// Create a numeral of RoundingMode sort which represents the TowardPositive rounding mode.
5717    ///
5718    /// This is the same as [`Z3_mk_fpa_round_toward_positive`].
5719    ///
5720    /// - `c`: logical context
5721    ///
5722    /// # See also
5723    ///
5724    /// - [`Z3_mk_fpa_rounding_mode_sort`]
5725    /// - [`Z3_mk_fpa_rna`]
5726    /// - [`Z3_mk_fpa_rne`]
5727    /// - [`Z3_mk_fpa_rtn`]
5728    /// - [`Z3_mk_fpa_rtz`]
5729    pub fn Z3_mk_fpa_rtp(c: Z3_context) -> Option<Z3_ast>;
5730    /// Create a numeral of RoundingMode sort which represents the TowardNegative rounding mode.
5731    ///
5732    /// This is the same as [`Z3_mk_fpa_rtn`].
5733    ///
5734    /// - `c`: logical context
5735    ///
5736    /// # See also
5737    ///
5738    /// - [`Z3_mk_fpa_rounding_mode_sort`]
5739    /// - [`Z3_mk_fpa_round_nearest_ties_to_away`]
5740    /// - [`Z3_mk_fpa_round_nearest_ties_to_even`]
5741    /// - [`Z3_mk_fpa_round_toward_positive`]
5742    /// - [`Z3_mk_fpa_round_toward_zero`]
5743    pub fn Z3_mk_fpa_round_toward_negative(c: Z3_context) -> Option<Z3_ast>;
5744    /// Create a numeral of RoundingMode sort which represents the TowardNegative rounding mode.
5745    ///
5746    /// This is the same as [`Z3_mk_fpa_round_toward_negative`].
5747    ///
5748    /// - `c`: logical context
5749    ///
5750    /// # See also
5751    ///
5752    /// - [`Z3_mk_fpa_rounding_mode_sort`]
5753    /// - [`Z3_mk_fpa_rna`]
5754    /// - [`Z3_mk_fpa_rne`]
5755    /// - [`Z3_mk_fpa_rtp`]
5756    /// - [`Z3_mk_fpa_rtz`]
5757    pub fn Z3_mk_fpa_rtn(c: Z3_context) -> Option<Z3_ast>;
5758    /// Create a numeral of RoundingMode sort which represents the TowardZero rounding mode.
5759    ///
5760    /// This is the same as [`Z3_mk_fpa_rtz`].
5761    ///
5762    /// - `c`: logical context
5763    ///
5764    /// # See also
5765    ///
5766    /// - [`Z3_mk_fpa_rounding_mode_sort`]
5767    /// - [`Z3_mk_fpa_round_nearest_ties_to_away`]
5768    /// - [`Z3_mk_fpa_round_nearest_ties_to_even`]
5769    /// - [`Z3_mk_fpa_round_toward_negative`]
5770    /// - [`Z3_mk_fpa_round_toward_positive`]
5771    pub fn Z3_mk_fpa_round_toward_zero(c: Z3_context) -> Option<Z3_ast>;
5772    /// Create a numeral of RoundingMode sort which represents the TowardZero rounding mode.
5773    ///
5774    /// This is the same as [`Z3_mk_fpa_round_toward_zero`].
5775    ///
5776    /// - `c`: logical context
5777    ///
5778    /// # See also
5779    ///
5780    /// - [`Z3_mk_fpa_rounding_mode_sort`]
5781    /// - [`Z3_mk_fpa_rna`]
5782    /// - [`Z3_mk_fpa_rne`]
5783    /// - [`Z3_mk_fpa_rtn`]
5784    /// - [`Z3_mk_fpa_rtp`]
5785    pub fn Z3_mk_fpa_rtz(c: Z3_context) -> Option<Z3_ast>;
5786    /// Create a FloatingPoint sort.
5787    ///
5788    /// - `c`: logical context
5789    /// - `ebits`: number of exponent bits
5790    /// - `sbits`: number of significand bits
5791    ///
5792    /// **Remark:** `ebits` must be larger than 1 and `sbits` must be larger than 2.
5793    ///
5794    /// # See also
5795    ///
5796    /// - [`Z3_mk_fpa_sort_half`]
5797    /// - [`Z3_mk_fpa_sort_16`]
5798    /// - [`Z3_mk_fpa_sort_single`]
5799    /// - [`Z3_mk_fpa_sort_32`]
5800    /// - [`Z3_mk_fpa_sort_double`]
5801    /// - [`Z3_mk_fpa_sort_64`]
5802    /// - [`Z3_mk_fpa_sort_quadruple`]
5803    /// - [`Z3_mk_fpa_sort_128`]
5804    pub fn Z3_mk_fpa_sort(
5805        c: Z3_context,
5806        ebits: ::core::ffi::c_uint,
5807        sbits: ::core::ffi::c_uint,
5808    ) -> Option<Z3_sort>;
5809    /// Create the half-precision (16-bit) FloatingPoint sort.
5810    ///
5811    /// This is the same as [`Z3_mk_fpa_sort_16`].
5812    ///
5813    /// - `c`: logical context
5814    ///
5815    /// # See also
5816    ///
5817    /// - [`Z3_mk_fpa_sort`]
5818    /// - [`Z3_mk_fpa_sort_single`]
5819    /// - [`Z3_mk_fpa_sort_double`]
5820    /// - [`Z3_mk_fpa_sort_quadruple`]
5821    pub fn Z3_mk_fpa_sort_half(c: Z3_context) -> Option<Z3_sort>;
5822    /// Create the half-precision (16-bit) FloatingPoint sort.
5823    ///
5824    /// This is the same as [`Z3_mk_fpa_sort_half`].
5825    ///
5826    /// - `c`: logical context
5827    ///
5828    /// # See also
5829    ///
5830    /// - [`Z3_mk_fpa_sort`]
5831    /// - [`Z3_mk_fpa_sort_32`]
5832    /// - [`Z3_mk_fpa_sort_64`]
5833    /// - [`Z3_mk_fpa_sort_128`]
5834    pub fn Z3_mk_fpa_sort_16(c: Z3_context) -> Option<Z3_sort>;
5835    /// Create the single-precision (32-bit) FloatingPoint sort.
5836    ///
5837    /// This is the same as [`Z3_mk_fpa_sort_32`].
5838    ///
5839    /// - `c`: logical context.
5840    ///
5841    /// # See also
5842    ///
5843    /// - [`Z3_mk_fpa_sort`]
5844    /// - [`Z3_mk_fpa_sort_half`]
5845    /// - [`Z3_mk_fpa_sort_double`]
5846    /// - [`Z3_mk_fpa_sort_quadruple`]
5847    pub fn Z3_mk_fpa_sort_single(c: Z3_context) -> Option<Z3_sort>;
5848    /// Create the single-precision (32-bit) FloatingPoint sort.
5849    ///
5850    /// This is the same as [`Z3_mk_fpa_sort_single`].
5851    ///
5852    /// - `c`: logical context
5853    ///
5854    /// # See also
5855    ///
5856    /// - [`Z3_mk_fpa_sort`]
5857    /// - [`Z3_mk_fpa_sort_16`]
5858    /// - [`Z3_mk_fpa_sort_64`]
5859    /// - [`Z3_mk_fpa_sort_128`]
5860    pub fn Z3_mk_fpa_sort_32(c: Z3_context) -> Option<Z3_sort>;
5861    /// Create the double-precision (64-bit) FloatingPoint sort.
5862    ///
5863    /// This is the same as [`Z3_mk_fpa_sort_64`].
5864    ///
5865    /// - `c`: logical context
5866    ///
5867    /// # See also
5868    ///
5869    /// - [`Z3_mk_fpa_sort`]
5870    /// - [`Z3_mk_fpa_sort_half`]
5871    /// - [`Z3_mk_fpa_sort_single`]
5872    /// - [`Z3_mk_fpa_sort_quadruple`]
5873    pub fn Z3_mk_fpa_sort_double(c: Z3_context) -> Option<Z3_sort>;
5874    /// Create the double-precision (64-bit) FloatingPoint sort.
5875    ///
5876    /// This is the same as [`Z3_mk_fpa_sort_double`].
5877    ///
5878    /// - `c`: logical context
5879    ///
5880    /// # See also
5881    ///
5882    /// - [`Z3_mk_fpa_sort`]
5883    /// - [`Z3_mk_fpa_sort_16`]
5884    /// - [`Z3_mk_fpa_sort_32`]
5885    /// - [`Z3_mk_fpa_sort_128`]
5886    pub fn Z3_mk_fpa_sort_64(c: Z3_context) -> Option<Z3_sort>;
5887    /// Create the quadruple-precision (128-bit) FloatingPoint sort.
5888    ///
5889    /// This is the same as [`Z3_mk_fpa_sort_128`].
5890    ///
5891    /// - `c`: logical context
5892    ///
5893    /// # See also
5894    ///
5895    /// - [`Z3_mk_fpa_sort`]
5896    /// - [`Z3_mk_fpa_sort_half`]
5897    /// - [`Z3_mk_fpa_sort_single`]
5898    /// - [`Z3_mk_fpa_sort_double`]
5899    pub fn Z3_mk_fpa_sort_quadruple(c: Z3_context) -> Option<Z3_sort>;
5900    /// Create the quadruple-precision (128-bit) FloatingPoint sort.
5901    ///
5902    /// This is the same as [`Z3_mk_fpa_sort_quadruple`].
5903    ///
5904    /// - `c`: logical context
5905    ///
5906    /// # See also
5907    ///
5908    /// - [`Z3_mk_fpa_sort`]
5909    /// - [`Z3_mk_fpa_sort_16`]
5910    /// - [`Z3_mk_fpa_sort_32`]
5911    /// - [`Z3_mk_fpa_sort_64`]
5912    pub fn Z3_mk_fpa_sort_128(c: Z3_context) -> Option<Z3_sort>;
5913    /// Create a floating-point NaN of sort `s`.
5914    ///
5915    /// - `c`: logical context
5916    /// - `s`: target sort
5917    ///
5918    /// # See also
5919    ///
5920    /// - [`Z3_mk_fpa_inf`]
5921    /// - [`Z3_mk_fpa_is_nan`]
5922    /// - [`Z3_mk_fpa_zero`]
5923    pub fn Z3_mk_fpa_nan(c: Z3_context, s: Z3_sort) -> Option<Z3_ast>;
5924    /// Create a floating-point infinity of sort `s`.
5925    ///
5926    /// - `c`: logical context
5927    /// - `s`: target sort
5928    /// - `negative`: indicates whether the result should be negative
5929    ///
5930    /// When `negative` is `true`, -oo will be generated instead of +oo.
5931    ///
5932    /// # See also
5933    ///
5934    /// - [`Z3_mk_fpa_is_infinite`]
5935    /// - [`Z3_mk_fpa_nan`]
5936    /// - [`Z3_mk_fpa_zero`]
5937    pub fn Z3_mk_fpa_inf(c: Z3_context, s: Z3_sort, negative: bool) -> Option<Z3_ast>;
5938    /// Create a floating-point zero of sort `s`.
5939    ///
5940    /// - `c`: logical context
5941    /// - `s`: target sort
5942    /// - `negative`: indicates whether the result should be negative
5943    ///
5944    /// When `negative` is `true`, -zero will be generated instead of +zero.
5945    ///
5946    /// # See also
5947    ///
5948    /// - [`Z3_mk_fpa_inf`]
5949    /// - [`Z3_mk_fpa_is_zero`]
5950    /// - [`Z3_mk_fpa_nan`]
5951    pub fn Z3_mk_fpa_zero(c: Z3_context, s: Z3_sort, negative: bool) -> Option<Z3_ast>;
5952    /// Create an expression of FloatingPoint sort from three bit-vector expressions.
5953    ///
5954    /// This is the operator named `fp' in the SMT FP theory definition.
5955    /// Note that `sgn` is required to be a bit-vector of size 1. Significand and exponent
5956    /// are required to be longer than 1 and 2 respectively. The FloatingPoint sort
5957    /// of the resulting expression is automatically determined from the bit-vector sizes
5958    /// of the arguments. The exponent is assumed to be in IEEE-754 biased representation.
5959    ///
5960    /// - `c`: logical context
5961    /// - `sgn`: sign
5962    /// - `exp`: exponent
5963    /// - `sig`: significand
5964    ///
5965    /// # See also
5966    ///
5967    /// - [`Z3_mk_fpa_numeral_double`]
5968    /// - [`Z3_mk_fpa_numeral_float`]
5969    /// - [`Z3_mk_fpa_numeral_int`]
5970    /// - [`Z3_mk_fpa_numeral_int_uint`]
5971    /// - [`Z3_mk_fpa_numeral_int64_uint64`]
5972    /// - [`Z3_mk_numeral`]
5973    pub fn Z3_mk_fpa_fp(
5974        c: Z3_context,
5975        sgn: Z3_ast,
5976        exp: Z3_ast,
5977        sig: Z3_ast,
5978    ) -> Option<Z3_ast>;
5979    /// Create a numeral of FloatingPoint sort from a float.
5980    ///
5981    /// This function is used to create numerals that fit in a float value.
5982    /// It is slightly faster than [`Z3_mk_numeral`] since it is not necessary to parse a string.
5983    ///
5984    /// - `c`: logical context
5985    /// - `v`: value
5986    /// - `ty`: sort
5987    ///
5988    /// `ty` must be a FloatingPoint sort
5989    ///
5990    /// # See also
5991    ///
5992    /// - [`Z3_mk_fpa_fp`]
5993    /// - [`Z3_mk_fpa_numeral_double`]
5994    /// - [`Z3_mk_fpa_numeral_int`]
5995    /// - [`Z3_mk_fpa_numeral_int_uint`]
5996    /// - [`Z3_mk_fpa_numeral_int64_uint64`]
5997    /// - [`Z3_mk_numeral`]
5998    pub fn Z3_mk_fpa_numeral_float(c: Z3_context, v: f32, ty: Z3_sort) -> Option<Z3_ast>;
5999    /// Create a numeral of FloatingPoint sort from a double.
6000    ///
6001    /// This function is used to create numerals that fit in a double value.
6002    /// It is slightly faster than [`Z3_mk_numeral`] since it is not necessary to parse a string.
6003    ///
6004    /// - `c`: logical context
6005    /// - `v`: value
6006    /// - `ty`: sort
6007    ///
6008    /// `ty` must be a FloatingPoint sort
6009    ///
6010    /// # See also
6011    ///
6012    /// - [`Z3_mk_fpa_fp`]
6013    /// - [`Z3_mk_fpa_numeral_float`]
6014    /// - [`Z3_mk_fpa_numeral_int`]
6015    /// - [`Z3_mk_fpa_numeral_int_uint`]
6016    /// - [`Z3_mk_fpa_numeral_int64_uint64`]
6017    /// - [`Z3_mk_numeral`]
6018    pub fn Z3_mk_fpa_numeral_double(
6019        c: Z3_context,
6020        v: f64,
6021        ty: Z3_sort,
6022    ) -> Option<Z3_ast>;
6023    /// Create a numeral of FloatingPoint sort from a signed integer.
6024    ///
6025    /// - `c`: logical context
6026    /// - `v`: value
6027    /// - `ty`: result sort
6028    ///
6029    /// `ty` must be a FloatingPoint sort
6030    ///
6031    /// # See also
6032    ///
6033    /// - [`Z3_mk_fpa_fp`]
6034    /// - [`Z3_mk_fpa_numeral_double`]
6035    /// - [`Z3_mk_fpa_numeral_float`]
6036    /// - [`Z3_mk_fpa_numeral_int_uint`]
6037    /// - [`Z3_mk_fpa_numeral_int64_uint64`]
6038    /// - [`Z3_mk_numeral`]
6039    pub fn Z3_mk_fpa_numeral_int(
6040        c: Z3_context,
6041        v: ::core::ffi::c_int,
6042        ty: Z3_sort,
6043    ) -> Option<Z3_ast>;
6044    /// Create a numeral of FloatingPoint sort from a sign bit and two integers.
6045    ///
6046    /// - `c`: logical context
6047    /// - `sgn`: sign bit (true == negative)
6048    /// - `sig`: significand
6049    /// - `exp`: exponent
6050    /// - `ty`: result sort
6051    ///
6052    /// `ty` must be a FloatingPoint sort
6053    ///
6054    /// # See also
6055    ///
6056    /// - [`Z3_mk_fpa_fp`]
6057    /// - [`Z3_mk_fpa_numeral_double`]
6058    /// - [`Z3_mk_fpa_numeral_float`]
6059    /// - [`Z3_mk_fpa_numeral_int`]
6060    /// - [`Z3_mk_fpa_numeral_int64_uint64`]
6061    /// - [`Z3_mk_numeral`]
6062    pub fn Z3_mk_fpa_numeral_int_uint(
6063        c: Z3_context,
6064        sgn: bool,
6065        exp: ::core::ffi::c_int,
6066        sig: ::core::ffi::c_uint,
6067        ty: Z3_sort,
6068    ) -> Option<Z3_ast>;
6069    /// Create a numeral of FloatingPoint sort from a sign bit and two 64-bit integers.
6070    ///
6071    /// - `c`: logical context
6072    /// - `sgn`: sign bit (true == negative)
6073    /// - `sig`: significand
6074    /// - `exp`: exponent
6075    /// - `ty`: result sort
6076    ///
6077    /// `ty` must be a FloatingPoint sort
6078    ///
6079    /// # See also
6080    ///
6081    /// - [`Z3_mk_fpa_fp`]
6082    /// - [`Z3_mk_fpa_numeral_double`]
6083    /// - [`Z3_mk_fpa_numeral_float`]
6084    /// - [`Z3_mk_fpa_numeral_int`]
6085    /// - [`Z3_mk_fpa_numeral_int_uint`]
6086    /// - [`Z3_mk_numeral`]
6087    pub fn Z3_mk_fpa_numeral_int64_uint64(
6088        c: Z3_context,
6089        sgn: bool,
6090        exp: i64,
6091        sig: u64,
6092        ty: Z3_sort,
6093    ) -> Option<Z3_ast>;
6094    /// Floating-point absolute value
6095    ///
6096    /// - `c`: logical context
6097    /// - `t`: term of FloatingPoint sort
6098    ///
6099    /// # See also
6100    ///
6101    /// - [`Z3_mk_fpa_is_negative`]
6102    /// - [`Z3_mk_fpa_is_positive`]
6103    /// - [`Z3_mk_fpa_neg`]
6104    pub fn Z3_mk_fpa_abs(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6105    /// Floating-point negation
6106    ///
6107    /// - `c`: logical context
6108    /// - `t`: term of FloatingPoint sort
6109    ///
6110    /// # See also
6111    ///
6112    /// - [`Z3_mk_fpa_abs`]
6113    /// - [`Z3_mk_fpa_is_negative`]
6114    /// - [`Z3_mk_fpa_is_positive`]
6115    pub fn Z3_mk_fpa_neg(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6116    /// Floating-point addition
6117    ///
6118    /// - `c`: logical context
6119    /// - `rm`: term of RoundingMode sort
6120    /// - `t1`: term of FloatingPoint sort
6121    /// - `t2`: term of FloatingPoint sort
6122    ///
6123    /// `rm` must be of RoundingMode sort, `t1` and `t2` must have the same FloatingPoint sort.
6124    pub fn Z3_mk_fpa_add(
6125        c: Z3_context,
6126        rm: Z3_ast,
6127        t1: Z3_ast,
6128        t2: Z3_ast,
6129    ) -> Option<Z3_ast>;
6130    /// Floating-point subtraction
6131    ///
6132    /// - `c`: logical context
6133    /// - `rm`: term of RoundingMode sort
6134    /// - `t1`: term of FloatingPoint sort
6135    /// - `t2`: term of FloatingPoint sort
6136    ///
6137    /// `rm` must be of RoundingMode sort, `t1` and `t2` must have the same FloatingPoint sort.
6138    pub fn Z3_mk_fpa_sub(
6139        c: Z3_context,
6140        rm: Z3_ast,
6141        t1: Z3_ast,
6142        t2: Z3_ast,
6143    ) -> Option<Z3_ast>;
6144    /// Floating-point multiplication
6145    ///
6146    /// - `c`: logical context
6147    /// - `rm`: term of RoundingMode sort
6148    /// - `t1`: term of FloatingPoint sort
6149    /// - `t2`: term of FloatingPoint sort
6150    ///
6151    /// `rm` must be of RoundingMode sort, `t1` and `t2` must have the same FloatingPoint sort.
6152    pub fn Z3_mk_fpa_mul(
6153        c: Z3_context,
6154        rm: Z3_ast,
6155        t1: Z3_ast,
6156        t2: Z3_ast,
6157    ) -> Option<Z3_ast>;
6158    /// Floating-point division
6159    ///
6160    /// - `c`: logical context
6161    /// - `rm`: term of RoundingMode sort
6162    /// - `t1`: term of FloatingPoint sort.
6163    /// - `t2`: term of FloatingPoint sort
6164    ///
6165    /// The nodes `rm` must be of RoundingMode sort, `t1` and `t2` must have the same FloatingPoint sort.
6166    pub fn Z3_mk_fpa_div(
6167        c: Z3_context,
6168        rm: Z3_ast,
6169        t1: Z3_ast,
6170        t2: Z3_ast,
6171    ) -> Option<Z3_ast>;
6172    /// Floating-point fused multiply-add.
6173    ///
6174    /// - `c`: logical context
6175    /// - `rm`: term of RoundingMode sort
6176    /// - `t1`: term of FloatingPoint sort
6177    /// - `t2`: term of FloatingPoint sort
6178    /// - `t3`: term of FloatingPoint sort
6179    ///
6180    /// The result is `round((t1 * t2) + t3)`.
6181    ///
6182    /// `rm` must be of RoundingMode sort, `t1`, `t2`, and `t3` must have the same FloatingPoint sort.
6183    pub fn Z3_mk_fpa_fma(
6184        c: Z3_context,
6185        rm: Z3_ast,
6186        t1: Z3_ast,
6187        t2: Z3_ast,
6188        t3: Z3_ast,
6189    ) -> Option<Z3_ast>;
6190    /// Floating-point square root
6191    ///
6192    /// - `c`: logical context
6193    /// - `rm`: term of RoundingMode sort
6194    /// - `t`: term of FloatingPoint sort
6195    ///
6196    /// `rm` must be of RoundingMode sort, `t` must have FloatingPoint sort.
6197    pub fn Z3_mk_fpa_sqrt(c: Z3_context, rm: Z3_ast, t: Z3_ast) -> Option<Z3_ast>;
6198    /// Floating-point remainder
6199    ///
6200    /// - `c`: logical context
6201    /// - `t1`: term of FloatingPoint sort
6202    /// - `t2`: term of FloatingPoint sort
6203    ///
6204    /// `t1` and `t2` must have the same FloatingPoint sort.
6205    pub fn Z3_mk_fpa_rem(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
6206    /// Floating-point roundToIntegral. Rounds a floating-point number to
6207    /// the closest integer, again represented as a floating-point number.
6208    ///
6209    /// - `c`: logical context
6210    /// - `rm`: term of RoundingMode sort
6211    /// - `t`: term of FloatingPoint sort
6212    ///
6213    /// `t` must be of FloatingPoint sort.
6214    pub fn Z3_mk_fpa_round_to_integral(
6215        c: Z3_context,
6216        rm: Z3_ast,
6217        t: Z3_ast,
6218    ) -> Option<Z3_ast>;
6219    /// Minimum of floating-point numbers.
6220    ///
6221    /// - `c`: logical context
6222    /// - `t1`: term of FloatingPoint sort
6223    /// - `t2`: term of FloatingPoint sort
6224    ///
6225    /// `t1`, `t2` must have the same FloatingPoint sort.
6226    ///
6227    /// # See also
6228    ///
6229    /// - [`Z3_mk_fpa_max`]
6230    pub fn Z3_mk_fpa_min(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
6231    /// Maximum of floating-point numbers.
6232    ///
6233    /// - `c`: logical context
6234    /// - `t1`: term of FloatingPoint sort
6235    /// - `t2`: term of FloatingPoint sort
6236    ///
6237    /// `t1`, `t2` must have the same FloatingPoint sort.
6238    ///
6239    /// # See also
6240    ///
6241    /// - [`Z3_mk_fpa_min`]
6242    pub fn Z3_mk_fpa_max(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
6243    /// Floating-point less than or equal.
6244    ///
6245    /// - `c`: logical context
6246    /// - `t1`: term of FloatingPoint sort
6247    /// - `t2`: term of FloatingPoint sort
6248    ///
6249    /// `t1` and `t2` must have the same FloatingPoint sort.
6250    ///
6251    /// # See also
6252    ///
6253    /// - [`Z3_mk_fpa_eq`]
6254    /// - [`Z3_mk_fpa_geq`]
6255    /// - [`Z3_mk_fpa_gt`]
6256    /// - [`Z3_mk_fpa_lt`]
6257    pub fn Z3_mk_fpa_leq(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
6258    /// Floating-point less than.
6259    ///
6260    /// - `c`: logical context
6261    /// - `t1`: term of FloatingPoint sort
6262    /// - `t2`: term of FloatingPoint sort
6263    ///
6264    /// `t1` and `t2` must have the same FloatingPoint sort.
6265    ///
6266    /// # See also
6267    ///
6268    /// - [`Z3_mk_fpa_eq`]
6269    /// - [`Z3_mk_fpa_geq`]
6270    /// - [`Z3_mk_fpa_gt`]
6271    /// - [`Z3_mk_fpa_leq`]
6272    pub fn Z3_mk_fpa_lt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
6273    /// Floating-point greater than or equal.
6274    ///
6275    /// - `c`: logical context
6276    /// - `t1`: term of FloatingPoint sort
6277    /// - `t2`: term of FloatingPoint sort
6278    ///
6279    /// `t1` and `t2` must have the same FloatingPoint sort.
6280    ///
6281    /// # See also
6282    ///
6283    /// - [`Z3_mk_fpa_eq`]
6284    /// - [`Z3_mk_fpa_gt`]
6285    /// - [`Z3_mk_fpa_leq`]
6286    /// - [`Z3_mk_fpa_lt`]
6287    pub fn Z3_mk_fpa_geq(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
6288    /// Floating-point greater than.
6289    ///
6290    /// - `c`: logical context
6291    /// - `t1`: term of FloatingPoint sort
6292    /// - `t2`: term of FloatingPoint sort
6293    ///
6294    /// `t1` and `t2` must have the same FloatingPoint sort.
6295    ///
6296    /// # See also
6297    ///
6298    /// - [`Z3_mk_fpa_eq`]
6299    /// - [`Z3_mk_fpa_geq`]
6300    /// - [`Z3_mk_fpa_leq`]
6301    /// - [`Z3_mk_fpa_lt`]
6302    pub fn Z3_mk_fpa_gt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
6303    /// Floating-point equality.
6304    ///
6305    /// - `c`: logical context
6306    /// - `t1`: term of FloatingPoint sort
6307    /// - `t2`: term of FloatingPoint sort
6308    ///
6309    /// Note that this is IEEE 754 equality (as opposed to SMT-LIB `=`).
6310    ///
6311    /// `t1` and `t2` must have the same FloatingPoint sort.
6312    ///
6313    /// # See also
6314    ///
6315    /// - [`Z3_mk_fpa_geq`]
6316    /// - [`Z3_mk_fpa_gt`]
6317    /// - [`Z3_mk_fpa_leq`]
6318    /// - [`Z3_mk_fpa_lt`]
6319    pub fn Z3_mk_fpa_eq(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Option<Z3_ast>;
6320    /// Predicate indicating whether `t` is a normal floating-point number.
6321    ///
6322    /// - `c`: logical context
6323    /// - `t`: term of FloatingPoint sort
6324    ///
6325    /// `t` must have FloatingPoint sort.
6326    ///
6327    /// # See also
6328    ///
6329    /// - [`Z3_mk_fpa_is_infinite`]
6330    /// - [`Z3_mk_fpa_is_nan`]
6331    /// - [`Z3_mk_fpa_is_subnormal`]
6332    /// - [`Z3_mk_fpa_is_zero`]
6333    pub fn Z3_mk_fpa_is_normal(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6334    /// Predicate indicating whether `t` is a subnormal floating-point number.
6335    ///
6336    /// - `c`: logical context
6337    /// - `t`: term of FloatingPoint sort
6338    ///
6339    /// `t` must have FloatingPoint sort.
6340    ///
6341    /// # See also
6342    ///
6343    /// - [`Z3_mk_fpa_is_infinite`]
6344    /// - [`Z3_mk_fpa_is_nan`]
6345    /// - [`Z3_mk_fpa_is_normal`]
6346    /// - [`Z3_mk_fpa_is_zero`]
6347    pub fn Z3_mk_fpa_is_subnormal(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6348    /// Predicate indicating whether `t` is a floating-point number with zero value, i.e., +zero or -zero.
6349    ///
6350    /// - `c`: logical context
6351    /// - `t`: term of FloatingPoint sort
6352    ///
6353    /// `t` must have FloatingPoint sort.
6354    ///
6355    /// # See also
6356    ///
6357    /// - [`Z3_mk_fpa_is_infinite`]
6358    /// - [`Z3_mk_fpa_is_nan`]
6359    /// - [`Z3_mk_fpa_is_normal`]
6360    /// - [`Z3_mk_fpa_is_subnormal`]
6361    /// - [`Z3_mk_fpa_zero`]
6362    pub fn Z3_mk_fpa_is_zero(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6363    /// Predicate indicating whether `t` is a floating-point number representing +oo or -oo.
6364    ///
6365    /// - `c`: logical context
6366    /// - `t`: term of FloatingPoint sort
6367    ///
6368    /// `t` must have FloatingPoint sort.
6369    ///
6370    /// # See also
6371    ///
6372    /// - [`Z3_mk_fpa_inf`]
6373    /// - [`Z3_mk_fpa_is_nan`]
6374    /// - [`Z3_mk_fpa_is_normal`]
6375    /// - [`Z3_mk_fpa_is_subnormal`]
6376    /// - [`Z3_mk_fpa_is_zero`]
6377    pub fn Z3_mk_fpa_is_infinite(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6378    /// Predicate indicating whether `t` is a NaN.
6379    ///
6380    /// - `c`: logical context
6381    /// - `t`: term of FloatingPoint sort
6382    ///
6383    /// `t` must have FloatingPoint sort.
6384    ///
6385    /// # See also
6386    ///
6387    /// - [`Z3_mk_fpa_is_infinite`]
6388    /// - [`Z3_mk_fpa_is_normal`]
6389    /// - [`Z3_mk_fpa_is_subnormal`]
6390    /// - [`Z3_mk_fpa_is_zero`]
6391    /// - [`Z3_mk_fpa_nan`]
6392    pub fn Z3_mk_fpa_is_nan(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6393    /// Predicate indicating whether `t` is a negative floating-point number.
6394    ///
6395    /// - `c`: logical context
6396    /// - `t`: term of FloatingPoint sort
6397    ///
6398    /// `t` must have FloatingPoint sort.
6399    ///
6400    /// # See also
6401    ///
6402    /// - [`Z3_mk_fpa_abs`]
6403    /// - [`Z3_mk_fpa_is_positive`]
6404    /// - [`Z3_mk_fpa_neg`]
6405    pub fn Z3_mk_fpa_is_negative(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6406    /// Predicate indicating whether `t` is a positive floating-point number.
6407    ///
6408    /// - `c`: logical context
6409    /// - `t`: term of FloatingPoint sort
6410    ///
6411    /// `t` must have FloatingPoint sort.
6412    ///
6413    /// # See also
6414    ///
6415    /// - [`Z3_mk_fpa_abs`]
6416    /// - [`Z3_mk_fpa_is_negative`]
6417    /// - [`Z3_mk_fpa_neg`]
6418    pub fn Z3_mk_fpa_is_positive(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6419    /// Conversion of a single IEEE 754-2008 bit-vector into a floating-point number.
6420    ///
6421    /// Produces a term that represents the conversion of a bit-vector term `bv` to a
6422    /// floating-point term of sort `s`.
6423    ///
6424    /// - `c`: logical context
6425    /// - `bv`: a bit-vector term
6426    /// - `s`: floating-point sort
6427    ///
6428    /// `s` must be a FloatingPoint sort, `t` must be of bit-vector sort, and the bit-vector
6429    /// size of `bv` must be equal to `ebits+sbits` of `s`. The format of the bit-vector is
6430    /// as defined by the IEEE 754-2008 interchange format.
6431    pub fn Z3_mk_fpa_to_fp_bv(c: Z3_context, bv: Z3_ast, s: Z3_sort) -> Option<Z3_ast>;
6432    /// Conversion of a FloatingPoint term into another term of different FloatingPoint sort.
6433    ///
6434    /// Produces a term that represents the conversion of a floating-point term `t` to a
6435    /// floating-point term of sort `s`. If necessary, the result will be rounded according
6436    /// to rounding mode `rm`.
6437    ///
6438    /// - `c`: logical context
6439    /// - `rm`: term of RoundingMode sort
6440    /// - `t`: term of FloatingPoint sort
6441    /// - `s`: floating-point sort
6442    ///
6443    /// `s` must be a FloatingPoint sort, `rm` must be of RoundingMode sort, `t` must be of floating-point sort.
6444    pub fn Z3_mk_fpa_to_fp_float(
6445        c: Z3_context,
6446        rm: Z3_ast,
6447        t: Z3_ast,
6448        s: Z3_sort,
6449    ) -> Option<Z3_ast>;
6450    /// Conversion of a term of real sort into a term of FloatingPoint sort.
6451    ///
6452    /// Produces a term that represents the conversion of term `t` of real sort into a
6453    /// floating-point term of sort `s`. If necessary, the result will be rounded according
6454    /// to rounding mode `rm`.
6455    ///
6456    /// - `c`: logical context
6457    /// - `rm`: term of RoundingMode sort
6458    /// - `t`: term of Real sort
6459    /// - `s`: floating-point sort
6460    ///
6461    /// `s` must be a FloatingPoint sort, `rm` must be of RoundingMode sort, `t` must be of real sort.
6462    pub fn Z3_mk_fpa_to_fp_real(
6463        c: Z3_context,
6464        rm: Z3_ast,
6465        t: Z3_ast,
6466        s: Z3_sort,
6467    ) -> Option<Z3_ast>;
6468    /// Conversion of a 2's complement signed bit-vector term into a term of FloatingPoint sort.
6469    ///
6470    /// Produces a term that represents the conversion of the bit-vector term `t` into a
6471    /// floating-point term of sort `s`. The bit-vector `t` is taken to be in signed
6472    /// 2's complement format. If necessary, the result will be rounded according
6473    /// to rounding mode `rm`.
6474    ///
6475    /// - `c`: logical context
6476    /// - `rm`: term of RoundingMode sort
6477    /// - `t`: term of bit-vector sort
6478    /// - `s`: floating-point sort
6479    ///
6480    /// `s` must be a FloatingPoint sort, `rm` must be of RoundingMode sort, `t` must be of bit-vector sort.
6481    pub fn Z3_mk_fpa_to_fp_signed(
6482        c: Z3_context,
6483        rm: Z3_ast,
6484        t: Z3_ast,
6485        s: Z3_sort,
6486    ) -> Option<Z3_ast>;
6487    /// Conversion of a 2's complement unsigned bit-vector term into a term of FloatingPoint sort.
6488    ///
6489    /// Produces a term that represents the conversion of the bit-vector term `t` into a
6490    /// floating-point term of sort `s`. The bit-vector `t` is taken to be in unsigned
6491    /// 2's complement format. If necessary, the result will be rounded according
6492    /// to rounding mode `rm`.
6493    ///
6494    /// - `c`: logical context
6495    /// - `rm`: term of RoundingMode sort
6496    /// - `t`: term of bit-vector sort
6497    /// - `s`: floating-point sort
6498    ///
6499    /// `s` must be a FloatingPoint sort, `rm` must be of RoundingMode sort, `t` must be of bit-vector sort.
6500    pub fn Z3_mk_fpa_to_fp_unsigned(
6501        c: Z3_context,
6502        rm: Z3_ast,
6503        t: Z3_ast,
6504        s: Z3_sort,
6505    ) -> Option<Z3_ast>;
6506    /// Conversion of a floating-point term into an unsigned bit-vector.
6507    ///
6508    /// Produces a term that represents the conversion of the floating-point term `t` into a
6509    /// bit-vector term of size `sz` in unsigned 2's complement format. If necessary, the result
6510    /// will be rounded according to rounding mode `rm`.
6511    ///
6512    /// - `c`: logical context
6513    /// - `rm`: term of RoundingMode sort
6514    /// - `t`: term of FloatingPoint sort
6515    /// - `sz`: size of the resulting bit-vector
6516    pub fn Z3_mk_fpa_to_ubv(
6517        c: Z3_context,
6518        rm: Z3_ast,
6519        t: Z3_ast,
6520        sz: ::core::ffi::c_uint,
6521    ) -> Option<Z3_ast>;
6522    /// Conversion of a floating-point term into a signed bit-vector.
6523    ///
6524    /// Produces a term that represents the conversion of the floating-point term `t` into a
6525    /// bit-vector term of size `sz` in signed 2's complement format. If necessary, the result
6526    /// will be rounded according to rounding mode `rm`.
6527    ///
6528    /// - `c`: logical context
6529    /// - `rm`: term of RoundingMode sort
6530    /// - `t`: term of FloatingPoint sort
6531    /// - `sz`: size of the resulting bit-vector
6532    pub fn Z3_mk_fpa_to_sbv(
6533        c: Z3_context,
6534        rm: Z3_ast,
6535        t: Z3_ast,
6536        sz: ::core::ffi::c_uint,
6537    ) -> Option<Z3_ast>;
6538    /// Conversion of a floating-point term into a real-numbered term.
6539    ///
6540    /// Produces a term that represents the conversion of the floating-point term `t` into a
6541    /// real number. Note that this type of conversion will often result in non-linear
6542    /// constraints over real terms.
6543    ///
6544    /// - `c`: logical context
6545    /// - `t`: term of FloatingPoint sort
6546    pub fn Z3_mk_fpa_to_real(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6547    /// Retrieves the number of bits reserved for the exponent in a FloatingPoint sort.
6548    ///
6549    /// - `c`: logical context
6550    /// - `s`: FloatingPoint sort
6551    ///
6552    /// # See also
6553    ///
6554    /// - [`Z3_fpa_get_sbits`]
6555    pub fn Z3_fpa_get_ebits(c: Z3_context, s: Z3_sort) -> ::core::ffi::c_uint;
6556    /// Retrieves the number of bits reserved for the significand in a FloatingPoint sort.
6557    ///
6558    /// - `c`: logical context
6559    /// - `s`: FloatingPoint sort
6560    ///
6561    /// # See also
6562    ///
6563    /// - [`Z3_fpa_get_ebits`]
6564    pub fn Z3_fpa_get_sbits(c: Z3_context, s: Z3_sort) -> ::core::ffi::c_uint;
6565    /// Checks whether a given ast is a floating-point numeral.
6566    ///
6567    /// - `c`: logical context
6568    /// - `t`: an ast
6569    ///
6570    /// # See also
6571    ///
6572    /// - [`Z3_fpa_is_numeral_nan`]
6573    /// - [`Z3_fpa_is_numeral_inf`]
6574    /// - [`Z3_fpa_is_numeral_normal`]
6575    /// - [`Z3_fpa_is_numeral_subnormal`]
6576    /// - [`Z3_fpa_is_numeral_zero`]
6577    pub fn Z3_fpa_is_numeral(c: Z3_context, t: Z3_ast) -> bool;
6578    /// Checks whether a given floating-point numeral is a NaN.
6579    ///
6580    /// - `c`: logical context
6581    /// - `t`: a floating-point numeral
6582    ///
6583    /// # See also
6584    ///
6585    /// - [`Z3_fpa_is_numeral_inf`]
6586    /// - [`Z3_fpa_is_numeral_normal`]
6587    /// - [`Z3_fpa_is_numeral_subnormal`]
6588    /// - [`Z3_fpa_is_numeral_zero`]
6589    pub fn Z3_fpa_is_numeral_nan(c: Z3_context, t: Z3_ast) -> bool;
6590    /// Checks whether a given floating-point numeral is a +oo or -oo.
6591    ///
6592    /// - `c`: logical context
6593    /// - `t`: a floating-point numeral
6594    ///
6595    /// # See also
6596    ///
6597    /// - [`Z3_fpa_is_numeral_nan`]
6598    /// - [`Z3_fpa_is_numeral_normal`]
6599    /// - [`Z3_fpa_is_numeral_subnormal`]
6600    /// - [`Z3_fpa_is_numeral_zero`]
6601    pub fn Z3_fpa_is_numeral_inf(c: Z3_context, t: Z3_ast) -> bool;
6602    /// Checks whether a given floating-point numeral is +zero or -zero.
6603    ///
6604    /// - `c`: logical context
6605    /// - `t`: a floating-point numeral
6606    ///
6607    /// # See also
6608    ///
6609    /// - [`Z3_fpa_is_numeral_inf`]
6610    /// - [`Z3_fpa_is_numeral_nan`]
6611    /// - [`Z3_fpa_is_numeral_normal`]
6612    /// - [`Z3_fpa_is_numeral_subnormal`]
6613    pub fn Z3_fpa_is_numeral_zero(c: Z3_context, t: Z3_ast) -> bool;
6614    /// Checks whether a given floating-point numeral is normal.
6615    ///
6616    /// - `c`: logical context
6617    /// - `t`: a floating-point numeral
6618    ///
6619    /// # See also
6620    ///
6621    /// - [`Z3_fpa_is_numeral_inf`]
6622    /// - [`Z3_fpa_is_numeral_nan`]
6623    /// - [`Z3_fpa_is_numeral_subnormal`]
6624    /// - [`Z3_fpa_is_numeral_zero`]
6625    pub fn Z3_fpa_is_numeral_normal(c: Z3_context, t: Z3_ast) -> bool;
6626    /// Checks whether a given floating-point numeral is subnormal.
6627    ///
6628    /// - `c`: logical context
6629    /// - `t`: a floating-point numeral
6630    ///
6631    /// # See also
6632    ///
6633    /// - [`Z3_fpa_is_numeral_inf`]
6634    /// - [`Z3_fpa_is_numeral_nan`]
6635    /// - [`Z3_fpa_is_numeral_normal`]
6636    /// - [`Z3_fpa_is_numeral_zero`]
6637    pub fn Z3_fpa_is_numeral_subnormal(c: Z3_context, t: Z3_ast) -> bool;
6638    /// Checks whether a given floating-point numeral is positive.
6639    ///
6640    /// - `c`: logical context
6641    /// - `t`: a floating-point numeral
6642    ///
6643    /// # See also
6644    ///
6645    /// - [`Z3_fpa_is_numeral_negative`]
6646    pub fn Z3_fpa_is_numeral_positive(c: Z3_context, t: Z3_ast) -> bool;
6647    /// Checks whether a given floating-point numeral is negative.
6648    ///
6649    /// - `c`: logical context
6650    /// - `t`: a floating-point numeral
6651    ///
6652    /// # See also
6653    ///
6654    /// - [`Z3_fpa_is_numeral_positive`]
6655    pub fn Z3_fpa_is_numeral_negative(c: Z3_context, t: Z3_ast) -> bool;
6656    /// Retrieves the sign of a floating-point literal as a bit-vector expression.
6657    ///
6658    /// - `c`: logical context
6659    /// - `t`: a floating-point numeral
6660    ///
6661    /// Remarks: NaN is an invalid argument.
6662    pub fn Z3_fpa_get_numeral_sign_bv(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6663    /// Retrieves the significand of a floating-point literal as a bit-vector expression.
6664    ///
6665    /// - `c`: logical context
6666    /// - `t`: a floating-point numeral
6667    ///
6668    /// Remarks: NaN is an invalid argument.
6669    pub fn Z3_fpa_get_numeral_significand_bv(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6670    /// Retrieves the sign of a floating-point literal.
6671    ///
6672    /// - `c`: logical context
6673    /// - `t`: a floating-point numeral
6674    /// - `sgn`: the retrieved sign
6675    ///
6676    /// **Returns:** true if `t` corresponds to a floating point numeral, otherwise invokes exception handler or returns false
6677    ///
6678    /// Remarks: sets `sgn` to `false` if `t' is positive and to `true` otherwise, except for
6679    /// NaN, which is an invalid argument.
6680    pub fn Z3_fpa_get_numeral_sign(c: Z3_context, t: Z3_ast, sgn: *mut bool) -> bool;
6681    /// Return the significand value of a floating-point numeral as a string.
6682    ///
6683    /// - `c`: logical context
6684    /// - `t`: a floating-point numeral
6685    ///
6686    /// **Returns:** true if `t` corresponds to a floating point numeral, otherwise invokes exception handler or returns false
6687    ///
6688    /// Remarks: The significand `s` is always `0.0 <= s < 2.0`; the resulting string is long
6689    /// enough to represent the real significand precisely.
6690    pub fn Z3_fpa_get_numeral_significand_string(c: Z3_context, t: Z3_ast) -> Z3_string;
6691    /// Return the significand value of a floating-point numeral as a uint64.
6692    ///
6693    /// - `c`: logical context
6694    /// - `t`: a floating-point numeral
6695    /// - `n`: pointer to output uint64
6696    ///
6697    /// Remarks: This function extracts the significand bits in `t`, without the
6698    /// hidden bit or normalization. Sets the `Z3_INVALID_ARG` error code if the
6699    /// significand does not fit into a `uint64`. NaN is an invalid argument.
6700    pub fn Z3_fpa_get_numeral_significand_uint64(
6701        c: Z3_context,
6702        t: Z3_ast,
6703        n: *mut u64,
6704    ) -> bool;
6705    /// Return the exponent value of a floating-point numeral as a string.
6706    ///
6707    /// - `c`: logical context
6708    /// - `t`: a floating-point numeral
6709    /// - `biased`: flag to indicate whether the result is in biased representation
6710    ///
6711    /// **Returns:** true if `t` corresponds to a floating point numeral, otherwise invokes exception handler or returns false
6712    ///
6713    /// Remarks: This function extracts the exponent in `t`, without normalization.
6714    /// NaN is an invalid argument.
6715    pub fn Z3_fpa_get_numeral_exponent_string(
6716        c: Z3_context,
6717        t: Z3_ast,
6718        biased: bool,
6719    ) -> Z3_string;
6720    /// Return the exponent value of a floating-point numeral as a signed 64-bit integer
6721    ///
6722    /// - `c`: logical context
6723    /// - `t`: a floating-point numeral
6724    /// - `n`: exponent
6725    /// - `biased`: flag to indicate whether the result is in biased representation
6726    ///
6727    /// **Returns:** true if `t` corresponds to a floating point numeral, otherwise invokes exception handler or returns false
6728    ///
6729    /// Remarks: This function extracts the exponent in `t`, without normalization.
6730    /// NaN is an invalid argument.
6731    pub fn Z3_fpa_get_numeral_exponent_int64(
6732        c: Z3_context,
6733        t: Z3_ast,
6734        n: *mut i64,
6735        biased: bool,
6736    ) -> bool;
6737    /// Retrieves the exponent of a floating-point literal as a bit-vector expression.
6738    ///
6739    /// - `c`: logical context
6740    /// - `t`: a floating-point numeral
6741    /// - `biased`: flag to indicate whether the result is in biased representation
6742    ///
6743    /// Remarks: This function extracts the exponent in `t`, without normalization.
6744    /// NaN is an invalid arguments.
6745    pub fn Z3_fpa_get_numeral_exponent_bv(
6746        c: Z3_context,
6747        t: Z3_ast,
6748        biased: bool,
6749    ) -> Option<Z3_ast>;
6750    /// Conversion of a floating-point term into a bit-vector term in IEEE 754-2008 format.
6751    ///
6752    /// - `c`: logical context
6753    /// - `t`: term of FloatingPoint sort
6754    ///
6755    /// `t` must have FloatingPoint sort. The size of the resulting bit-vector is automatically
6756    /// determined.
6757    ///
6758    /// Note that IEEE 754-2008 allows multiple different representations of NaN. This conversion
6759    /// knows only one NaN and it will always produce the same bit-vector representation of
6760    /// that NaN.
6761    pub fn Z3_mk_fpa_to_ieee_bv(c: Z3_context, t: Z3_ast) -> Option<Z3_ast>;
6762    /// Conversion of a real-sorted significand and an integer-sorted exponent into a term of FloatingPoint sort.
6763    ///
6764    /// Produces a term that represents the conversion of `sig * 2^exp` into a
6765    /// floating-point term of sort `s`. If necessary, the result will be rounded
6766    /// according to rounding mode `rm`.
6767    ///
6768    /// - `c`: logical context
6769    /// - `rm`: term of RoundingMode sort
6770    /// - `exp`: exponent term of Int sort
6771    /// - `sig`: significand term of Real sort
6772    /// - `s`: FloatingPoint sort
6773    ///
6774    /// `s` must be a FloatingPoint sort, `rm` must be of RoundingMode sort, `exp` must be of int sort, `sig` must be of real sort.
6775    pub fn Z3_mk_fpa_to_fp_int_real(
6776        c: Z3_context,
6777        rm: Z3_ast,
6778        exp: Z3_ast,
6779        sig: Z3_ast,
6780        s: Z3_sort,
6781    ) -> Option<Z3_ast>;
6782    /// Pose a query against the asserted rules at the given level.
6783    ///
6784    /// ```c
6785    /// query ::= (exists (bound-vars) query)
6786    /// |  literals
6787    /// ```
6788    ///
6789    /// query returns
6790    /// - `Z3_L_FALSE` if the query is unsatisfiable.
6791    /// - `Z3_L_TRUE` if the query is satisfiable. Obtain the answer by calling [`Z3_fixedpoint_get_answer`].
6792    /// - `Z3_L_UNDEF` if the query was interrupted, timed out or otherwise failed.
6793    pub fn Z3_fixedpoint_query_from_lvl(
6794        c: Z3_context,
6795        d: Z3_fixedpoint,
6796        query: Z3_ast,
6797        lvl: ::core::ffi::c_uint,
6798    ) -> Z3_lbool;
6799    /// Retrieve a bottom-up (from query) sequence of ground facts
6800    ///
6801    /// The previous call to [`Z3_fixedpoint_query`] must have returned `Z3_L_TRUE`.
6802    pub fn Z3_fixedpoint_get_ground_sat_answer(
6803        c: Z3_context,
6804        d: Z3_fixedpoint,
6805    ) -> Option<Z3_ast>;
6806    /// Obtain the list of rules along the counterexample trace.
6807    pub fn Z3_fixedpoint_get_rules_along_trace(
6808        c: Z3_context,
6809        d: Z3_fixedpoint,
6810    ) -> Option<Z3_ast_vector>;
6811    /// Obtain the list of rules along the counterexample trace.
6812    pub fn Z3_fixedpoint_get_rule_names_along_trace(
6813        c: Z3_context,
6814        d: Z3_fixedpoint,
6815    ) -> Option<Z3_symbol>;
6816    /// Add an invariant for the predicate `pred`.
6817    /// Add an assumed invariant of predicate `pred`.
6818    ///
6819    /// Note: this functionality is Spacer specific.
6820    pub fn Z3_fixedpoint_add_invariant(
6821        c: Z3_context,
6822        d: Z3_fixedpoint,
6823        pred: Z3_func_decl,
6824        property: Z3_ast,
6825    );
6826    /// Retrieve reachable states of a predicate.
6827    /// Note: this functionality is Spacer specific.
6828    pub fn Z3_fixedpoint_get_reachable(
6829        c: Z3_context,
6830        d: Z3_fixedpoint,
6831        pred: Z3_func_decl,
6832    ) -> Option<Z3_ast>;
6833    /// Project variables given a model
6834    pub fn Z3_qe_model_project(
6835        c: Z3_context,
6836        m: Z3_model,
6837        num_bounds: ::core::ffi::c_uint,
6838        bound: *const Z3_app,
6839        body: Z3_ast,
6840    ) -> Option<Z3_ast>;
6841    /// Project variables given a model
6842    pub fn Z3_qe_model_project_skolem(
6843        c: Z3_context,
6844        m: Z3_model,
6845        num_bounds: ::core::ffi::c_uint,
6846        bound: *const Z3_app,
6847        body: Z3_ast,
6848        map: Z3_ast_map,
6849    ) -> Option<Z3_ast>;
6850    /// Project with witness extraction.
6851    ///
6852    /// The returned map contains a binding of variables to terms that such that when the binding
6853    /// is used for the formula, it remains true within the model.
6854    pub fn Z3_qe_model_project_with_witness(
6855        c: Z3_context,
6856        m: Z3_model,
6857        num_bounds: ::core::ffi::c_uint,
6858        bound: *const Z3_app,
6859        body: Z3_ast,
6860        map: Z3_ast_map,
6861    ) -> Option<Z3_ast>;
6862    /// Extrapolates a model of a formula
6863    pub fn Z3_model_extrapolate(
6864        c: Z3_context,
6865        m: Z3_model,
6866        fml: Z3_ast,
6867    ) -> Option<Z3_ast>;
6868    /// Best-effort quantifier elimination
6869    pub fn Z3_qe_lite(
6870        c: Z3_context,
6871        vars: Z3_ast_vector,
6872        body: Z3_ast,
6873    ) -> Option<Z3_ast>;
6874}