z3_sys/
lib.rs

1//! # Z3
2//!
3//! Z3 is a theorem prover [from Microsoft Research](https://github.com/Z3Prover/z3/).
4//!
5//! This crate provides low-level bindings that provide no real
6//! affordances for usage from Rust and that mirror the C API.
7//!
8//! For bindings that are easier to use from Rust, see the higher level
9//! bindings in the [Z3](https://crates.io/crates/z3/) crate.
10//!
11//! Example:
12//!
13//! ```
14//! use z3_sys::*;
15//!
16//! unsafe {
17//!     let cfg = Z3_mk_config();
18//!     let ctx = Z3_mk_context(cfg);
19//!
20//!     let a = Z3_mk_not(ctx, Z3_mk_eq(ctx, Z3_mk_false(ctx), Z3_mk_true(ctx)));
21//!     let b = Z3_mk_not(ctx, Z3_mk_iff(ctx, Z3_mk_false(ctx), Z3_mk_true(ctx)));
22//!     assert_eq!(Z3_mk_true(ctx), Z3_simplify(ctx, a));
23//!     assert_eq!(Z3_mk_true(ctx), Z3_simplify(ctx, b));
24//!
25//!     Z3_del_config(cfg);
26//!     Z3_del_context(ctx);
27//! }
28//! ```
29
30#![allow(non_camel_case_types)]
31#![allow(clippy::unreadable_literal)]
32#![warn(clippy::doc_markdown)]
33
34mod generated;
35
36#[doc(hidden)]
37#[repr(C)]
38#[derive(Debug, Copy, Clone)]
39pub struct _Z3_symbol {
40    _unused: [u8; 0],
41}
42/// Lisp-like symbol used to name types, constants, and functions.
43/// A symbol can be created using string or integers.
44///
45/// # See also:
46///
47/// - [`Z3_get_symbol_int`]
48/// - [`Z3_get_symbol_kind`]
49/// - [`Z3_get_symbol_string`]
50/// - [`Z3_mk_int_symbol`]
51/// - [`Z3_mk_string_symbol`]
52pub type Z3_symbol = *mut _Z3_symbol;
53
54#[doc(hidden)]
55#[repr(C)]
56#[derive(Debug, Copy, Clone)]
57pub struct _Z3_literals {
58    _unused: [u8; 0],
59}
60pub type Z3_literals = *mut _Z3_literals;
61
62#[doc(hidden)]
63#[repr(C)]
64#[derive(Debug, Copy, Clone)]
65pub struct _Z3_config {
66    _unused: [u8; 0],
67}
68/// Configuration object used to initialize logical contexts.
69pub type Z3_config = *mut _Z3_config;
70
71#[doc(hidden)]
72#[repr(C)]
73#[derive(Debug, Copy, Clone)]
74pub struct _Z3_context {
75    _unused: [u8; 0],
76}
77/// Manager of all other Z3 objects, global configuration options, etc.
78pub type Z3_context = *mut _Z3_context;
79
80#[doc(hidden)]
81#[repr(C)]
82#[derive(Debug, Copy, Clone)]
83pub struct _Z3_sort {
84    _unused: [u8; 0],
85}
86/// Kind of AST used to represent types.
87pub type Z3_sort = *mut _Z3_sort;
88
89#[doc(hidden)]
90#[repr(C)]
91#[derive(Debug, Copy, Clone)]
92pub struct _Z3_func_decl {
93    _unused: [u8; 0],
94}
95/// Kind of AST used to represent function symbols.
96pub type Z3_func_decl = *mut _Z3_func_decl;
97
98#[doc(hidden)]
99#[repr(C)]
100#[derive(Debug, Copy, Clone)]
101pub struct _Z3_ast {
102    _unused: [u8; 0],
103}
104/// Abstract Syntax Tree node. That is, the data structure used in Z3
105/// to represent terms, formulas, and types.
106pub type Z3_ast = *mut _Z3_ast;
107
108#[doc(hidden)]
109#[repr(C)]
110#[derive(Debug, Copy, Clone)]
111pub struct _Z3_app {
112    _unused: [u8; 0],
113}
114/// Kind of AST used to represent function applications.
115pub type Z3_app = *mut _Z3_app;
116
117#[doc(hidden)]
118#[repr(C)]
119#[derive(Debug, Copy, Clone)]
120pub struct _Z3_pattern {
121    _unused: [u8; 0],
122}
123/// Kind of AST used to represent pattern and multi-patterns used
124/// to guide quantifier instantiation.
125pub type Z3_pattern = *mut _Z3_pattern;
126
127#[doc(hidden)]
128#[repr(C)]
129#[derive(Debug, Copy, Clone)]
130pub struct _Z3_model {
131    _unused: [u8; 0],
132}
133/// Model for the constraints inserted into the logical context.
134pub type Z3_model = *mut _Z3_model;
135
136#[doc(hidden)]
137#[repr(C)]
138#[derive(Debug, Copy, Clone)]
139pub struct _Z3_constructor {
140    _unused: [u8; 0],
141}
142/// Type constructor for a (recursive) datatype.
143pub type Z3_constructor = *mut _Z3_constructor;
144
145#[doc(hidden)]
146#[repr(C)]
147#[derive(Debug, Copy, Clone)]
148pub struct _Z3_constructor_list {
149    _unused: [u8; 0],
150}
151/// List of constructors for a (recursive) datatype.
152pub type Z3_constructor_list = *mut _Z3_constructor_list;
153
154#[doc(hidden)]
155#[repr(C)]
156#[derive(Debug, Copy, Clone)]
157pub struct _Z3_params {
158    _unused: [u8; 0],
159}
160/// Parameter set used to configure many components such as:
161/// simplifiers, tactics, solvers, etc.
162pub type Z3_params = *mut _Z3_params;
163
164#[doc(hidden)]
165#[repr(C)]
166#[derive(Debug, Copy, Clone)]
167pub struct _Z3_param_descrs {
168    _unused: [u8; 0],
169}
170/// Provides a collection of parameter names, their types,
171/// default values and documentation strings. Solvers, tactics,
172/// and other objects accept different collection of parameters.
173pub type Z3_param_descrs = *mut _Z3_param_descrs;
174
175#[doc(hidden)]
176#[repr(C)]
177#[derive(Debug, Copy, Clone)]
178pub struct _Z3_goal {
179    _unused: [u8; 0],
180}
181/// Set of formulas that can be solved and/or transformed using
182/// tactics and solvers.
183pub type Z3_goal = *mut _Z3_goal;
184
185#[doc(hidden)]
186#[repr(C)]
187#[derive(Debug, Copy, Clone)]
188pub struct _Z3_tactic {
189    _unused: [u8; 0],
190}
191/// Basic building block for creating custom solvers for specific
192/// problem domains.
193pub type Z3_tactic = *mut _Z3_tactic;
194
195#[doc(hidden)]
196#[repr(C)]
197#[derive(Debug, Copy, Clone)]
198pub struct _Z3_probe {
199    _unused: [u8; 0],
200}
201/// Function/predicate used to inspect a goal and collect information
202/// that may be used to decide which solver and/or preprocessing step
203/// will be used.
204pub type Z3_probe = *mut _Z3_probe;
205
206#[doc(hidden)]
207#[repr(C)]
208#[derive(Debug, Copy, Clone)]
209pub struct _Z3_stats {
210    _unused: [u8; 0],
211}
212/// Statistical data for a solver.
213pub type Z3_stats = *mut _Z3_stats;
214
215#[doc(hidden)]
216#[repr(C)]
217#[derive(Debug, Copy, Clone)]
218pub struct _Z3_solver {
219    _unused: [u8; 0],
220}
221/// (Incremental) solver, possibly specialized by a particular
222/// tactic or logic.
223pub type Z3_solver = *mut _Z3_solver;
224
225#[doc(hidden)]
226#[repr(C)]
227#[derive(Debug, Copy, Clone)]
228pub struct _Z3_ast_vector {
229    _unused: [u8; 0],
230}
231/// Vector of [`Z3_ast`] objects.
232pub type Z3_ast_vector = *mut _Z3_ast_vector;
233
234#[doc(hidden)]
235#[repr(C)]
236#[derive(Debug, Copy, Clone)]
237pub struct _Z3_ast_map {
238    _unused: [u8; 0],
239}
240/// Mapping from [`Z3_ast`] to [`Z3_ast`] objects.
241pub type Z3_ast_map = *mut _Z3_ast_map;
242
243#[doc(hidden)]
244#[repr(C)]
245#[derive(Debug, Copy, Clone)]
246pub struct _Z3_apply_result {
247    _unused: [u8; 0],
248}
249/// Collection of subgoals resulting from applying of a tactic
250/// to a goal.
251pub type Z3_apply_result = *mut _Z3_apply_result;
252
253#[doc(hidden)]
254#[repr(C)]
255#[derive(Debug, Copy, Clone)]
256pub struct _Z3_func_interp {
257    _unused: [u8; 0],
258}
259/// Interpretation of a function in a model.
260pub type Z3_func_interp = *mut _Z3_func_interp;
261
262#[doc(hidden)]
263#[repr(C)]
264#[derive(Debug, Copy, Clone)]
265pub struct _Z3_func_entry {
266    _unused: [u8; 0],
267}
268/// Representation of the value of a [`Z3_func_interp`]
269/// at a particular point.
270pub type Z3_func_entry = *mut _Z3_func_entry;
271
272#[doc(hidden)]
273#[repr(C)]
274#[derive(Debug, Copy, Clone)]
275pub struct _Z3_fixedpoint {
276    _unused: [u8; 0],
277}
278/// Context for the recursive predicate solver.
279pub type Z3_fixedpoint = *mut _Z3_fixedpoint;
280
281#[doc(hidden)]
282#[repr(C)]
283#[derive(Debug, Copy, Clone)]
284pub struct _Z3_optimize {
285    _unused: [u8; 0],
286}
287/// Context for solving optimization queries.
288pub type Z3_optimize = *mut _Z3_optimize;
289
290#[doc(hidden)]
291#[repr(C)]
292#[derive(Debug, Copy, Clone)]
293pub struct _Z3_rcf_num {
294    _unused: [u8; 0],
295}
296pub type Z3_rcf_num = *mut _Z3_rcf_num;
297
298/// Z3 string type. It is just an alias for `const char *`.
299pub type Z3_string = *const ::std::os::raw::c_char;
300
301pub type Z3_string_ptr = *mut Z3_string;
302
303pub const Z3_L_FALSE: Z3_lbool = -1;
304pub const Z3_L_UNDEF: Z3_lbool = 0;
305pub const Z3_L_TRUE: Z3_lbool = 1;
306
307/// Lifted Boolean type: `false`, `undefined`, `true`.
308pub type Z3_lbool = i32;
309
310/// The different kinds of symbol.
311/// In Z3, a symbol can be represented using integers and
312/// strings. See [`Z3_get_symbol_kind`].
313///
314/// This corresponds to `Z3_symbol_kind` in the C API.
315///
316/// # See also:
317///
318/// - [`Z3_mk_int_symbol`]
319/// - [`Z3_mk_string_symbol`]
320/// - [`Z3_symbol`]
321#[repr(u32)]
322#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
323pub enum SymbolKind {
324    /// An integer symbol.
325    ///
326    /// This corresponds to `Z3_INT_SYMBOL` in the C API.
327    Int = generated::Z3_symbol_kind::Z3_INT_SYMBOL as u32,
328    /// A string symbol.
329    ///
330    /// This corresponds to `Z3_STRING_SYMBOL` in the C API.
331    String = generated::Z3_symbol_kind::Z3_STRING_SYMBOL as u32,
332}
333
334/// The different kinds of parameters that can be associated with function symbols.
335///
336/// This corresponds to `Z3_parameter_kind` in the C API.
337///
338/// # See also:
339///
340/// - [`Z3_get_decl_num_parameters`]
341/// - [`Z3_get_decl_parameter_kind`]
342#[repr(u32)]
343#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
344pub enum ParameterKind {
345    /// An integer parameter.
346    ///
347    /// This corresponds to `Z3_PARAMETER_INT` in the C API.
348    Int = generated::Z3_parameter_kind::Z3_PARAMETER_INT as u32,
349    /// A double parameter.
350    ///
351    /// This corresponds to `Z3_PARAMETER_DOUBLE` in the C API.
352    Double = generated::Z3_parameter_kind::Z3_PARAMETER_DOUBLE as u32,
353    /// A rational number parameter.
354    ///
355    /// This corresponds to `Z3_PARAMETER_RATIONAL` in the C API.
356    Rational = generated::Z3_parameter_kind::Z3_PARAMETER_RATIONAL as u32,
357    /// A symbol parameter.
358    ///
359    /// This corresponds to `Z3_PARAMETER_SYMBOL` in the C API.
360    Symbol = generated::Z3_parameter_kind::Z3_PARAMETER_SYMBOL as u32,
361    /// A sort parameter.
362    ///
363    /// This corresponds to `Z3_PARAMETER_SORT` in the C API.
364    Sort = generated::Z3_parameter_kind::Z3_PARAMETER_SORT as u32,
365    /// An expression parameter.
366    ///
367    /// This corresponds to `Z3_PARAMETER_AST` in the C API.
368    AST = generated::Z3_parameter_kind::Z3_PARAMETER_AST as u32,
369    /// A function declaration parameter.
370    ///
371    /// This corresponds to `Z3_PARAMETER_FUNC_DECL` in the C API.
372    FuncDecl = generated::Z3_parameter_kind::Z3_PARAMETER_FUNC_DECL as u32,
373}
374
375/// The different kinds of Z3 types.
376///
377/// This corresponds to `Z3_sort_kind` in the C API.
378#[repr(u32)]
379#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
380pub enum SortKind {
381    /// This corresponds to `Z3_UNINTERPRETED_SORT` in the C API.
382    Uninterpreted = generated::Z3_sort_kind::Z3_UNINTERPRETED_SORT as u32,
383    /// This corresponds to `Z3_BOOL_SORT` in the C API.
384    Bool = generated::Z3_sort_kind::Z3_BOOL_SORT as u32,
385    /// This corresponds to `Z3_INT_SORT` in the C API.
386    Int = generated::Z3_sort_kind::Z3_INT_SORT as u32,
387    /// This corresponds to `Z3_REAL_SORT` in the C API.
388    Real = generated::Z3_sort_kind::Z3_REAL_SORT as u32,
389    /// This corresponds to `Z3_BV_SORT` in the C API.
390    BV = generated::Z3_sort_kind::Z3_BV_SORT as u32,
391    /// This corresponds to `Z3_ARRAY_SORT` in the C API.
392    Array = generated::Z3_sort_kind::Z3_ARRAY_SORT as u32,
393    /// This corresponds to `Z3_DATATYPE_SORT` in the C API.
394    Datatype = generated::Z3_sort_kind::Z3_DATATYPE_SORT as u32,
395    /// This corresponds to `Z3_RELATION_SORT` in the C API.
396    Relation = generated::Z3_sort_kind::Z3_RELATION_SORT as u32,
397    /// This corresponds to `Z3_FINITE_DOMAIN_SORT` in the C API.
398    FiniteDomain = generated::Z3_sort_kind::Z3_FINITE_DOMAIN_SORT as u32,
399    /// This corresponds to `Z3_FLOATING_POINT_SORT` in the C API.
400    FloatingPoint = generated::Z3_sort_kind::Z3_FLOATING_POINT_SORT as u32,
401    /// This corresponds to `Z3_ROUNDING_MODE_SORT` in the C API.
402    RoundingMode = generated::Z3_sort_kind::Z3_ROUNDING_MODE_SORT as u32,
403    /// This corresponds to `Z3_SEQ_SORT` in the C API.
404    Seq = generated::Z3_sort_kind::Z3_SEQ_SORT as u32,
405    /// This corresponds to `Z3_RE_SORT` in the C API.
406    RE = generated::Z3_sort_kind::Z3_RE_SORT as u32,
407    /// This corresponds to `Z3_UNKNOWN_SORT` in the C API.
408    Unknown = generated::Z3_sort_kind::Z3_UNKNOWN_SORT as u32,
409}
410
411/// The different kinds of Z3 AST (abstract syntax trees). That is, terms, formulas and types.
412///
413/// This corresponds to `Z3_ast_kind` in the C API.
414#[repr(u32)]
415#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
416pub enum AstKind {
417    /// numeral constants
418    ///
419    /// This corresponds to `Z3_NUMERAL_AST` in the C API.
420    Numeral = generated::Z3_ast_kind::Z3_NUMERAL_AST as u32,
421    /// constant and applications
422    ///
423    /// This corresponds to `Z3_APP_AST` in the C API.
424    App = generated::Z3_ast_kind::Z3_APP_AST as u32,
425    /// bound variables
426    ///
427    /// This corresponds to `Z3_VAR_AST` in the C API.
428    Var = generated::Z3_ast_kind::Z3_VAR_AST as u32,
429    /// quantifiers
430    ///
431    /// This corresponds to `Z3_QUANTIFIER_AST` in the C API.
432    Quantifier = generated::Z3_ast_kind::Z3_QUANTIFIER_AST as u32,
433    /// sort
434    ///
435    /// This corresponds to `Z3_SORT_AST` in the C API.
436    Sort = generated::Z3_ast_kind::Z3_SORT_AST as u32,
437    /// function declaration
438    ///
439    /// This corresponds to `Z3_FUNC_DECL_AST` in the C API.
440    FuncDecl = generated::Z3_ast_kind::Z3_FUNC_DECL_AST as u32,
441    /// internal
442    ///
443    /// This corresponds to `Z3_UNKNOWN_AST` in the C API.
444    Unknown = generated::Z3_ast_kind::Z3_UNKNOWN_AST as u32,
445}
446
447/// The different kinds of interpreted function kinds.
448///
449/// This corresponds to `Z3_decl_kind` in the C API.
450#[repr(u32)]
451#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
452pub enum DeclKind {
453    /// The constant `true`.
454    TRUE = generated::Z3_decl_kind::Z3_OP_TRUE as u32,
455    /// The constant `false`.
456    FALSE = generated::Z3_decl_kind::Z3_OP_FALSE as u32,
457    /// The equality predicate.
458    EQ = generated::Z3_decl_kind::Z3_OP_EQ as u32,
459    /// The n-ary distinct predicate (every argument is mutually distinct).
460    DISTINCT = generated::Z3_decl_kind::Z3_OP_DISTINCT as u32,
461    /// The ternary if-then-else term.
462    ITE = generated::Z3_decl_kind::Z3_OP_ITE as u32,
463    /// n-ary conjunction.
464    AND = generated::Z3_decl_kind::Z3_OP_AND as u32,
465    /// n-ary disjunction.
466    OR = generated::Z3_decl_kind::Z3_OP_OR as u32,
467    /// equivalence (binary).
468    IFF = generated::Z3_decl_kind::Z3_OP_IFF as u32,
469    /// Exclusive or.
470    XOR = generated::Z3_decl_kind::Z3_OP_XOR as u32,
471    /// Negation.
472    NOT = generated::Z3_decl_kind::Z3_OP_NOT as u32,
473    /// Implication.
474    IMPLIES = generated::Z3_decl_kind::Z3_OP_IMPLIES as u32,
475    /// Binary equivalence modulo namings. This binary predicate is used
476    /// in proof terms. It captures equisatisfiability and equivalence
477    /// modulo renamings.
478    OEQ = generated::Z3_decl_kind::Z3_OP_OEQ as u32,
479    /// Arithmetic numeral.
480    ANUM = generated::Z3_decl_kind::Z3_OP_ANUM as u32,
481    /// Arithmetic algebraic numeral. Algebraic numbers are used to
482    /// represent irrational numbers in Z3.
483    AGNUM = generated::Z3_decl_kind::Z3_OP_AGNUM as u32,
484    /// `<=`.
485    LE = generated::Z3_decl_kind::Z3_OP_LE as u32,
486    /// `>=`.
487    GE = generated::Z3_decl_kind::Z3_OP_GE as u32,
488    /// `<`.
489    LT = generated::Z3_decl_kind::Z3_OP_LT as u32,
490    /// `>`.
491    GT = generated::Z3_decl_kind::Z3_OP_GT as u32,
492    /// Addition - Binary.
493    ADD = generated::Z3_decl_kind::Z3_OP_ADD as u32,
494    /// Binary subtraction.
495    SUB = generated::Z3_decl_kind::Z3_OP_SUB as u32,
496    /// Unary minus.
497    UMINUS = generated::Z3_decl_kind::Z3_OP_UMINUS as u32,
498    /// Multiplication - Binary.
499    MUL = generated::Z3_decl_kind::Z3_OP_MUL as u32,
500    /// Division - Binary.
501    DIV = generated::Z3_decl_kind::Z3_OP_DIV as u32,
502    /// Integer division - Binary.
503    IDIV = generated::Z3_decl_kind::Z3_OP_IDIV as u32,
504    /// Remainder - Binary.
505    REM = generated::Z3_decl_kind::Z3_OP_REM as u32,
506    /// Modulus - Binary.
507    MOD = generated::Z3_decl_kind::Z3_OP_MOD as u32,
508    /// Coercion of integer to real - Unary.
509    TO_REAL = generated::Z3_decl_kind::Z3_OP_TO_REAL as u32,
510    /// Coercion of real to integer - Unary.
511    TO_INT = generated::Z3_decl_kind::Z3_OP_TO_INT as u32,
512    /// Check if real is also an integer - Unary.
513    IS_INT = generated::Z3_decl_kind::Z3_OP_IS_INT as u32,
514    /// Power operator `x^y`.
515    POWER = generated::Z3_decl_kind::Z3_OP_POWER as u32,
516    /// Array store. It satisfies `select(store(a,i,v),j) = if i = j then v else select(a,j)`.
517    /// Array store takes at least 3 arguments.
518    STORE = generated::Z3_decl_kind::Z3_OP_STORE as u32,
519    /// Array select.
520    SELECT = generated::Z3_decl_kind::Z3_OP_SELECT as u32,
521    /// The constant array. For example, `select(const(v),i) = v`
522    /// holds for every `v` and `i`. The function is unary.
523    CONST_ARRAY = generated::Z3_decl_kind::Z3_OP_CONST_ARRAY as u32,
524    /// Array map operator.
525    /// It satisfies `map[f](a1,..,a_n)[i] = f(a1[i],...,a_n[i])` for every `i`.
526    ARRAY_MAP = generated::Z3_decl_kind::Z3_OP_ARRAY_MAP as u32,
527    /// Default value of arrays. For example `default(const(v)) = v`. The function is unary.
528    ARRAY_DEFAULT = generated::Z3_decl_kind::Z3_OP_ARRAY_DEFAULT as u32,
529    /// Set union between two Boolean arrays (two arrays whose range
530    /// type is Boolean). The function is binary.
531    SET_UNION = generated::Z3_decl_kind::Z3_OP_SET_UNION as u32,
532    /// Set intersection between two Boolean arrays. The function is binary.
533    SET_INTERSECT = generated::Z3_decl_kind::Z3_OP_SET_INTERSECT as u32,
534    /// Set difference between two Boolean arrays. The function is binary.
535    SET_DIFFERENCE = generated::Z3_decl_kind::Z3_OP_SET_DIFFERENCE as u32,
536    /// Set complement of a Boolean array. The function is unary.
537    SET_COMPLEMENT = generated::Z3_decl_kind::Z3_OP_SET_COMPLEMENT as u32,
538    /// Subset predicate between two Boolean arrays. The relation is binary.
539    SET_SUBSET = generated::Z3_decl_kind::Z3_OP_SET_SUBSET as u32,
540    /// An array value that behaves as the function graph of the
541    /// function passed as parameter.
542    AS_ARRAY = generated::Z3_decl_kind::Z3_OP_AS_ARRAY as u32,
543    /// Array extensionality function. It takes two arrays as arguments and
544    /// produces an index, such that the arrays
545    /// are different if they are different on the index.
546    ARRAY_EXT = generated::Z3_decl_kind::Z3_OP_ARRAY_EXT as u32,
547    /// Bit-vector numeral.
548    BNUM = generated::Z3_decl_kind::Z3_OP_BNUM as u32,
549    /// One bit bit-vector.
550    BIT1 = generated::Z3_decl_kind::Z3_OP_BIT1 as u32,
551    /// Zero bit bit-vector.
552    BIT0 = generated::Z3_decl_kind::Z3_OP_BIT0 as u32,
553    /// Unary minus.
554    BNEG = generated::Z3_decl_kind::Z3_OP_BNEG as u32,
555    /// Binary addition.
556    BADD = generated::Z3_decl_kind::Z3_OP_BADD as u32,
557    /// Binary subtraction.
558    BSUB = generated::Z3_decl_kind::Z3_OP_BSUB as u32,
559    /// Binary multiplication.
560    BMUL = generated::Z3_decl_kind::Z3_OP_BMUL as u32,
561    /// Binary signed division.
562    BSDIV = generated::Z3_decl_kind::Z3_OP_BSDIV as u32,
563    /// Binary unsigned division.
564    BUDIV = generated::Z3_decl_kind::Z3_OP_BUDIV as u32,
565    /// Binary signed remainder.
566    BSREM = generated::Z3_decl_kind::Z3_OP_BSREM as u32,
567    /// Binary unsigned remainder.
568    BUREM = generated::Z3_decl_kind::Z3_OP_BUREM as u32,
569    /// Binary signed modulus.
570    BSMOD = generated::Z3_decl_kind::Z3_OP_BSMOD as u32,
571    /// Unary function. `bsdiv(x, 0)` is congruent to `bsdiv0(x)`.
572    BSDIV0 = generated::Z3_decl_kind::Z3_OP_BSDIV0 as u32,
573    /// Unary function. `budiv(x, 0)` is congruent to `budiv0(x)`.
574    BUDIV0 = generated::Z3_decl_kind::Z3_OP_BUDIV0 as u32,
575    /// Unary function. `bsrem(x, 0)` is congruent to `bsrem0(x)`.
576    BSREM0 = generated::Z3_decl_kind::Z3_OP_BSREM0 as u32,
577    /// Unary function. `burem(x, 0)` is congruent to `burem0(x)`.
578    BUREM0 = generated::Z3_decl_kind::Z3_OP_BUREM0 as u32,
579    /// Unary function. `bsmod(x, 0)` is congruent to `bsmod0(x)`.
580    BSMOD0 = generated::Z3_decl_kind::Z3_OP_BSMOD0 as u32,
581    /// Unsigned bit-vector <= - Binary relation.
582    ULEQ = generated::Z3_decl_kind::Z3_OP_ULEQ as u32,
583    /// Signed bit-vector  <= - Binary relation.
584    SLEQ = generated::Z3_decl_kind::Z3_OP_SLEQ as u32,
585    /// Unsigned bit-vector  >= - Binary relation.
586    UGEQ = generated::Z3_decl_kind::Z3_OP_UGEQ as u32,
587    /// Signed bit-vector  >= - Binary relation.
588    SGEQ = generated::Z3_decl_kind::Z3_OP_SGEQ as u32,
589    /// Unsigned bit-vector  < - Binary relation.
590    ULT = generated::Z3_decl_kind::Z3_OP_ULT as u32,
591    /// Signed bit-vector < - Binary relation.
592    SLT = generated::Z3_decl_kind::Z3_OP_SLT as u32,
593    /// Unsigned bit-vector > - Binary relation.
594    UGT = generated::Z3_decl_kind::Z3_OP_UGT as u32,
595    /// Signed bit-vector > - Binary relation.
596    SGT = generated::Z3_decl_kind::Z3_OP_SGT as u32,
597    /// Bit-wise and - Binary.
598    BAND = generated::Z3_decl_kind::Z3_OP_BAND as u32,
599    /// Bit-wise or - Binary.
600    BOR = generated::Z3_decl_kind::Z3_OP_BOR as u32,
601    /// Bit-wise not - Unary.
602    BNOT = generated::Z3_decl_kind::Z3_OP_BNOT as u32,
603    /// Bit-wise xor - Binary.
604    BXOR = generated::Z3_decl_kind::Z3_OP_BXOR as u32,
605    /// Bit-wise nand - Binary.
606    BNAND = generated::Z3_decl_kind::Z3_OP_BNAND as u32,
607    /// Bit-wise nor - Binary.
608    BNOR = generated::Z3_decl_kind::Z3_OP_BNOR as u32,
609    /// Bit-wise xnor - Binary.
610    BXNOR = generated::Z3_decl_kind::Z3_OP_BXNOR as u32,
611    /// Bit-vector concatenation - Binary.
612    CONCAT = generated::Z3_decl_kind::Z3_OP_CONCAT as u32,
613    /// Bit-vector sign extension.
614    SIGN_EXT = generated::Z3_decl_kind::Z3_OP_SIGN_EXT as u32,
615    /// Bit-vector zero extension.
616    ZERO_EXT = generated::Z3_decl_kind::Z3_OP_ZERO_EXT as u32,
617    /// Bit-vector extraction.
618    EXTRACT = generated::Z3_decl_kind::Z3_OP_EXTRACT as u32,
619    /// Repeat bit-vector n times.
620    REPEAT = generated::Z3_decl_kind::Z3_OP_REPEAT as u32,
621    /// Bit-vector reduce or - Unary.
622    BREDOR = generated::Z3_decl_kind::Z3_OP_BREDOR as u32,
623    /// Bit-vector reduce and - Unary.
624    BREDAND = generated::Z3_decl_kind::Z3_OP_BREDAND as u32,
625    BCOMP = generated::Z3_decl_kind::Z3_OP_BCOMP as u32,
626    /// Shift left.
627    BSHL = generated::Z3_decl_kind::Z3_OP_BSHL as u32,
628    /// Logical shift right.
629    BLSHR = generated::Z3_decl_kind::Z3_OP_BLSHR as u32,
630    /// Arithmetical shift right.
631    BASHR = generated::Z3_decl_kind::Z3_OP_BASHR as u32,
632    /// Left rotation.
633    ROTATE_LEFT = generated::Z3_decl_kind::Z3_OP_ROTATE_LEFT as u32,
634    /// Right rotation.
635    ROTATE_RIGHT = generated::Z3_decl_kind::Z3_OP_ROTATE_RIGHT as u32,
636    /// (extended) Left rotation. Similar to `DeclKind::ROTATE_LEFT`,
637    /// but it is a binary operator instead of a parametric one.
638    EXT_ROTATE_LEFT = generated::Z3_decl_kind::Z3_OP_EXT_ROTATE_LEFT as u32,
639    /// (extended) Right rotation. Similar to `DeclKind::ROTATE_RIGHT`,
640    /// but it is a binary operator instead of a parametric one.
641    EXT_ROTATE_RIGHT = generated::Z3_decl_kind::Z3_OP_EXT_ROTATE_RIGHT as u32,
642    BIT2BOOL = generated::Z3_decl_kind::Z3_OP_BIT2BOOL as u32,
643    /// Coerce integer to bit-vector.
644    ///
645    /// NB. This function is not supported by the decision procedures.
646    /// Only the most rudimentary simplification rules are applied to
647    /// this function.
648    INT2BV = generated::Z3_decl_kind::Z3_OP_INT2BV as u32,
649    /// Coerce bit-vector to integer.
650    ///
651    /// NB. This function is not supported by the decision procedures.
652    /// Only the most rudimentary simplification rules are applied to
653    /// this function.
654    BV2INT = generated::Z3_decl_kind::Z3_OP_BV2INT as u32,
655    /// Compute the carry bit in a full-adder.
656    /// The meaning is given by the equivalence:
657    ///
658    /// ```text
659    /// (carry l1 l2 l3) <=> (or (and l1 l2) (and l1 l3) (and l2 l3)))
660    /// ```
661    CARRY = generated::Z3_decl_kind::Z3_OP_CARRY as u32,
662    /// Compute ternary XOR.
663    ///
664    /// The meaning is given by the equivalence:
665    ///
666    /// ```text
667    /// (xor3 l1 l2 l3) <=> (xor (xor l1 l2) l3)
668    /// ```
669    XOR3 = generated::Z3_decl_kind::Z3_OP_XOR3 as u32,
670    /// Check that bit-wise signed multiplication does not overflow.
671    ///
672    /// Signed multiplication overflows if the operands have the
673    /// same sign and the result of multiplication does not fit
674    /// within the available bits.
675    ///
676    /// # See also:
677    ///
678    /// - [`Z3_mk_bvmul_no_overflow`]
679    BSMUL_NO_OVFL = generated::Z3_decl_kind::Z3_OP_BSMUL_NO_OVFL as u32,
680    /// Check that bit-wise unsigned multiplication does not overflow.
681    ///
682    /// Unsigned multiplication overflows if the result does not fit
683    /// within the available bits.
684    ///
685    /// # See also:
686    ///
687    /// - [`Z3_mk_bvmul_no_overflow`]
688    BUMUL_NO_OVFL = generated::Z3_decl_kind::Z3_OP_BUMUL_NO_OVFL as u32,
689    /// Check that bit-wise signed multiplication does not underflow.
690    ///
691    /// Signed multiplication underflows if the operands have opposite
692    /// signs and the result of multiplication does not fit within the
693    /// available bits.
694    ///
695    /// # See also:
696    ///
697    /// - [`Z3_mk_bvmul_no_underflow`]
698    BSMUL_NO_UDFL = generated::Z3_decl_kind::Z3_OP_BSMUL_NO_UDFL as u32,
699    /// Binary signed division.
700    ///
701    /// It has the same semantics as `DeclKind::BSDIV`, but created in
702    /// a context where the second operand can be assumed to be non-zero.
703    BSDIV_I = generated::Z3_decl_kind::Z3_OP_BSDIV_I as u32,
704    /// Binary unsigned division.
705    ///
706    /// It has the same semantics as `DeclKind::BUDIV`, but created in a
707    /// context where the second operand can be assumed to be non-zero.
708    BUDIV_I = generated::Z3_decl_kind::Z3_OP_BUDIV_I as u32,
709    /// Binary signed remainder.
710    ///
711    /// It has the same semantics as `DeclKind::BSREM`, but created in a
712    /// context where the second operand can be assumed to be non-zero.
713    BSREM_I = generated::Z3_decl_kind::Z3_OP_BSREM_I as u32,
714    /// Binary unsigned remainder.
715    ///
716    /// It has the same semantics as `DeclKind::BUREM`, but created in a
717    /// context where the second operand can be assumed to be non-zero.
718    BUREM_I = generated::Z3_decl_kind::Z3_OP_BUREM_I as u32,
719    /// Binary signed modulus.
720    ///
721    /// It has the same semantics as `DeclKind::BSMOD`, but created in a
722    /// context where the second operand can be assumed to be non-zero.
723    BSMOD_I = generated::Z3_decl_kind::Z3_OP_BSMOD_I as u32,
724    /// Undef/Null proof object.
725    PR_UNDEF = generated::Z3_decl_kind::Z3_OP_PR_UNDEF as u32,
726    /// Proof for the expression 'true'.
727    PR_TRUE = generated::Z3_decl_kind::Z3_OP_PR_TRUE as u32,
728    /// Proof for a fact asserted by the user.
729    PR_ASSERTED = generated::Z3_decl_kind::Z3_OP_PR_ASSERTED as u32,
730    /// Proof for a fact (tagged as goal) asserted by the user.
731    PR_GOAL = generated::Z3_decl_kind::Z3_OP_PR_GOAL as u32,
732    /// Given a proof for p and a proof for (implies p q), produces a proof for q.
733    ///
734    /// ```text
735    /// T1: p
736    /// T2: (implies p q)
737    /// [mp T1 T2]: q
738    /// ```
739    ///
740    /// The second antecedents may also be a proof for `(iff p q)`.
741    PR_MODUS_PONENS = generated::Z3_decl_kind::Z3_OP_PR_MODUS_PONENS as u32,
742    /// A proof for `(R t t)`, where `R` is a reflexive relation.
743    ///
744    /// This proof object has no antecedents.
745    ///
746    /// The only reflexive relations that are used are
747    /// equivalence modulo namings, equality and equivalence.
748    /// That is, `R` is either `~`, `=` or `iff`.
749    PR_REFLEXIVITY = generated::Z3_decl_kind::Z3_OP_PR_REFLEXIVITY as u32,
750    /// Given an symmetric relation `R` and a proof for `(R t s)`,
751    /// produces a proof for `(R s t)`.
752    ///
753    /// ```text
754    /// T1: (R t s)
755    /// [symmetry T1]: (R s t)
756    /// ```
757    ///
758    /// `T1` is the antecedent of this proof object.
759    PR_SYMMETRY = generated::Z3_decl_kind::Z3_OP_PR_SYMMETRY as u32,
760    /// Given a transitive relation `R`, and proofs for `(R t s)` and
761    /// `(R s u)`, produces a proof for `(R t u)`.
762    ///
763    /// ```text
764    /// T1: (R t s)
765    /// T2: (R s u)
766    /// [trans T1 T2]: (R t u)
767    /// ```
768    PR_TRANSITIVITY = generated::Z3_decl_kind::Z3_OP_PR_TRANSITIVITY as u32,
769    /// Condensed transitivity proof.
770    ///
771    /// It combines several symmetry and transitivity proofs.
772    ///
773    /// Example:
774    ///
775    /// ```text
776    /// T1: (R a b)
777    /// T2: (R c b)
778    /// T3: (R c d)
779    /// [trans* T1 T2 T3]: (R a d)
780    /// ```
781    ///
782    /// `R` must be a symmetric and transitive relation.
783    ///
784    /// Assuming that this proof object is a proof for `(R s t)`, then
785    /// a proof checker must check if it is possible to prove `(R s t)`
786    /// using the antecedents, symmetry and transitivity.  That is,
787    /// if there is a path from `s` to `t`, if we view every
788    /// antecedent `(R a b)` as an edge between `a` and `b`.
789    PR_TRANSITIVITY_STAR = generated::Z3_decl_kind::Z3_OP_PR_TRANSITIVITY_STAR as u32,
790    /// Monotonicity proof object.
791    ///
792    /// ```text
793    /// T1: (R t_1 s_1)
794    /// ...
795    /// Tn: (R t_n s_n)
796    /// [monotonicity T1 ... Tn]: (R (f t_1 ... t_n) (f s_1 ... s_n))
797    /// ```
798    ///
799    /// Remark: if `t_i == s_i`, then the antecedent `Ti` is suppressed.
800    /// That is, reflexivity proofs are suppressed to save space.
801    PR_MONOTONICITY = generated::Z3_decl_kind::Z3_OP_PR_MONOTONICITY as u32,
802    /// Given a proof for `(~ p q)`, produces a proof for
803    /// `(~ (forall (x) p) (forall (x) q))`.
804    ///
805    /// ```text
806    /// T1: (~ p q)
807    /// [quant-intro T1]: (~ (forall (x) p) (forall (x) q))
808    /// ```
809    PR_QUANT_INTRO = generated::Z3_decl_kind::Z3_OP_PR_QUANT_INTRO as u32,
810
811    /// Given a proof `p`, produces a proof of `lambda x . p`, where `x` are free
812    /// variables in `p`.
813    ///
814    /// ```text
815    /// T1: f
816    /// [proof-bind T1] forall (x) f
817    /// ```
818    PR_BIND = generated::Z3_decl_kind::Z3_OP_PR_BIND as u32,
819    /// Distributivity proof object.
820    ///
821    /// Given that `f (= or)` distributes over `g (= and)`, produces a proof for
822    ///
823    /// ```text
824    /// (= (f a (g c d))
825    /// (g (f a c) (f a d)))
826    /// ```
827    ///
828    /// If `f` and `g` are associative, this proof also justifies the following equality:
829    ///
830    /// ```text
831    /// (= (f (g a b) (g c d))
832    /// (g (f a c) (f a d) (f b c) (f b d)))
833    /// ```
834    ///
835    /// where each `f` and `g` can have arbitrary number of arguments.
836    ///
837    /// This proof object has no antecedents.
838    ///
839    /// Remark: This rule is used by the CNF conversion pass and
840    /// instantiated by `f = or`, and `g = and`.
841    PR_DISTRIBUTIVITY = generated::Z3_decl_kind::Z3_OP_PR_DISTRIBUTIVITY as u32,
842    /// Given a proof for `(and l_1 ... l_n)`, produces a proof
843    /// for `l_i`.
844    ///
845    /// ```text
846    /// T1: (and l_1 ... l_n)
847    /// [and-elim T1]: l_i
848    /// ```
849    PR_AND_ELIM = generated::Z3_decl_kind::Z3_OP_PR_AND_ELIM as u32,
850    /// Given a proof for `(not (or l_1 ... l_n))`, produces a
851    /// proof for `(not l_i)`.
852    ///
853    /// ```text
854    /// T1: (not (or l_1 ... l_n))
855    /// [not-or-elim T1]: (not l_i)
856    /// ```
857    PR_NOT_OR_ELIM = generated::Z3_decl_kind::Z3_OP_PR_NOT_OR_ELIM as u32,
858    /// A proof for a local rewriting step `(= t s)`.
859    ///
860    /// The head function symbol of `t` is interpreted.
861    ///
862    /// This proof object has no antecedents.
863    ///
864    /// The conclusion of a rewrite rule is either an equality `(= t s)`,
865    /// an equivalence `(iff t s)`, or equi-satisfiability `(~ t s)`.
866    ///
867    /// Remark: if `f` is `bool`, then `=` is `iff`.
868    ///
869    /// Examples:
870    ///
871    /// ```text
872    /// (= (+ x 0) x)
873    /// (= (+ x 1 2) (+ 3 x))
874    /// (iff (or x false) x)
875    /// ```
876    PR_REWRITE = generated::Z3_decl_kind::Z3_OP_PR_REWRITE as u32,
877    /// A proof for rewriting an expression `t` into an expression `s`.
878    ///
879    /// This proof object can have `n` antecedents. The antecedents are
880    /// proofs for equalities used as substitution rules.
881    ///
882    /// The object is also used in a few cases. The cases are:
883    ///
884    /// - When applying contextual simplification `(CONTEXT_SIMPLIFIER=true)`.
885    /// - When converting bit-vectors to Booleans `(BIT2BOOL=true)`.
886    PR_REWRITE_STAR = generated::Z3_decl_kind::Z3_OP_PR_REWRITE_STAR as u32,
887    /// A proof for `(iff (f (forall (x) q(x)) r) (forall (x) (f (q x) r)))`.
888    ///
889    /// This proof object has no antecedents.
890    PR_PULL_QUANT = generated::Z3_decl_kind::Z3_OP_PR_PULL_QUANT as u32,
891    /// A proof for:
892    ///
893    /// ```text
894    /// (iff (forall (x_1 ... x_m) (and p_1[x_1 ... x_m] ... p_n[x_1 ... x_m]))
895    /// (and (forall (x_1 ... x_m) p_1[x_1 ... x_m])
896    /// ...
897    /// (forall (x_1 ... x_m) p_n[x_1 ... x_m])))
898    /// ```
899    ///
900    /// This proof object has no antecedents.
901    PR_PUSH_QUANT = generated::Z3_decl_kind::Z3_OP_PR_PUSH_QUANT as u32,
902    /// A proof for
903    ///
904    /// ```text
905    /// (iff (forall (x_1 ... x_n y_1 ... y_m) p[x_1 ... x_n])
906    /// (forall (x_1 ... x_n) p[x_1 ... x_n]))
907    /// ```
908    ///
909    /// It is used to justify the elimination of unused variables.
910    ///
911    /// This proof object has no antecedents.
912    PR_ELIM_UNUSED_VARS = generated::Z3_decl_kind::Z3_OP_PR_ELIM_UNUSED_VARS as u32,
913    /// A proof for destructive equality resolution:
914    ///
915    /// ```text
916    /// (iff (forall (x) (or (not (= x t)) P[x])) P[t])
917    /// ```
918    ///
919    /// if `x` does not occur in `t`.
920    ///
921    /// This proof object has no antecedents.
922    ///
923    /// Several variables can be eliminated simultaneously.
924    PR_DER = generated::Z3_decl_kind::Z3_OP_PR_DER as u32,
925    /// A proof of `(or (not (forall (x) (P x))) (P a))`.
926    PR_QUANT_INST = generated::Z3_decl_kind::Z3_OP_PR_QUANT_INST as u32,
927    /// Mark a hypothesis in a natural deduction style proof.
928    PR_HYPOTHESIS = generated::Z3_decl_kind::Z3_OP_PR_HYPOTHESIS as u32,
929    /// ```text
930    /// T1: false
931    /// [lemma T1]: (or (not l_1) ... (not l_n))
932    /// ```
933    ///
934    /// This proof object has one antecedent: a hypothetical proof for false.
935    ///
936    /// It converts the proof in a proof for `(or (not l_1) ... (not l_n))`,
937    /// when `T1` contains the open hypotheses: `l_1, ..., l_n`.
938    ///
939    /// The hypotheses are closed after an application of a lemma.
940    ///
941    /// Furthermore, there are no other open hypotheses in the subtree covered by
942    /// the lemma.
943    PR_LEMMA = generated::Z3_decl_kind::Z3_OP_PR_LEMMA as u32,
944    /// ```text
945    /// T1:      (or l_1 ... l_n l_1' ... l_m')
946    /// T2:      (not l_1)
947    /// ...
948    /// T(n+1):  (not l_n)
949    /// [unit-resolution T1 ... T(n+1)]: (or l_1' ... l_m')
950    /// ```
951    PR_UNIT_RESOLUTION = generated::Z3_decl_kind::Z3_OP_PR_UNIT_RESOLUTION as u32,
952    /// ```text
953    /// T1: p
954    /// [iff-true T1]: (iff p true)
955    /// ```
956    PR_IFF_TRUE = generated::Z3_decl_kind::Z3_OP_PR_IFF_TRUE as u32,
957    /// ```text
958    /// T1: (not p)
959    /// [iff-false T1]: (iff p false)
960    /// ```
961    PR_IFF_FALSE = generated::Z3_decl_kind::Z3_OP_PR_IFF_FALSE as u32,
962    /// ```text
963    /// [comm]: (= (f a b) (f b a))
964    /// ```
965    ///
966    /// `f` is a commutative operator.
967    ///
968    /// This proof object has no antecedents.
969    ///
970    /// Remark: if `f` is `bool`, then `=` is `iff`.
971    PR_COMMUTATIVITY = generated::Z3_decl_kind::Z3_OP_PR_COMMUTATIVITY as u32,
972    /// Proof object used to justify Tseitin's like axioms:
973    ///
974    /// ```text
975    /// (or (not (and p q)) p)
976    /// (or (not (and p q)) q)
977    /// (or (not (and p q r)) p)
978    /// (or (not (and p q r)) q)
979    /// (or (not (and p q r)) r)
980    /// ...
981    /// (or (and p q) (not p) (not q))
982    /// (or (not (or p q)) p q)
983    /// (or (or p q) (not p))
984    /// (or (or p q) (not q))
985    /// (or (not (iff p q)) (not p) q)
986    /// (or (not (iff p q)) p (not q))
987    /// (or (iff p q) (not p) (not q))
988    /// (or (iff p q) p q)
989    /// (or (not (ite a b c)) (not a) b)
990    /// (or (not (ite a b c)) a c)
991    /// (or (ite a b c) (not a) (not b))
992    /// (or (ite a b c) a (not c))
993    /// (or (not (not a)) (not a))
994    /// (or (not a) a)
995    /// ```
996    ///
997    /// This proof object has no antecedents.
998    ///
999    /// Note: all axioms are propositional tautologies.
1000    /// Note also that `and` and `or` can take multiple arguments.
1001    /// You can recover the propositional tautologies by
1002    /// unfolding the Boolean connectives in the axioms a small
1003    /// bounded number of steps `(=3)`.
1004    PR_DEF_AXIOM = generated::Z3_decl_kind::Z3_OP_PR_DEF_AXIOM as u32,
1005    /// Introduces a name for a formula/term.
1006    ///
1007    /// Suppose `e` is an expression with free variables `x`, and
1008    /// `def-intro` introduces the name `n(x)`. The possible cases are:
1009    ///
1010    /// When e is of Boolean type:
1011    ///
1012    /// ```text
1013    /// [def-intro]: (and (or n (not e)) (or (not n) e))
1014    /// ```
1015    ///
1016    /// or:
1017    ///
1018    /// ```text
1019    /// [def-intro]: (or (not n) e)
1020    /// ```
1021    ///
1022    /// when e only occurs positively.
1023    ///
1024    /// When e is of the form `(ite cond th el)`:
1025    ///
1026    /// ```text
1027    /// [def-intro]: (and (or (not cond) (= n th)) (or cond (= n el)))
1028    /// ```
1029    ///
1030    /// Otherwise:
1031    ///
1032    /// ```text
1033    /// [def-intro]: (= n e)
1034    /// ```
1035    PR_DEF_INTRO = generated::Z3_decl_kind::Z3_OP_PR_DEF_INTRO as u32,
1036    /// ```text
1037    /// [apply-def T1]: F ~ n
1038    /// ```
1039    ///
1040    /// `F` is 'equivalent' to `n`, given that `T1` is a proof that
1041    /// `n` is a name for `F`.
1042    PR_APPLY_DEF = generated::Z3_decl_kind::Z3_OP_PR_APPLY_DEF as u32,
1043    /// ```text
1044    /// T1: (iff p q)
1045    /// [iff~ T1]: (~ p q)
1046    /// ```
1047    PR_IFF_OEQ = generated::Z3_decl_kind::Z3_OP_PR_IFF_OEQ as u32,
1048    /// Proof for a (positive) NNF step. Example:
1049    ///
1050    /// ```text
1051    /// T1: (not s_1) ~ r_1
1052    /// T2: (not s_2) ~ r_2
1053    /// T3: s_1 ~ r_1'
1054    /// T4: s_2 ~ r_2'
1055    /// [nnf-pos T1 T2 T3 T4]: (~ (iff s_1 s_2)
1056    /// (and (or r_1 r_2') (or r_1' r_2)))
1057    /// ```
1058    ///
1059    /// The negation normal form steps `NNF_POS` and `NNF_NEG` are used in the
1060    /// following cases:
1061    ///
1062    /// - When creating the NNF of a positive force quantifier.
1063    ///   The quantifier is retained (unless the bound variables are eliminated).
1064    ///   Example:
1065    ///   ```text
1066    ///   T1: q ~ q_new
1067    ///   [nnf-pos T1]: (~ (forall (x T) q) (forall (x T) q_new))
1068    ///   ```
1069    /// - When recursively creating NNF over Boolean formulas, where the top-level
1070    ///   connective is changed during NNF conversion. The relevant Boolean connectives
1071    ///   for `NNF_POS` are `implies`, `iff`, `xor`, `ite`.
1072    ///   `NNF_NEG` furthermore handles the case where negation is pushed
1073    ///   over Boolean connectives `and` and `or`.
1074    PR_NNF_POS = generated::Z3_decl_kind::Z3_OP_PR_NNF_POS as u32,
1075    /// Proof for a (negative) NNF step. Examples:
1076    ///
1077    /// ```text
1078    /// T1: (not s_1) ~ r_1
1079    /// ...
1080    /// Tn: (not s_n) ~ r_n
1081    /// [nnf-neg T1 ... Tn]: (not (and s_1 ... s_n)) ~ (or r_1 ... r_n)
1082    /// ```
1083    ///
1084    /// and
1085    ///
1086    /// ```text
1087    /// T1: (not s_1) ~ r_1
1088    /// ...
1089    /// Tn: (not s_n) ~ r_n
1090    /// [nnf-neg T1 ... Tn]: (not (or s_1 ... s_n)) ~ (and r_1 ... r_n)
1091    /// ```
1092    ///
1093    /// and
1094    ///
1095    /// ```text
1096    /// T1: (not s_1) ~ r_1
1097    /// T2: (not s_2) ~ r_2
1098    /// T3: s_1 ~ r_1'
1099    /// T4: s_2 ~ r_2'
1100    /// [nnf-neg T1 T2 T3 T4]: (~ (not (iff s_1 s_2))
1101    /// (and (or r_1 r_2) (or r_1' r_2')))
1102    /// ```
1103    PR_NNF_NEG = generated::Z3_decl_kind::Z3_OP_PR_NNF_NEG as u32,
1104    /// Proof for:
1105    ///
1106    /// ```text
1107    /// [sk]: (~ (not (forall x (p x y))) (not (p (sk y) y)))
1108    /// [sk]: (~ (exists x (p x y)) (p (sk y) y))
1109    /// ```
1110    ///
1111    /// This proof object has no antecedents.
1112    PR_SKOLEMIZE = generated::Z3_decl_kind::Z3_OP_PR_SKOLEMIZE as u32,
1113    /// Modus ponens style rule for equi-satisfiability.
1114    ///
1115    /// ```text
1116    /// T1: p
1117    /// T2: (~ p q)
1118    /// [mp~ T1 T2]: q
1119    /// ```
1120    PR_MODUS_PONENS_OEQ = generated::Z3_decl_kind::Z3_OP_PR_MODUS_PONENS_OEQ as u32,
1121    /// Generic proof for theory lemmas.
1122    ///
1123    /// The theory lemma function comes with one or more parameters.
1124    ///
1125    /// The first parameter indicates the name of the theory.
1126    ///
1127    /// For the theory of arithmetic, additional parameters provide hints for
1128    /// checking the theory lemma.
1129    ///
1130    /// The hints for arithmetic are:
1131    ///
1132    /// - `farkas` - followed by rational coefficients. Multiply the coefficients to the
1133    ///   inequalities in the lemma, add the (negated) inequalities and obtain a contradiction.
1134    /// - `triangle-eq` - Indicates a lemma related to the equivalence:
1135    ///   ```text
1136    ///   (iff (= t1 t2) (and (<= t1 t2) (<= t2 t1)))
1137    ///   ```
1138    /// - `gcd-test` - Indicates an integer linear arithmetic lemma that uses a gcd test.
1139    PR_TH_LEMMA = generated::Z3_decl_kind::Z3_OP_PR_TH_LEMMA as u32,
1140    /// Hyper-resolution rule.
1141    ///
1142    /// The premises of the rules is a sequence of clauses.
1143    /// The first clause argument is the main clause of the rule.
1144    /// with a literal from the first (main) clause.
1145    ///
1146    /// Premises of the rules are of the form
1147    ///
1148    /// ```text
1149    /// (or l0 l1 l2 .. ln)
1150    /// ```
1151    ///
1152    /// or
1153    ///
1154    /// ```text
1155    /// (=> (and l1 l2 .. ln) l0)
1156    /// ```
1157    ///
1158    /// or in the most general (ground) form:
1159    ///
1160    /// ```text
1161    /// (=> (and ln+1 ln+2 .. ln+m) (or l0 l1 .. ln))
1162    /// ```
1163    ///
1164    /// In other words we use the following (Prolog style) convention for Horn
1165    /// implications:
1166    ///
1167    /// - the head of a Horn implication is position 0,
1168    /// - the first conjunct in the body of an implication is position 1
1169    /// - the second conjunct in the body of an implication is position 2
1170    ///
1171    /// For general implications where the head is a disjunction, the
1172    /// first n positions correspond to the n disjuncts in the head.
1173    /// The next m positions correspond to the m conjuncts in the body.
1174    ///
1175    /// The premises can be universally quantified so that the most
1176    /// general non-ground form is:
1177    ///
1178    /// ```text
1179    /// (forall (vars) (=> (and ln+1 ln+2 .. ln+m) (or l0 l1 .. ln)))
1180    /// ```
1181    ///
1182    /// The hyper-resolution rule takes a sequence of parameters.
1183    /// The parameters are substitutions of bound variables separated by pairs
1184    /// of literal positions from the main clause and side clause.
1185    PR_HYPER_RESOLVE = generated::Z3_decl_kind::Z3_OP_PR_HYPER_RESOLVE as u32,
1186    /// Insert a record into a relation.
1187    ///
1188    /// The function takes `n`+1 arguments, where the first argument
1189    /// is the relation and the remaining `n` elements
1190    /// correspond to the `n` columns of the relation.
1191    RA_STORE = generated::Z3_decl_kind::Z3_OP_RA_STORE as u32,
1192    /// Creates the empty relation.
1193    RA_EMPTY = generated::Z3_decl_kind::Z3_OP_RA_EMPTY as u32,
1194    /// Tests if the relation is empty.
1195    RA_IS_EMPTY = generated::Z3_decl_kind::Z3_OP_RA_IS_EMPTY as u32,
1196    /// Create the relational join.
1197    RA_JOIN = generated::Z3_decl_kind::Z3_OP_RA_JOIN as u32,
1198    /// Create the union or convex hull of two relations.
1199    ///
1200    /// The function takes two arguments.
1201    RA_UNION = generated::Z3_decl_kind::Z3_OP_RA_UNION as u32,
1202    /// Widen two relations.
1203    ///
1204    /// The function takes two arguments.
1205    RA_WIDEN = generated::Z3_decl_kind::Z3_OP_RA_WIDEN as u32,
1206    /// Project the columns (provided as numbers in the parameters).
1207    ///
1208    /// The function takes one argument.
1209    RA_PROJECT = generated::Z3_decl_kind::Z3_OP_RA_PROJECT as u32,
1210    /// Filter (restrict) a relation with respect to a predicate.
1211    ///
1212    /// The first argument is a relation.
1213    ///
1214    /// The second argument is a predicate with free de-Bruijn indices
1215    /// corresponding to the columns of the relation.
1216    ///
1217    /// So the first column in the relation has index 0.
1218    RA_FILTER = generated::Z3_decl_kind::Z3_OP_RA_FILTER as u32,
1219    /// Intersect the first relation with respect to negation
1220    /// of the second relation (the function takes two arguments).
1221    ///
1222    /// Logically, the specification can be described by a function
1223    ///
1224    /// ```text
1225    /// target = filter_by_negation(pos, neg, columns)
1226    /// ```
1227    ///
1228    /// where columns are pairs `c1`, `d1`, ..,  `cN`, `dN` of columns
1229    /// from `pos` and `neg`, such that target are elements in `x` in `pos`,
1230    /// such that there is no `y` in `neg` that agrees with
1231    /// `x` on the columns `c1`, `d1`, .., `cN`, `dN`.
1232    RA_NEGATION_FILTER = generated::Z3_decl_kind::Z3_OP_RA_NEGATION_FILTER as u32,
1233    /// Rename columns in the relation.
1234    ///
1235    /// The function takes one argument.
1236    ///
1237    /// The parameters contain the renaming as a cycle.
1238    RA_RENAME = generated::Z3_decl_kind::Z3_OP_RA_RENAME as u32,
1239    /// Complement the relation.
1240    RA_COMPLEMENT = generated::Z3_decl_kind::Z3_OP_RA_COMPLEMENT as u32,
1241    /// Check if a record is an element of the relation.
1242    ///
1243    /// The function takes `n`+1 arguments, where the first argument is a relation,
1244    /// and the remaining `n` arguments correspond to a record.
1245    RA_SELECT = generated::Z3_decl_kind::Z3_OP_RA_SELECT as u32,
1246    /// Create a fresh copy (clone) of a relation.
1247    ///
1248    /// The function is logically the identity, but
1249    /// in the context of a register machine allows
1250    /// for [`DeclKind::RA_UNION`]
1251    /// to perform destructive updates to the first argument.
1252    RA_CLONE = generated::Z3_decl_kind::Z3_OP_RA_CLONE as u32,
1253    FD_CONSTANT = generated::Z3_decl_kind::Z3_OP_FD_CONSTANT as u32,
1254    /// A less than predicate over the finite domain `SortKind::FiniteDomain`.
1255    FD_LT = generated::Z3_decl_kind::Z3_OP_FD_LT as u32,
1256    SEQ_UNIT = generated::Z3_decl_kind::Z3_OP_SEQ_UNIT as u32,
1257    SEQ_EMPTY = generated::Z3_decl_kind::Z3_OP_SEQ_EMPTY as u32,
1258    SEQ_CONCAT = generated::Z3_decl_kind::Z3_OP_SEQ_CONCAT as u32,
1259    SEQ_PREFIX = generated::Z3_decl_kind::Z3_OP_SEQ_PREFIX as u32,
1260    SEQ_SUFFIX = generated::Z3_decl_kind::Z3_OP_SEQ_SUFFIX as u32,
1261    SEQ_CONTAINS = generated::Z3_decl_kind::Z3_OP_SEQ_CONTAINS as u32,
1262    SEQ_EXTRACT = generated::Z3_decl_kind::Z3_OP_SEQ_EXTRACT as u32,
1263    SEQ_REPLACE = generated::Z3_decl_kind::Z3_OP_SEQ_REPLACE as u32,
1264    SEQ_AT = generated::Z3_decl_kind::Z3_OP_SEQ_AT as u32,
1265    SEQ_LENGTH = generated::Z3_decl_kind::Z3_OP_SEQ_LENGTH as u32,
1266    SEQ_INDEX = generated::Z3_decl_kind::Z3_OP_SEQ_INDEX as u32,
1267    SEQ_TO_RE = generated::Z3_decl_kind::Z3_OP_SEQ_TO_RE as u32,
1268    SEQ_IN_RE = generated::Z3_decl_kind::Z3_OP_SEQ_IN_RE as u32,
1269    STR_TO_INT = generated::Z3_decl_kind::Z3_OP_STR_TO_INT as u32,
1270    INT_TO_STR = generated::Z3_decl_kind::Z3_OP_INT_TO_STR as u32,
1271    RE_PLUS = generated::Z3_decl_kind::Z3_OP_RE_PLUS as u32,
1272    RE_STAR = generated::Z3_decl_kind::Z3_OP_RE_STAR as u32,
1273    RE_OPTION = generated::Z3_decl_kind::Z3_OP_RE_OPTION as u32,
1274    RE_CONCAT = generated::Z3_decl_kind::Z3_OP_RE_CONCAT as u32,
1275    RE_UNION = generated::Z3_decl_kind::Z3_OP_RE_UNION as u32,
1276    RE_RANGE = generated::Z3_decl_kind::Z3_OP_RE_RANGE as u32,
1277    RE_LOOP = generated::Z3_decl_kind::Z3_OP_RE_LOOP as u32,
1278    RE_INTERSECT = generated::Z3_decl_kind::Z3_OP_RE_INTERSECT as u32,
1279    RE_EMPTY_SET = generated::Z3_decl_kind::Z3_OP_RE_EMPTY_SET as u32,
1280    RE_FULL_SET = generated::Z3_decl_kind::Z3_OP_RE_FULL_SET as u32,
1281    RE_COMPLEMENT = generated::Z3_decl_kind::Z3_OP_RE_COMPLEMENT as u32,
1282    /// A label (used by the Boogie Verification condition generator).
1283    ///
1284    /// The label has two parameters, a string and a Boolean polarity.
1285    ///
1286    /// It takes one argument, a formula.
1287    LABEL = generated::Z3_decl_kind::Z3_OP_LABEL as u32,
1288    /// A label literal (used by the Boogie Verification condition generator).
1289    ///
1290    /// A label literal has a set of string parameters. It takes no arguments.
1291    LABEL_LIT = generated::Z3_decl_kind::Z3_OP_LABEL_LIT as u32,
1292    /// Datatype constructor.
1293    DT_CONSTRUCTOR = generated::Z3_decl_kind::Z3_OP_DT_CONSTRUCTOR as u32,
1294    /// Datatype recognizer.
1295    DT_RECOGNISER = generated::Z3_decl_kind::Z3_OP_DT_RECOGNISER as u32,
1296    /// Datatype recognizer.
1297    DT_IS = generated::Z3_decl_kind::Z3_OP_DT_IS as u32,
1298    /// Datatype accessor.
1299    DT_ACCESSOR = generated::Z3_decl_kind::Z3_OP_DT_ACCESSOR as u32,
1300    /// Datatype field update.
1301    DT_UPDATE_FIELD = generated::Z3_decl_kind::Z3_OP_DT_UPDATE_FIELD as u32,
1302    /// Cardinality constraint.
1303    ///
1304    /// Example: `x + y + z <= 2`
1305    PB_AT_MOST = generated::Z3_decl_kind::Z3_OP_PB_AT_MOST as u32,
1306    /// Cardinality constraint.
1307    ///
1308    /// Example: `x + y + z >= 2`
1309    PB_AT_LEAST = generated::Z3_decl_kind::Z3_OP_PB_AT_LEAST as u32,
1310    /// Generalized Pseudo-Boolean cardinality constraint.
1311    ///
1312    /// Example: `2*x + 3*y <= 4`
1313    PB_LE = generated::Z3_decl_kind::Z3_OP_PB_LE as u32,
1314    /// Generalized Pseudo-Boolean cardinality constraint.
1315    ///
1316    /// Example: `2*x + 3*y + 2*z >= 4`
1317    PB_GE = generated::Z3_decl_kind::Z3_OP_PB_GE as u32,
1318    /// Generalized Pseudo-Boolean equality constraint.
1319    ///
1320    /// Example: `2*x + 1*y + 2*z + 1*u = 4`
1321    PB_EQ = generated::Z3_decl_kind::Z3_OP_PB_EQ as u32,
1322    /// Floating-point rounding mode RNE
1323    FPA_RM_NEAREST_TIES_TO_EVEN = generated::Z3_decl_kind::Z3_OP_FPA_RM_NEAREST_TIES_TO_EVEN as u32,
1324    /// Floating-point rounding mode RNA
1325    FPA_RM_NEAREST_TIES_TO_AWAY = generated::Z3_decl_kind::Z3_OP_FPA_RM_NEAREST_TIES_TO_AWAY as u32,
1326    /// Floating-point rounding mode RTP
1327    FPA_RM_TOWARD_POSITIVE = generated::Z3_decl_kind::Z3_OP_FPA_RM_TOWARD_POSITIVE as u32,
1328    /// Floating-point rounding mode RTN
1329    FPA_RM_TOWARD_NEGATIVE = generated::Z3_decl_kind::Z3_OP_FPA_RM_TOWARD_NEGATIVE as u32,
1330    /// Floating-point rounding mode RTZ
1331    FPA_RM_TOWARD_ZERO = generated::Z3_decl_kind::Z3_OP_FPA_RM_TOWARD_ZERO as u32,
1332    /// Floating-point value
1333    FPA_NUM = generated::Z3_decl_kind::Z3_OP_FPA_NUM as u32,
1334    /// Floating-point +oo
1335    FPA_PLUS_INF = generated::Z3_decl_kind::Z3_OP_FPA_PLUS_INF as u32,
1336    /// Floating-point -oo
1337    FPA_MINUS_INF = generated::Z3_decl_kind::Z3_OP_FPA_MINUS_INF as u32,
1338    /// Floating-point NaN
1339    FPA_NAN = generated::Z3_decl_kind::Z3_OP_FPA_NAN as u32,
1340    /// Floating-point +zero
1341    FPA_PLUS_ZERO = generated::Z3_decl_kind::Z3_OP_FPA_PLUS_ZERO as u32,
1342    /// Floating-point -zero
1343    FPA_MINUS_ZERO = generated::Z3_decl_kind::Z3_OP_FPA_MINUS_ZERO as u32,
1344    /// Floating-point addition
1345    FPA_ADD = generated::Z3_decl_kind::Z3_OP_FPA_ADD as u32,
1346    /// Floating-point subtraction
1347    FPA_SUB = generated::Z3_decl_kind::Z3_OP_FPA_SUB as u32,
1348    /// Floating-point negation
1349    FPA_NEG = generated::Z3_decl_kind::Z3_OP_FPA_NEG as u32,
1350    /// Floating-point multiplication
1351    FPA_MUL = generated::Z3_decl_kind::Z3_OP_FPA_MUL as u32,
1352    /// Floating-point division
1353    FPA_DIV = generated::Z3_decl_kind::Z3_OP_FPA_DIV as u32,
1354    /// Floating-point remainder
1355    FPA_REM = generated::Z3_decl_kind::Z3_OP_FPA_REM as u32,
1356    /// Floating-point absolute value
1357    FPA_ABS = generated::Z3_decl_kind::Z3_OP_FPA_ABS as u32,
1358    /// Floating-point minimum
1359    FPA_MIN = generated::Z3_decl_kind::Z3_OP_FPA_MIN as u32,
1360    /// Floating-point maximum
1361    FPA_MAX = generated::Z3_decl_kind::Z3_OP_FPA_MAX as u32,
1362    /// Floating-point fused multiply-add
1363    FPA_FMA = generated::Z3_decl_kind::Z3_OP_FPA_FMA as u32,
1364    /// Floating-point square root
1365    FPA_SQRT = generated::Z3_decl_kind::Z3_OP_FPA_SQRT as u32,
1366    /// Floating-point round to integral
1367    FPA_ROUND_TO_INTEGRAL = generated::Z3_decl_kind::Z3_OP_FPA_ROUND_TO_INTEGRAL as u32,
1368    /// Floating-point equality
1369    FPA_EQ = generated::Z3_decl_kind::Z3_OP_FPA_EQ as u32,
1370    /// Floating-point less than
1371    FPA_LT = generated::Z3_decl_kind::Z3_OP_FPA_LT as u32,
1372    /// Floating-point greater than
1373    FPA_GT = generated::Z3_decl_kind::Z3_OP_FPA_GT as u32,
1374    /// Floating-point less than or equal
1375    FPA_LE = generated::Z3_decl_kind::Z3_OP_FPA_LE as u32,
1376    /// Floating-point greater than or equal
1377    FPA_GE = generated::Z3_decl_kind::Z3_OP_FPA_GE as u32,
1378    /// Floating-point isNaN
1379    FPA_IS_NAN = generated::Z3_decl_kind::Z3_OP_FPA_IS_NAN as u32,
1380    /// Floating-point isInfinite
1381    FPA_IS_INF = generated::Z3_decl_kind::Z3_OP_FPA_IS_INF as u32,
1382    /// Floating-point isZero
1383    FPA_IS_ZERO = generated::Z3_decl_kind::Z3_OP_FPA_IS_ZERO as u32,
1384    /// Floating-point isNormal
1385    FPA_IS_NORMAL = generated::Z3_decl_kind::Z3_OP_FPA_IS_NORMAL as u32,
1386    /// Floating-point isSubnormal
1387    FPA_IS_SUBNORMAL = generated::Z3_decl_kind::Z3_OP_FPA_IS_SUBNORMAL as u32,
1388    /// Floating-point isNegative
1389    FPA_IS_NEGATIVE = generated::Z3_decl_kind::Z3_OP_FPA_IS_NEGATIVE as u32,
1390    /// Floating-point isPositive
1391    FPA_IS_POSITIVE = generated::Z3_decl_kind::Z3_OP_FPA_IS_POSITIVE as u32,
1392    /// Floating-point constructor from 3 bit-vectors
1393    FPA_FP = generated::Z3_decl_kind::Z3_OP_FPA_FP as u32,
1394    /// Floating-point conversion (various)
1395    FPA_TO_FP = generated::Z3_decl_kind::Z3_OP_FPA_TO_FP as u32,
1396    /// Floating-point conversion from unsigned bit-vector
1397    FPA_TO_FP_UNSIGNED = generated::Z3_decl_kind::Z3_OP_FPA_TO_FP_UNSIGNED as u32,
1398    /// Floating-point conversion to unsigned bit-vector
1399    FPA_TO_UBV = generated::Z3_decl_kind::Z3_OP_FPA_TO_UBV as u32,
1400    /// Floating-point conversion to signed bit-vector
1401    FPA_TO_SBV = generated::Z3_decl_kind::Z3_OP_FPA_TO_SBV as u32,
1402    /// Floating-point conversion to real number
1403    FPA_TO_REAL = generated::Z3_decl_kind::Z3_OP_FPA_TO_REAL as u32,
1404    /// Floating-point conversion to IEEE-754 bit-vector
1405    FPA_TO_IEEE_BV = generated::Z3_decl_kind::Z3_OP_FPA_TO_IEEE_BV as u32,
1406    /// Implicitly) represents the internal bitvector-representation
1407    /// of a floating-point term (used for the lazy encoding
1408    /// of non-relevant terms in `theory_fpa`)
1409    FPA_BVWRAP = generated::Z3_decl_kind::Z3_OP_FPA_BVWRAP as u32,
1410    /// Conversion of a 3-bit bit-vector term to a
1411    /// floating-point rounding-mode term.
1412    ///
1413    /// The conversion uses the following values:
1414    ///
1415    /// 0 = 000 = `DeclKind::FPA_RM_NEAREST_TIES_TO_EVEN`,
1416    /// 1 = 001 = `DeclKind::FPA_RM_NEAREST_TIES_TO_AWAY`,
1417    /// 2 = 010 = `DeclKind::FPA_RM_TOWARD_POSITIVE`,
1418    /// 3 = 011 = `DeclKind::FPA_RM_TOWARD_NEGATIVE`,
1419    /// 4 = 100 = `DeclKind::FPA_RM_TOWARD_ZERO`.
1420    FPA_BV2RM = generated::Z3_decl_kind::Z3_OP_FPA_BV2RM as u32,
1421    /// Internal (often interpreted) symbol, but no additional
1422    /// information is exposed. Tools may use the string
1423    /// representation of the function declaration to obtain
1424    /// more information.
1425    INTERNAL = generated::Z3_decl_kind::Z3_OP_INTERNAL as u32,
1426    /// Kind used for uninterpreted symbols.
1427    UNINTERPRETED = generated::Z3_decl_kind::Z3_OP_UNINTERPRETED as u32,
1428}
1429
1430/// The different kinds of parameters that can be associated with parameter sets.
1431/// (see [`Z3_mk_params`]).
1432///
1433/// This corresponds to `Z3_param_kind` in the C API.
1434#[repr(u32)]
1435#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1436pub enum ParamKind {
1437    /// integer parameters.
1438    ///
1439    /// This corresponds to `Z3_PK_UINT` in the C API.
1440    UInt = generated::Z3_param_kind::Z3_PK_UINT as u32,
1441    /// boolean parameters.
1442    ///
1443    /// This corresponds to `Z3_PK_BOOL` in the C API.
1444    Bool = generated::Z3_param_kind::Z3_PK_BOOL as u32,
1445    /// double parameters.
1446    ///
1447    /// This corresponds to `Z3_PK_DOUBLE` in the C API.
1448    Double = generated::Z3_param_kind::Z3_PK_DOUBLE as u32,
1449    /// symbol parameters.
1450    ///
1451    /// This corresponds to `Z3_PK_SYMBOL` in the C API.
1452    Symbol = generated::Z3_param_kind::Z3_PK_SYMBOL as u32,
1453    /// string parameters.
1454    ///
1455    /// This corresponds to `Z3_PK_STRING` in the C API.
1456    String = generated::Z3_param_kind::Z3_PK_STRING as u32,
1457    /// all internal parameter kinds which are not exposed in the API.
1458    ///
1459    /// This corresponds to `Z3_PK_OTHER` in the C API.
1460    Other = generated::Z3_param_kind::Z3_PK_OTHER as u32,
1461    /// invalid parameter.
1462    ///
1463    /// This corresponds to `Z3_PK_INVALID` in the C API.
1464    Invalid = generated::Z3_param_kind::Z3_PK_INVALID as u32,
1465}
1466
1467/// Z3 pretty printing modes (See [`Z3_set_ast_print_mode`]).
1468///
1469/// This corresponds to `Z3_ast_print_mode` in the C API.
1470#[repr(u32)]
1471#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1472pub enum AstPrintMode {
1473    /// Print AST nodes in SMTLIB verbose format.
1474    ///
1475    /// This corresponds to `Z3_PRINT_SMTLIB_FULL` in the C API.
1476    SmtLibFull = generated::Z3_ast_print_mode::Z3_PRINT_SMTLIB_FULL as u32,
1477    /// Print AST nodes using a low-level format.
1478    ///
1479    /// This corresponds to `Z3_PRINT_LOW_LEVEL` in the C API.
1480    LowLevel = generated::Z3_ast_print_mode::Z3_PRINT_LOW_LEVEL as u32,
1481    /// Print AST nodes in SMTLIB 2.x compliant format.
1482    ///
1483    /// This corresponds to `Z3_PRINT_SMTLIB2_COMPLIANT` in the C API.
1484    SmtLib2Compliant = generated::Z3_ast_print_mode::Z3_PRINT_SMTLIB2_COMPLIANT as u32,
1485}
1486
1487/// Z3 error codes (See [`Z3_get_error_code`]).
1488///
1489/// This corresponds to `Z3_error_code` in the C API.
1490#[repr(u32)]
1491#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1492pub enum ErrorCode {
1493    /// No error.
1494    ///
1495    /// This corresponds to `Z3_OK` in the C API.
1496    OK = generated::Z3_error_code::Z3_OK as u32,
1497    /// User tried to build an invalid (type incorrect) AST.
1498    ///
1499    /// This corresponds to `Z3_SORT_ERROR` in the C API.
1500    SortError = generated::Z3_error_code::Z3_SORT_ERROR as u32,
1501    /// Index out of bounds.
1502    ///
1503    /// This corresponds to `Z3_IOB` in the C API.
1504    IOB = generated::Z3_error_code::Z3_IOB as u32,
1505    /// Invalid argument was provided.
1506    ///
1507    /// This corresponds to `Z3_INVALID_ARG` in the C API.
1508    InvalidArg = generated::Z3_error_code::Z3_INVALID_ARG as u32,
1509    /// An error occurred when parsing a string or file.
1510    ///
1511    /// This corresponds to `Z3_PARSER_ERROR` in the C API.
1512    ParserError = generated::Z3_error_code::Z3_PARSER_ERROR as u32,
1513    /// Parser output is not available, that is, user didn't invoke
1514    /// [`Z3_parse_smtlib2_string`] or [`Z3_parse_smtlib2_file`].
1515    ///
1516    /// This corresponds to `Z3_NO_PARSER` in the C API.
1517    NoParser = generated::Z3_error_code::Z3_NO_PARSER as u32,
1518    /// Invalid pattern was used to build a quantifier.
1519    ///
1520    /// This corresponds to `Z3_INVALID_PATTERN` in the C API.
1521    InvalidPattern = generated::Z3_error_code::Z3_INVALID_PATTERN as u32,
1522    /// A memory allocation failure was encountered.
1523    ///
1524    /// This corresponds to `Z3_MEMOUT_FAIL` in the C API.
1525    MemoutFail = generated::Z3_error_code::Z3_MEMOUT_FAIL as u32,
1526    /// A file could not be accessed.
1527    ///
1528    /// This corresponds to `Z3_FILE_ACCESS_ERROR` in the C API.
1529    FileAccessError = generated::Z3_error_code::Z3_FILE_ACCESS_ERROR as u32,
1530    /// An error internal to Z3 occurred.
1531    ///
1532    /// This corresponds to `Z3_INTERNAL_FATAL` in the C API.
1533    InternalFatal = generated::Z3_error_code::Z3_INTERNAL_FATAL as u32,
1534    /// API call is invalid in the current state.
1535    ///
1536    /// This corresponds to `Z3_INVALID_USAGE` in the C API.
1537    InvalidUsage = generated::Z3_error_code::Z3_INVALID_USAGE as u32,
1538    /// Trying to decrement the reference counter of an AST that was
1539    /// deleted or the reference counter was not initialized with
1540    /// [`Z3_inc_ref`].
1541    ///
1542    /// This corresponds to `Z3_DEC_REF_ERROR` in the C API.
1543    DecRefError = generated::Z3_error_code::Z3_DEC_REF_ERROR as u32,
1544    /// Internal Z3 exception. Additional details can be retrieved
1545    /// using [`Z3_get_error_msg`].
1546    ///
1547    /// This corresponds to `Z3_EXCEPTION` in the C API.
1548    Exception = generated::Z3_error_code::Z3_EXCEPTION as u32,
1549}
1550
1551/// Z3 custom error handler (See [`Z3_set_error_handler`]).
1552pub type Z3_error_handler =
1553    ::std::option::Option<unsafe extern "C" fn(c: Z3_context, e: ErrorCode)>;
1554
1555/// Precision of a given goal. Some goals can be transformed using over/under approximations.
1556///
1557/// This corresponds to `Z3_goal_prec` in the C API.
1558#[repr(u32)]
1559#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1560pub enum GoalPrec {
1561    /// Approximations/Relaxations were not applied on the goal
1562    /// (sat and unsat answers were preserved).
1563    ///
1564    /// This corresponds to `Z3_GOAL_PRECISE` in the C API.
1565    Precise = generated::Z3_goal_prec::Z3_GOAL_PRECISE as u32,
1566    /// Goal is the product of a under-approximation (sat answers are preserved).
1567    ///
1568    /// This corresponds to `Z3_GOAL_UNDER` in the C API.
1569    Under = generated::Z3_goal_prec::Z3_GOAL_UNDER as u32,
1570    /// Goal is the product of an over-approximation (unsat answers are preserved).
1571    ///
1572    /// This corresponds to `Z3_GOAL_OVER` in the C API.
1573    Over = generated::Z3_goal_prec::Z3_GOAL_OVER as u32,
1574    /// Goal is garbage (it is the product of over- and under-approximations,
1575    /// sat and unsat answers are not preserved).
1576    ///
1577    /// This corresponds to `Z3_GOAL_UNDER_OVER` in the C API.
1578    UnderOver = generated::Z3_goal_prec::Z3_GOAL_UNDER_OVER as u32,
1579}
1580
1581extern "C" {
1582    /// Set a global (or module) parameter.
1583    /// This setting is shared by all Z3 contexts.
1584    ///
1585    /// When a Z3 module is initialized it will use the value of these parameters
1586    /// when [`Z3_params`] objects are not provided.
1587    ///
1588    /// The name of parameter can be composed of characters [a-z][A-Z], digits [0-9], '-' and '_'.
1589    /// The character '.' is a delimiter (more later).
1590    ///
1591    /// The parameter names are case-insensitive. The character '-' should be viewed as an "alias" for '_'.
1592    /// Thus, the following parameter names are considered equivalent: `"pp.decimal-precision"`
1593    /// and `"PP.DECIMAL_PRECISION"`.
1594    ///
1595    /// This function can be used to set parameters for a specific Z3 module.
1596    /// This can be done by using `<module-name>.<parameter-name>`.
1597    ///
1598    /// For example:
1599    /// `Z3_global_param_set('pp.decimal', 'true')`
1600    /// will set the parameter `"decimal"` in the module `"pp"` to true.
1601    ///
1602    /// # See also:
1603    ///
1604    /// - [`Z3_global_param_get`]
1605    /// - [`Z3_global_param_reset_all`]
1606    pub fn Z3_global_param_set(param_id: Z3_string, param_value: Z3_string);
1607
1608    /// Restore the value of all global (and module) parameters.
1609    /// This command will not affect already created objects (such as tactics and solvers).
1610    ///
1611    /// # See also:
1612    ///
1613    /// - [`Z3_global_param_get`]
1614    /// - [`Z3_global_param_set`]
1615    pub fn Z3_global_param_reset_all();
1616
1617    /// Get a global (or module) parameter.
1618    ///
1619    /// Returns `false` if the parameter value does not exist.
1620    ///
1621    /// # See also:
1622    ///
1623    /// - [`Z3_global_param_reset_all`]
1624    /// - [`Z3_global_param_set`]
1625    ///
1626    /// NOTE: This function cannot be invoked simultaneously from different threads without synchronization.
1627    /// The result string stored in `param_value` is stored in shared location.
1628    pub fn Z3_global_param_get(param_id: Z3_string, param_value: Z3_string_ptr) -> bool;
1629
1630    /// Create a configuration object for the Z3 context object.
1631    ///
1632    /// Configurations are created in order to assign parameters prior to creating
1633    /// contexts for Z3 interaction. For example, if the users wishes to use proof
1634    /// generation, then call:
1635    ///
1636    /// `Z3_set_param_value(cfg, "proof", "true")`
1637    ///
1638    /// NOTE: In previous versions of Z3, the [`Z3_config`] was used to store
1639    /// global and module configurations. Now, we should use [`Z3_global_param_set`].
1640    ///
1641    /// The following parameters can be set:
1642    ///
1643    /// - `proof`  (Boolean)           Enable proof generation
1644    /// - `debug_ref_count` (Boolean)  Enable debug support for [`Z3_ast`] reference counting
1645    /// - `trace`  (Boolean)           Tracing support for VCC
1646    /// - `trace_file_name` (String)   Trace out file for VCC traces
1647    /// - `timeout` (unsigned)         default timeout (in milliseconds) used for solvers
1648    /// - `well_sorted_check`          type checker
1649    /// - `auto_config`                use heuristics to automatically select solver and configure it
1650    /// - `model`                      model generation for solvers, this parameter can be overwritten when creating a solver
1651    /// - `model_validate`             validate models produced by solvers
1652    /// - `unsat_core`                 unsat-core generation for solvers, this parameter can be overwritten when creating a solver
1653    ///
1654    /// # See also:
1655    ///
1656    /// - [`Z3_set_param_value`]
1657    /// - [`Z3_del_config`]
1658    pub fn Z3_mk_config() -> Z3_config;
1659
1660    /// Delete the given configuration object.
1661    ///
1662    /// # See also:
1663    ///
1664    /// - [`Z3_mk_config`]
1665    pub fn Z3_del_config(c: Z3_config);
1666
1667    /// Set a configuration parameter.
1668    ///
1669    /// The following parameters can be set for
1670    ///
1671    /// # See also:
1672    ///
1673    /// - [`Z3_mk_config`]
1674    pub fn Z3_set_param_value(c: Z3_config, param_id: Z3_string, param_value: Z3_string);
1675
1676    /// Create a context using the given configuration.
1677    ///
1678    /// After a context is created, the configuration cannot be changed,
1679    /// although some parameters can be changed using [`Z3_update_param_value`].
1680    /// All main interaction with Z3 happens in the context of a [`Z3_context`].
1681    ///
1682    /// In contrast to [`Z3_mk_context_rc`], the life time of [`Z3_ast`]
1683    /// objects are determined by the scope level of [`Z3_solver_push`]
1684    /// and [`Z3_solver_pop`]. In other words, a [`Z3_ast`] object remains
1685    /// valid until there is a call to [`Z3_solver_pop`] that
1686    /// takes the current scope below the level where
1687    /// the object was created.
1688    ///
1689    /// Note that all other reference counted objects, including [`Z3_model`],
1690    /// [`Z3_solver`], [`Z3_func_interp`] have to be managed by the caller.
1691    /// Their reference counts are not handled by the context.
1692    ///
1693    /// Further remarks:
1694    /// - [`Z3_sort`], [`Z3_func_decl`], [`Z3_app`], [`Z3_pattern`] are [`Z3_ast`]'s.
1695    /// - Z3 uses hash-consing, i.e., when the same [`Z3_ast`] is created twice,
1696    ///   Z3 will return the same pointer twice.
1697    ///
1698    /// # See also:
1699    ///
1700    /// - [`Z3_del_context`]
1701    pub fn Z3_mk_context(c: Z3_config) -> Z3_context;
1702
1703    /// Create a context using the given configuration.
1704    /// This function is similar to [`Z3_mk_context`]. However,
1705    /// in the context returned by this function, the user
1706    /// is responsible for managing [`Z3_ast`] reference counters.
1707    /// Managing reference counters is a burden and error-prone,
1708    /// but allows the user to use the memory more efficiently.
1709    /// The user must invoke [`Z3_inc_ref`] for any [`Z3_ast`] returned
1710    /// by Z3, and [`Z3_dec_ref`] whenever the [`Z3_ast`] is not needed
1711    /// anymore. This idiom is similar to the one used in
1712    /// BDD (binary decision diagrams) packages such as CUDD.
1713    ///
1714    /// Remarks:
1715    ///
1716    /// - [`Z3_sort`], [`Z3_func_decl`], [`Z3_app`], [`Z3_pattern`] are [`Z3_ast`]'s.
1717    /// - After a context is created, the configuration cannot be changed.
1718    /// - All main interaction with Z3 happens in the context of a [`Z3_context`].
1719    /// - Z3 uses hash-consing, i.e., when the same [`Z3_ast`] is created twice,
1720    ///   Z3 will return the same pointer twice.
1721    pub fn Z3_mk_context_rc(c: Z3_config) -> Z3_context;
1722
1723    /// Delete the given logical context.
1724    ///
1725    /// # See also:
1726    ///
1727    /// - [`Z3_mk_context`]
1728    pub fn Z3_del_context(c: Z3_context);
1729
1730    /// Increment the reference counter of the given AST.
1731    /// The context `c` should have been created using [`Z3_mk_context_rc`].
1732    /// This function is a NOOP if `c` was created using [`Z3_mk_context`].
1733    pub fn Z3_inc_ref(c: Z3_context, a: Z3_ast);
1734
1735    /// Decrement the reference counter of the given AST.
1736    /// The context `c` should have been created using [`Z3_mk_context_rc`].
1737    /// This function is a NOOP if `c` was created using [`Z3_mk_context`].
1738    pub fn Z3_dec_ref(c: Z3_context, a: Z3_ast);
1739
1740    /// Set a value of a context parameter.
1741    ///
1742    /// # See also:
1743    ///
1744    /// - [`Z3_global_param_set`]
1745    pub fn Z3_update_param_value(c: Z3_context, param_id: Z3_string, param_value: Z3_string);
1746
1747    /// Interrupt the execution of a Z3 procedure.
1748    ///
1749    /// This procedure can be used to interrupt: solvers, simplifiers and tactics.
1750    ///
1751    /// This method can be invoked from a thread different from the one executing the
1752    /// interruptible procedure.
1753    pub fn Z3_interrupt(c: Z3_context);
1754
1755    /// Create a Z3 (empty) parameter set.
1756    /// Starting at Z3 4.0, parameter sets are used to configure many components such as:
1757    /// simplifiers, tactics, solvers, etc.
1758    ///
1759    /// NOTE: Reference counting must be used to manage parameter
1760    /// sets, even when the [`Z3_context`] was created using
1761    /// [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
1762    pub fn Z3_mk_params(c: Z3_context) -> Z3_params;
1763
1764    /// Increment the reference counter of the given parameter set.
1765    pub fn Z3_params_inc_ref(c: Z3_context, p: Z3_params);
1766
1767    /// Decrement the reference counter of the given parameter set.
1768    pub fn Z3_params_dec_ref(c: Z3_context, p: Z3_params);
1769
1770    /// Add a Boolean parameter `k` with value `v` to the parameter set `p`.
1771    pub fn Z3_params_set_bool(c: Z3_context, p: Z3_params, k: Z3_symbol, v: bool);
1772
1773    /// Add a unsigned parameter `k` with value `v` to the parameter set `p`.
1774    pub fn Z3_params_set_uint(c: Z3_context, p: Z3_params, k: Z3_symbol, v: ::std::os::raw::c_uint);
1775
1776    /// Add a double parameter `k` with value `v` to the parameter set `p`.
1777    pub fn Z3_params_set_double(c: Z3_context, p: Z3_params, k: Z3_symbol, v: f64);
1778
1779    /// Add a symbol parameter `k` with value `v` to the parameter set `p`.
1780    pub fn Z3_params_set_symbol(c: Z3_context, p: Z3_params, k: Z3_symbol, v: Z3_symbol);
1781
1782    /// Convert a parameter set into a string. This function is mainly used for printing the
1783    /// contents of a parameter set.
1784    pub fn Z3_params_to_string(c: Z3_context, p: Z3_params) -> Z3_string;
1785
1786    /// Validate the parameter set `p` against the parameter description set `d`.
1787    ///
1788    /// The procedure invokes the error handler if `p` is invalid.
1789    pub fn Z3_params_validate(c: Z3_context, p: Z3_params, d: Z3_param_descrs);
1790
1791    /// Increment the reference counter of the given parameter description set.
1792    pub fn Z3_param_descrs_inc_ref(c: Z3_context, p: Z3_param_descrs);
1793
1794    /// Decrement the reference counter of the given parameter description set.
1795    pub fn Z3_param_descrs_dec_ref(c: Z3_context, p: Z3_param_descrs);
1796
1797    /// Return the kind associated with the given parameter name `n`.
1798    pub fn Z3_param_descrs_get_kind(c: Z3_context, p: Z3_param_descrs, n: Z3_symbol) -> ParamKind;
1799
1800    /// Return the number of parameters in the given parameter description set.
1801    pub fn Z3_param_descrs_size(c: Z3_context, p: Z3_param_descrs) -> ::std::os::raw::c_uint;
1802
1803    /// Return the number of parameters in the given parameter description set.
1804    ///
1805    /// # Preconditions:
1806    ///
1807    /// - `i < Z3_param_descrs_size(c, p)`
1808    pub fn Z3_param_descrs_get_name(
1809        c: Z3_context,
1810        p: Z3_param_descrs,
1811        i: ::std::os::raw::c_uint,
1812    ) -> Z3_symbol;
1813
1814    /// Retrieve documentation string corresponding to parameter name `s`.
1815    pub fn Z3_param_descrs_get_documentation(
1816        c: Z3_context,
1817        p: Z3_param_descrs,
1818        s: Z3_symbol,
1819    ) -> Z3_string;
1820
1821    /// Convert a parameter description set into a string. This function is mainly used for printing the
1822    /// contents of a parameter description set.
1823    pub fn Z3_param_descrs_to_string(c: Z3_context, p: Z3_param_descrs) -> Z3_string;
1824
1825    /// Create a Z3 symbol using an integer.
1826    ///
1827    /// Symbols are used to name several term and type constructors.
1828    ///
1829    /// NB. Not all integers can be passed to this function.
1830    /// The legal range of unsigned integers is 0 to 2^30-1.
1831    ///
1832    /// # See also:
1833    ///
1834    /// - [`Z3_get_symbol_int`]
1835    /// - [`Z3_mk_string_symbol`]
1836    pub fn Z3_mk_int_symbol(c: Z3_context, i: ::std::os::raw::c_int) -> Z3_symbol;
1837
1838    /// Create a Z3 symbol using a C string.
1839    ///
1840    /// Symbols are used to name several term and type constructors.
1841    ///
1842    /// # See also:
1843    ///
1844    /// - [`Z3_get_symbol_string`]
1845    /// - [`Z3_mk_int_symbol`]
1846    pub fn Z3_mk_string_symbol(c: Z3_context, s: Z3_string) -> Z3_symbol;
1847
1848    /// Create a free (uninterpreted) type using the given name (symbol).
1849    ///
1850    /// Two free types are considered the same iff the have the same name.
1851    pub fn Z3_mk_uninterpreted_sort(c: Z3_context, s: Z3_symbol) -> Z3_sort;
1852
1853    /// Create the Boolean type.
1854    ///
1855    /// This type is used to create propositional variables and predicates.
1856    pub fn Z3_mk_bool_sort(c: Z3_context) -> Z3_sort;
1857
1858    /// Create the integer type.
1859    ///
1860    /// This type is not the int type found in programming languages.
1861    /// A machine integer can be represented using bit-vectors. The function
1862    /// [`Z3_mk_bv_sort`] creates a bit-vector type.
1863    ///
1864    /// # See also:
1865    ///
1866    /// - [`Z3_mk_bv_sort`]
1867    pub fn Z3_mk_int_sort(c: Z3_context) -> Z3_sort;
1868
1869    /// Create the real type.
1870    ///
1871    /// Note that this type is not a floating point number.
1872    pub fn Z3_mk_real_sort(c: Z3_context) -> Z3_sort;
1873
1874    /// Create a bit-vector type of the given size.
1875    ///
1876    /// This type can also be seen as a machine integer.
1877    ///
1878    /// NOTE: The size of the bit-vector type must be greater than zero.
1879    pub fn Z3_mk_bv_sort(c: Z3_context, sz: ::std::os::raw::c_uint) -> Z3_sort;
1880
1881    /// Create a named finite domain sort.
1882    ///
1883    /// To create constants that belong to the finite domain,
1884    /// use the APIs for creating numerals and pass a numeric
1885    /// constant together with the sort returned by this call.
1886    /// The numeric constant should be between 0 and the less
1887    /// than the size of the domain.
1888    ///
1889    /// # See also:
1890    ///
1891    /// - [`Z3_get_finite_domain_sort_size`]
1892    pub fn Z3_mk_finite_domain_sort(c: Z3_context, name: Z3_symbol, size: u64) -> Z3_sort;
1893
1894    /// Create an array type.
1895    ///
1896    /// We usually represent the array type as: `[domain -> range]`.
1897    /// Arrays are usually used to model the heap/memory in software verification.
1898    ///
1899    /// # See also:
1900    ///
1901    /// - [`Z3_mk_select`]
1902    /// - [`Z3_mk_store`]
1903    pub fn Z3_mk_array_sort(c: Z3_context, domain: Z3_sort, range: Z3_sort) -> Z3_sort;
1904
1905    /// Create an array type with N arguments
1906    ///
1907    /// # See also:
1908    ///
1909    /// - [`Z3_mk_select_n`]
1910    /// - [`Z3_mk_store_n`]
1911    pub fn Z3_mk_array_sort_n(
1912        c: Z3_context,
1913        n: ::std::os::raw::c_uint,
1914        domain: *const Z3_sort,
1915        range: Z3_sort,
1916    ) -> Z3_sort;
1917
1918    /// Create a tuple type.
1919    ///
1920    /// A tuple with `n` fields has a constructor and `n` projections.
1921    /// This function will also declare the constructor and projection functions.
1922    ///
1923    /// - `c`: logical context
1924    /// - `mk_tuple_name`: name of the constructor function associated with the tuple type.
1925    /// - `num_fields`: number of fields in the tuple type.
1926    /// - `field_names`: name of the projection functions.
1927    /// - `field_sorts`: type of the tuple fields.
1928    /// - `mk_tuple_decl`: output parameter that will contain the constructor declaration.
1929    /// - `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.
1930    pub fn Z3_mk_tuple_sort(
1931        c: Z3_context,
1932        mk_tuple_name: Z3_symbol,
1933        num_fields: ::std::os::raw::c_uint,
1934        field_names: *const Z3_symbol,
1935        field_sorts: *const Z3_sort,
1936        mk_tuple_decl: *mut Z3_func_decl,
1937        proj_decl: *mut Z3_func_decl,
1938    ) -> Z3_sort;
1939
1940    /// Create a enumeration sort.
1941    ///
1942    /// An enumeration sort with `n` elements.
1943    /// This function will also declare the functions corresponding to the enumerations.
1944    ///
1945    /// - `c`: logical context
1946    /// - `name`: name of the enumeration sort.
1947    /// - `n`: number of elements in enumeration sort.
1948    /// - `enum_names`: names of the enumerated elements.
1949    /// - `enum_consts`: constants corresponding to the enumerated elements.
1950    /// - `enum_testers`: predicates testing if terms of the enumeration sort correspond to an enumeration.
1951    ///
1952    /// For example, if this function is called with three symbols A, B, C and the name S, then
1953    /// `s` is a sort whose name is S, and the function returns three terms corresponding to A, B, C in
1954    /// `enum_consts`. The array `enum_testers` has three predicates of type `(s -> Bool)`.
1955    /// The first predicate (corresponding to A) is true when applied to A, and false otherwise.
1956    /// Similarly for the other predicates.
1957    pub fn Z3_mk_enumeration_sort(
1958        c: Z3_context,
1959        name: Z3_symbol,
1960        n: ::std::os::raw::c_uint,
1961        enum_names: *const Z3_symbol,
1962        enum_consts: *mut Z3_func_decl,
1963        enum_testers: *mut Z3_func_decl,
1964    ) -> Z3_sort;
1965
1966    /// Create a list sort
1967    ///
1968    /// A list sort over `elem_sort`
1969    /// This function declares the corresponding constructors and testers for lists.
1970    ///
1971    /// - `c`: logical context
1972    /// - `name`: name of the list sort.
1973    /// - `elem_sort`: sort of list elements.
1974    /// - `nil_decl`: declaration for the empty list.
1975    /// - `is_nil_decl`: test for the empty list.
1976    /// - `cons_decl`: declaration for a cons cell.
1977    /// - `is_cons_decl`: cons cell test.
1978    /// - `head_decl`: list head.
1979    /// - `tail_decl`: list tail.
1980    pub fn Z3_mk_list_sort(
1981        c: Z3_context,
1982        name: Z3_symbol,
1983        elem_sort: Z3_sort,
1984        nil_decl: *mut Z3_func_decl,
1985        is_nil_decl: *mut Z3_func_decl,
1986        cons_decl: *mut Z3_func_decl,
1987        is_cons_decl: *mut Z3_func_decl,
1988        head_decl: *mut Z3_func_decl,
1989        tail_decl: *mut Z3_func_decl,
1990    ) -> Z3_sort;
1991
1992    /// Create a constructor.
1993    ///
1994    /// - `c`: logical context.
1995    /// - `name`: constructor name.
1996    /// - `recognizer`: name of recognizer function.
1997    /// - `num_fields`: number of fields in constructor.
1998    /// - `field_names`: names of the constructor fields.
1999    /// - `sorts`: field sorts, 0 if the field sort refers to a recursive sort.
2000    /// - `sort_refs`: reference to datatype sort that is an argument to the constructor; if the corresponding
2001    ///   sort reference is 0, then the value in `sort_refs` should be an index referring to
2002    ///   one of the recursive datatypes that is declared.
2003    ///
2004    /// # See also:
2005    ///
2006    /// - [`Z3_del_constructor`]
2007    /// - [`Z3_mk_constructor_list`]
2008    /// - [`Z3_query_constructor`]
2009    pub fn Z3_mk_constructor(
2010        c: Z3_context,
2011        name: Z3_symbol,
2012        recognizer: Z3_symbol,
2013        num_fields: ::std::os::raw::c_uint,
2014        field_names: *const Z3_symbol,
2015        sorts: *const Z3_sort,
2016        sort_refs: *mut ::std::os::raw::c_uint,
2017    ) -> Z3_constructor;
2018
2019    /// Reclaim memory allocated to constructor.
2020    ///
2021    /// - `c`: logical context.
2022    /// - `constr`: constructor.
2023    ///
2024    /// # See also:
2025    ///
2026    /// - [`Z3_mk_constructor`]
2027    pub fn Z3_del_constructor(c: Z3_context, constr: Z3_constructor);
2028
2029    /// Create datatype, such as lists, trees, records, enumerations or unions of records.
2030    /// The datatype may be recursive. Return the datatype sort.
2031    ///
2032    /// - `c`: logical context.
2033    /// - `name`: name of datatype.
2034    /// - `num_constructors`: number of constructors passed in.
2035    /// - `constructors`: array of constructor containers.
2036    ///
2037    /// # See also:
2038    ///
2039    /// - [`Z3_mk_constructor`]
2040    /// - [`Z3_mk_constructor_list`]
2041    /// - [`Z3_mk_datatypes`]
2042    pub fn Z3_mk_datatype(
2043        c: Z3_context,
2044        name: Z3_symbol,
2045        num_constructors: ::std::os::raw::c_uint,
2046        constructors: *mut Z3_constructor,
2047    ) -> Z3_sort;
2048
2049    /// Create list of constructors.
2050    ///
2051    /// - `c`: logical context.
2052    /// - `num_constructors`: number of constructors in list.
2053    /// - `constructors`: list of constructors.
2054    ///
2055    /// # See also:
2056    ///
2057    /// - [`Z3_del_constructor_list`]
2058    /// - [`Z3_mk_constructor`]
2059    pub fn Z3_mk_constructor_list(
2060        c: Z3_context,
2061        num_constructors: ::std::os::raw::c_uint,
2062        constructors: *const Z3_constructor,
2063    ) -> Z3_constructor_list;
2064
2065    /// Reclaim memory allocated for constructor list.
2066    ///
2067    /// Each constructor inside the constructor list must be independently reclaimed using [`Z3_del_constructor`].
2068    ///
2069    /// - `c`: logical context.
2070    /// - `clist`: constructor list container.
2071    ///
2072    /// # See also:
2073    ///
2074    /// - [`Z3_mk_constructor_list`]
2075    pub fn Z3_del_constructor_list(c: Z3_context, clist: Z3_constructor_list);
2076
2077    /// Create mutually recursive datatypes.
2078    ///
2079    /// - `c`: logical context.
2080    /// - `num_sorts`: number of datatype sorts.
2081    /// - `sort_names`: names of datatype sorts.
2082    /// - `sorts`: array of datatype sorts.
2083    /// - `constructor_lists`: list of constructors, one list per sort.
2084    ///
2085    /// # See also:
2086    ///
2087    /// - [`Z3_mk_constructor`]
2088    /// - [`Z3_mk_constructor_list`]
2089    /// - [`Z3_mk_datatype`]
2090    pub fn Z3_mk_datatypes(
2091        c: Z3_context,
2092        num_sorts: ::std::os::raw::c_uint,
2093        sort_names: *const Z3_symbol,
2094        sorts: *mut Z3_sort,
2095        constructor_lists: *mut Z3_constructor_list,
2096    );
2097
2098    /// Query constructor for declared functions.
2099    ///
2100    /// - `c`: logical context.
2101    /// - `constr`: constructor container. The container must have been passed in to a [`Z3_mk_datatype`] call.
2102    /// - `num_fields`: number of accessor fields in the constructor.
2103    /// - `constructor`: constructor function declaration, allocated by user.
2104    /// - `tester`: constructor test function declaration, allocated by user.
2105    /// - `accessors`: array of accessor function declarations allocated by user. The array must contain `num_fields` elements.
2106    ///
2107    /// # See also:
2108    ///
2109    /// - [`Z3_mk_constructor`]
2110    pub fn Z3_query_constructor(
2111        c: Z3_context,
2112        constr: Z3_constructor,
2113        num_fields: ::std::os::raw::c_uint,
2114        constructor: *mut Z3_func_decl,
2115        tester: *mut Z3_func_decl,
2116        accessors: *mut Z3_func_decl,
2117    );
2118
2119    /// Declare a constant or function.
2120    ///
2121    /// - `c`: logical context.
2122    /// - `s`: name of the constant or function.
2123    /// - `domain_size`: number of arguments. It is 0 when declaring a constant.
2124    /// - `domain`: array containing the sort of each argument. The array must contain `domain_size` elements. It is 0 when declaring a constant.
2125    /// - `range`: sort of the constant or the return sort of the function.
2126    ///
2127    /// After declaring a constant or function, the function
2128    /// [`Z3_mk_app`] can be used to create a constant or function
2129    /// application.
2130    ///
2131    /// # See also:
2132    ///
2133    /// - [`Z3_mk_app`]
2134    /// - [`Z3_mk_fresh_func_decl`]
2135    /// - [`Z3_mk_rec_func_decl`]
2136    pub fn Z3_mk_func_decl(
2137        c: Z3_context,
2138        s: Z3_symbol,
2139        domain_size: ::std::os::raw::c_uint,
2140        domain: *const Z3_sort,
2141        range: Z3_sort,
2142    ) -> Z3_func_decl;
2143
2144    /// Create a constant or function application.
2145    ///
2146    /// # See also:
2147    ///
2148    /// - [`Z3_mk_fresh_func_decl`]
2149    /// - [`Z3_mk_func_decl`]
2150    /// - [`Z3_mk_rec_func_decl`]
2151    pub fn Z3_mk_app(
2152        c: Z3_context,
2153        d: Z3_func_decl,
2154        num_args: ::std::os::raw::c_uint,
2155        args: *const Z3_ast,
2156    ) -> Z3_ast;
2157
2158    /// Declare and create a constant.
2159    ///
2160    /// This function is a shorthand for:
2161    ///
2162    /// ```c
2163    /// Z3_func_decl d = Z3_mk_func_decl(c, s, 0, 0, ty);
2164    /// Z3_ast n             = Z3_mk_app(c, d, 0, 0);
2165    /// ```
2166    ///
2167    /// # See also:
2168    ///
2169    /// - [`Z3_mk_app`]
2170    /// - [`Z3_mk_fresh_const`]
2171    /// - [`Z3_mk_func_decl`]
2172    pub fn Z3_mk_const(c: Z3_context, s: Z3_symbol, ty: Z3_sort) -> Z3_ast;
2173
2174    /// Declare a fresh constant or function.
2175    ///
2176    /// Z3 will generate an unique name for this function declaration.
2177    /// If prefix is different from `NULL`, then the name generate by Z3 will start with `prefix`.
2178    ///
2179    /// NOTE: If `prefix` is `NULL`, then it is assumed to be the empty string.
2180    ///
2181    /// # See also:
2182    ///
2183    /// - [`Z3_mk_func_decl`]
2184    pub fn Z3_mk_fresh_func_decl(
2185        c: Z3_context,
2186        prefix: Z3_string,
2187        domain_size: ::std::os::raw::c_uint,
2188        domain: *const Z3_sort,
2189        range: Z3_sort,
2190    ) -> Z3_func_decl;
2191
2192    /// Declare and create a fresh constant.
2193    ///
2194    /// This function is a shorthand for:
2195    /// ```c
2196    /// Z3_func_decl d = Z3_mk_fresh_func_decl(c, prefix, 0, 0, ty);
2197    /// Z3_ast n = Z3_mk_app(c, d, 0, 0);
2198    /// ```
2199    ///
2200    /// NOTE: If `prefix` is `NULL`, then it is assumed to be the empty string.
2201    ///
2202    /// # See also:
2203    ///
2204    /// - [`Z3_mk_app`]
2205    /// - [`Z3_mk_const`]
2206    /// - [`Z3_mk_fresh_func_decl`]
2207    /// - [`Z3_mk_func_decl`]
2208    pub fn Z3_mk_fresh_const(c: Z3_context, prefix: Z3_string, ty: Z3_sort) -> Z3_ast;
2209
2210    /// Declare a recursive function
2211    ///
2212    /// * `c`: logical context.
2213    /// * `s`: name of the function.
2214    /// * `domain_size`: number of arguments. It should be greater than 0.
2215    /// * `domain`: array containing the sort of each argument. The array must contain `domain_size` elements.
2216    /// * `range`: sort of the constant or the return sort of the function.
2217    ///
2218    /// After declaring recursive function, it should be associated with a
2219    /// recursive definition with [`Z3_add_rec_def`]. The function
2220    /// [`Z3_mk_app`] can be used to create a constant or function
2221    /// application.
2222    ///
2223    /// # See also:
2224    ///
2225    /// * [`Z3_add_rec_def`]
2226    /// * [`Z3_mk_app`]
2227    /// * [`Z3_mk_func_decl`]
2228    pub fn Z3_mk_rec_func_decl(
2229        c: Z3_context,
2230        s: Z3_symbol,
2231        domain_size: ::std::os::raw::c_uint,
2232        domain: *const Z3_sort,
2233        range: Z3_sort,
2234    ) -> Z3_func_decl;
2235
2236    /// Define the body of a recursive function.
2237    ///
2238    /// * `c`: logical context.
2239    /// * `f`: function declaration.
2240    /// * `n`: number of arguments to the function
2241    /// * `args`: constants that are used as arguments to the recursive function in the definition.
2242    /// * `body`: body of the recursive function
2243    ///
2244    /// After declaring a recursive function or a collection of  mutually recursive functions, use
2245    /// this function to provide the definition for the recursive function.
2246    ///
2247    /// # See also:
2248    ///
2249    /// * [`Z3_mk_rec_func_decl`]
2250    pub fn Z3_add_rec_def(
2251        c: Z3_context,
2252        f: Z3_func_decl,
2253        n: ::std::os::raw::c_uint,
2254        args: *mut Z3_ast,
2255        body: Z3_ast,
2256    );
2257
2258    /// Create an AST node representing `true`.
2259    pub fn Z3_mk_true(c: Z3_context) -> Z3_ast;
2260
2261    /// Create an AST node representing `false`.
2262    pub fn Z3_mk_false(c: Z3_context) -> Z3_ast;
2263
2264    /// Create an AST node representing `l = r`.
2265    ///
2266    /// The nodes `l` and `r` must have the same type.
2267    pub fn Z3_mk_eq(c: Z3_context, l: Z3_ast, r: Z3_ast) -> Z3_ast;
2268
2269    /// Create an AST node representing `distinct(args[0], ..., args[num_args-1])`.
2270    ///
2271    /// The `distinct` construct is used for declaring the arguments pairwise distinct.
2272    /// That is, `Forall 0 <= i < j < num_args. not args[i] = args[j]`.
2273    ///
2274    /// All arguments must have the same sort.
2275    ///
2276    /// NOTE: The number of arguments of a distinct construct must be greater than one.
2277    pub fn Z3_mk_distinct(
2278        c: Z3_context,
2279        num_args: ::std::os::raw::c_uint,
2280        args: *const Z3_ast,
2281    ) -> Z3_ast;
2282
2283    /// Create an AST node representing `not(a)`.
2284    ///
2285    /// The node `a` must have Boolean sort.
2286    pub fn Z3_mk_not(c: Z3_context, a: Z3_ast) -> Z3_ast;
2287
2288    /// Create an AST node representing an if-then-else: `ite(t1, t2, t3)`.
2289    ///
2290    /// The node `t1` must have Boolean sort, `t2` and `t3` must have the same sort.
2291    /// The sort of the new node is equal to the sort of `t2` and `t3`.
2292    pub fn Z3_mk_ite(c: Z3_context, t1: Z3_ast, t2: Z3_ast, t3: Z3_ast) -> Z3_ast;
2293
2294    /// Create an AST node representing `t1 iff t2`.
2295    ///
2296    /// The nodes `t1` and `t2` must have Boolean sort.
2297    pub fn Z3_mk_iff(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2298
2299    /// Create an AST node representing `t1 implies t2`.
2300    ///
2301    /// The nodes `t1` and `t2` must have Boolean sort.
2302    pub fn Z3_mk_implies(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2303
2304    /// Create an AST node representing `t1 xor t2`.
2305    ///
2306    /// The nodes `t1` and `t2` must have Boolean sort.
2307    pub fn Z3_mk_xor(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2308
2309    /// Create an AST node representing `args[0] and ... and args[num_args-1]`.
2310    ///
2311    /// The array `args` must have `num_args` elements.
2312    /// All arguments must have Boolean sort.
2313    ///
2314    /// NOTE: The number of arguments must be greater than zero.
2315    pub fn Z3_mk_and(
2316        c: Z3_context,
2317        num_args: ::std::os::raw::c_uint,
2318        args: *const Z3_ast,
2319    ) -> Z3_ast;
2320
2321    /// Create an AST node representing `args[0] or ... or args[num_args-1]`.
2322    ///
2323    /// The array `args` must have `num_args` elements.
2324    /// All arguments must have Boolean sort.
2325    ///
2326    /// NOTE: The number of arguments must be greater than zero.
2327    pub fn Z3_mk_or(c: Z3_context, num_args: ::std::os::raw::c_uint, args: *const Z3_ast)
2328        -> Z3_ast;
2329
2330    /// Create an AST node representing `args[0] + ... + args[num_args-1]`.
2331    ///
2332    /// The array `args` must have `num_args` elements.
2333    /// All arguments must have int or real sort.
2334    ///
2335    /// NOTE: The number of arguments must be greater than zero.
2336    pub fn Z3_mk_add(
2337        c: Z3_context,
2338        num_args: ::std::os::raw::c_uint,
2339        args: *const Z3_ast,
2340    ) -> Z3_ast;
2341
2342    /// Create an AST node representing `args[0] * ... * args[num_args-1]`.
2343    ///
2344    /// The array `args` must have `num_args` elements.
2345    /// All arguments must have int or real sort.
2346    ///
2347    /// NOTE: Z3 has limited support for non-linear arithmetic.
2348    /// NOTE: The number of arguments must be greater than zero.
2349    pub fn Z3_mk_mul(
2350        c: Z3_context,
2351        num_args: ::std::os::raw::c_uint,
2352        args: *const Z3_ast,
2353    ) -> Z3_ast;
2354
2355    /// Create an AST node representing `args[0] - ... - args[num_args - 1]`.
2356    ///
2357    /// The array `args` must have `num_args` elements.
2358    /// All arguments must have int or real sort.
2359    ///
2360    /// NOTE: The number of arguments must be greater than zero.
2361    pub fn Z3_mk_sub(
2362        c: Z3_context,
2363        num_args: ::std::os::raw::c_uint,
2364        args: *const Z3_ast,
2365    ) -> Z3_ast;
2366
2367    /// Create an AST node representing `- arg`.
2368    ///
2369    /// The arguments must have int or real type.
2370    pub fn Z3_mk_unary_minus(c: Z3_context, arg: Z3_ast) -> Z3_ast;
2371
2372    /// Create an AST node representing `arg1 div arg2`.
2373    ///
2374    /// The arguments must either both have int type or both have real type.
2375    /// If the arguments have int type, then the result type is an int type, otherwise the
2376    /// the result type is real.
2377    pub fn Z3_mk_div(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Z3_ast;
2378
2379    /// Create an AST node representing `arg1 mod arg2`.
2380    ///
2381    /// The arguments must have int type.
2382    pub fn Z3_mk_mod(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Z3_ast;
2383
2384    /// Create an AST node representing `arg1 rem arg2`.
2385    ///
2386    /// The arguments must have int type.
2387    pub fn Z3_mk_rem(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Z3_ast;
2388
2389    /// Create an AST node representing `arg1 ^ arg2`.
2390    ///
2391    /// The arguments must have int or real type.
2392    pub fn Z3_mk_power(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Z3_ast;
2393
2394    /// Create less than.
2395    ///
2396    /// The nodes `t1` and `t2` must have the same sort, and must be int or real.
2397    pub fn Z3_mk_lt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2398
2399    /// Create less than or equal to.
2400    ///
2401    /// The nodes `t1` and `t2` must have the same sort, and must be int or real.
2402    pub fn Z3_mk_le(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2403
2404    /// Create greater than.
2405    ///
2406    /// The nodes `t1` and `t2` must have the same sort, and must be int or real.
2407    pub fn Z3_mk_gt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2408
2409    /// Create greater than or equal to.
2410    ///
2411    /// The nodes `t1` and `t2` must have the same sort, and must be int or real.
2412    pub fn Z3_mk_ge(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2413
2414    /// Coerce an integer to a real.
2415    ///
2416    /// There is also a converse operation exposed.
2417    /// It follows the semantics prescribed by the SMT-LIB standard.
2418    ///
2419    /// You can take the floor of a real by
2420    /// creating an auxiliary integer constant `k` and
2421    /// and asserting `mk_int2real(k) <= t1 < mk_int2real(k)+1`.
2422    ///
2423    /// The node `t1` must have sort integer.
2424    ///
2425    /// # See also:
2426    ///
2427    /// - [`Z3_mk_real2int`]
2428    /// - [`Z3_mk_is_int`]
2429    pub fn Z3_mk_int2real(c: Z3_context, t1: Z3_ast) -> Z3_ast;
2430
2431    /// Coerce a real to an integer.
2432    ///
2433    /// The semantics of this function follows the SMT-LIB standard
2434    /// for the function `to_int`
2435    ///
2436    /// # See also:
2437    ///
2438    /// - [`Z3_mk_int2real`]
2439    /// - [`Z3_mk_is_int`]
2440    pub fn Z3_mk_real2int(c: Z3_context, t1: Z3_ast) -> Z3_ast;
2441
2442    /// Check if a real number is an integer.
2443    ///
2444    /// # See also:
2445    ///
2446    /// - [`Z3_mk_int2real`]
2447    /// - [`Z3_mk_real2int`]
2448    pub fn Z3_mk_is_int(c: Z3_context, t1: Z3_ast) -> Z3_ast;
2449
2450    /// Bitwise negation.
2451    ///
2452    /// The node `t1` must have a bit-vector sort.
2453    pub fn Z3_mk_bvnot(c: Z3_context, t1: Z3_ast) -> Z3_ast;
2454
2455    /// Take conjunction of bits in vector, return vector of length 1.
2456    ///
2457    /// The node `t1` must have a bit-vector sort.
2458    pub fn Z3_mk_bvredand(c: Z3_context, t1: Z3_ast) -> Z3_ast;
2459
2460    /// Take disjunction of bits in vector, return vector of length 1.
2461    ///
2462    /// The node `t1` must have a bit-vector sort.
2463    pub fn Z3_mk_bvredor(c: Z3_context, t1: Z3_ast) -> Z3_ast;
2464
2465    /// Bitwise and.
2466    ///
2467    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2468    pub fn Z3_mk_bvand(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2469
2470    /// Bitwise or.
2471    ///
2472    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2473    pub fn Z3_mk_bvor(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2474
2475    /// Bitwise exclusive-or.
2476    ///
2477    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2478    pub fn Z3_mk_bvxor(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2479
2480    /// Bitwise nand.
2481    ///
2482    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2483    pub fn Z3_mk_bvnand(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2484
2485    /// Bitwise nor.
2486    ///
2487    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2488    pub fn Z3_mk_bvnor(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2489
2490    /// Bitwise xnor.
2491    ///
2492    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2493    pub fn Z3_mk_bvxnor(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2494
2495    /// Standard two's complement unary minus.
2496    ///
2497    /// The node `t1` must have bit-vector sort.
2498    pub fn Z3_mk_bvneg(c: Z3_context, t1: Z3_ast) -> Z3_ast;
2499
2500    /// Standard two's complement addition.
2501    ///
2502    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2503    pub fn Z3_mk_bvadd(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2504
2505    /// Standard two's complement subtraction.
2506    ///
2507    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2508    pub fn Z3_mk_bvsub(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2509
2510    /// Standard two's complement multiplication.
2511    ///
2512    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2513    pub fn Z3_mk_bvmul(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2514
2515    /// Unsigned division.
2516    ///
2517    /// It is defined as the `floor` of `t1/t2` if `t2` is
2518    /// different from zero. If `t2` is zero, then the result
2519    /// is undefined.
2520    ///
2521    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2522    pub fn Z3_mk_bvudiv(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2523
2524    /// Two's complement signed division.
2525    ///
2526    /// It is defined in the following way:
2527    ///
2528    /// - The `floor` of `t1/t2` if `t2` is different from zero, and `t1*t2 >= 0`.
2529    ///
2530    /// - The `ceiling` of `t1/t2` if `t2` is different from zero, and `t1*t2 < 0`.
2531    ///
2532    /// If `t2` is zero, then the result is undefined.
2533    ///
2534    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2535    pub fn Z3_mk_bvsdiv(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2536
2537    /// Unsigned remainder.
2538    ///
2539    /// It is defined as `t1 - (t1 /u t2) * t2`, where `/u` represents unsigned division.
2540    ///
2541    /// If `t2` is zero, then the result is undefined.
2542    ///
2543    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2544    pub fn Z3_mk_bvurem(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2545
2546    /// Two's complement signed remainder (sign follows dividend).
2547    ///
2548    /// It is defined as `t1 - (t1 /s t2) * t2`, where `/s` represents signed division.
2549    /// The most significant bit (sign) of the result is equal to the most significant bit of `t1`.
2550    ///
2551    /// If `t2` is zero, then the result is undefined.
2552    ///
2553    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2554    ///
2555    /// # See also:
2556    ///
2557    /// - [`Z3_mk_bvsmod`]
2558    pub fn Z3_mk_bvsrem(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2559
2560    /// Two's complement signed remainder (sign follows divisor).
2561    ///
2562    /// If `t2` is zero, then the result is undefined.
2563    ///
2564    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2565    ///
2566    /// # See also:
2567    ///
2568    /// - [`Z3_mk_bvsrem`]
2569    pub fn Z3_mk_bvsmod(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2570
2571    /// Unsigned less than.
2572    ///
2573    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2574    pub fn Z3_mk_bvult(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2575
2576    /// Two's complement signed less than.
2577    ///
2578    /// It abbreviates:
2579    /// ```text
2580    /// (or (and (= (extract[|m-1|:|m-1|] t1) bit1)
2581    /// (= (extract[|m-1|:|m-1|] t2) bit0))
2582    /// (and (= (extract[|m-1|:|m-1|] t1) (extract[|m-1|:|m-1|] t2))
2583    /// (bvult t1 t2)))
2584    /// ```
2585    ///
2586    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2587    pub fn Z3_mk_bvslt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2588
2589    /// Unsigned less than or equal to.
2590    ///
2591    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2592    pub fn Z3_mk_bvule(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2593
2594    /// Two's complement signed less than or equal to.
2595    ///
2596    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2597    pub fn Z3_mk_bvsle(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2598
2599    /// Unsigned greater than or equal to.
2600    ///
2601    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2602    pub fn Z3_mk_bvuge(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2603
2604    /// Two's complement signed greater than or equal to.
2605    ///
2606    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2607    pub fn Z3_mk_bvsge(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2608
2609    /// Unsigned greater than.
2610    ///
2611    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2612    pub fn Z3_mk_bvugt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2613
2614    /// Two's complement signed greater than.
2615    ///
2616    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2617    pub fn Z3_mk_bvsgt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2618
2619    /// Concatenate the given bit-vectors.
2620    ///
2621    /// The nodes `t1` and `t2` must have (possibly different) bit-vector sorts
2622    ///
2623    /// The result is a bit-vector of size `n1+n2`, where `n1` (`n2`) is the size
2624    /// of `t1` (`t2`).
2625    pub fn Z3_mk_concat(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2626
2627    /// Extract the bits `high` down to `low` from a bit-vector of
2628    /// size `m` to yield a new bit-vector of size `n`, where `n = high - low + 1`.
2629    ///
2630    /// The node `t1` must have a bit-vector sort.
2631    pub fn Z3_mk_extract(
2632        c: Z3_context,
2633        high: ::std::os::raw::c_uint,
2634        low: ::std::os::raw::c_uint,
2635        t1: Z3_ast,
2636    ) -> Z3_ast;
2637
2638    /// Sign-extend of the given bit-vector to the (signed) equivalent bit-vector of
2639    /// size `m+i`, where `m` is the size of the given
2640    /// bit-vector.
2641    ///
2642    /// The node `t1` must have a bit-vector sort.
2643    pub fn Z3_mk_sign_ext(c: Z3_context, i: ::std::os::raw::c_uint, t1: Z3_ast) -> Z3_ast;
2644
2645    /// Extend the given bit-vector with zeros to the (unsigned) equivalent
2646    /// bit-vector of size `m+i`, where `m` is the size of the
2647    /// given bit-vector.
2648    ///
2649    /// The node `t1` must have a bit-vector sort.
2650    pub fn Z3_mk_zero_ext(c: Z3_context, i: ::std::os::raw::c_uint, t1: Z3_ast) -> Z3_ast;
2651
2652    /// Repeat the given bit-vector up length `i`.
2653    ///
2654    /// The node `t1` must have a bit-vector sort.
2655    pub fn Z3_mk_repeat(c: Z3_context, i: ::std::os::raw::c_uint, t1: Z3_ast) -> Z3_ast;
2656
2657    /// Shift left.
2658    ///
2659    /// It is equivalent to multiplication by `2^x` where `x` is the value of the
2660    /// third argument.
2661    ///
2662    /// NB. The semantics of shift operations varies between environments. This
2663    /// definition does not necessarily capture directly the semantics of the
2664    /// programming language or assembly architecture you are modeling.
2665    ///
2666    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2667    pub fn Z3_mk_bvshl(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2668
2669    /// Logical shift right.
2670    ///
2671    /// It is equivalent to unsigned division by `2^x` where `x` is the
2672    /// value of the third argument.
2673    ///
2674    /// NB. The semantics of shift operations varies between environments. This
2675    /// definition does not necessarily capture directly the semantics of the
2676    /// programming language or assembly architecture you are modeling.
2677    ///
2678    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2679    pub fn Z3_mk_bvlshr(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2680
2681    /// Arithmetic shift right.
2682    ///
2683    /// It is like logical shift right except that the most significant
2684    /// bits of the result always copy the most significant bit of the
2685    /// second argument.
2686    ///
2687    /// The semantics of shift operations varies between environments. This
2688    /// definition does not necessarily capture directly the semantics of the
2689    /// programming language or assembly architecture you are modeling.
2690    ///
2691    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2692    pub fn Z3_mk_bvashr(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2693
2694    /// Rotate bits of `t1` to the left `i` times.
2695    ///
2696    /// The node `t1` must have a bit-vector sort.
2697    pub fn Z3_mk_rotate_left(c: Z3_context, i: ::std::os::raw::c_uint, t1: Z3_ast) -> Z3_ast;
2698
2699    /// Rotate bits of `t1` to the right `i` times.
2700    ///
2701    /// The node `t1` must have a bit-vector sort.
2702    pub fn Z3_mk_rotate_right(c: Z3_context, i: ::std::os::raw::c_uint, t1: Z3_ast) -> Z3_ast;
2703
2704    /// Rotate bits of `t1` to the left `t2` times.
2705    ///
2706    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2707    pub fn Z3_mk_ext_rotate_left(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2708
2709    /// Rotate bits of `t1` to the right `t2` times.
2710    ///
2711    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2712    pub fn Z3_mk_ext_rotate_right(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2713
2714    /// Create an `n` bit bit-vector from the integer argument `t1`.
2715    ///
2716    /// The resulting bit-vector has `n` bits, where the i'th bit (counting
2717    /// from `0` to `n-1`) is `1` if `(t1 div 2^i) mod 2` is `1`.
2718    ///
2719    /// The node `t1` must have integer sort.
2720    pub fn Z3_mk_int2bv(c: Z3_context, n: ::std::os::raw::c_uint, t1: Z3_ast) -> Z3_ast;
2721
2722    /// Create an integer from the bit-vector argument `t1`.
2723    /// If `is_signed` is false, then the bit-vector `t1` is treated as unsigned.
2724    /// So the result is non-negative
2725    /// and in the range `[0..2^N-1]`, where N are the number of bits in `t1`.
2726    /// If `is_signed` is true, `t1` is treated as a signed bit-vector.
2727    ///
2728    /// The node `t1` must have a bit-vector sort.
2729    pub fn Z3_mk_bv2int(c: Z3_context, t1: Z3_ast, is_signed: bool) -> Z3_ast;
2730
2731    /// Create a predicate that checks that the bit-wise addition
2732    /// of `t1` and `t2` does not overflow.
2733    ///
2734    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2735    pub fn Z3_mk_bvadd_no_overflow(
2736        c: Z3_context,
2737        t1: Z3_ast,
2738        t2: Z3_ast,
2739        is_signed: bool,
2740    ) -> Z3_ast;
2741
2742    /// Create a predicate that checks that the bit-wise signed addition
2743    /// of `t1` and `t2` does not underflow.
2744    ///
2745    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2746    pub fn Z3_mk_bvadd_no_underflow(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2747
2748    /// Create a predicate that checks that the bit-wise signed subtraction
2749    /// of `t1` and `t2` does not overflow.
2750    ///
2751    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2752    pub fn Z3_mk_bvsub_no_overflow(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2753
2754    /// Create a predicate that checks that the bit-wise subtraction
2755    /// of `t1` and `t2` does not underflow.
2756    ///
2757    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2758    pub fn Z3_mk_bvsub_no_underflow(
2759        c: Z3_context,
2760        t1: Z3_ast,
2761        t2: Z3_ast,
2762        is_signed: bool,
2763    ) -> Z3_ast;
2764
2765    /// Create a predicate that checks that the bit-wise signed division
2766    /// of `t1` and `t2` does not overflow.
2767    ///
2768    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2769    pub fn Z3_mk_bvsdiv_no_overflow(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2770
2771    /// Check that bit-wise negation does not overflow when
2772    /// `t1` is interpreted as a signed bit-vector.
2773    ///
2774    /// The node `t1` must have bit-vector sort.
2775    pub fn Z3_mk_bvneg_no_overflow(c: Z3_context, t1: Z3_ast) -> Z3_ast;
2776
2777    /// Create a predicate that checks that the bit-wise multiplication
2778    /// of `t1` and `t2` does not overflow.
2779    ///
2780    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2781    pub fn Z3_mk_bvmul_no_overflow(
2782        c: Z3_context,
2783        t1: Z3_ast,
2784        t2: Z3_ast,
2785        is_signed: bool,
2786    ) -> Z3_ast;
2787
2788    /// Create a predicate that checks that the bit-wise signed multiplication
2789    /// of `t1` and `t2` does not underflow.
2790    ///
2791    /// The nodes `t1` and `t2` must have the same bit-vector sort.
2792    pub fn Z3_mk_bvmul_no_underflow(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
2793
2794    /// Array read.
2795    /// The argument `a` is the array and `i` is the index of the array that gets read.
2796    ///
2797    /// The node `a` must have an array sort `[domain -> range]`,
2798    /// and `i` must have the sort `domain`.
2799    /// The sort of the result is `range`.
2800    ///
2801    /// # See also:
2802    ///
2803    /// - [`Z3_mk_array_sort`]
2804    /// - [`Z3_mk_store`]
2805    pub fn Z3_mk_select(c: Z3_context, a: Z3_ast, i: Z3_ast) -> Z3_ast;
2806
2807    /// n-ary Array read.
2808    /// The argument `a` is the array and `idxs` are the indices of the array that gets read.
2809    pub fn Z3_mk_select_n(
2810        c: Z3_context,
2811        a: Z3_ast,
2812        n: ::std::os::raw::c_uint,
2813        idxs: *const Z3_ast,
2814    ) -> Z3_ast;
2815
2816    /// Array update.
2817    ///
2818    /// The node `a` must have an array sort `[domain -> range]`, `i` must have sort `domain`,
2819    /// `v` must have sort range. The sort of the result is `[domain -> range]`.
2820    /// The semantics of this function is given by the theory of arrays described in the SMT-LIB
2821    /// standard. See <http://smtlib.org/> for more details.
2822    /// The result of this function is an array that is equal to `a` (with respect to `select`)
2823    /// on all indices except for `i`, where it maps to `v` (and the `select` of `a` with
2824    /// respect to `i` may be a different value).
2825    ///
2826    /// # See also:
2827    ///
2828    /// - [`Z3_mk_array_sort`]
2829    /// - [`Z3_mk_select`]
2830    pub fn Z3_mk_store(c: Z3_context, a: Z3_ast, i: Z3_ast, v: Z3_ast) -> Z3_ast;
2831
2832    /// n-ary Array update.
2833    pub fn Z3_mk_store_n(
2834        c: Z3_context,
2835        a: Z3_ast,
2836        n: ::std::os::raw::c_uint,
2837        idxs: *const Z3_ast,
2838        v: Z3_ast,
2839    ) -> Z3_ast;
2840
2841    /// Create the constant array.
2842    ///
2843    /// The resulting term is an array, such that a `select` on an arbitrary index
2844    /// produces the value `v`.
2845    ///
2846    /// - `c`: logical context.
2847    /// - `domain`: domain sort for the array.
2848    /// - `v`: value that the array maps to.
2849    pub fn Z3_mk_const_array(c: Z3_context, domain: Z3_sort, v: Z3_ast) -> Z3_ast;
2850
2851    /// Map f on the argument arrays.
2852    ///
2853    /// The `n` nodes `args` must be of array sorts `[domain_i -> range_i]`.
2854    /// The function declaration `f` must have type `range_1 .. range_n -> range`.
2855    /// `v` must have sort range. The sort of the result is `[domain_i -> range]`.
2856    ///
2857    /// # See also:
2858    ///
2859    /// - [`Z3_mk_array_sort`]
2860    /// - [`Z3_mk_store`]
2861    /// - [`Z3_mk_select`]
2862    pub fn Z3_mk_map(
2863        c: Z3_context,
2864        f: Z3_func_decl,
2865        n: ::std::os::raw::c_uint,
2866        args: *const Z3_ast,
2867    ) -> Z3_ast;
2868
2869    /// Access the array default value.
2870    /// Produces the default range value, for arrays that can be represented as
2871    /// finite maps with a default range value.
2872    ///
2873    /// - `c`: logical context.
2874    /// - `array`: array value whose default range value is accessed.
2875    pub fn Z3_mk_array_default(c: Z3_context, array: Z3_ast) -> Z3_ast;
2876
2877    /// Create array with the same interpretation as a function.
2878    /// The array satisfies the property (f x) = (select (_ as-array f) x)
2879    /// for every argument x.
2880    pub fn Z3_mk_as_array(c: Z3_context, f: Z3_func_decl) -> Z3_ast;
2881
2882    /// Create Set type.
2883    pub fn Z3_mk_set_sort(c: Z3_context, ty: Z3_sort) -> Z3_sort;
2884
2885    /// Create the empty set.
2886    pub fn Z3_mk_empty_set(c: Z3_context, domain: Z3_sort) -> Z3_ast;
2887
2888    /// Create the full set.
2889    pub fn Z3_mk_full_set(c: Z3_context, domain: Z3_sort) -> Z3_ast;
2890
2891    /// Add an element to a set.
2892    ///
2893    /// The first argument must be a set, the second an element.
2894    pub fn Z3_mk_set_add(c: Z3_context, set: Z3_ast, elem: Z3_ast) -> Z3_ast;
2895
2896    /// Remove an element to a set.
2897    ///
2898    /// The first argument must be a set, the second an element.
2899    pub fn Z3_mk_set_del(c: Z3_context, set: Z3_ast, elem: Z3_ast) -> Z3_ast;
2900
2901    /// Take the union of a list of sets.
2902    pub fn Z3_mk_set_union(
2903        c: Z3_context,
2904        num_args: ::std::os::raw::c_uint,
2905        args: *const Z3_ast,
2906    ) -> Z3_ast;
2907
2908    /// Take the intersection of a list of sets.
2909    pub fn Z3_mk_set_intersect(
2910        c: Z3_context,
2911        num_args: ::std::os::raw::c_uint,
2912        args: *const Z3_ast,
2913    ) -> Z3_ast;
2914
2915    /// Take the set difference between two sets.
2916    pub fn Z3_mk_set_difference(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Z3_ast;
2917
2918    /// Take the complement of a set.
2919    pub fn Z3_mk_set_complement(c: Z3_context, arg: Z3_ast) -> Z3_ast;
2920
2921    /// Check for set membership.
2922    ///
2923    /// The first argument should be an element type of the set.
2924    pub fn Z3_mk_set_member(c: Z3_context, elem: Z3_ast, set: Z3_ast) -> Z3_ast;
2925
2926    /// Check for subsetness of sets.
2927    pub fn Z3_mk_set_subset(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Z3_ast;
2928
2929    /// Create array extensionality index given two arrays with the same sort.
2930    /// The meaning is given by the axiom:
2931    /// (=> (= (select A (array-ext A B)) (select B (array-ext A B))) (= A B))
2932    pub fn Z3_mk_array_ext(c: Z3_context, arg1: Z3_ast, arg2: Z3_ast) -> Z3_ast;
2933
2934    /// Create a numeral of a given sort.
2935    ///
2936    /// - `c`: logical context.
2937    /// - `numeral`: A string representing the numeral value in decimal notation. The string may be of the form `[num]*[.[num]*][E[+|-][num]+]`.
2938    ///   If the given sort is a real, then the numeral can be a rational, that is, a string of the form `[num]* / [num]*` .
2939    /// - `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.
2940    ///
2941    /// # See also:
2942    ///
2943    /// - [`Z3_mk_int`]
2944    /// - [`Z3_mk_unsigned_int`]
2945    pub fn Z3_mk_numeral(c: Z3_context, numeral: Z3_string, ty: Z3_sort) -> Z3_ast;
2946
2947    /// Create a real from a fraction.
2948    ///
2949    /// - `c`: logical context.
2950    /// - `num`: numerator of rational.
2951    /// - `den`: denominator of rational.
2952    ///
2953    /// # Preconditions:
2954    ///
2955    /// - `den != 0`
2956    ///
2957    /// # See also:
2958    ///
2959    /// - [`Z3_mk_numeral`]
2960    /// - [`Z3_mk_int`]
2961    /// - [`Z3_mk_unsigned_int`]
2962    pub fn Z3_mk_real(
2963        c: Z3_context,
2964        num: ::std::os::raw::c_int,
2965        den: ::std::os::raw::c_int,
2966    ) -> Z3_ast;
2967
2968    /// Create a numeral of an int, bit-vector, or finite-domain sort.
2969    ///
2970    /// This function can be use to create numerals that fit in a machine integer.
2971    /// It is slightly faster than [`Z3_mk_numeral`] since it is not necessary to parse a string.
2972    ///
2973    /// # See also:
2974    ///
2975    /// - [`Z3_mk_numeral`]
2976    pub fn Z3_mk_int(c: Z3_context, v: ::std::os::raw::c_int, ty: Z3_sort) -> Z3_ast;
2977
2978    /// Create a numeral of a int, bit-vector, or finite-domain sort.
2979    ///
2980    /// This function can be use to create numerals that fit in a machine unsigned integer.
2981    /// It is slightly faster than [`Z3_mk_numeral`] since it is not necessary to parse a string.
2982    ///
2983    /// # See also:
2984    ///
2985    /// - [`Z3_mk_numeral`]
2986    pub fn Z3_mk_unsigned_int(c: Z3_context, v: ::std::os::raw::c_uint, ty: Z3_sort) -> Z3_ast;
2987
2988    /// Create a numeral of a int, bit-vector, or finite-domain sort.
2989    ///
2990    /// This function can be use to create numerals that fit in a machine `int64_t` integer.
2991    /// It is slightly faster than [`Z3_mk_numeral`] since it is not necessary to parse a string.
2992    ///
2993    /// # See also:
2994    ///
2995    /// - [`Z3_mk_numeral`]
2996    pub fn Z3_mk_int64(c: Z3_context, v: i64, ty: Z3_sort) -> Z3_ast;
2997
2998    /// Create a numeral of a int, bit-vector, or finite-domain sort.
2999    ///
3000    /// This function can be use to create numerals that fit in a machine `uint64_t` integer.
3001    /// It is slightly faster than [`Z3_mk_numeral`] since it is not necessary to parse a string.
3002    ///
3003    /// # See also:
3004    ///
3005    /// - [`Z3_mk_numeral`]
3006    pub fn Z3_mk_unsigned_int64(c: Z3_context, v: u64, ty: Z3_sort) -> Z3_ast;
3007
3008    /// create a bit-vector numeral from a vector of Booleans.
3009    ///
3010    /// # See also:
3011    ///
3012    /// - [`Z3_mk_numeral`]
3013    pub fn Z3_mk_bv_numeral(c: Z3_context, sz: ::std::os::raw::c_uint, bits: *const bool)
3014        -> Z3_ast;
3015
3016    /// Create a sequence sort out of the sort for the elements.
3017    pub fn Z3_mk_seq_sort(c: Z3_context, s: Z3_sort) -> Z3_sort;
3018
3019    /// Check if `s` is a sequence sort.
3020    pub fn Z3_is_seq_sort(c: Z3_context, s: Z3_sort) -> bool;
3021
3022    /// Create a regular expression sort out of a sequence sort.
3023    pub fn Z3_mk_re_sort(c: Z3_context, seq: Z3_sort) -> Z3_sort;
3024
3025    /// Check if `s` is a regular expression sort.
3026    pub fn Z3_is_re_sort(c: Z3_context, s: Z3_sort) -> bool;
3027
3028    /// Create a sort for 8 bit strings.
3029    ///
3030    /// This function creates a sort for ASCII strings.
3031    /// Each character is 8 bits.
3032    pub fn Z3_mk_string_sort(c: Z3_context) -> Z3_sort;
3033
3034    /// Check if `s` is a string sort.
3035    pub fn Z3_is_string_sort(c: Z3_context, s: Z3_sort) -> bool;
3036
3037    /// Create a string constant out of the string that is passed in
3038    pub fn Z3_mk_string(c: Z3_context, s: Z3_string) -> Z3_ast;
3039
3040    /// Determine if `s` is a string constant.
3041    pub fn Z3_is_string(c: Z3_context, s: Z3_ast) -> bool;
3042
3043    /// Retrieve the string constant stored in `s`.
3044    ///
3045    /// # Preconditions:
3046    ///
3047    /// - `Z3_is_string(c, s)`
3048    pub fn Z3_get_string(c: Z3_context, s: Z3_ast) -> Z3_string;
3049
3050    /// Create an empty sequence of the sequence sort `seq`.
3051    ///
3052    /// # Preconditions:
3053    ///
3054    /// - `s` is a sequence sort.
3055    pub fn Z3_mk_seq_empty(c: Z3_context, seq: Z3_sort) -> Z3_ast;
3056
3057    /// Create a unit sequence of `a`.
3058    pub fn Z3_mk_seq_unit(c: Z3_context, a: Z3_ast) -> Z3_ast;
3059
3060    /// Concatenate sequences.
3061    ///
3062    /// # Preconditions:
3063    ///
3064    /// - `n > 0`
3065    pub fn Z3_mk_seq_concat(
3066        c: Z3_context,
3067        n: ::std::os::raw::c_uint,
3068        args: *const Z3_ast,
3069    ) -> Z3_ast;
3070
3071    /// Check if `prefix` is a prefix of `s`.
3072    ///
3073    /// # Preconditions:
3074    ///
3075    /// - `prefix` and `s` are the same sequence sorts.
3076    pub fn Z3_mk_seq_prefix(c: Z3_context, prefix: Z3_ast, s: Z3_ast) -> Z3_ast;
3077
3078    /// Check if `suffix` is a suffix of `s`.
3079    ///
3080    /// # Preconditions:
3081    ///
3082    /// - `suffix` and `s` are the same sequence sorts.
3083    pub fn Z3_mk_seq_suffix(c: Z3_context, suffix: Z3_ast, s: Z3_ast) -> Z3_ast;
3084
3085    /// Check if `container` contains `containee`.
3086    ///
3087    /// # Preconditions:
3088    ///
3089    /// - `container` and `containee` are the same sequence sorts.
3090    pub fn Z3_mk_seq_contains(c: Z3_context, container: Z3_ast, containee: Z3_ast) -> Z3_ast;
3091
3092    /// Extract subsequence starting at `offset` of `length`.
3093    pub fn Z3_mk_seq_extract(c: Z3_context, s: Z3_ast, offset: Z3_ast, length: Z3_ast) -> Z3_ast;
3094
3095    /// Replace the first occurrence of `src` with `dst` in `s`.
3096    pub fn Z3_mk_seq_replace(c: Z3_context, s: Z3_ast, src: Z3_ast, dst: Z3_ast) -> Z3_ast;
3097
3098    /// Retrieve from `s` the unit sequence positioned at position `index`.
3099    pub fn Z3_mk_seq_at(c: Z3_context, s: Z3_ast, index: Z3_ast) -> Z3_ast;
3100
3101    /// Retrieve from `s` the element positioned at position `index`.
3102    /// The function is under-specified if the index is out of bounds.
3103    pub fn Z3_mk_seq_nth(c: Z3_context, s: Z3_ast, index: Z3_ast) -> Z3_ast;
3104
3105    /// Return the length of the sequence `s`.
3106    pub fn Z3_mk_seq_length(c: Z3_context, s: Z3_ast) -> Z3_ast;
3107
3108    /// Return index of first occurrence of `substr` in `s` starting from offset `offset`.
3109    /// 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.
3110    /// The function is under-specified if `offset` is negative or larger than the length of `s`.
3111    pub fn Z3_mk_seq_index(c: Z3_context, s: Z3_ast, substr: Z3_ast, offset: Z3_ast) -> Z3_ast;
3112
3113    /// Convert string to integer.
3114    pub fn Z3_mk_str_to_int(c: Z3_context, s: Z3_ast) -> Z3_ast;
3115
3116    /// Integer to string conversion.
3117    pub fn Z3_mk_int_to_str(c: Z3_context, s: Z3_ast) -> Z3_ast;
3118
3119    /// Create a regular expression that accepts the sequence `seq`.
3120    pub fn Z3_mk_seq_to_re(c: Z3_context, seq: Z3_ast) -> Z3_ast;
3121
3122    /// Check if `seq` is in the language generated by the regular expression `re`.
3123    pub fn Z3_mk_seq_in_re(c: Z3_context, seq: Z3_ast, re: Z3_ast) -> Z3_ast;
3124
3125    /// Create the regular language `re+`.
3126    pub fn Z3_mk_re_plus(c: Z3_context, re: Z3_ast) -> Z3_ast;
3127
3128    /// Create the regular language `re*`.
3129    pub fn Z3_mk_re_star(c: Z3_context, re: Z3_ast) -> Z3_ast;
3130
3131    /// Create the regular language `re?`.
3132    pub fn Z3_mk_re_option(c: Z3_context, re: Z3_ast) -> Z3_ast;
3133
3134    /// Create the union of the regular languages.
3135    ///
3136    /// # Preconditions:
3137    ///
3138    /// - `n > 0`
3139    pub fn Z3_mk_re_union(c: Z3_context, n: ::std::os::raw::c_uint, args: *const Z3_ast) -> Z3_ast;
3140
3141    /// Create the concatenation of the regular languages.
3142    ///
3143    /// # Preconditions:
3144    ///
3145    /// - `n > 0`
3146    pub fn Z3_mk_re_concat(c: Z3_context, n: ::std::os::raw::c_uint, args: *const Z3_ast)
3147        -> Z3_ast;
3148
3149    /// Create the range regular expression over two sequences of length 1.
3150    pub fn Z3_mk_re_range(c: Z3_context, lo: Z3_ast, hi: Z3_ast) -> Z3_ast;
3151
3152    /// Create a regular expression that accepts all singleton sequences of the regular expression sort.
3153    ///
3154    /// Requires Z3 4.8.13 or later.
3155    pub fn Z3_mk_re_allchar(c: Z3_context, regex_sort: Z3_sort) -> Z3_ast;
3156
3157    /// Create a regular expression loop. The supplied regular expression `r` is repeated
3158    /// between `lo` and `hi` times. The `lo` should be below `hi` with one execution: when
3159    /// supplying the value `hi` as 0, the meaning is to repeat the argument `r` at least
3160    /// `lo` number of times, and with an unbounded upper bound.
3161    pub fn Z3_mk_re_loop(
3162        c: Z3_context,
3163        r: Z3_ast,
3164        lo: ::std::os::raw::c_uint,
3165        hi: ::std::os::raw::c_uint,
3166    ) -> Z3_ast;
3167
3168    /// Create a power regular expression.
3169    ///
3170    /// Requires Z3 4.8.15 or later.
3171    pub fn Z3_mk_re_power(c: Z3_context, re: Z3_ast, n: ::std::os::raw::c_uint) -> Z3_ast;
3172
3173    /// Create the intersection of the regular languages.
3174    ///
3175    /// # Preconditions:
3176    ///
3177    /// - `n > 0`
3178    pub fn Z3_mk_re_intersect(
3179        c: Z3_context,
3180        n: ::std::os::raw::c_uint,
3181        args: *const Z3_ast,
3182    ) -> Z3_ast;
3183
3184    /// Create the complement of the regular language `re`.
3185    pub fn Z3_mk_re_complement(c: Z3_context, re: Z3_ast) -> Z3_ast;
3186
3187    /// Create the difference of regular expressions.
3188    ///
3189    /// Requires Z3 4.8.14 or later.
3190    pub fn Z3_mk_re_diff(c: Z3_context, re1: Z3_ast, re2: Z3_ast) -> Z3_ast;
3191
3192    /// Create an empty regular expression of sort `re`.
3193    ///
3194    /// # Preconditions:
3195    ///
3196    /// - `re` is a regular expression sort.
3197    pub fn Z3_mk_re_empty(c: Z3_context, re: Z3_sort) -> Z3_ast;
3198
3199    /// Create an universal regular expression of sort `re`.
3200    ///
3201    /// # Preconditions:
3202    ///
3203    /// - `re` is a regular expression sort.
3204    pub fn Z3_mk_re_full(c: Z3_context, re: Z3_sort) -> Z3_ast;
3205
3206    /// Create a pattern for quantifier instantiation.
3207    ///
3208    /// Z3 uses pattern matching to instantiate quantifiers. If a
3209    /// pattern is not provided for a quantifier, then Z3 will
3210    /// automatically compute a set of patterns for it. However, for
3211    /// optimal performance, the user should provide the patterns.
3212    ///
3213    /// Patterns comprise a list of terms. The list should be
3214    /// non-empty.  If the list comprises of more than one term, it is
3215    /// a called a multi-pattern.
3216    ///
3217    /// In general, one can pass in a list of (multi-)patterns in the
3218    /// quantifier constructor.
3219    ///
3220    /// # See also:
3221    ///
3222    /// - [`Z3_mk_forall`]
3223    /// - [`Z3_mk_exists`]
3224    pub fn Z3_mk_pattern(
3225        c: Z3_context,
3226        num_patterns: ::std::os::raw::c_uint,
3227        terms: *const Z3_ast,
3228    ) -> Z3_pattern;
3229
3230    /// Create a bound variable.
3231    ///
3232    /// Bound variables are indexed by de-Bruijn indices. It is perhaps easiest to explain
3233    /// the meaning of de-Bruijn indices by indicating the compilation process from
3234    /// non-de-Bruijn formulas to de-Bruijn format.
3235    ///
3236    /// ```text
3237    /// abs(forall (x1) phi) = forall (x1) abs1(phi, x1, 0)
3238    /// abs(forall (x1, x2) phi) = abs(forall (x1) abs(forall (x2) phi))
3239    /// abs1(x, x, n) = b_n
3240    /// abs1(y, x, n) = y
3241    /// abs1(f(t1,...,tn), x, n) = f(abs1(t1,x,n), ..., abs1(tn,x,n))
3242    /// abs1(forall (x1) phi, x, n) = forall (x1) (abs1(phi, x, n+1))
3243    /// ```
3244    ///
3245    /// The last line is significant: the index of a bound variable is different depending
3246    /// on the scope in which it appears. The deeper x appears, the higher is its
3247    /// index.
3248    ///
3249    /// - `c`: logical context
3250    /// - `index`: de-Bruijn index
3251    /// - `ty`: sort of the bound variable
3252    ///
3253    /// # See also:
3254    ///
3255    /// - [`Z3_mk_forall`]
3256    /// - [`Z3_mk_exists`]
3257    pub fn Z3_mk_bound(c: Z3_context, index: ::std::os::raw::c_uint, ty: Z3_sort) -> Z3_ast;
3258
3259    /// Create a forall formula. It takes an expression `body` that contains bound variables
3260    /// of the same sorts as the sorts listed in the array `sorts`. The bound variables are de-Bruijn indices created
3261    /// using [`Z3_mk_bound`]. The array `decl_names` contains the names that the quantified formula uses for the
3262    /// bound variables. Z3 applies the convention that the last element in the `decl_names` and `sorts` array
3263    /// refers to the variable with index 0, the second to last element of `decl_names` and `sorts` refers
3264    /// to the variable with index 1, etc.
3265    ///
3266    /// - `c`: logical context.
3267    /// - `weight`: quantifiers are associated with weights indicating the importance of using the quantifier during instantiation. By default, pass the weight 0.
3268    /// - `num_patterns`: number of patterns.
3269    /// - `patterns`: array containing the patterns created using [`Z3_mk_pattern`].
3270    /// - `num_decls`: number of variables to be bound.
3271    /// - `sorts`: the sorts of the bound variables.
3272    /// - `decl_names`: names of the bound variables
3273    /// - `body`: the body of the quantifier.
3274    ///
3275    /// # See also:
3276    ///
3277    /// - [`Z3_mk_pattern`]
3278    /// - [`Z3_mk_bound`]
3279    /// - [`Z3_mk_exists`]
3280    pub fn Z3_mk_forall(
3281        c: Z3_context,
3282        weight: ::std::os::raw::c_uint,
3283        num_patterns: ::std::os::raw::c_uint,
3284        patterns: *const Z3_pattern,
3285        num_decls: ::std::os::raw::c_uint,
3286        sorts: *const Z3_sort,
3287        decl_names: *const Z3_symbol,
3288        body: Z3_ast,
3289    ) -> Z3_ast;
3290
3291    /// Create an exists formula. Similar to [`Z3_mk_forall`].
3292    ///
3293    /// # See also:
3294    ///
3295    /// - [`Z3_mk_pattern`]
3296    /// - [`Z3_mk_bound`]
3297    /// - [`Z3_mk_forall`]
3298    /// - [`Z3_mk_quantifier`]
3299    pub fn Z3_mk_exists(
3300        c: Z3_context,
3301        weight: ::std::os::raw::c_uint,
3302        num_patterns: ::std::os::raw::c_uint,
3303        patterns: *const Z3_pattern,
3304        num_decls: ::std::os::raw::c_uint,
3305        sorts: *const Z3_sort,
3306        decl_names: *const Z3_symbol,
3307        body: Z3_ast,
3308    ) -> Z3_ast;
3309
3310    /// Create a quantifier - universal or existential, with pattern hints.
3311    /// See the documentation for [`Z3_mk_forall`] for an explanation of the parameters.
3312    ///
3313    /// - `c`: logical context.
3314    /// - `is_forall`: flag to indicate if this is a universal or existential quantifier.
3315    /// - `weight`: quantifiers are associated with weights indicating the importance of using the quantifier during instantiation. By default, pass the weight 0.
3316    /// - `num_patterns`: number of patterns.
3317    /// - `patterns`: array containing the patterns created using [`Z3_mk_pattern`]
3318    /// - `num_decls`: number of variables to be bound.
3319    /// - `sorts`: array of sorts of the bound variables.
3320    /// - `decl_names`: names of the bound variables.
3321    /// - `body`: the body of the quantifier.
3322    ///
3323    /// # See also:
3324    ///
3325    /// - [`Z3_mk_pattern`]
3326    /// - [`Z3_mk_bound`]
3327    /// - [`Z3_mk_forall`]
3328    /// - [`Z3_mk_exists`]
3329    pub fn Z3_mk_quantifier(
3330        c: Z3_context,
3331        is_forall: bool,
3332        weight: ::std::os::raw::c_uint,
3333        num_patterns: ::std::os::raw::c_uint,
3334        patterns: *const Z3_pattern,
3335        num_decls: ::std::os::raw::c_uint,
3336        sorts: *const Z3_sort,
3337        decl_names: *const Z3_symbol,
3338        body: Z3_ast,
3339    ) -> Z3_ast;
3340
3341    /// Create a quantifier - universal or existential, with pattern hints, no patterns, and attributes
3342    ///
3343    /// - `c`: logical context.
3344    /// - `is_forall`: flag to indicate if this is a universal or existential quantifier.
3345    /// - `quantifier_id`: identifier to identify quantifier
3346    /// - `skolem_id`: identifier to identify skolem constants introduced by quantifier.
3347    /// - `weight`: quantifiers are associated with weights indicating the importance of using the quantifier during instantiation. By default, pass the weight 0.
3348    /// - `num_patterns`: number of patterns.
3349    /// - `patterns`: array containing the patterns created using [`Z3_mk_pattern`].
3350    /// - `num_no_patterns`: number of `no_patterns`.
3351    /// - `no_patterns`: array containing subexpressions to be excluded from inferred patterns.
3352    /// - `num_decls`: number of variables to be bound.
3353    /// - `sorts`: array of sorts of the bound variables.
3354    /// - `decl_names`: names of the bound variables.
3355    /// - `body`: the body of the quantifier.
3356    ///
3357    /// # See also:
3358    ///
3359    /// - [`Z3_mk_pattern`]
3360    /// - [`Z3_mk_bound`]
3361    /// - [`Z3_mk_forall`]
3362    /// - [`Z3_mk_exists`]
3363    pub fn Z3_mk_quantifier_ex(
3364        c: Z3_context,
3365        is_forall: bool,
3366        weight: ::std::os::raw::c_uint,
3367        quantifier_id: Z3_symbol,
3368        skolem_id: Z3_symbol,
3369        num_patterns: ::std::os::raw::c_uint,
3370        patterns: *const Z3_pattern,
3371        num_no_patterns: ::std::os::raw::c_uint,
3372        no_patterns: *const Z3_ast,
3373        num_decls: ::std::os::raw::c_uint,
3374        sorts: *const Z3_sort,
3375        decl_names: *const Z3_symbol,
3376        body: Z3_ast,
3377    ) -> Z3_ast;
3378
3379    /// Create a universal quantifier using a list of constants that
3380    /// will form the set of bound variables.
3381    ///
3382    /// - `c`: logical context.
3383    /// - `weight`: quantifiers are associated with weights indicating the importance of using
3384    ///   the quantifier during instantiation. By default, pass the weight 0.
3385    /// - `num_bound`: number of constants to be abstracted into bound variables.
3386    /// - `bound`: array of constants to be abstracted into bound variables.
3387    /// - `num_patterns`: number of patterns.
3388    /// - `patterns`: array containing the patterns created using [`Z3_mk_pattern`]
3389    /// - `body`: the body of the quantifier.
3390    ///
3391    /// # See also:
3392    ///
3393    /// - [`Z3_mk_pattern`]
3394    /// - [`Z3_mk_exists_const`]
3395    pub fn Z3_mk_forall_const(
3396        c: Z3_context,
3397        weight: ::std::os::raw::c_uint,
3398        num_bound: ::std::os::raw::c_uint,
3399        bound: *const Z3_app,
3400        num_patterns: ::std::os::raw::c_uint,
3401        patterns: *const Z3_pattern,
3402        body: Z3_ast,
3403    ) -> Z3_ast;
3404
3405    /// Similar to [`Z3_mk_forall_const`].
3406    ///
3407    /// Create an existential quantifier using a list of constants that
3408    /// will form the set of bound variables.
3409    ///
3410    /// - `c`: logical context.
3411    /// - `weight`: quantifiers are associated with weights indicating the importance of using
3412    ///   the quantifier during instantiation. By default, pass the weight 0.
3413    /// - `num_bound`: number of constants to be abstracted into bound variables.
3414    /// - `bound`: array of constants to be abstracted into bound variables.
3415    /// - `num_patterns`: number of patterns.
3416    /// - `patterns`: array containing the patterns created using [`Z3_mk_pattern`].
3417    /// - `body`: the body of the quantifier.
3418    ///
3419    /// # See also:
3420    ///
3421    /// - [`Z3_mk_pattern`]
3422    /// - [`Z3_mk_forall_const`]
3423    pub fn Z3_mk_exists_const(
3424        c: Z3_context,
3425        weight: ::std::os::raw::c_uint,
3426        num_bound: ::std::os::raw::c_uint,
3427        bound: *const Z3_app,
3428        num_patterns: ::std::os::raw::c_uint,
3429        patterns: *const Z3_pattern,
3430        body: Z3_ast,
3431    ) -> Z3_ast;
3432
3433    /// Create a universal or existential quantifier using a list of
3434    /// constants that will form the set of bound variables.
3435    pub fn Z3_mk_quantifier_const(
3436        c: Z3_context,
3437        is_forall: bool,
3438        weight: ::std::os::raw::c_uint,
3439        num_bound: ::std::os::raw::c_uint,
3440        bound: *const Z3_app,
3441        num_patterns: ::std::os::raw::c_uint,
3442        patterns: *const Z3_pattern,
3443        body: Z3_ast,
3444    ) -> Z3_ast;
3445
3446    /// Create a universal or existential quantifier using a list of
3447    /// constants that will form the set of bound variables.
3448    pub fn Z3_mk_quantifier_const_ex(
3449        c: Z3_context,
3450        is_forall: bool,
3451        weight: ::std::os::raw::c_uint,
3452        quantifier_id: Z3_symbol,
3453        skolem_id: Z3_symbol,
3454        num_bound: ::std::os::raw::c_uint,
3455        bound: *const Z3_app,
3456        num_patterns: ::std::os::raw::c_uint,
3457        patterns: *const Z3_pattern,
3458        num_no_patterns: ::std::os::raw::c_uint,
3459        no_patterns: *const Z3_ast,
3460        body: Z3_ast,
3461    ) -> Z3_ast;
3462
3463    /// Create a lambda expression.
3464    ///
3465    /// It takes an expression `body` that contains bound variables of
3466    /// the same sorts as the sorts listed in the array `sorts`. The
3467    /// bound variables are de-Bruijn indices created using [`Z3_mk_bound`].
3468    /// The array `decl_names` contains the names that the quantified
3469    /// formula uses for the bound variables. Z3 applies the convention
3470    /// that the last element in the `decl_names` and `sorts` array
3471    /// refers to the variable with index `0`, the second to last element
3472    /// of `decl_names` and `sorts` refers to the variable with index `1`, etc.
3473    ///
3474    /// The sort of the resulting expression is `(Array sorts range)` where
3475    /// `range` is the sort of `body`. For example, if the lambda binds two
3476    /// variables of sort `Int` and `Bool`, and the `body` has sort `Real`,
3477    /// the sort of the expression is `(Array Int Bool Real)`.
3478    ///
3479    /// - `c`: logical context
3480    /// - `num_decls`: number of variables to be bound.
3481    /// - `sorts`: the sorts of the bound variables.
3482    /// - `decl_names`: names of the bound variables
3483    /// - `body`: the body of the lambda expression.
3484    ///
3485    /// # See also:
3486    ///
3487    /// - [`Z3_mk_bound`]
3488    /// - [`Z3_mk_forall`]
3489    /// - [`Z3_mk_lambda_const`]
3490    pub fn Z3_mk_lambda(
3491        c: Z3_context,
3492        num_decls: ::std::os::raw::c_uint,
3493        sorts: *const Z3_sort,
3494        decl_names: *const Z3_symbol,
3495        body: Z3_ast,
3496    ) -> Z3_ast;
3497
3498    /// Create a lambda expression using a list of constants that form the set
3499    /// of bound variables
3500    ///
3501    /// - `c`: logical context.
3502    /// - `num_bound`: number of constants to be abstracted into bound variables.
3503    /// - `bound`: array of constants to be abstracted into bound variables.
3504    /// - `body`: the body of the lambda expression.
3505    ///
3506    /// # See also:
3507    ///
3508    /// - [`Z3_mk_bound`]
3509    /// - [`Z3_mk_forall`]
3510    /// - [`Z3_mk_lambda`]
3511    pub fn Z3_mk_lambda_const(
3512        c: Z3_context,
3513        num_bound: ::std::os::raw::c_uint,
3514        bound: *const Z3_app,
3515        body: Z3_ast,
3516    ) -> Z3_ast;
3517
3518    /// Return `SymbolKind::Int` if the symbol was constructed
3519    /// using [`Z3_mk_int_symbol`],
3520    /// and `SymbolKind::String` if the symbol
3521    /// was constructed using [`Z3_mk_string_symbol`].
3522    pub fn Z3_get_symbol_kind(c: Z3_context, s: Z3_symbol) -> SymbolKind;
3523
3524    /// Return the symbol int value.
3525    ///
3526    /// # Preconditions:
3527    ///
3528    /// - `Z3_get_symbol_kind(s) == SymbolKind::Int`
3529    ///
3530    /// # See also:
3531    ///
3532    /// - [`Z3_mk_int_symbol`]
3533    pub fn Z3_get_symbol_int(c: Z3_context, s: Z3_symbol) -> ::std::os::raw::c_int;
3534
3535    /// Return the symbol name.
3536    ///
3537    /// Warning: The returned buffer is statically allocated by Z3. It will
3538    /// be automatically deallocated when [`Z3_del_context`] is invoked.
3539    /// So, the buffer is invalidated in the next call to `Z3_get_symbol_string`.
3540    ///
3541    /// # Preconditions:
3542    ///
3543    /// - `Z3_get_symbol_kind(s) == SymbolKind::String`
3544    ///
3545    /// # See also:
3546    ///
3547    /// - [`Z3_mk_string_symbol`]
3548    pub fn Z3_get_symbol_string(c: Z3_context, s: Z3_symbol) -> Z3_string;
3549
3550    /// Return the sort name as a symbol.
3551    pub fn Z3_get_sort_name(c: Z3_context, d: Z3_sort) -> Z3_symbol;
3552
3553    /// Return a unique identifier for `s`.
3554    pub fn Z3_get_sort_id(c: Z3_context, s: Z3_sort) -> ::std::os::raw::c_uint;
3555
3556    /// Convert a [`Z3_sort`] into [`Z3_ast`]. This is just type casting.
3557    ///
3558    /// # See also:
3559    ///
3560    /// - [`Z3_app_to_ast`]
3561    /// - [`Z3_func_decl_to_ast`]
3562    /// - [`Z3_pattern_to_ast`]
3563    pub fn Z3_sort_to_ast(c: Z3_context, s: Z3_sort) -> Z3_ast;
3564
3565    /// compare sorts.
3566    pub fn Z3_is_eq_sort(c: Z3_context, s1: Z3_sort, s2: Z3_sort) -> bool;
3567
3568    /// Return the sort kind (e.g., array, tuple, int, bool, etc).
3569    ///
3570    /// # See also:
3571    ///
3572    /// - [`SortKind`]
3573    pub fn Z3_get_sort_kind(c: Z3_context, t: Z3_sort) -> SortKind;
3574
3575    /// Return the size of the given bit-vector sort.
3576    ///
3577    /// # Preconditions:
3578    ///
3579    /// - `Z3_get_sort_kind(c, t) == SortKind::BV`
3580    ///
3581    /// # See also:
3582    ///
3583    /// - [`Z3_mk_bv_sort`]
3584    /// - [`Z3_get_sort_kind`]
3585    pub fn Z3_get_bv_sort_size(c: Z3_context, t: Z3_sort) -> ::std::os::raw::c_uint;
3586
3587    /// Store the size of the sort in `r`. Return `false` if the call failed.
3588    /// That is, `Z3_get_sort_kind(s) == SortKind::FiniteDomain`
3589    pub fn Z3_get_finite_domain_sort_size(c: Z3_context, s: Z3_sort, r: *mut u64) -> bool;
3590
3591    /// Return the domain of the given array sort.
3592    ///
3593    /// In the case of a multi-dimensional array, this function
3594    /// returns the sort of the first dimension.
3595    ///
3596    /// # Preconditions:
3597    ///
3598    /// - `Z3_get_sort_kind(c, t) == SortKind::Array`
3599    ///
3600    /// # See also:
3601    ///
3602    /// - [`Z3_mk_array_sort`]
3603    /// - [`Z3_get_sort_kind`]
3604    pub fn Z3_get_array_sort_domain(c: Z3_context, t: Z3_sort) -> Z3_sort;
3605
3606    /// Return the range of the given array sort.
3607    ///
3608    /// # Preconditions:
3609    ///
3610    /// - `Z3_get_sort_kind(c, t) == SortKind::Array`
3611    ///
3612    /// # See also:
3613    ///
3614    /// - [`Z3_mk_array_sort`]
3615    /// - [`Z3_get_sort_kind`]
3616    pub fn Z3_get_array_sort_range(c: Z3_context, t: Z3_sort) -> Z3_sort;
3617
3618    /// Return the constructor declaration of the given tuple
3619    /// sort.
3620    ///
3621    /// # Preconditions:
3622    ///
3623    /// - `Z3_get_sort_kind(c, t) == SortKind::Datatype`
3624    ///
3625    /// # See also:
3626    ///
3627    /// - [`Z3_mk_tuple_sort`]
3628    /// - [`Z3_get_sort_kind`]
3629    pub fn Z3_get_tuple_sort_mk_decl(c: Z3_context, t: Z3_sort) -> Z3_func_decl;
3630
3631    /// Return the number of fields of the given tuple sort.
3632    ///
3633    /// # Preconditions:
3634    ///
3635    /// - `Z3_get_sort_kind(c, t) == SortKind::Datatype`
3636    ///
3637    /// # See also:
3638    ///
3639    /// - [`Z3_mk_tuple_sort`]
3640    /// - [`Z3_get_sort_kind`]
3641    pub fn Z3_get_tuple_sort_num_fields(c: Z3_context, t: Z3_sort) -> ::std::os::raw::c_uint;
3642
3643    /// Return the i-th field declaration (i.e., projection function declaration)
3644    /// of the given tuple sort.
3645    ///
3646    /// # Preconditions:
3647    ///
3648    /// - `Z3_get_sort_kind(t) == SortKind::Datatype`
3649    /// - `i < Z3_get_tuple_sort_num_fields(c, t)`
3650    ///
3651    /// # See also:
3652    ///
3653    /// - [`Z3_mk_tuple_sort`]
3654    /// - [`Z3_get_sort_kind`]
3655    pub fn Z3_get_tuple_sort_field_decl(
3656        c: Z3_context,
3657        t: Z3_sort,
3658        i: ::std::os::raw::c_uint,
3659    ) -> Z3_func_decl;
3660
3661    /// Return number of constructors for datatype.
3662    ///
3663    /// # Preconditions:
3664    ///
3665    /// - `Z3_get_sort_kind(t) == SortKind::Datatype`
3666    ///
3667    /// # See also:
3668    ///
3669    /// - [`Z3_get_datatype_sort_constructor`]
3670    /// - [`Z3_get_datatype_sort_recognizer`]
3671    /// - [`Z3_get_datatype_sort_constructor_accessor`]
3672    pub fn Z3_get_datatype_sort_num_constructors(
3673        c: Z3_context,
3674        t: Z3_sort,
3675    ) -> ::std::os::raw::c_uint;
3676
3677    /// Return idx'th constructor.
3678    ///
3679    /// # Preconditions:
3680    ///
3681    /// - `Z3_get_sort_kind(t) == SortKind::Datatype`
3682    /// - `idx < Z3_get_datatype_sort_num_constructors(c, t)`
3683    ///
3684    /// # See also:
3685    ///
3686    /// - [`Z3_get_datatype_sort_num_constructors`]
3687    /// - [`Z3_get_datatype_sort_recognizer`]
3688    /// - [`Z3_get_datatype_sort_constructor_accessor`]
3689    pub fn Z3_get_datatype_sort_constructor(
3690        c: Z3_context,
3691        t: Z3_sort,
3692        idx: ::std::os::raw::c_uint,
3693    ) -> Z3_func_decl;
3694
3695    /// Return idx'th recognizer.
3696    ///
3697    /// # Preconditions:
3698    ///
3699    /// - `Z3_get_sort_kind(t) == SortKind::Datatype`
3700    /// - `idx < Z3_get_datatype_sort_num_constructors(c, t)`
3701    ///
3702    /// # See also:
3703    ///
3704    /// - [`Z3_get_datatype_sort_num_constructors`]
3705    /// - [`Z3_get_datatype_sort_constructor`]
3706    /// - [`Z3_get_datatype_sort_constructor_accessor`]
3707    pub fn Z3_get_datatype_sort_recognizer(
3708        c: Z3_context,
3709        t: Z3_sort,
3710        idx: ::std::os::raw::c_uint,
3711    ) -> Z3_func_decl;
3712
3713    /// Return `idx_a`'th accessor for the `idx_c`'th constructor.
3714    ///
3715    /// # Preconditions:
3716    ///
3717    /// - `Z3_get_sort_kind(t) == SortKind::Datatype`
3718    /// - `idx_c < Z3_get_datatype_sort_num_constructors(c, t)`
3719    /// - `idx_a < Z3_get_domain_size(c, Z3_get_datatype_sort_constructor(c, idx_c))`
3720    ///
3721    /// # See also:
3722    ///
3723    /// - [`Z3_get_datatype_sort_num_constructors`]
3724    /// - [`Z3_get_datatype_sort_constructor`]
3725    /// - [`Z3_get_datatype_sort_recognizer`]
3726    pub fn Z3_get_datatype_sort_constructor_accessor(
3727        c: Z3_context,
3728        t: Z3_sort,
3729        idx_c: ::std::os::raw::c_uint,
3730        idx_a: ::std::os::raw::c_uint,
3731    ) -> Z3_func_decl;
3732
3733    /// Update record field with a value.
3734    ///
3735    /// This corresponds to the 'with' construct in OCaml.
3736    /// It has the effect of updating a record field with a given value.
3737    /// The remaining fields are left unchanged. It is the record
3738    /// equivalent of an array store (see [`Z3_mk_store`]).
3739    /// If the datatype has more than one constructor, then the update function
3740    /// behaves as identity if there is a miss-match between the accessor and
3741    /// constructor. For example ((_ update-field car) nil 1) is nil,
3742    /// while `((_ update-field car)` (cons 2 nil) 1) is (cons 1 nil).
3743    ///
3744    ///
3745    /// # Preconditions:
3746    ///
3747    /// - `Z3_get_sort_kind(Z3_get_sort(c, t)) == Z3_get_domain(c, field_access, 1) == SortKind::Datatype`
3748    /// - `Z3_get_sort(c, value) == Z3_get_range(c, field_access)`
3749    pub fn Z3_datatype_update_field(
3750        c: Z3_context,
3751        field_access: Z3_func_decl,
3752        t: Z3_ast,
3753        value: Z3_ast,
3754    ) -> Z3_ast;
3755
3756    /// Return arity of relation.
3757    ///
3758    /// # Preconditions:
3759    ///
3760    /// - `Z3_get_sort_kind(s) == SortKind::Relation`
3761    ///
3762    /// # See also:
3763    ///
3764    /// - [`Z3_get_relation_column`]
3765    pub fn Z3_get_relation_arity(c: Z3_context, s: Z3_sort) -> ::std::os::raw::c_uint;
3766
3767    /// Return sort at i'th column of relation sort.
3768    ///
3769    /// # Preconditions:
3770    ///
3771    /// - `Z3_get_sort_kind(c, s) == SortKind::Relation`
3772    /// - `col < Z3_get_relation_arity(c, s)`
3773    ///
3774    /// # See also:
3775    ///
3776    /// - [`Z3_get_relation_arity`]
3777    pub fn Z3_get_relation_column(
3778        c: Z3_context,
3779        s: Z3_sort,
3780        col: ::std::os::raw::c_uint,
3781    ) -> Z3_sort;
3782
3783    /// Pseudo-Boolean relations.
3784    ///
3785    /// Encode `p1 + p2 + ... + pn <= k`
3786    pub fn Z3_mk_atmost(
3787        c: Z3_context,
3788        num_args: ::std::os::raw::c_uint,
3789        args: *const Z3_ast,
3790        k: ::std::os::raw::c_uint,
3791    ) -> Z3_ast;
3792
3793    /// Pseudo-Boolean relations.
3794    ///
3795    /// Encode `p1 + p2 + ... + pn >= k`
3796    pub fn Z3_mk_atleast(
3797        c: Z3_context,
3798        num_args: ::std::os::raw::c_uint,
3799        args: *const Z3_ast,
3800        k: ::std::os::raw::c_uint,
3801    ) -> Z3_ast;
3802
3803    /// Pseudo-Boolean relations.
3804    ///
3805    /// Encode `k1*p1 + k2*p2 + ... + kn*pn <= k`
3806    pub fn Z3_mk_pble(
3807        c: Z3_context,
3808        num_args: ::std::os::raw::c_uint,
3809        args: *const Z3_ast,
3810        coeffs: *const ::std::os::raw::c_int,
3811        k: ::std::os::raw::c_int,
3812    ) -> Z3_ast;
3813
3814    /// Pseudo-Boolean relations.
3815    ///
3816    /// Encode `k1*p1 + k2*p2 + ... + kn*pn >= k`
3817    pub fn Z3_mk_pbge(
3818        c: Z3_context,
3819        num_args: ::std::os::raw::c_uint,
3820        args: *const Z3_ast,
3821        coeffs: *const ::std::os::raw::c_int,
3822        k: ::std::os::raw::c_int,
3823    ) -> Z3_ast;
3824
3825    /// Pseudo-Boolean relations.
3826    ///
3827    /// Encode `k1*p1 + k2*p2 + ... + kn*pn = k`
3828    pub fn Z3_mk_pbeq(
3829        c: Z3_context,
3830        num_args: ::std::os::raw::c_uint,
3831        args: *const Z3_ast,
3832        coeffs: *const ::std::os::raw::c_int,
3833        k: ::std::os::raw::c_int,
3834    ) -> Z3_ast;
3835
3836    /// Convert a [`Z3_func_decl`] into [`Z3_ast`]. This is just type casting.
3837    ///
3838    /// # See also:
3839    ///
3840    /// - [`Z3_app_to_ast`]
3841    /// - [`Z3_pattern_to_ast`]
3842    /// - [`Z3_sort_to_ast`]
3843    /// - [`Z3_to_func_decl`]
3844    pub fn Z3_func_decl_to_ast(c: Z3_context, f: Z3_func_decl) -> Z3_ast;
3845
3846    /// Compare terms.
3847    pub fn Z3_is_eq_func_decl(c: Z3_context, f1: Z3_func_decl, f2: Z3_func_decl) -> bool;
3848
3849    /// Return a unique identifier for `f`.
3850    pub fn Z3_get_func_decl_id(c: Z3_context, f: Z3_func_decl) -> ::std::os::raw::c_uint;
3851
3852    /// Return the constant declaration name as a symbol.
3853    pub fn Z3_get_decl_name(c: Z3_context, d: Z3_func_decl) -> Z3_symbol;
3854
3855    /// Return declaration kind corresponding to declaration.
3856    pub fn Z3_get_decl_kind(c: Z3_context, d: Z3_func_decl) -> DeclKind;
3857
3858    /// Return the number of parameters of the given declaration.
3859    ///
3860    /// # See also:
3861    ///
3862    /// - [`Z3_get_arity`]
3863    pub fn Z3_get_domain_size(c: Z3_context, d: Z3_func_decl) -> ::std::os::raw::c_uint;
3864
3865    /// Alias for `Z3_get_domain_size`.
3866    ///
3867    /// # See also:
3868    ///
3869    /// - [`Z3_get_domain_size`]
3870    pub fn Z3_get_arity(c: Z3_context, d: Z3_func_decl) -> ::std::os::raw::c_uint;
3871
3872    /// Return the sort of the i-th parameter of the given function declaration.
3873    ///
3874    /// # Preconditions:
3875    ///
3876    /// - `i < Z3_get_domain_size(d)`
3877    ///
3878    /// # See also:
3879    ///
3880    /// - [`Z3_get_domain_size`]
3881    pub fn Z3_get_domain(c: Z3_context, d: Z3_func_decl, i: ::std::os::raw::c_uint) -> Z3_sort;
3882
3883    /// Return the range of the given declaration.
3884    ///
3885    /// If `d` is a constant (i.e., has zero arguments), then this
3886    /// function returns the sort of the constant.
3887    pub fn Z3_get_range(c: Z3_context, d: Z3_func_decl) -> Z3_sort;
3888
3889    /// Return the number of parameters associated with a declaration.
3890    pub fn Z3_get_decl_num_parameters(c: Z3_context, d: Z3_func_decl) -> ::std::os::raw::c_uint;
3891
3892    /// Return the parameter type associated with a declaration.
3893    ///
3894    /// - `c`: the context
3895    /// - `d`: the function declaration
3896    /// - `idx`: is the index of the named parameter it should be between 0 and
3897    ///   the number of parameters.
3898    pub fn Z3_get_decl_parameter_kind(
3899        c: Z3_context,
3900        d: Z3_func_decl,
3901        idx: ::std::os::raw::c_uint,
3902    ) -> ParameterKind;
3903
3904    /// Return the integer value associated with an integer parameter.
3905    ///
3906    /// # Preconditions:
3907    ///
3908    /// - `Z3_get_decl_parameter_kind(c, d, idx) == ParameterKind::Int`
3909    pub fn Z3_get_decl_int_parameter(
3910        c: Z3_context,
3911        d: Z3_func_decl,
3912        idx: ::std::os::raw::c_uint,
3913    ) -> ::std::os::raw::c_int;
3914
3915    /// Return the double value associated with an double parameter.
3916    ///
3917    /// # Preconditions:
3918    ///
3919    /// - `Z3_get_decl_parameter_kind(c, d, idx) == ParameterKind::Double`
3920    pub fn Z3_get_decl_double_parameter(
3921        c: Z3_context,
3922        d: Z3_func_decl,
3923        idx: ::std::os::raw::c_uint,
3924    ) -> f64;
3925
3926    /// Return the double value associated with an double parameter.
3927    ///
3928    /// # Preconditions:
3929    ///
3930    /// - `Z3_get_decl_parameter_kind(c, d, idx) == ParameterKind::Symbol`
3931    pub fn Z3_get_decl_symbol_parameter(
3932        c: Z3_context,
3933        d: Z3_func_decl,
3934        idx: ::std::os::raw::c_uint,
3935    ) -> Z3_symbol;
3936
3937    /// Return the sort value associated with a sort parameter.
3938    ///
3939    /// # Preconditions:
3940    ///
3941    /// - `Z3_get_decl_parameter_kind(c, d, idx) == ParameterKind::Sort`
3942    pub fn Z3_get_decl_sort_parameter(
3943        c: Z3_context,
3944        d: Z3_func_decl,
3945        idx: ::std::os::raw::c_uint,
3946    ) -> Z3_sort;
3947
3948    /// Return the expression value associated with an expression parameter.
3949    ///
3950    /// # Preconditions:
3951    ///
3952    /// - `Z3_get_decl_parameter_kind(c, d, idx) == ParameterKind::AST`
3953    pub fn Z3_get_decl_ast_parameter(
3954        c: Z3_context,
3955        d: Z3_func_decl,
3956        idx: ::std::os::raw::c_uint,
3957    ) -> Z3_ast;
3958
3959    /// Return the expression value associated with an expression parameter.
3960    ///
3961    /// # Preconditions:
3962    ///
3963    /// - `Z3_get_decl_parameter_kind(c, d, idx) == ParameterKind::FuncDecl`
3964    pub fn Z3_get_decl_func_decl_parameter(
3965        c: Z3_context,
3966        d: Z3_func_decl,
3967        idx: ::std::os::raw::c_uint,
3968    ) -> Z3_func_decl;
3969
3970    /// Return the rational value, as a string, associated with a rational parameter.
3971    ///
3972    /// # Preconditions:
3973    ///
3974    /// - `Z3_get_decl_parameter_kind(c, d, idx) == ParameterKind::Rational`
3975    pub fn Z3_get_decl_rational_parameter(
3976        c: Z3_context,
3977        d: Z3_func_decl,
3978        idx: ::std::os::raw::c_uint,
3979    ) -> Z3_string;
3980
3981    /// Convert a [`Z3_app`] into [`Z3_ast`]. This is just type casting.
3982    ///
3983    /// # See also:
3984    ///
3985    /// - [`Z3_to_app`]
3986    /// - [`Z3_func_decl_to_ast`]
3987    /// - [`Z3_pattern_to_ast`]
3988    /// - [`Z3_sort_to_ast`]
3989    pub fn Z3_app_to_ast(c: Z3_context, a: Z3_app) -> Z3_ast;
3990
3991    /// Return the declaration of a constant or function application.
3992    pub fn Z3_get_app_decl(c: Z3_context, a: Z3_app) -> Z3_func_decl;
3993
3994    /// Return the number of argument of an application. If `t`
3995    /// is an constant, then the number of arguments is 0.
3996    ///
3997    /// # See also:
3998    ///
3999    /// - [`Z3_get_app_arg`]
4000    pub fn Z3_get_app_num_args(c: Z3_context, a: Z3_app) -> ::std::os::raw::c_uint;
4001
4002    /// Return the i-th argument of the given application.
4003    ///
4004    /// # Preconditions:
4005    ///
4006    /// - `i < Z3_get_app_num_args(c, a)`
4007    ///
4008    /// # See also:
4009    ///
4010    /// - [`Z3_get_app_num_args`]
4011    pub fn Z3_get_app_arg(c: Z3_context, a: Z3_app, i: ::std::os::raw::c_uint) -> Z3_ast;
4012
4013    /// Compare terms.
4014    pub fn Z3_is_eq_ast(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> bool;
4015
4016    /// Return a unique identifier for `t`.
4017    ///
4018    /// The identifier is unique up to structural equality. Thus, two ast nodes
4019    /// created by the same context and having the same children and same function symbols
4020    /// have the same identifiers. Ast nodes created in the same context, but having
4021    /// different children or different functions have different identifiers.
4022    /// Variables and quantifiers are also assigned different identifiers according to
4023    /// their structure.
4024    pub fn Z3_get_ast_id(c: Z3_context, t: Z3_ast) -> ::std::os::raw::c_uint;
4025
4026    /// Return a hash code for the given AST.
4027    ///
4028    /// The hash code is structural. You can use [`Z3_get_ast_id`]
4029    /// interchangeably with this function.
4030    pub fn Z3_get_ast_hash(c: Z3_context, a: Z3_ast) -> ::std::os::raw::c_uint;
4031
4032    /// Return the sort of an AST node.
4033    ///
4034    /// The AST node must be a constant, application, numeral, bound variable, or quantifier.
4035    pub fn Z3_get_sort(c: Z3_context, a: Z3_ast) -> Z3_sort;
4036
4037    /// Return true if the given expression `t` is well sorted.
4038    pub fn Z3_is_well_sorted(c: Z3_context, t: Z3_ast) -> bool;
4039
4040    /// Return `Z3_L_TRUE` if `a` is true, `Z3_L_FALSE` if it is false,
4041    /// and `Z3_L_UNDEF` otherwise.
4042    pub fn Z3_get_bool_value(c: Z3_context, a: Z3_ast) -> Z3_lbool;
4043
4044    /// Return the kind of the given AST.
4045    pub fn Z3_get_ast_kind(c: Z3_context, a: Z3_ast) -> AstKind;
4046
4047    pub fn Z3_is_app(c: Z3_context, a: Z3_ast) -> bool;
4048
4049    pub fn Z3_is_numeral_ast(c: Z3_context, a: Z3_ast) -> bool;
4050
4051    /// Return true if the given AST is a real algebraic number.
4052    pub fn Z3_is_algebraic_number(c: Z3_context, a: Z3_ast) -> bool;
4053
4054    /// Convert an `ast` into an [`Z3_app`]. This is just type casting.
4055    ///
4056    /// # Preconditions:
4057    ///
4058    /// - `Z3_get_ast_kind(c, a) == AstKind::App`
4059    ///
4060    /// # See also:
4061    ///
4062    /// - [`Z3_app_to_ast`]
4063    /// - [`Z3_get_ast_kind`]
4064    /// - [`AstKind::App`]
4065    pub fn Z3_to_app(c: Z3_context, a: Z3_ast) -> Z3_app;
4066
4067    /// Convert an AST into a [`Z3_func_decl`]. This is just type casting.
4068    ///
4069    /// # Preconditions:
4070    ///
4071    /// - `Z3_get_ast_kind(c, a) == AstKind::FuncDecl`
4072    ///
4073    /// # See also:
4074    ///
4075    /// - [`Z3_func_decl_to_ast`]
4076    /// - [`Z3_get_ast_kind`]
4077    /// - [`AstKind::FuncDecl`]
4078    pub fn Z3_to_func_decl(c: Z3_context, a: Z3_ast) -> Z3_func_decl;
4079
4080    /// Return numeral value, as a string of a numeric constant term
4081    ///
4082    /// # Preconditions:
4083    ///
4084    /// - `Z3_get_ast_kind(c, a) == AstKind::Numeral`
4085    ///
4086    /// # See also:
4087    ///
4088    /// - [`Z3_get_ast_kind`]
4089    /// - [`AstKind::Numeral`]
4090    pub fn Z3_get_numeral_string(c: Z3_context, a: Z3_ast) -> Z3_string;
4091
4092    /// Return numeral as a string in decimal notation.
4093    /// The result has at most `precision` decimal places.
4094    ///
4095    /// # Preconditions:
4096    ///
4097    /// - `Z3_get_ast_kind(c, a) == AstKind::Numeral || Z3_is_algebraic_number(c, a)`
4098    ///
4099    /// # See also:
4100    ///
4101    /// - [`Z3_get_ast_kind`]
4102    /// - [`Z3_is_algebraic_number`]
4103    /// - [`AstKind::Numeral`]
4104    pub fn Z3_get_numeral_decimal_string(
4105        c: Z3_context,
4106        a: Z3_ast,
4107        precision: ::std::os::raw::c_uint,
4108    ) -> Z3_string;
4109
4110    /// Return numeral as a double.
4111    /// # Preconditions:
4112    ///
4113    /// - `Z3_get_ast_kind(c, a) == AstKind::Numeral || Z3_is_algebraic_number(c, a)`
4114    ///
4115    /// # See also:
4116    ///
4117    /// - [`Z3_get_ast_kind`]
4118    /// - [`AstKind::Numeral`]
4119    pub fn Z3_get_numeral_double(c: Z3_context, a: Z3_ast) -> f64;
4120
4121    /// Return the numerator (as a numeral AST) of a numeral AST of sort Real.
4122    ///
4123    /// # Preconditions:
4124    ///
4125    /// - `Z3_get_ast_kind(c, a) == AstKind::Numeral`
4126    ///
4127    /// # See also:
4128    ///
4129    /// - [`Z3_get_ast_kind`]
4130    /// - [`AstKind::Numeral`]
4131    pub fn Z3_get_numerator(c: Z3_context, a: Z3_ast) -> Z3_ast;
4132
4133    /// Return the denominator (as a numeral AST) of a numeral AST of sort Real.
4134    ///
4135    /// # Preconditions:
4136    ///
4137    /// - `Z3_get_ast_kind(c, a) == AstKind::Numeral`
4138    ///
4139    /// # See also:
4140    ///
4141    /// - [`Z3_get_ast_kind`]
4142    /// - [`AstKind::Numeral`]
4143    pub fn Z3_get_denominator(c: Z3_context, a: Z3_ast) -> Z3_ast;
4144
4145    /// Return numeral value, as a pair of 64 bit numbers if the representation fits.
4146    ///
4147    /// - `c`: logical context.
4148    /// - `a`: term.
4149    /// - `num`: numerator.
4150    /// - `den`: denominator.
4151    ///
4152    /// Return `true` if the numeral value fits in 64 bit numerals, `false` otherwise.
4153    ///
4154    /// # Preconditions:
4155    ///
4156    /// - `Z3_get_ast_kind(a) == AstKind::Numeral`
4157    ///
4158    /// # See also:
4159    ///
4160    /// - [`Z3_get_ast_kind`]
4161    /// - [`AstKind::Numeral`]
4162    pub fn Z3_get_numeral_small(c: Z3_context, a: Z3_ast, num: *mut i64, den: *mut i64) -> bool;
4163
4164    /// Similar to [`Z3_get_numeral_string`], but only succeeds if
4165    /// the value can fit in a machine int. Return `true` if the call succeeded.
4166    ///
4167    /// # Preconditions:
4168    ///
4169    /// - `Z3_get_ast_kind(c, v) == AstKind::Numeral`
4170    ///
4171    /// # See also:
4172    ///
4173    /// - [`Z3_get_numeral_string`]
4174    /// - [`Z3_get_ast_kind`]
4175    /// - [`AstKind::Numeral`]
4176    pub fn Z3_get_numeral_int(c: Z3_context, v: Z3_ast, i: *mut ::std::os::raw::c_int) -> bool;
4177
4178    /// Similar to [`Z3_get_numeral_string`], but only succeeds if
4179    /// the value can fit in a machine unsigned int.
4180    /// Return `true` if the call succeeded.
4181    ///
4182    /// # Preconditions:
4183    ///
4184    /// - `Z3_get_ast_kind(c, v) == AstKind::Numeral`
4185    ///
4186    /// # See also:
4187    ///
4188    /// - [`Z3_get_numeral_string`]
4189    /// - [`Z3_get_ast_kind`]
4190    /// - [`AstKind::Numeral`]
4191    pub fn Z3_get_numeral_uint(c: Z3_context, v: Z3_ast, u: *mut ::std::os::raw::c_uint) -> bool;
4192
4193    /// Similar to [`Z3_get_numeral_string`] but only succeeds if the
4194    /// value can fit in a machine `uint64_t` int.
4195    /// Return `true` if the call succeeded.
4196    ///
4197    /// # Preconditions:
4198    ///
4199    /// - `Z3_get_ast_kind(c, v) == AstKind::Numeral`
4200    ///
4201    /// # See also:
4202    ///
4203    /// - [`Z3_get_numeral_string`]
4204    /// - [`Z3_get_ast_kind`]
4205    /// - [`AstKind::Numeral`]
4206    pub fn Z3_get_numeral_uint64(c: Z3_context, v: Z3_ast, u: *mut u64) -> bool;
4207
4208    /// Similar to [`Z3_get_numeral_string`], but only succeeds if the
4209    /// value can fit in a machine `int64_t` int.
4210    /// Return `true` if the call succeeded.
4211    ///
4212    /// # Preconditions:
4213    ///
4214    /// - `Z3_get_ast_kind(c, v) == AstKind::Numeral`
4215    ///
4216    /// # See also:
4217    ///
4218    /// - [`Z3_get_numeral_string`]
4219    /// - [`Z3_get_ast_kind`]
4220    /// - [`AstKind::Numeral`]
4221    pub fn Z3_get_numeral_int64(c: Z3_context, v: Z3_ast, i: *mut i64) -> bool;
4222
4223    /// Similar to [`Z3_get_numeral_string`], but only succeeds if the
4224    /// value can fit as a rational number as
4225    /// machine `int64_t` int. Return `true` if the call succeeded.
4226    ///
4227    /// # Preconditions:
4228    ///
4229    /// - `Z3_get_ast_kind(c, v) == AstKind::Numeral`
4230    ///
4231    /// # See also:
4232    ///
4233    /// - [`Z3_get_numeral_string`]
4234    /// - [`Z3_get_ast_kind`]
4235    /// - [`AstKind::Numeral`]
4236    pub fn Z3_get_numeral_rational_int64(
4237        c: Z3_context,
4238        v: Z3_ast,
4239        num: *mut i64,
4240        den: *mut i64,
4241    ) -> bool;
4242
4243    /// Return a lower bound for the given real algebraic number.
4244    ///
4245    /// The interval isolating the number is smaller than 1/10^precision.
4246    /// The result is a numeral AST of sort Real.
4247    ///
4248    /// # Preconditions:
4249    ///
4250    /// - `Z3_is_algebraic_number(c, a)`
4251    ///
4252    /// # See also:
4253    ///
4254    /// - [`Z3_is_algebraic_number`]
4255    pub fn Z3_get_algebraic_number_lower(
4256        c: Z3_context,
4257        a: Z3_ast,
4258        precision: ::std::os::raw::c_uint,
4259    ) -> Z3_ast;
4260
4261    /// Return an upper bound for the given real algebraic number.
4262    ///
4263    /// The interval isolating the number is smaller than 1/10^precision.
4264    /// The result is a numeral AST of sort Real.
4265    ///
4266    /// # Preconditions:
4267    ///
4268    /// - `Z3_is_algebraic_number(c, a)`
4269    ///
4270    /// # See also:
4271    ///
4272    /// - [`Z3_is_algebraic_number`]
4273    pub fn Z3_get_algebraic_number_upper(
4274        c: Z3_context,
4275        a: Z3_ast,
4276        precision: ::std::os::raw::c_uint,
4277    ) -> Z3_ast;
4278
4279    /// Convert a [`Z3_pattern`] into [`Z3_ast`]. This is just type casting.
4280    ///
4281    /// # See also:
4282    ///
4283    /// - [`Z3_app_to_ast`]
4284    /// - [`Z3_func_decl_to_ast`]
4285    /// - [`Z3_sort_to_ast`]
4286    pub fn Z3_pattern_to_ast(c: Z3_context, p: Z3_pattern) -> Z3_ast;
4287
4288    /// Return number of terms in pattern.
4289    pub fn Z3_get_pattern_num_terms(c: Z3_context, p: Z3_pattern) -> ::std::os::raw::c_uint;
4290
4291    /// Return i'th ast in pattern.
4292    pub fn Z3_get_pattern(c: Z3_context, p: Z3_pattern, idx: ::std::os::raw::c_uint) -> Z3_ast;
4293
4294    /// Return index of de-Bruijn bound variable.
4295    ///
4296    /// # Preconditions:
4297    ///
4298    /// - `Z3_get_ast_kind(a) == AstKind::Var`
4299    pub fn Z3_get_index_value(c: Z3_context, a: Z3_ast) -> ::std::os::raw::c_uint;
4300
4301    /// Determine if quantifier is universal.
4302    ///
4303    /// # Preconditions:
4304    ///
4305    /// - `Z3_get_ast_kind(a) == AstKind::Quantifier`
4306    pub fn Z3_is_quantifier_forall(c: Z3_context, a: Z3_ast) -> bool;
4307
4308    /// Determine if ast is an existential quantifier.
4309    pub fn Z3_is_quantifier_exists(c: Z3_context, a: Z3_ast) -> bool;
4310
4311    /// Determine if ast is a lambda expression.
4312    ///
4313    /// # Preconditions:
4314    ///
4315    /// - `Z3_get_ast_kind(a) == AstKind::Quantifier`
4316    pub fn Z3_is_lambda(c: Z3_context, a: Z3_ast) -> bool;
4317
4318    /// Obtain weight of quantifier.
4319    ///
4320    /// # Preconditions:
4321    ///
4322    /// - `Z3_get_ast_kind(a) == AstKind::Quantifier`
4323    pub fn Z3_get_quantifier_weight(c: Z3_context, a: Z3_ast) -> ::std::os::raw::c_uint;
4324
4325    /// Return number of patterns used in quantifier.
4326    ///
4327    /// # Preconditions:
4328    ///
4329    /// - `Z3_get_ast_kind(a) == AstKind::Quantifier`
4330    pub fn Z3_get_quantifier_num_patterns(c: Z3_context, a: Z3_ast) -> ::std::os::raw::c_uint;
4331
4332    /// Return i'th pattern.
4333    ///
4334    /// # Preconditions:
4335    ///
4336    /// - `Z3_get_ast_kind(a) == AstKind::Quantifier`
4337    pub fn Z3_get_quantifier_pattern_ast(
4338        c: Z3_context,
4339        a: Z3_ast,
4340        i: ::std::os::raw::c_uint,
4341    ) -> Z3_pattern;
4342
4343    /// Return number of `no_patterns` used in quantifier.
4344    ///
4345    /// # Preconditions:
4346    ///
4347    /// - `Z3_get_ast_kind(a) == AstKind::Quantifier`
4348    pub fn Z3_get_quantifier_num_no_patterns(c: Z3_context, a: Z3_ast) -> ::std::os::raw::c_uint;
4349
4350    /// Return i'th `no_pattern`.
4351    ///
4352    /// # Preconditions:
4353    ///
4354    /// - `Z3_get_ast_kind(a) == AstKind::Quantifier`
4355    pub fn Z3_get_quantifier_no_pattern_ast(
4356        c: Z3_context,
4357        a: Z3_ast,
4358        i: ::std::os::raw::c_uint,
4359    ) -> Z3_ast;
4360
4361    /// Return number of bound variables of quantifier.
4362    ///
4363    /// # Preconditions:
4364    ///
4365    /// - `Z3_get_ast_kind(a) == AstKind::Quantifier`
4366    pub fn Z3_get_quantifier_num_bound(c: Z3_context, a: Z3_ast) -> ::std::os::raw::c_uint;
4367
4368    /// Return symbol of the i'th bound variable.
4369    ///
4370    /// # Preconditions:
4371    ///
4372    /// - `Z3_get_ast_kind(a) == AstKind::Quantifier`
4373    pub fn Z3_get_quantifier_bound_name(
4374        c: Z3_context,
4375        a: Z3_ast,
4376        i: ::std::os::raw::c_uint,
4377    ) -> Z3_symbol;
4378
4379    /// Return sort of the i'th bound variable.
4380    ///
4381    /// # Preconditions:
4382    ///
4383    /// - `Z3_get_ast_kind(a) == AstKind::Quantifier`
4384    pub fn Z3_get_quantifier_bound_sort(
4385        c: Z3_context,
4386        a: Z3_ast,
4387        i: ::std::os::raw::c_uint,
4388    ) -> Z3_sort;
4389
4390    /// Return body of quantifier.
4391    ///
4392    /// # Preconditions:
4393    ///
4394    /// - `Z3_get_ast_kind(a) == AstKind::Quantifier`
4395    pub fn Z3_get_quantifier_body(c: Z3_context, a: Z3_ast) -> Z3_ast;
4396
4397    /// Interface to simplifier.
4398    ///
4399    /// Provides an interface to the AST simplifier used by Z3.
4400    /// It returns an AST object which is equal to the argument.
4401    /// The returned AST is simplified using algebraic simplification rules,
4402    /// such as constant propagation (propagating true/false over logical connectives).
4403    ///
4404    /// # See also:
4405    ///
4406    /// - [`Z3_simplify_ex`]
4407    pub fn Z3_simplify(c: Z3_context, a: Z3_ast) -> Z3_ast;
4408
4409    /// Interface to simplifier.
4410    ///
4411    /// Provides an interface to the AST simplifier used by Z3.
4412    /// This procedure is similar to [`Z3_simplify`],
4413    /// but the behavior of the simplifier can be configured using the
4414    /// given parameter set.
4415    ///
4416    /// # See also:
4417    ///
4418    /// - [`Z3_simplify`]
4419    /// - [`Z3_simplify_get_help`]
4420    /// - [`Z3_simplify_get_param_descrs`]
4421    pub fn Z3_simplify_ex(c: Z3_context, a: Z3_ast, p: Z3_params) -> Z3_ast;
4422
4423    /// Return a string describing all available parameters.
4424    ///
4425    /// # See also:
4426    ///
4427    /// - [`Z3_simplify_ex`]
4428    /// - [`Z3_simplify_get_param_descrs`]
4429    pub fn Z3_simplify_get_help(c: Z3_context) -> Z3_string;
4430
4431    /// Return the parameter description set for the simplify procedure.
4432    ///
4433    /// # See also:
4434    ///
4435    /// - [`Z3_simplify_ex`]
4436    /// - [`Z3_simplify_get_help`]
4437    pub fn Z3_simplify_get_param_descrs(c: Z3_context) -> Z3_param_descrs;
4438
4439    /// Update the arguments of term `a` using the arguments `args`.
4440    ///
4441    /// The number of arguments `num_args` should coincide
4442    /// with the number of arguments to `a`.
4443    ///
4444    /// If `a` is a quantifier, then `num_args` has to be 1.
4445    pub fn Z3_update_term(
4446        c: Z3_context,
4447        a: Z3_ast,
4448        num_args: ::std::os::raw::c_uint,
4449        args: *const Z3_ast,
4450    ) -> Z3_ast;
4451
4452    /// Substitute every occurrence of `from[i]` in `a` with `to[i]`, for `i`
4453    /// smaller than `num_exprs`.
4454    ///
4455    /// The result is the new AST. The arrays `from` and `to` must have
4456    /// size `num_exprs`.
4457    ///
4458    /// For every `i` smaller than `num_exprs`, we must have that sort of
4459    /// `from[i]` must be equal to sort of `to[i]`.
4460    pub fn Z3_substitute(
4461        c: Z3_context,
4462        a: Z3_ast,
4463        num_exprs: ::std::os::raw::c_uint,
4464        from: *const Z3_ast,
4465        to: *const Z3_ast,
4466    ) -> Z3_ast;
4467
4468    /// Substitute the free variables in `a` with the expressions in `to`.
4469    ///
4470    /// For every `i` smaller than `num_exprs`, the variable with de-Bruijn
4471    /// index `i` is replaced with term `to[i]`.
4472    pub fn Z3_substitute_vars(
4473        c: Z3_context,
4474        a: Z3_ast,
4475        num_exprs: ::std::os::raw::c_uint,
4476        to: *const Z3_ast,
4477    ) -> Z3_ast;
4478
4479    /// Translate/Copy the AST `a` from context `source` to context `target`.
4480    ///
4481    /// AST `a` must have been created using context `source`.
4482    ///
4483    /// # Preconditions:
4484    ///
4485    /// - `source != target`
4486    pub fn Z3_translate(source: Z3_context, a: Z3_ast, target: Z3_context) -> Z3_ast;
4487
4488    /// Create a fresh model object. It has reference count 0.
4489    pub fn Z3_mk_model(c: Z3_context) -> Z3_model;
4490
4491    /// Increment the reference counter of the given model.
4492    pub fn Z3_model_inc_ref(c: Z3_context, m: Z3_model);
4493
4494    /// Decrement the reference counter of the given model.
4495    pub fn Z3_model_dec_ref(c: Z3_context, m: Z3_model);
4496
4497    /// Evaluate the AST node `t` in the given model.
4498    /// Return `true` if succeeded, and store the result in `v`.
4499    ///
4500    /// If `model_completion` is `true`, then Z3 will assign an
4501    /// interpretation for any constant or function that does
4502    /// not have an interpretation in `m`. These constants and
4503    /// functions were essentially don't cares.
4504    ///
4505    /// If `model_completion` is `false`, then Z3 will not assign
4506    /// interpretations to constants for functions that do not have
4507    /// interpretations in `m`. Evaluation behaves as the identify
4508    /// function in this case.
4509    ///
4510    /// The evaluation may fail for the following reasons:
4511    ///
4512    /// - `t` contains a quantifier.
4513    /// - the model `m` is partial, that is, it doesn't have a complete
4514    ///   interpretation for uninterpreted functions. That is, the option
4515    ///   `MODEL_PARTIAL=true` was used.
4516    /// - `t` is type incorrect.
4517    /// - [`Z3_interrupt`] was invoked during evaluation.
4518    pub fn Z3_model_eval(
4519        c: Z3_context,
4520        m: Z3_model,
4521        t: Z3_ast,
4522        model_completion: bool,
4523        v: *mut Z3_ast,
4524    ) -> bool;
4525
4526    /// Return the interpretation (i.e., assignment) of constant `a` in the model `m`.
4527    ///
4528    /// Return `NULL`, if the model does not assign an interpretation for `a`.
4529    /// That should be interpreted as: the value of `a` does not matter.
4530    ///
4531    /// # Preconditions:
4532    ///
4533    /// - `Z3_get_arity(c, a) == 0`
4534    pub fn Z3_model_get_const_interp(c: Z3_context, m: Z3_model, a: Z3_func_decl) -> Z3_ast;
4535
4536    /// Test if there exists an interpretation (i.e., assignment) for `a` in the model `m`.
4537    pub fn Z3_model_has_interp(c: Z3_context, m: Z3_model, a: Z3_func_decl) -> bool;
4538
4539    /// Return the interpretation of the function `f` in the model `m`.
4540    ///
4541    /// Return `NULL`, if the model does not assign an interpretation for `f`.
4542    /// That should be interpreted as: the `f` does not matter.
4543    ///
4544    /// # Preconditions:
4545    ///
4546    /// - `Z3_get_arity(c, f) > 0`
4547    ///
4548    /// NOTE: Reference counting must be used to manage [`Z3_func_interp`]
4549    /// objects, even when the `Z3_context` was created using
4550    /// [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
4551    pub fn Z3_model_get_func_interp(c: Z3_context, m: Z3_model, f: Z3_func_decl) -> Z3_func_interp;
4552
4553    /// Return the number of constants assigned by the given model.
4554    ///
4555    /// # See also:
4556    ///
4557    /// - [`Z3_model_get_const_decl`]
4558    pub fn Z3_model_get_num_consts(c: Z3_context, m: Z3_model) -> ::std::os::raw::c_uint;
4559
4560    /// Return the i-th constant in the given model.
4561    ///
4562    /// # Preconditions:
4563    ///
4564    /// - `i < Z3_model_get_num_consts(c, m)`
4565    ///
4566    /// # See also:
4567    ///
4568    /// - [`Z3_model_eval`]
4569    /// - [`Z3_model_get_num_consts`]
4570    pub fn Z3_model_get_const_decl(
4571        c: Z3_context,
4572        m: Z3_model,
4573        i: ::std::os::raw::c_uint,
4574    ) -> Z3_func_decl;
4575
4576    /// Return the number of function interpretations in the given model.
4577    ///
4578    /// A function interpretation is represented as a finite map and an 'else' value.
4579    /// Each entry in the finite map represents the value of a function given a set of arguments.
4580    ///
4581    /// # See also:
4582    ///
4583    /// - [`Z3_model_get_func_decl`]
4584    pub fn Z3_model_get_num_funcs(c: Z3_context, m: Z3_model) -> ::std::os::raw::c_uint;
4585
4586    /// Return the declaration of the i-th function in the given model.
4587    ///
4588    /// # Preconditions:
4589    ///
4590    /// - `i < Z3_model_get_num_funcs(c, m)`
4591    ///
4592    /// # See also:
4593    ///
4594    /// - [`Z3_model_get_num_funcs`]
4595    pub fn Z3_model_get_func_decl(
4596        c: Z3_context,
4597        m: Z3_model,
4598        i: ::std::os::raw::c_uint,
4599    ) -> Z3_func_decl;
4600
4601    /// Return the number of uninterpreted sorts that `m` assigns an
4602    /// interpretation to.
4603    ///
4604    /// Z3 also provides an interpretation for uninterpreted sorts used in
4605    /// a formula. The interpretation for a sort `s` is a finite set of
4606    /// distinct values. We say this finite set is the "universe" of `s`.
4607    ///
4608    /// # See also:
4609    ///
4610    /// - [`Z3_model_get_sort`]
4611    /// - [`Z3_model_get_sort_universe`]
4612    pub fn Z3_model_get_num_sorts(c: Z3_context, m: Z3_model) -> ::std::os::raw::c_uint;
4613
4614    /// Return an uninterpreted sort that `m` assigns an interpretation.
4615    ///
4616    /// # Preconditions:
4617    ///
4618    /// - `i < Z3_model_get_num_sorts(c, m)`
4619    ///
4620    /// # See also:
4621    ///
4622    /// - [`Z3_model_get_num_sorts`]
4623    /// - [`Z3_model_get_sort_universe`]
4624    pub fn Z3_model_get_sort(c: Z3_context, m: Z3_model, i: ::std::os::raw::c_uint) -> Z3_sort;
4625
4626    /// Return the finite set of distinct values that represent the interpretation for sort `s`.
4627    ///
4628    /// # See also:
4629    ///
4630    /// - [`Z3_model_get_num_sorts`]
4631    /// - [`Z3_model_get_sort`]
4632    pub fn Z3_model_get_sort_universe(c: Z3_context, m: Z3_model, s: Z3_sort) -> Z3_ast_vector;
4633
4634    /// Translate model from context `c` to context `dst`.
4635    pub fn Z3_model_translate(c: Z3_context, m: Z3_model, dst: Z3_context) -> Z3_model;
4636
4637    /// The `(_ as-array f)` AST node is a construct for assigning interpretations
4638    /// for arrays in Z3.
4639    ///
4640    /// It is the array such that forall indices `i` we have that
4641    /// `(select (_ as-array f) i)` is equal to `(f i)`. This procedure
4642    /// returns `true` if the `a` is an `as`-array AST node.
4643    ///
4644    /// Z3 current solvers have minimal support for `as_array` nodes.
4645    ///
4646    /// # See also:
4647    ///
4648    /// - [`Z3_get_as_array_func_decl`]
4649    pub fn Z3_is_as_array(c: Z3_context, a: Z3_ast) -> bool;
4650
4651    /// Return the function declaration `f` associated with a `(_ as_array f)` node.
4652    ///
4653    /// # See also:
4654    ///
4655    /// - [`Z3_is_as_array`]
4656    pub fn Z3_get_as_array_func_decl(c: Z3_context, a: Z3_ast) -> Z3_func_decl;
4657
4658    /// Create a fresh `func_interp` object, add it to a model for a specified function.
4659    /// It has reference count 0.
4660    ///
4661    /// - `c`: context
4662    /// - `m`: model
4663    /// - `f`: function declaration
4664    /// - `default_value`: default value for function interpretation
4665    pub fn Z3_add_func_interp(
4666        c: Z3_context,
4667        m: Z3_model,
4668        f: Z3_func_decl,
4669        default_value: Z3_ast,
4670    ) -> Z3_func_interp;
4671
4672    /// Add a constant interpretation.
4673    pub fn Z3_add_const_interp(c: Z3_context, m: Z3_model, f: Z3_func_decl, a: Z3_ast);
4674
4675    /// Increment the reference counter of the given `Z3_func_interp` object.
4676    pub fn Z3_func_interp_inc_ref(c: Z3_context, f: Z3_func_interp);
4677
4678    /// Decrement the reference counter of the given `Z3_func_interp` object.
4679    pub fn Z3_func_interp_dec_ref(c: Z3_context, f: Z3_func_interp);
4680
4681    /// Return the number of entries in the given function interpretation.
4682    ///
4683    /// A function interpretation is represented as a finite map and
4684    /// an 'else' value. Each entry in the finite map represents the
4685    /// value of a function given a set of arguments. This procedure
4686    /// return the number of element in the finite map of `f`.
4687    ///
4688    /// # See also:
4689    ///
4690    /// - [`Z3_func_interp_get_entry`]
4691    pub fn Z3_func_interp_get_num_entries(
4692        c: Z3_context,
4693        f: Z3_func_interp,
4694    ) -> ::std::os::raw::c_uint;
4695
4696    /// Return a "point" of the given function interpretation. It represents
4697    /// the value of `f` in a particular point.
4698    ///
4699    /// # Preconditions:
4700    ///
4701    /// - `i < Z3_func_interp_get_num_entries(c, f)`
4702    ///
4703    /// # See also:
4704    ///
4705    /// - [`Z3_func_interp_get_num_entries`]
4706    pub fn Z3_func_interp_get_entry(
4707        c: Z3_context,
4708        f: Z3_func_interp,
4709        i: ::std::os::raw::c_uint,
4710    ) -> Z3_func_entry;
4711
4712    /// Return the 'else' value of the given function interpretation.
4713    ///
4714    /// A function interpretation is represented as a finite map and an 'else' value.
4715    /// This procedure returns the 'else' value.
4716    pub fn Z3_func_interp_get_else(c: Z3_context, f: Z3_func_interp) -> Z3_ast;
4717
4718    /// Set the 'else' value of the given function interpretation.
4719    ///
4720    /// A function interpretation is represented as a finite map and an 'else' value.
4721    /// This procedure can be used to update the 'else' value.
4722    pub fn Z3_func_interp_set_else(c: Z3_context, f: Z3_func_interp, else_value: Z3_ast);
4723
4724    /// Return the arity (number of arguments) of the given function interpretation.
4725    pub fn Z3_func_interp_get_arity(c: Z3_context, f: Z3_func_interp) -> ::std::os::raw::c_uint;
4726
4727    /// add a function entry to a function interpretation.
4728    ///
4729    /// - `c`: logical context
4730    /// - `fi`: a function interpretation to be updated.
4731    /// - `args`: list of arguments. They should be constant values
4732    ///   (such as integers) and be of the same types as the domain
4733    ///   of the function.
4734    /// - `value`: value of the function when the parameters match args.
4735    ///
4736    /// It is assumed that entries added to a function cover disjoint
4737    /// arguments. If an two entries are added with the same arguments,
4738    /// only the second insertion survives and the first inserted entry
4739    /// is removed.
4740    pub fn Z3_func_interp_add_entry(
4741        c: Z3_context,
4742        fi: Z3_func_interp,
4743        args: Z3_ast_vector,
4744        value: Z3_ast,
4745    );
4746
4747    /// Increment the reference counter of the given `Z3_func_entry` object.
4748    pub fn Z3_func_entry_inc_ref(c: Z3_context, e: Z3_func_entry);
4749
4750    /// Decrement the reference counter of the given `Z3_func_entry` object.
4751    pub fn Z3_func_entry_dec_ref(c: Z3_context, e: Z3_func_entry);
4752
4753    /// Return the value of this point.
4754    ///
4755    /// A `Z3_func_entry` object represents an element in the finite map used
4756    /// to encode a function interpretation.
4757    ///
4758    /// # See also:
4759    ///
4760    /// - [`Z3_func_interp_get_entry`]
4761    pub fn Z3_func_entry_get_value(c: Z3_context, e: Z3_func_entry) -> Z3_ast;
4762
4763    /// Return the number of arguments in a `Z3_func_entry` object.
4764    ///
4765    /// # See also:
4766    ///
4767    /// - [`Z3_func_entry_get_arg`]
4768    /// - [`Z3_func_interp_get_entry`]
4769    pub fn Z3_func_entry_get_num_args(c: Z3_context, e: Z3_func_entry) -> ::std::os::raw::c_uint;
4770
4771    /// Return an argument of a `Z3_func_entry` object.
4772    ///
4773    /// # Preconditions:
4774    ///
4775    /// - `i < Z3_func_entry_get_num_args(c, e)`
4776    ///
4777    /// # See also:
4778    ///
4779    /// - [`Z3_func_entry_get_num_args`]
4780    /// - [`Z3_func_interp_get_entry`]
4781    pub fn Z3_func_entry_get_arg(
4782        c: Z3_context,
4783        e: Z3_func_entry,
4784        i: ::std::os::raw::c_uint,
4785    ) -> Z3_ast;
4786
4787    /// Log interaction to a file.
4788    ///
4789    /// # See also:
4790    ///
4791    /// - [`Z3_append_log`]
4792    /// - [`Z3_close_log`]
4793    pub fn Z3_open_log(filename: Z3_string) -> bool;
4794
4795    /// Append user-defined string to interaction log.
4796    ///
4797    /// The interaction log is opened using [`Z3_open_log`].
4798    /// It contains the formulas that are checked using Z3.
4799    /// You can use this command to append comments, for instance.
4800    ///
4801    /// # See also:
4802    ///
4803    /// - [`Z3_open_log`]
4804    /// - [`Z3_close_log`]
4805    pub fn Z3_append_log(string: Z3_string);
4806
4807    /// Close interaction log.
4808    ///
4809    /// # See also:
4810    ///
4811    /// - [`Z3_append_log`]
4812    /// - [`Z3_open_log`]
4813    pub fn Z3_close_log();
4814
4815    /// Enable/disable printing warning messages to the console.
4816    ///
4817    /// Warnings are printed after passing `true`, warning messages are
4818    /// suppressed after calling this method with `false`.
4819    pub fn Z3_toggle_warning_messages(enabled: bool);
4820
4821    /// Select mode for the format used for pretty-printing AST nodes.
4822    ///
4823    /// The default mode for pretty printing AST nodes is to produce
4824    /// SMT-LIB style output where common subexpressions are printed
4825    /// at each occurrence. The mode is called `AstPrintMode::SmtLibFull`.
4826    ///
4827    /// To print shared common subexpressions only once,
4828    /// use the `AstPrintMode::LowLevel` mode.
4829    ///
4830    /// To print in way that conforms to SMT-LIB standards and uses let
4831    /// expressions to share common sub-expressions use
4832    /// `AstPrintMode::SmtLib2Compliant`.
4833    ///
4834    /// # See also:
4835    ///
4836    /// - [`Z3_ast_to_string`]
4837    /// - [`Z3_pattern_to_string`]
4838    /// - [`Z3_func_decl_to_string`]
4839    pub fn Z3_set_ast_print_mode(c: Z3_context, mode: AstPrintMode);
4840
4841    /// Convert the given AST node into a string.
4842    ///
4843    /// Warning: The result buffer is statically allocated by Z3.
4844    /// It will be automatically deallocated when
4845    /// [`Z3_del_context`] is invoked.
4846    /// So, the buffer is invalidated in the next call to
4847    /// `Z3_ast_to_string`.
4848    ///
4849    /// # See also:
4850    ///
4851    /// - [`Z3_func_decl_to_string`]
4852    /// - [`Z3_pattern_to_string`]
4853    /// - [`Z3_sort_to_string`]
4854    pub fn Z3_ast_to_string(c: Z3_context, a: Z3_ast) -> Z3_string;
4855
4856    /// Convert the given pattern AST node into a string.
4857    ///
4858    /// This is a wrapper around [`Z3_ast_to_string`].
4859    ///
4860    /// Warning: The result buffer is statically allocated by Z3.
4861    /// It will be automatically deallocated when
4862    /// [`Z3_del_context`] is invoked.
4863    /// So, the buffer is invalidated in the next call to
4864    /// [`Z3_ast_to_string`].
4865    ///
4866    /// # See also:
4867    ///
4868    /// - [`Z3_ast_to_string`]
4869    /// - [`Z3_func_decl_to_string`]
4870    /// - [`Z3_sort_to_string`]
4871    pub fn Z3_pattern_to_string(c: Z3_context, p: Z3_pattern) -> Z3_string;
4872
4873    /// Convert the given sort AST node into a string.
4874    ///
4875    /// This is a wrapper around [`Z3_ast_to_string`].
4876    ///
4877    /// Warning: The result buffer is statically allocated by Z3.
4878    /// It will be automatically deallocated when
4879    /// [`Z3_del_context`] is invoked.
4880    /// So, the buffer is invalidated in the next call to
4881    /// [`Z3_ast_to_string`].
4882    ///
4883    /// # See also:
4884    ///
4885    /// - [`Z3_ast_to_string`]
4886    /// - [`Z3_func_decl_to_string`]
4887    /// - [`Z3_pattern_to_string`]
4888    pub fn Z3_sort_to_string(c: Z3_context, s: Z3_sort) -> Z3_string;
4889
4890    /// Convert the given func decl AST node into a string.
4891    ///
4892    /// This is a wrapper around [`Z3_ast_to_string`].
4893    ///
4894    /// Warning: The result buffer is statically allocated by Z3.
4895    /// It will be automatically deallocated when
4896    /// [`Z3_del_context`] is invoked.
4897    /// So, the buffer is invalidated in the next call to
4898    /// [`Z3_ast_to_string`].
4899    ///
4900    /// # See also:
4901    ///
4902    /// - [`Z3_ast_to_string`]
4903    /// - [`Z3_pattern_to_string`]
4904    /// - [`Z3_sort_to_string`]
4905    pub fn Z3_func_decl_to_string(c: Z3_context, d: Z3_func_decl) -> Z3_string;
4906
4907    /// Convert the given model into a string.
4908    ///
4909    /// Warning: The result buffer is statically allocated by Z3.
4910    /// It will be automatically deallocated when
4911    /// [`Z3_del_context`] is invoked.
4912    /// So, the buffer is invalidated in the next call to `Z3_model_to_string`.
4913    pub fn Z3_model_to_string(c: Z3_context, m: Z3_model) -> Z3_string;
4914
4915    /// Convert the given benchmark into SMT-LIB formatted string.
4916    ///
4917    /// Warning: The result buffer is statically allocated by Z3.
4918    /// It will be automatically deallocated when
4919    /// [`Z3_del_context`] is invoked.
4920    /// So, the buffer is invalidated in the next call to
4921    /// `Z3_benchmark_to_smtlib_string`.
4922    ///
4923    /// - `c`: - context.
4924    /// - `name`: - name of benchmark. The argument is optional.
4925    /// - `logic`: - the benchmark logic.
4926    /// - `status`: - the status string (sat, unsat, or unknown)
4927    /// - `attributes`: - other attributes, such as source, difficulty or category.
4928    /// - `num_assumptions`: - number of assumptions.
4929    /// - `assumptions`: - auxiliary assumptions.
4930    /// - `formula`: - formula to be checked for consistency in conjunction with assumptions.
4931    pub fn Z3_benchmark_to_smtlib_string(
4932        c: Z3_context,
4933        name: Z3_string,
4934        logic: Z3_string,
4935        status: Z3_string,
4936        attributes: Z3_string,
4937        num_assumptions: ::std::os::raw::c_uint,
4938        assumptions: *const Z3_ast,
4939        formula: Z3_ast,
4940    ) -> Z3_string;
4941
4942    /// Parse the given string using the SMT-LIB2 parser.
4943    ///
4944    /// It returns a formula comprising of the conjunction of assertions
4945    /// in the scope (up to push/pop) at the end of the string.
4946    pub fn Z3_parse_smtlib2_string(
4947        c: Z3_context,
4948        str: Z3_string,
4949        num_sorts: ::std::os::raw::c_uint,
4950        sort_names: *const Z3_symbol,
4951        sorts: *const Z3_sort,
4952        num_decls: ::std::os::raw::c_uint,
4953        decl_names: *const Z3_symbol,
4954        decls: *const Z3_func_decl,
4955    ) -> Z3_ast_vector;
4956
4957    /// Similar to [`Z3_parse_smtlib2_string`], but reads the benchmark from a file.
4958    pub fn Z3_parse_smtlib2_file(
4959        c: Z3_context,
4960        file_name: Z3_string,
4961        num_sorts: ::std::os::raw::c_uint,
4962        sort_names: *const Z3_symbol,
4963        sorts: *const Z3_sort,
4964        num_decls: ::std::os::raw::c_uint,
4965        decl_names: *const Z3_symbol,
4966        decls: *const Z3_func_decl,
4967    ) -> Z3_ast_vector;
4968
4969    /// Parse and evaluate and SMT-LIB2 command sequence. The state from a previous
4970    /// call is saved so the next evaluation builds on top of the previous call.
4971    ///
4972    /// Returns output generated from processing commands.
4973    pub fn Z3_eval_smtlib2_string(arg1: Z3_context, str: Z3_string) -> Z3_string;
4974
4975    /// Return the error code for the last API call.
4976    ///
4977    /// A call to a Z3 function may return a non `ErrorCode::OK` error code,
4978    /// when it is not used correctly.
4979    ///
4980    /// # See also:
4981    ///
4982    /// - [`Z3_set_error_handler`]
4983    pub fn Z3_get_error_code(c: Z3_context) -> ErrorCode;
4984
4985    /// Register a Z3 error handler.
4986    ///
4987    /// A call to a Z3 function may return a non `ErrorCode::OK` error code, when
4988    /// it is not used correctly.  An error handler can be registered
4989    /// and will be called in this case.  To disable the use of the
4990    /// error handler, simply register with `h`=NULL.
4991    ///
4992    /// Warning: Log files, created using [`Z3_open_log`],
4993    /// may be potentially incomplete/incorrect if error handlers are used.
4994    ///
4995    /// # See also:
4996    ///
4997    /// - [`Z3_get_error_code`]
4998    pub fn Z3_set_error_handler(c: Z3_context, h: Z3_error_handler);
4999
5000    /// Set an error.
5001    pub fn Z3_set_error(c: Z3_context, e: ErrorCode);
5002
5003    /// Return a string describing the given error code.
5004    pub fn Z3_get_error_msg(c: Z3_context, err: ErrorCode) -> Z3_string;
5005
5006    /// Return Z3 version number information.
5007    ///
5008    /// # See also:
5009    ///
5010    /// - [`Z3_get_full_version`]
5011    pub fn Z3_get_version(
5012        major: *mut ::std::os::raw::c_uint,
5013        minor: *mut ::std::os::raw::c_uint,
5014        build_number: *mut ::std::os::raw::c_uint,
5015        revision_number: *mut ::std::os::raw::c_uint,
5016    );
5017
5018    /// Return a string that fully describes the version of Z3 in use.
5019    ///
5020    /// # See also:
5021    ///
5022    /// - [`Z3_get_version`]
5023    pub fn Z3_get_full_version() -> Z3_string;
5024
5025    /// Enable tracing messages tagged as `tag` when Z3 is compiled in debug mode.
5026    /// It is a NOOP otherwise
5027    ///
5028    /// # See also:
5029    ///
5030    /// - [`Z3_disable_trace`]
5031    pub fn Z3_enable_trace(tag: Z3_string);
5032
5033    /// Disable tracing messages tagged as `tag` when Z3 is compiled in debug mode.
5034    /// It is a NOOP otherwise
5035    ///
5036    /// # See also:
5037    ///
5038    /// - [`Z3_enable_trace`]
5039    pub fn Z3_disable_trace(tag: Z3_string);
5040
5041    /// Reset all allocated resources.
5042    ///
5043    /// Use this facility on out-of memory errors.
5044    /// It allows discharging the previous state and resuming afresh.
5045    /// Any pointers previously returned by the API
5046    /// become invalid.
5047    pub fn Z3_reset_memory();
5048
5049    /// Destroy all allocated resources.
5050    ///
5051    /// Any pointers previously returned by the API become invalid.
5052    /// Can be used for memory leak detection.
5053    pub fn Z3_finalize_memory();
5054
5055    /// Create a goal (aka problem). A goal is essentially a set
5056    /// of formulas, that can be solved and/or transformed using
5057    /// tactics and solvers.
5058    ///
5059    /// If `models == true`, then model generation is enabled for the
5060    /// new goal.
5061    ///
5062    /// If `unsat_cores == true`, then unsat core generation is enabled
5063    /// for the new goal.
5064    ///
5065    /// If `proofs == true`, then proof generation is enabled for the
5066    /// new goal.
5067    ///
5068    /// NOTE: The Z3 context `c` must have been created with proof
5069    /// generation support.
5070    ///
5071    /// NOTE: Reference counting must be used to manage goals, even
5072    /// when the [`Z3_context`] was created using
5073    /// [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
5074    pub fn Z3_mk_goal(c: Z3_context, models: bool, unsat_cores: bool, proofs: bool) -> Z3_goal;
5075
5076    /// Increment the reference counter of the given goal.
5077    pub fn Z3_goal_inc_ref(c: Z3_context, g: Z3_goal);
5078
5079    /// Decrement the reference counter of the given goal.
5080    pub fn Z3_goal_dec_ref(c: Z3_context, g: Z3_goal);
5081
5082    /// Return the "precision" of the given goal. Goals can be transformed using over and under approximations.
5083    /// A under approximation is applied when the objective is to find a model for a given goal.
5084    /// An over approximation is applied when the objective is to find a proof for a given goal.
5085    pub fn Z3_goal_precision(c: Z3_context, g: Z3_goal) -> GoalPrec;
5086
5087    /// Add a new formula `a` to the given goal.
5088    ///
5089    /// The formula is split according to the following procedure that
5090    /// is applied until a fixed-point:
5091    ///
5092    /// - Conjunctions are split into separate formulas.
5093    /// - Negations are distributed over disjunctions, resulting in
5094    ///   separate formulas.
5095    ///
5096    /// If the goal is `false`, adding new formulas is a no-op.
5097    ///
5098    /// If the formula `a` is `true`, then nothing is added.
5099    ///
5100    /// If the formula `a` is `false`, then the entire goal is
5101    /// replaced by the formula `false`.
5102    pub fn Z3_goal_assert(c: Z3_context, g: Z3_goal, a: Z3_ast);
5103
5104    /// Return true if the given goal contains the formula `false`.
5105    pub fn Z3_goal_inconsistent(c: Z3_context, g: Z3_goal) -> bool;
5106
5107    /// Return the depth of the given goal. It tracks how many transformations were applied to it.
5108    pub fn Z3_goal_depth(c: Z3_context, g: Z3_goal) -> ::std::os::raw::c_uint;
5109
5110    /// Erase all formulas from the given goal.
5111    pub fn Z3_goal_reset(c: Z3_context, g: Z3_goal);
5112
5113    /// Return the number of formulas in the given goal.
5114    pub fn Z3_goal_size(c: Z3_context, g: Z3_goal) -> ::std::os::raw::c_uint;
5115
5116    /// Return a formula from the given goal.
5117    ///
5118    /// # Preconditions:
5119    ///
5120    /// - `idx < Z3_goal_size(c, g)`
5121    pub fn Z3_goal_formula(c: Z3_context, g: Z3_goal, idx: ::std::os::raw::c_uint) -> Z3_ast;
5122
5123    /// Return the number of formulas, subformulas and terms in the given goal.
5124    pub fn Z3_goal_num_exprs(c: Z3_context, g: Z3_goal) -> ::std::os::raw::c_uint;
5125
5126    /// Return true if the goal is empty, and it is precise or the product of a under approximation.
5127    pub fn Z3_goal_is_decided_sat(c: Z3_context, g: Z3_goal) -> bool;
5128
5129    /// Return true if the goal contains false, and it is precise or the product of an over approximation.
5130    pub fn Z3_goal_is_decided_unsat(c: Z3_context, g: Z3_goal) -> bool;
5131
5132    /// Copy a goal `g` from the context `source` to the context `target`.
5133    pub fn Z3_goal_translate(source: Z3_context, g: Z3_goal, target: Z3_context) -> Z3_goal;
5134
5135    /// Convert a model of the formulas of a goal to a model of an original goal.
5136    /// The model may be null, in which case the returned model is valid if the goal was
5137    /// established satisfiable.
5138    pub fn Z3_goal_convert_model(c: Z3_context, g: Z3_goal, m: Z3_model) -> Z3_model;
5139
5140    /// Convert a goal into a string.
5141    pub fn Z3_goal_to_string(c: Z3_context, g: Z3_goal) -> Z3_string;
5142
5143    /// Convert a goal into a DIMACS formatted string.
5144    /// The goal must be in CNF. You can convert a goal to CNF
5145    /// by applying the tseitin-cnf tactic. Bit-vectors are not automatically
5146    /// converted to Booleans either, so the if caller intends to
5147    /// preserve satisfiability, it should apply bit-blasting tactics.
5148    /// Quantifiers and theory atoms will not be encoded.
5149    pub fn Z3_goal_to_dimacs_string(c: Z3_context, g: Z3_goal) -> Z3_string;
5150
5151    /// Return a tactic associated with the given name.
5152    ///
5153    /// The complete list of tactics may be obtained using the procedures [`Z3_get_num_tactics`] and [`Z3_get_tactic_name`].
5154    /// It may also be obtained using the command `(help-tactic)` in the SMT 2.0 front-end.
5155    ///
5156    /// Tactics are the basic building block for creating custom solvers for specific problem domains.
5157    pub fn Z3_mk_tactic(c: Z3_context, name: Z3_string) -> Z3_tactic;
5158
5159    /// Increment the reference counter of the given tactic.
5160    pub fn Z3_tactic_inc_ref(c: Z3_context, t: Z3_tactic);
5161
5162    /// Decrement the reference counter of the given tactic.
5163    pub fn Z3_tactic_dec_ref(c: Z3_context, g: Z3_tactic);
5164
5165    /// Return a probe associated with the given name.
5166    /// The complete list of probes may be obtained using the procedures [`Z3_get_num_probes`] and [`Z3_get_probe_name`].
5167    /// It may also be obtained using the command `(help-tactic)` in the SMT 2.0 front-end.
5168    ///
5169    /// Probes are used to inspect a goal (aka problem) and collect information that may be used to decide
5170    /// which solver and/or preprocessing step will be used.
5171    pub fn Z3_mk_probe(c: Z3_context, name: Z3_string) -> Z3_probe;
5172
5173    /// Increment the reference counter of the given probe.
5174    pub fn Z3_probe_inc_ref(c: Z3_context, p: Z3_probe);
5175
5176    /// Decrement the reference counter of the given probe.
5177    pub fn Z3_probe_dec_ref(c: Z3_context, p: Z3_probe);
5178
5179    /// Return a tactic that applies `t1` to a given goal and `t2`
5180    /// to every subgoal produced by `t1`.
5181    pub fn Z3_tactic_and_then(c: Z3_context, t1: Z3_tactic, t2: Z3_tactic) -> Z3_tactic;
5182
5183    /// Return a tactic that first applies `t1` to a given goal,
5184    /// if it fails then returns the result of `t2` applied to the given goal.
5185    pub fn Z3_tactic_or_else(c: Z3_context, t1: Z3_tactic, t2: Z3_tactic) -> Z3_tactic;
5186
5187    /// Return a tactic that applies the given tactics in parallel.
5188    pub fn Z3_tactic_par_or(
5189        c: Z3_context,
5190        num: ::std::os::raw::c_uint,
5191        ts: *const Z3_tactic,
5192    ) -> Z3_tactic;
5193
5194    /// Return a tactic that applies `t1` to a given goal and then `t2`
5195    /// to every subgoal produced by `t1`. The subgoals are processed in parallel.
5196    pub fn Z3_tactic_par_and_then(c: Z3_context, t1: Z3_tactic, t2: Z3_tactic) -> Z3_tactic;
5197
5198    /// Return a tactic that applies `t` to a given goal for `ms` milliseconds.
5199    /// If `t` does not terminate in `ms` milliseconds, then it fails.
5200    pub fn Z3_tactic_try_for(c: Z3_context, t: Z3_tactic, ms: ::std::os::raw::c_uint) -> Z3_tactic;
5201
5202    /// Return a tactic that applies `t` to a given goal is the probe `p` evaluates to true.
5203    /// If `p` evaluates to false, then the new tactic behaves like the skip tactic.
5204    pub fn Z3_tactic_when(c: Z3_context, p: Z3_probe, t: Z3_tactic) -> Z3_tactic;
5205
5206    /// Return a tactic that applies `t1` to a given goal if the probe `p` evaluates to true,
5207    /// and `t2` if `p` evaluates to false.
5208    pub fn Z3_tactic_cond(c: Z3_context, p: Z3_probe, t1: Z3_tactic, t2: Z3_tactic) -> Z3_tactic;
5209
5210    /// Return a tactic that keeps applying `t` until the goal is not modified anymore or the maximum
5211    /// number of iterations `max` is reached.
5212    pub fn Z3_tactic_repeat(c: Z3_context, t: Z3_tactic, max: ::std::os::raw::c_uint) -> Z3_tactic;
5213
5214    /// Return a tactic that just return the given goal.
5215    pub fn Z3_tactic_skip(c: Z3_context) -> Z3_tactic;
5216
5217    /// Return a tactic that always fails.
5218    pub fn Z3_tactic_fail(c: Z3_context) -> Z3_tactic;
5219
5220    /// Return a tactic that fails if the probe `p` evaluates to false.
5221    pub fn Z3_tactic_fail_if(c: Z3_context, p: Z3_probe) -> Z3_tactic;
5222
5223    /// Return a tactic that fails if the goal is not trivially satisfiable (i.e., empty) or
5224    /// trivially unsatisfiable (i.e., contains false).
5225    pub fn Z3_tactic_fail_if_not_decided(c: Z3_context) -> Z3_tactic;
5226
5227    /// Return a tactic that applies `t` using the given set of parameters.
5228    pub fn Z3_tactic_using_params(c: Z3_context, t: Z3_tactic, p: Z3_params) -> Z3_tactic;
5229
5230    /// Return a probe that always evaluates to val.
5231    pub fn Z3_probe_const(x: Z3_context, val: f64) -> Z3_probe;
5232
5233    /// Return a probe that evaluates to "true" when the value returned by `p1` is less than the value returned by `p2`.
5234    ///
5235    /// NOTE: For probes, "true" is any value different from 0.0.
5236    pub fn Z3_probe_lt(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Z3_probe;
5237
5238    /// Return a probe that evaluates to "true" when the value returned by `p1` is greater than the value returned by `p2`.
5239    ///
5240    /// NOTE: For probes, "true" is any value different from 0.0.
5241    pub fn Z3_probe_gt(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Z3_probe;
5242
5243    /// Return a probe that evaluates to "true" when the value returned by `p1` is less than or equal to the value returned by `p2`.
5244    ///
5245    /// NOTE: For probes, "true" is any value different from 0.0.
5246    pub fn Z3_probe_le(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Z3_probe;
5247
5248    /// Return a probe that evaluates to "true" when the value returned by `p1` is greater than or equal to the value returned by `p2`.
5249    ///
5250    /// NOTE: For probes, "true" is any value different from 0.0.
5251    pub fn Z3_probe_ge(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Z3_probe;
5252
5253    /// Return a probe that evaluates to "true" when the value returned by `p1` is equal to the value returned by `p2`.
5254    ///
5255    /// NOTE: For probes, "true" is any value different from 0.0.
5256    pub fn Z3_probe_eq(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Z3_probe;
5257
5258    /// Return a probe that evaluates to "true" when `p1` and `p2` evaluates to true.
5259    ///
5260    /// NOTE: For probes, "true" is any value different from 0.0.
5261    pub fn Z3_probe_and(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Z3_probe;
5262
5263    /// Return a probe that evaluates to "true" when `p1` or `p2` evaluates to true.
5264    ///
5265    /// NOTE: For probes, "true" is any value different from 0.0.
5266    pub fn Z3_probe_or(x: Z3_context, p1: Z3_probe, p2: Z3_probe) -> Z3_probe;
5267
5268    /// Return a probe that evaluates to "true" when `p` does not evaluate to true.
5269    ///
5270    /// NOTE: For probes, "true" is any value different from 0.0.
5271    pub fn Z3_probe_not(x: Z3_context, p: Z3_probe) -> Z3_probe;
5272
5273    /// Return the number of builtin tactics available in Z3.
5274    ///
5275    /// # See also:
5276    ///
5277    /// - [`Z3_get_tactic_name`]
5278    pub fn Z3_get_num_tactics(c: Z3_context) -> ::std::os::raw::c_uint;
5279
5280    /// Return the name of the idx tactic.
5281    ///
5282    /// # Preconditions:
5283    ///
5284    /// - `i < Z3_get_num_tactics(c)`
5285    ///
5286    /// # See also:
5287    ///
5288    /// - [`Z3_get_num_tactics`]
5289    pub fn Z3_get_tactic_name(c: Z3_context, i: ::std::os::raw::c_uint) -> Z3_string;
5290
5291    /// Return the number of builtin probes available in Z3.
5292    ///
5293    /// # See also:
5294    ///
5295    /// - [`Z3_get_probe_name`]
5296    pub fn Z3_get_num_probes(c: Z3_context) -> ::std::os::raw::c_uint;
5297
5298    /// Return the name of the `i` probe.
5299    ///
5300    /// # Preconditions:
5301    ///
5302    /// - `i < Z3_get_num_probes(c)`
5303    ///
5304    /// # See also:
5305    ///
5306    /// - [`Z3_get_num_probes`]
5307    pub fn Z3_get_probe_name(c: Z3_context, i: ::std::os::raw::c_uint) -> Z3_string;
5308
5309    /// Return a string containing a description of parameters accepted by the given tactic.
5310    pub fn Z3_tactic_get_help(c: Z3_context, t: Z3_tactic) -> Z3_string;
5311
5312    /// Return the parameter description set for the given tactic object.
5313    pub fn Z3_tactic_get_param_descrs(c: Z3_context, t: Z3_tactic) -> Z3_param_descrs;
5314
5315    /// Return a string containing a description of the tactic with the given name.
5316    pub fn Z3_tactic_get_descr(c: Z3_context, name: Z3_string) -> Z3_string;
5317
5318    /// Return a string containing a description of the probe with the given name.
5319    pub fn Z3_probe_get_descr(c: Z3_context, name: Z3_string) -> Z3_string;
5320
5321    /// Execute the probe over the goal. The probe always produce a double value.
5322    /// "Boolean" probes return 0.0 for false, and a value different from 0.0 for true.
5323    pub fn Z3_probe_apply(c: Z3_context, p: Z3_probe, g: Z3_goal) -> f64;
5324
5325    /// Apply tactic `t` to the goal `g`.
5326    ///
5327    /// # See also:
5328    ///
5329    /// - [`Z3_tactic_apply_ex`]
5330    pub fn Z3_tactic_apply(c: Z3_context, t: Z3_tactic, g: Z3_goal) -> Z3_apply_result;
5331
5332    /// Apply tactic `t` to the goal `g` using the parameter set `p`.
5333    ///
5334    /// # See also:
5335    ///
5336    /// - [`Z3_tactic_apply`]
5337    pub fn Z3_tactic_apply_ex(
5338        c: Z3_context,
5339        t: Z3_tactic,
5340        g: Z3_goal,
5341        p: Z3_params,
5342    ) -> Z3_apply_result;
5343
5344    /// Increment the reference counter of the given `Z3_apply_result` object.
5345    pub fn Z3_apply_result_inc_ref(c: Z3_context, r: Z3_apply_result);
5346
5347    /// Decrement the reference counter of the given `Z3_apply_result` object.
5348    pub fn Z3_apply_result_dec_ref(c: Z3_context, r: Z3_apply_result);
5349
5350    /// Convert the `Z3_apply_result` object returned by [`Z3_tactic_apply`] into a string.
5351    pub fn Z3_apply_result_to_string(c: Z3_context, r: Z3_apply_result) -> Z3_string;
5352
5353    /// Return the number of subgoals in the `Z3_apply_result` object returned by [`Z3_tactic_apply`].
5354    ///
5355    /// # See also:
5356    ///
5357    /// - [`Z3_apply_result_get_subgoal`]
5358    pub fn Z3_apply_result_get_num_subgoals(
5359        c: Z3_context,
5360        r: Z3_apply_result,
5361    ) -> ::std::os::raw::c_uint;
5362
5363    /// Return one of the subgoals in the `Z3_apply_result` object returned by [`Z3_tactic_apply`].
5364    ///
5365    /// # Preconditions:
5366    ///
5367    /// - `i < Z3_apply_result_get_num_subgoals(c, r)`
5368    ///
5369    /// # See also:
5370    ///
5371    /// - [`Z3_apply_result_get_num_subgoals`]
5372    pub fn Z3_apply_result_get_subgoal(
5373        c: Z3_context,
5374        r: Z3_apply_result,
5375        i: ::std::os::raw::c_uint,
5376    ) -> Z3_goal;
5377
5378    /// Create a new solver. This solver is a "combined solver" (see
5379    /// `combined_solver` module) that internally uses a non-incremental (solver1) and an
5380    /// incremental solver (solver2). This combined solver changes its behaviour based
5381    /// on how it is used and how its parameters are set.
5382    ///
5383    /// If the solver is used in a non incremental way (i.e. no calls to
5384    /// [`Z3_solver_push`] or [`Z3_solver_pop`], and no calls to
5385    /// [`Z3_solver_assert`] or [`Z3_solver_assert_and_track`] after checking
5386    /// satisfiability without an intervening [`Z3_solver_reset`]) then solver1
5387    /// will be used. This solver will apply Z3's "default" tactic.
5388    ///
5389    /// The "default" tactic will attempt to probe the logic used by the
5390    /// assertions and will apply a specialized tactic if one is supported.
5391    /// Otherwise the general `(and-then simplify smt)` tactic will be used.
5392    ///
5393    /// If the solver is used in an incremental way then the combined solver
5394    /// will switch to using solver2 (which behaves similarly to the general
5395    /// "smt" tactic).
5396    ///
5397    /// Note however it is possible to set the `solver2_timeout`,
5398    /// `solver2_unknown`, and `ignore_solver1` parameters of the combined
5399    /// solver to change its behaviour.
5400    ///
5401    /// The function [`Z3_solver_get_model`] retrieves a model if the
5402    /// assertions is satisfiable (i.e., the result is
5403    /// `Z3_L_TRUE`) and model construction is enabled.
5404    /// The function [`Z3_solver_get_model`] can also be used even
5405    /// if the result is `Z3_L_UNDEF`, but the returned model
5406    /// is not guaranteed to satisfy quantified assertions.
5407    ///
5408    /// NOTE: User must use [`Z3_solver_inc_ref`] and [`Z3_solver_dec_ref`] to manage solver objects.
5409    /// Even if the context was created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
5410    ///
5411    /// # See also:
5412    ///
5413    /// - [`Z3_mk_simple_solver`]
5414    /// - [`Z3_mk_solver_for_logic`]
5415    /// - [`Z3_mk_solver_from_tactic`]
5416    pub fn Z3_mk_solver(c: Z3_context) -> Z3_solver;
5417
5418    /// Create a new incremental solver.
5419    ///
5420    /// This is equivalent to applying the "smt" tactic.
5421    ///
5422    /// Unlike [`Z3_mk_solver`] this solver
5423    /// - Does not attempt to apply any logic specific tactics.
5424    /// - Does not change its behaviour based on whether it used
5425    ///   incrementally/non-incrementally.
5426    ///
5427    /// Note that these differences can result in very different performance
5428    /// compared to `Z3_mk_solver()`.
5429    ///
5430    /// The function [`Z3_solver_get_model`] retrieves a model if the
5431    /// assertions is satisfiable (i.e., the result is
5432    /// `Z3_L_TRUE`) and model construction is enabled.
5433    /// The function [`Z3_solver_get_model`] can also be used even
5434    /// if the result is `Z3_L_UNDEF`, but the returned model
5435    /// is not guaranteed to satisfy quantified assertions.
5436    ///
5437    /// NOTE: User must use [`Z3_solver_inc_ref`] and [`Z3_solver_dec_ref`] to manage solver objects.
5438    /// Even if the context was created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
5439    ///
5440    /// # See also:
5441    ///
5442    /// - [`Z3_mk_solver`]
5443    /// - [`Z3_mk_solver_for_logic`]
5444    /// - [`Z3_mk_solver_from_tactic`]
5445    pub fn Z3_mk_simple_solver(c: Z3_context) -> Z3_solver;
5446
5447    /// Create a new solver customized for the given logic.
5448    /// It behaves like [`Z3_mk_solver`] if the logic is unknown or unsupported.
5449    ///
5450    /// NOTE: User must use [`Z3_solver_inc_ref`] and [`Z3_solver_dec_ref`] to manage solver objects.
5451    /// Even if the context was created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
5452    ///
5453    /// # See also:
5454    ///
5455    /// - [`Z3_mk_solver`]
5456    /// - [`Z3_mk_simple_solver`]
5457    /// - [`Z3_mk_solver_from_tactic`]
5458    pub fn Z3_mk_solver_for_logic(c: Z3_context, logic: Z3_symbol) -> Z3_solver;
5459
5460    /// Create a new solver that is implemented using the given tactic.
5461    /// The solver supports the commands [`Z3_solver_push`] and [`Z3_solver_pop`], but it
5462    /// will always solve each [`Z3_solver_check`] from scratch.
5463    ///
5464    /// NOTE: User must use [`Z3_solver_inc_ref`] and [`Z3_solver_dec_ref`] to manage solver objects.
5465    /// Even if the context was created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
5466    ///
5467    /// # See also:
5468    ///
5469    /// - [`Z3_mk_solver`]
5470    /// - [`Z3_mk_simple_solver`]
5471    /// - [`Z3_mk_solver_for_logic`]
5472    pub fn Z3_mk_solver_from_tactic(c: Z3_context, t: Z3_tactic) -> Z3_solver;
5473
5474    /// Copy a solver `s` from the context `source` to the context `target`.
5475    pub fn Z3_solver_translate(source: Z3_context, s: Z3_solver, target: Z3_context) -> Z3_solver;
5476
5477    /// Ad-hoc method for importing model conversion from solver.
5478    pub fn Z3_solver_import_model_converter(ctx: Z3_context, src: Z3_solver, dst: Z3_solver);
5479
5480    /// Return a string describing all solver available parameters.
5481    ///
5482    /// # See also:
5483    ///
5484    /// - [`Z3_solver_get_param_descrs`]
5485    /// - [`Z3_solver_set_params`]
5486    pub fn Z3_solver_get_help(c: Z3_context, s: Z3_solver) -> Z3_string;
5487
5488    /// Return the parameter description set for the given solver object.
5489    ///
5490    /// # See also:
5491    ///
5492    /// - [`Z3_solver_get_help`]
5493    /// - [`Z3_solver_set_params`]
5494    pub fn Z3_solver_get_param_descrs(c: Z3_context, s: Z3_solver) -> Z3_param_descrs;
5495
5496    /// Set the given solver using the given parameters.
5497    ///
5498    /// # See also:
5499    ///
5500    /// - [`Z3_solver_get_help`]
5501    /// - [`Z3_solver_get_param_descrs`]
5502    pub fn Z3_solver_set_params(c: Z3_context, s: Z3_solver, p: Z3_params);
5503
5504    /// Increment the reference counter of the given solver.
5505    pub fn Z3_solver_inc_ref(c: Z3_context, s: Z3_solver);
5506
5507    /// Decrement the reference counter of the given solver.
5508    pub fn Z3_solver_dec_ref(c: Z3_context, s: Z3_solver);
5509
5510    /// Create a backtracking point.
5511    ///
5512    /// The solver contains a stack of assertions.
5513    ///
5514    /// # See also:
5515    ///
5516    /// - [`Z3_solver_pop`]
5517    pub fn Z3_solver_push(c: Z3_context, s: Z3_solver);
5518
5519    /// Backtrack `n` backtracking points.
5520    ///
5521    /// # See also:
5522    ///
5523    /// - [`Z3_solver_push`]
5524    ///
5525    /// # Preconditions:
5526    ///
5527    /// - `n <= Z3_solver_get_num_scopes(c, s)`
5528    pub fn Z3_solver_pop(c: Z3_context, s: Z3_solver, n: ::std::os::raw::c_uint);
5529
5530    /// Remove all assertions from the solver.
5531    ///
5532    /// # See also:
5533    ///
5534    /// - [`Z3_solver_assert`]
5535    /// - [`Z3_solver_assert_and_track`]
5536    pub fn Z3_solver_reset(c: Z3_context, s: Z3_solver);
5537
5538    /// Return the number of backtracking points.
5539    ///
5540    /// # See also:
5541    ///
5542    /// - [`Z3_solver_push`]
5543    /// - [`Z3_solver_pop`]
5544    pub fn Z3_solver_get_num_scopes(c: Z3_context, s: Z3_solver) -> ::std::os::raw::c_uint;
5545
5546    /// Assert a constraint into the solver.
5547    ///
5548    /// The functions [`Z3_solver_check`] and [`Z3_solver_check_assumptions`] should be
5549    /// used to check whether the logical context is consistent or not.
5550    ///
5551    /// # See also:
5552    ///
5553    /// - [`Z3_solver_assert_and_track`]
5554    /// - [`Z3_solver_reset`]
5555    pub fn Z3_solver_assert(c: Z3_context, s: Z3_solver, a: Z3_ast);
5556
5557    /// Assert a constraint `a` into the solver, and track it (in the
5558    /// unsat) core using the Boolean constant `p`.
5559    ///
5560    /// This API is an alternative to [`Z3_solver_check_assumptions`]
5561    /// for extracting unsat cores. Both APIs can be used in the same solver.
5562    /// The unsat core will contain a combination of the Boolean variables
5563    /// provided using [`Z3_solver_assert_and_track`]
5564    /// and the Boolean literals provided using
5565    /// [`Z3_solver_check_assumptions`].
5566    ///
5567    /// # Preconditions:
5568    ///
5569    /// * `a` must be a Boolean expression
5570    /// * `p` must be a Boolean constant (aka variable).
5571    ///
5572    /// # See also:
5573    ///
5574    /// - [`Z3_solver_assert`]
5575    /// - [`Z3_solver_reset`]
5576    pub fn Z3_solver_assert_and_track(c: Z3_context, s: Z3_solver, a: Z3_ast, p: Z3_ast);
5577
5578    /// load solver assertions from a file.
5579    ///
5580    /// # See also:
5581    ///
5582    /// - [`Z3_solver_from_string`]
5583    /// - [`Z3_solver_to_string`]
5584    pub fn Z3_solver_from_file(c: Z3_context, s: Z3_solver, file_name: Z3_string);
5585
5586    /// load solver assertions from a string.
5587    ///
5588    /// # See also:
5589    ///
5590    /// - [`Z3_solver_from_file`]
5591    /// - [`Z3_solver_to_string`]
5592    pub fn Z3_solver_from_string(c: Z3_context, s: Z3_solver, c_str: Z3_string);
5593
5594    /// Return the set of asserted formulas on the solver.
5595    pub fn Z3_solver_get_assertions(c: Z3_context, s: Z3_solver) -> Z3_ast_vector;
5596
5597    /// Return the set of units modulo model conversion.
5598    pub fn Z3_solver_get_units(c: Z3_context, s: Z3_solver) -> Z3_ast_vector;
5599
5600    /// Return the set of non units in the solver state.
5601    pub fn Z3_solver_get_non_units(c: Z3_context, s: Z3_solver) -> Z3_ast_vector;
5602
5603    /// Check whether the assertions in a given solver are consistent or not.
5604    ///
5605    /// The function [`Z3_solver_get_model`]
5606    /// retrieves a model if the assertions is satisfiable (i.e., the
5607    /// result is `Z3_L_TRUE`) and model construction is enabled.
5608    /// Note that if the call returns `Z3_L_UNDEF`, Z3 does not
5609    /// ensure that calls to [`Z3_solver_get_model`]
5610    /// succeed and any models produced in this case are not guaranteed
5611    /// to satisfy the assertions.
5612    ///
5613    /// The function [`Z3_solver_get_proof`]
5614    /// retrieves a proof if proof generation was enabled when the context
5615    /// was created, and the assertions are unsatisfiable (i.e., the result
5616    /// is `Z3_L_FALSE`).
5617    ///
5618    /// # See also:
5619    ///
5620    /// - [`Z3_solver_check_assumptions`]
5621    pub fn Z3_solver_check(c: Z3_context, s: Z3_solver) -> Z3_lbool;
5622
5623    /// Check whether the assertions in the given solver and
5624    /// optional assumptions are consistent or not.
5625    ///
5626    /// The function
5627    /// [`Z3_solver_get_unsat_core`]
5628    /// retrieves the subset of the assumptions used in the
5629    /// unsatisfiability proof produced by Z3.
5630    ///
5631    /// # See also:
5632    ///
5633    /// - [`Z3_solver_check`]
5634    pub fn Z3_solver_check_assumptions(
5635        c: Z3_context,
5636        s: Z3_solver,
5637        num_assumptions: ::std::os::raw::c_uint,
5638        assumptions: *const Z3_ast,
5639    ) -> Z3_lbool;
5640
5641    /// Retrieve congruence class representatives for terms.
5642    ///
5643    /// The function can be used for relying on Z3 to identify equal terms under the current
5644    /// set of assumptions. The array of terms and array of class identifiers should have
5645    /// the same length. The class identifiers are numerals that are assigned to the same
5646    /// value for their corresponding terms if the current context forces the terms to be
5647    /// equal. You cannot deduce that terms corresponding to different numerals must be all different,
5648    /// (especially when using non-convex theories).
5649    /// All implied equalities are returned by this call.
5650    /// This means that two terms map to the same class identifier if and only if
5651    /// the current context implies that they are equal.
5652    ///
5653    /// A side-effect of the function is a satisfiability check on the assertions on the solver that is passed in.
5654    /// The function return `Z3_L_FALSE` if the current assertions are not satisfiable.
5655    pub fn Z3_get_implied_equalities(
5656        c: Z3_context,
5657        s: Z3_solver,
5658        num_terms: ::std::os::raw::c_uint,
5659        terms: *const Z3_ast,
5660        class_ids: *mut ::std::os::raw::c_uint,
5661    ) -> Z3_lbool;
5662
5663    /// retrieve consequences from solver that determine values of the supplied function symbols.
5664    pub fn Z3_solver_get_consequences(
5665        c: Z3_context,
5666        s: Z3_solver,
5667        assumptions: Z3_ast_vector,
5668        variables: Z3_ast_vector,
5669        consequences: Z3_ast_vector,
5670    ) -> Z3_lbool;
5671
5672    /// Extract a next cube for a solver. The last cube is the constant `true` or `false`.
5673    /// The number of (non-constant) cubes is by default 1. For the sat solver cubing is controlled
5674    /// using parameters sat.lookahead.cube.cutoff and sat.lookahead.cube.fraction.
5675    ///
5676    /// The third argument is a vector of variables that may be used for cubing.
5677    /// The contents of the vector is only used in the first call. The initial list of variables
5678    /// is used in subsequent calls until it returns the unsatisfiable cube.
5679    /// The vector is modified to contain a set of Autarky variables that occur in clauses that
5680    /// are affected by the (last literal in the) cube. These variables could be used by a different
5681    /// cuber (on a different solver object) for further recursive cubing.
5682    ///
5683    /// The last argument is a backtracking level. It instructs the cube process to backtrack below
5684    /// the indicated level for the next cube.
5685    pub fn Z3_solver_cube(
5686        c: Z3_context,
5687        s: Z3_solver,
5688        vars: Z3_ast_vector,
5689        backtrack_level: ::std::os::raw::c_uint,
5690    ) -> Z3_ast_vector;
5691
5692    /// Retrieve the model for the last [`Z3_solver_check`]
5693    ///
5694    /// The error handler is invoked if a model is not available because
5695    /// the commands above were not invoked for the given solver, or if the result was `Z3_L_FALSE`.
5696    pub fn Z3_solver_get_model(c: Z3_context, s: Z3_solver) -> Z3_model;
5697
5698    /// Retrieve the proof for the last [`Z3_solver_check`]
5699    ///
5700    /// The error handler is invoked if proof generation is not enabled,
5701    /// or if the commands above were not invoked for the given solver,
5702    /// or if the result was different from `Z3_L_FALSE`.
5703    pub fn Z3_solver_get_proof(c: Z3_context, s: Z3_solver) -> Z3_ast;
5704
5705    /// Retrieve the unsat core for the last [`Z3_solver_check_assumptions`]
5706    /// The unsat core is a subset of the assumptions `a`.
5707    ///
5708    /// By default, the unsat core will not be minimized. Generation of a minimized
5709    /// unsat core can be enabled via the `"sat.core.minimize"` and `"smt.core.minimize"`
5710    /// settings for SAT and SMT cores respectively. Generation of minimized unsat cores
5711    /// will be more expensive.
5712    pub fn Z3_solver_get_unsat_core(c: Z3_context, s: Z3_solver) -> Z3_ast_vector;
5713
5714    /// Return a brief justification for an "unknown" result (i.e., `Z3_L_UNDEF`) for
5715    /// the commands [`Z3_solver_check`]
5716    pub fn Z3_solver_get_reason_unknown(c: Z3_context, s: Z3_solver) -> Z3_string;
5717
5718    /// Return statistics for the given solver.
5719    ///
5720    /// NOTE: User must use [`Z3_stats_inc_ref`] and [`Z3_stats_dec_ref`] to manage [`Z3_stats`] objects.
5721    pub fn Z3_solver_get_statistics(c: Z3_context, s: Z3_solver) -> Z3_stats;
5722
5723    /// Convert a solver into a string.
5724    ///
5725    /// # See also:
5726    ///
5727    /// - [`Z3_solver_from_file`]
5728    /// - [`Z3_solver_from_string`]
5729    pub fn Z3_solver_to_string(c: Z3_context, s: Z3_solver) -> Z3_string;
5730
5731    /// Convert a statistics into a string.
5732    pub fn Z3_stats_to_string(c: Z3_context, s: Z3_stats) -> Z3_string;
5733
5734    /// Increment the reference counter of the given statistics object.
5735    pub fn Z3_stats_inc_ref(c: Z3_context, s: Z3_stats);
5736
5737    /// Decrement the reference counter of the given statistics object.
5738    pub fn Z3_stats_dec_ref(c: Z3_context, s: Z3_stats);
5739
5740    /// Return the number of statistical data in `s`.
5741    pub fn Z3_stats_size(c: Z3_context, s: Z3_stats) -> ::std::os::raw::c_uint;
5742
5743    /// Return the key (a string) for a particular statistical data.
5744    ///
5745    /// # Preconditions:
5746    ///
5747    /// - `idx < Z3_stats_size(c, s)`
5748    pub fn Z3_stats_get_key(c: Z3_context, s: Z3_stats, idx: ::std::os::raw::c_uint) -> Z3_string;
5749
5750    /// Return `true` if the given statistical data is a unsigned integer.
5751    ///
5752    /// # Preconditions:
5753    ///
5754    /// - `idx < Z3_stats_size(c, s)`
5755    pub fn Z3_stats_is_uint(c: Z3_context, s: Z3_stats, idx: ::std::os::raw::c_uint) -> bool;
5756
5757    /// Return `true` if the given statistical data is a double.
5758    ///
5759    /// # Preconditions:
5760    ///
5761    /// - `idx < Z3_stats_size(c, s)`
5762    pub fn Z3_stats_is_double(c: Z3_context, s: Z3_stats, idx: ::std::os::raw::c_uint) -> bool;
5763
5764    /// Return the unsigned value of the given statistical data.
5765    ///
5766    /// # Preconditions:
5767    ///
5768    /// - `idx < Z3_stats_size(c, s) && Z3_stats_is_uint(c, s)`
5769    pub fn Z3_stats_get_uint_value(
5770        c: Z3_context,
5771        s: Z3_stats,
5772        idx: ::std::os::raw::c_uint,
5773    ) -> ::std::os::raw::c_uint;
5774
5775    /// Return the double value of the given statistical data.
5776    ///
5777    /// # Preconditions:
5778    ///
5779    /// - `idx < Z3_stats_size(c, s) && Z3_stats_is_double(c, s)`
5780    pub fn Z3_stats_get_double_value(
5781        c: Z3_context,
5782        s: Z3_stats,
5783        idx: ::std::os::raw::c_uint,
5784    ) -> f64;
5785
5786    /// Return the estimated allocated memory in bytes.
5787    pub fn Z3_get_estimated_alloc_size() -> u64;
5788
5789    /// Return an empty AST vector.
5790    ///
5791    /// NOTE: Reference counting must be used to manage AST vectors, even when the `Z3_context` was
5792    /// created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
5793    pub fn Z3_mk_ast_vector(c: Z3_context) -> Z3_ast_vector;
5794
5795    /// Increment the reference counter of the given AST vector.
5796    pub fn Z3_ast_vector_inc_ref(c: Z3_context, v: Z3_ast_vector);
5797
5798    /// Decrement the reference counter of the given AST vector.
5799    pub fn Z3_ast_vector_dec_ref(c: Z3_context, v: Z3_ast_vector);
5800
5801    /// Return the size of the given AST vector.
5802    pub fn Z3_ast_vector_size(c: Z3_context, v: Z3_ast_vector) -> ::std::os::raw::c_uint;
5803
5804    /// Return the AST at position `i` in the AST vector `v`.
5805    ///
5806    /// # Preconditions:
5807    ///
5808    /// - `i < Z3_ast_vector_size(c, v)`
5809    pub fn Z3_ast_vector_get(c: Z3_context, v: Z3_ast_vector, i: ::std::os::raw::c_uint) -> Z3_ast;
5810
5811    /// Update position `i` of the AST vector `v` with the AST `a`.
5812    ///
5813    /// # Preconditions:
5814    ///
5815    /// - `i < Z3_ast_vector_size(c, v)`
5816    pub fn Z3_ast_vector_set(c: Z3_context, v: Z3_ast_vector, i: ::std::os::raw::c_uint, a: Z3_ast);
5817
5818    /// Resize the AST vector `v`.
5819    pub fn Z3_ast_vector_resize(c: Z3_context, v: Z3_ast_vector, n: ::std::os::raw::c_uint);
5820
5821    /// Add the AST `a` in the end of the AST vector `v`. The size of `v` is increased by one.
5822    pub fn Z3_ast_vector_push(c: Z3_context, v: Z3_ast_vector, a: Z3_ast);
5823
5824    /// Translate the AST vector `v` from context `s` into an AST vector in context `t`.
5825    pub fn Z3_ast_vector_translate(s: Z3_context, v: Z3_ast_vector, t: Z3_context)
5826        -> Z3_ast_vector;
5827
5828    /// Convert AST vector into a string.
5829    pub fn Z3_ast_vector_to_string(c: Z3_context, v: Z3_ast_vector) -> Z3_string;
5830
5831    /// Return an empty mapping from AST to AST
5832    ///
5833    /// NOTE: Reference counting must be used to manage AST maps, even when the `Z3_context` was
5834    /// created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
5835    pub fn Z3_mk_ast_map(c: Z3_context) -> Z3_ast_map;
5836
5837    /// Increment the reference counter of the given AST map.
5838    pub fn Z3_ast_map_inc_ref(c: Z3_context, m: Z3_ast_map);
5839
5840    /// Decrement the reference counter of the given AST map.
5841    pub fn Z3_ast_map_dec_ref(c: Z3_context, m: Z3_ast_map);
5842
5843    /// Return true if the map `m` contains the AST key `k`.
5844    pub fn Z3_ast_map_contains(c: Z3_context, m: Z3_ast_map, k: Z3_ast) -> bool;
5845
5846    /// Return the value associated with the key `k`.
5847    ///
5848    /// The procedure invokes the error handler if `k` is not in the map.
5849    pub fn Z3_ast_map_find(c: Z3_context, m: Z3_ast_map, k: Z3_ast) -> Z3_ast;
5850
5851    /// Store/Replace a new key, value pair in the given map.
5852    pub fn Z3_ast_map_insert(c: Z3_context, m: Z3_ast_map, k: Z3_ast, v: Z3_ast);
5853
5854    /// Erase a key from the map.
5855    pub fn Z3_ast_map_erase(c: Z3_context, m: Z3_ast_map, k: Z3_ast);
5856
5857    /// Remove all keys from the given map.
5858    pub fn Z3_ast_map_reset(c: Z3_context, m: Z3_ast_map);
5859
5860    /// Return the size of the given map.
5861    pub fn Z3_ast_map_size(c: Z3_context, m: Z3_ast_map) -> ::std::os::raw::c_uint;
5862
5863    /// Return the keys stored in the given map.
5864    pub fn Z3_ast_map_keys(c: Z3_context, m: Z3_ast_map) -> Z3_ast_vector;
5865
5866    /// Convert the given map into a string.
5867    pub fn Z3_ast_map_to_string(c: Z3_context, m: Z3_ast_map) -> Z3_string;
5868
5869    /// Return `true` if `a` can be used as value in the Z3 real algebraic
5870    /// number package.
5871    pub fn Z3_algebraic_is_value(c: Z3_context, a: Z3_ast) -> bool;
5872
5873    /// Return `true` if `a` is positive, and `false` otherwise.
5874    ///
5875    /// # Preconditions:
5876    ///
5877    /// - `Z3_algebraic_is_value(c, a)`
5878    ///
5879    /// # See also:
5880    ///
5881    /// - [`Z3_algebraic_is_value`]
5882    pub fn Z3_algebraic_is_pos(c: Z3_context, a: Z3_ast) -> bool;
5883
5884    /// Return `true` if `a` is negative, and `false` otherwise.
5885    ///
5886    /// # Preconditions:
5887    ///
5888    /// - `Z3_algebraic_is_value(c, a)`
5889    ///
5890    /// # See also:
5891    ///
5892    /// - [`Z3_algebraic_is_value`]
5893    pub fn Z3_algebraic_is_neg(c: Z3_context, a: Z3_ast) -> bool;
5894
5895    /// Return `true` if `a` is zero, and `false` otherwise.
5896    ///
5897    /// # Preconditions:
5898    ///
5899    /// - `Z3_algebraic_is_value(c, a)`
5900    ///
5901    /// # See also:
5902    ///
5903    /// - [`Z3_algebraic_is_value`]
5904    pub fn Z3_algebraic_is_zero(c: Z3_context, a: Z3_ast) -> bool;
5905
5906    /// Return 1 if `a` is positive, 0 if `a` is zero, and -1 if `a` is negative.
5907    ///
5908    /// # Preconditions:
5909    ///
5910    /// - `Z3_algebraic_is_value(c, a)`
5911    ///
5912    /// # See also:
5913    ///
5914    /// - [`Z3_algebraic_is_value`]
5915    pub fn Z3_algebraic_sign(c: Z3_context, a: Z3_ast) -> ::std::os::raw::c_int;
5916
5917    /// Return the value `a + b`.
5918    ///
5919    /// # Preconditions:
5920    ///
5921    /// - `Z3_algebraic_is_value(c, a)`
5922    /// - `Z3_algebraic_is_value(c, b)`
5923    ///
5924    /// # Postconditions:
5925    ///
5926    /// - `Z3_algebraic_is_value(c, result)`
5927    ///
5928    /// # See also:
5929    ///
5930    /// - [`Z3_algebraic_is_value`]
5931    pub fn Z3_algebraic_add(c: Z3_context, a: Z3_ast, b: Z3_ast) -> Z3_ast;
5932
5933    /// Return the value `a - b`.
5934    ///
5935    /// # Preconditions:
5936    ///
5937    /// - `Z3_algebraic_is_value(c, a)`
5938    /// - `Z3_algebraic_is_value(c, b)`
5939    ///
5940    /// # Postconditions:
5941    ///
5942    /// - `Z3_algebraic_is_value(c, result)`
5943    ///
5944    /// # See also:
5945    ///
5946    /// - [`Z3_algebraic_is_value`]
5947    pub fn Z3_algebraic_sub(c: Z3_context, a: Z3_ast, b: Z3_ast) -> Z3_ast;
5948
5949    /// Return the value `a * b`.
5950    ///
5951    /// # Preconditions:
5952    ///
5953    /// - `Z3_algebraic_is_value(c, a)`
5954    /// - `Z3_algebraic_is_value(c, b)`
5955    ///
5956    /// # Postconditions:
5957    ///
5958    /// - `Z3_algebraic_is_value(c, result)`
5959    ///
5960    /// # See also:
5961    ///
5962    /// - [`Z3_algebraic_is_value`]
5963    pub fn Z3_algebraic_mul(c: Z3_context, a: Z3_ast, b: Z3_ast) -> Z3_ast;
5964
5965    /// Return the value `a / b`.
5966    ///
5967    /// # Preconditions:
5968    ///
5969    /// - `Z3_algebraic_is_value(c, a)`
5970    /// - `Z3_algebraic_is_value(c, b)`
5971    /// - `!Z3_algebraic_is_zero(c, b)`
5972    ///
5973    /// # Postconditions:
5974    ///
5975    /// - `Z3_algebraic_is_value(c, result)`
5976    ///
5977    /// # See also:
5978    ///
5979    /// - [`Z3_algebraic_is_value`]
5980    /// - [`Z3_algebraic_is_zero`]
5981    pub fn Z3_algebraic_div(c: Z3_context, a: Z3_ast, b: Z3_ast) -> Z3_ast;
5982
5983    /// Return the `a^(1/k)`
5984    ///
5985    /// # Preconditions:
5986    ///
5987    /// - `Z3_algebraic_is_value(c, a)`
5988    /// - k is even => `!Z3_algebraic_is_neg(c, a)`
5989    ///
5990    /// # Postconditions:
5991    ///
5992    /// - `Z3_algebraic_is_value(c, result)`
5993    ///
5994    /// # See also:
5995    ///
5996    /// - [`Z3_algebraic_is_neg`]
5997    /// - [`Z3_algebraic_is_value`]
5998    pub fn Z3_algebraic_root(c: Z3_context, a: Z3_ast, k: ::std::os::raw::c_uint) -> Z3_ast;
5999
6000    /// Return the `a^k`
6001    ///
6002    /// # Preconditions:
6003    ///
6004    /// - `Z3_algebraic_is_value(c, a)`
6005    ///
6006    /// # Postconditions:
6007    ///
6008    /// - `Z3_algebraic_is_value(c, result)`
6009    ///
6010    /// # See also:
6011    ///
6012    /// - [`Z3_algebraic_is_value`]
6013    pub fn Z3_algebraic_power(c: Z3_context, a: Z3_ast, k: ::std::os::raw::c_uint) -> Z3_ast;
6014
6015    /// Return `true` if `a < b`, and `false` otherwise.
6016    ///
6017    /// # Preconditions:
6018    ///
6019    /// - `Z3_algebraic_is_value(c, a)`
6020    /// - `Z3_algebraic_is_value(c, b)`
6021    ///
6022    /// # See also:
6023    ///
6024    /// - [`Z3_algebraic_is_value`]
6025    pub fn Z3_algebraic_lt(c: Z3_context, a: Z3_ast, b: Z3_ast) -> bool;
6026
6027    /// Return `true` if `a > b`, and `false` otherwise.
6028    ///
6029    /// # Preconditions:
6030    ///
6031    /// - `Z3_algebraic_is_value(c, a)`
6032    /// - `Z3_algebraic_is_value(c, b)`
6033    ///
6034    /// # See also:
6035    ///
6036    /// - [`Z3_algebraic_is_value`]
6037    pub fn Z3_algebraic_gt(c: Z3_context, a: Z3_ast, b: Z3_ast) -> bool;
6038
6039    /// Return `true` if `a <= b`, and `false` otherwise.
6040    ///
6041    /// # Preconditions:
6042    ///
6043    /// - `Z3_algebraic_is_value(c, a)`
6044    /// - `Z3_algebraic_is_value(c, b)`
6045    ///
6046    /// # See also:
6047    ///
6048    /// - [`Z3_algebraic_is_value`]
6049    pub fn Z3_algebraic_le(c: Z3_context, a: Z3_ast, b: Z3_ast) -> bool;
6050
6051    /// Return `true` if `a >= b`, and `false` otherwise.
6052    ///
6053    /// # Preconditions:
6054    ///
6055    /// - `Z3_algebraic_is_value(c, a)`
6056    /// - `Z3_algebraic_is_value(c, b)`
6057    ///
6058    /// # See also:
6059    ///
6060    /// - [`Z3_algebraic_is_value`]
6061    pub fn Z3_algebraic_ge(c: Z3_context, a: Z3_ast, b: Z3_ast) -> bool;
6062
6063    /// Return `true` if `a == b`, and `false` otherwise.
6064    ///
6065    /// # Preconditions:
6066    ///
6067    /// - `Z3_algebraic_is_value(c, a)`
6068    /// - `Z3_algebraic_is_value(c, b)`
6069    ///
6070    /// # See also:
6071    ///
6072    /// - [`Z3_algebraic_is_value`]
6073    pub fn Z3_algebraic_eq(c: Z3_context, a: Z3_ast, b: Z3_ast) -> bool;
6074
6075    /// Return `true` if `a != b`, and `false` otherwise.
6076    ///
6077    /// # Preconditions:
6078    ///
6079    /// - `Z3_algebraic_is_value(c, a)`
6080    /// - `Z3_algebraic_is_value(c, b)`
6081    ///
6082    /// # See also:
6083    ///
6084    /// - [`Z3_algebraic_is_value`]
6085    pub fn Z3_algebraic_neq(c: Z3_context, a: Z3_ast, b: Z3_ast) -> bool;
6086
6087    /// Given a multivariate polynomial `p(x_0, ..., x_{n-1}, x_n)`, returns the
6088    /// roots of the univariate polynomial `p(a[0], ..., a[n-1], x_n)`.
6089    ///
6090    /// # Preconditions:
6091    ///
6092    /// - `p` is a Z3 expression that contains only arithmetic terms and free variables.
6093    /// - `forall i in [0, n) Z3_algebraic_is_value(c, a[i])`
6094    ///
6095    /// # Postconditions:
6096    ///
6097    /// - `forall r in result Z3_algebraic_is_value(c, result)`
6098    ///
6099    /// # See also:
6100    ///
6101    /// - [`Z3_algebraic_is_value`]
6102    pub fn Z3_algebraic_roots(
6103        c: Z3_context,
6104        p: Z3_ast,
6105        n: ::std::os::raw::c_uint,
6106        a: *mut Z3_ast,
6107    ) -> Z3_ast_vector;
6108
6109    /// Given a multivariate polynomial `p(x_0, ..., x_{n-1})`, return the
6110    /// sign of `p(a[0], ..., a[n-1])`.
6111    ///
6112    /// # Preconditions:
6113    ///
6114    /// - `p` is a Z3 expression that contains only arithmetic terms and free variables.
6115    /// - `forall i in [0, n) Z3_algebraic_is_value(c, a[i])`
6116    ///
6117    /// # See also:
6118    ///
6119    /// - [`Z3_algebraic_is_value`]
6120    pub fn Z3_algebraic_eval(
6121        c: Z3_context,
6122        p: Z3_ast,
6123        n: ::std::os::raw::c_uint,
6124        a: *mut Z3_ast,
6125    ) -> ::std::os::raw::c_int;
6126
6127    /// Return the nonzero subresultants of `p` and `q` with respect to the "variable" `x`.
6128    ///
6129    /// # Preconditions:
6130    ///
6131    /// - `p`, `q` and `x` are Z3 expressions where `p` and `q` are arithmetic terms.
6132    ///
6133    /// Note that, any subterm that cannot be viewed as a polynomial is assumed to be a variable.
6134    /// Example: `f(a)` is a considered to be a variable in the polynomial
6135    /// `f(a)*f(a) + 2*f(a) + 1`
6136    pub fn Z3_polynomial_subresultants(
6137        c: Z3_context,
6138        p: Z3_ast,
6139        q: Z3_ast,
6140        x: Z3_ast,
6141    ) -> Z3_ast_vector;
6142
6143    /// Delete a RCF numeral created using the RCF API.
6144    pub fn Z3_rcf_del(c: Z3_context, a: Z3_rcf_num);
6145
6146    /// Return a RCF rational using the given string.
6147    pub fn Z3_rcf_mk_rational(c: Z3_context, val: Z3_string) -> Z3_rcf_num;
6148
6149    /// Return a RCF small integer.
6150    pub fn Z3_rcf_mk_small_int(c: Z3_context, val: ::std::os::raw::c_int) -> Z3_rcf_num;
6151
6152    /// Return Pi
6153    pub fn Z3_rcf_mk_pi(c: Z3_context) -> Z3_rcf_num;
6154
6155    /// Return e (Euler's constant)
6156    pub fn Z3_rcf_mk_e(c: Z3_context) -> Z3_rcf_num;
6157
6158    /// Return a new infinitesimal that is smaller than all elements in the Z3 field.
6159    pub fn Z3_rcf_mk_infinitesimal(c: Z3_context) -> Z3_rcf_num;
6160
6161    /// Store in roots the roots of the polynomial `a[n-1]*x^{n-1} + ... + a[0]`.
6162    /// The output vector `roots` must have size `n`.
6163    /// It returns the number of roots of the polynomial.
6164    ///
6165    /// # Preconditions:
6166    ///
6167    /// - The input polynomial is not the zero polynomial.
6168    pub fn Z3_rcf_mk_roots(
6169        c: Z3_context,
6170        n: ::std::os::raw::c_uint,
6171        a: *const Z3_rcf_num,
6172        roots: *mut Z3_rcf_num,
6173    ) -> ::std::os::raw::c_uint;
6174
6175    /// Return the value `a + b`.
6176    pub fn Z3_rcf_add(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> Z3_rcf_num;
6177
6178    /// Return the value `a - b`.
6179    pub fn Z3_rcf_sub(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> Z3_rcf_num;
6180
6181    /// Return the value `a * b`.
6182    pub fn Z3_rcf_mul(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> Z3_rcf_num;
6183
6184    /// Return the value `a / b`.
6185    pub fn Z3_rcf_div(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> Z3_rcf_num;
6186
6187    /// Return the value `-a`.
6188    pub fn Z3_rcf_neg(c: Z3_context, a: Z3_rcf_num) -> Z3_rcf_num;
6189
6190    /// Return the value `1/a`.
6191    pub fn Z3_rcf_inv(c: Z3_context, a: Z3_rcf_num) -> Z3_rcf_num;
6192
6193    /// Return the value `a^k`.
6194    pub fn Z3_rcf_power(c: Z3_context, a: Z3_rcf_num, k: ::std::os::raw::c_uint) -> Z3_rcf_num;
6195
6196    /// Return `true` if `a < b`.
6197    pub fn Z3_rcf_lt(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> bool;
6198
6199    /// Return `true` if `a > b`.
6200    pub fn Z3_rcf_gt(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> bool;
6201
6202    /// Return `true` if `a <= b`.
6203    pub fn Z3_rcf_le(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> bool;
6204
6205    /// Return `true` if `a >= b`.
6206    pub fn Z3_rcf_ge(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> bool;
6207
6208    /// Return `true` if `a == b`.
6209    pub fn Z3_rcf_eq(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> bool;
6210
6211    /// Return `true` if `a != b`.
6212    pub fn Z3_rcf_neq(c: Z3_context, a: Z3_rcf_num, b: Z3_rcf_num) -> bool;
6213
6214    /// Convert the RCF numeral into a string.
6215    pub fn Z3_rcf_num_to_string(
6216        c: Z3_context,
6217        a: Z3_rcf_num,
6218        compact: bool,
6219        html: bool,
6220    ) -> Z3_string;
6221
6222    /// Convert the RCF numeral into a string in decimal notation.
6223    pub fn Z3_rcf_num_to_decimal_string(
6224        c: Z3_context,
6225        a: Z3_rcf_num,
6226        prec: ::std::os::raw::c_uint,
6227    ) -> Z3_string;
6228
6229    /// Extract the "numerator" and "denominator" of the given RCF numeral.
6230    ///
6231    /// We have that `a = n/d`, moreover `n` and `d` are not represented using rational functions.
6232    pub fn Z3_rcf_get_numerator_denominator(
6233        c: Z3_context,
6234        a: Z3_rcf_num,
6235        n: *mut Z3_rcf_num,
6236        d: *mut Z3_rcf_num,
6237    );
6238
6239    /// Create a new fixedpoint context.
6240    ///
6241    /// NOTE: User must use [`Z3_fixedpoint_inc_ref`] and [`Z3_fixedpoint_dec_ref`] to manage fixedpoint objects.
6242    /// Even if the context was created using [`Z3_mk_context`] instead of [`Z3_mk_context_rc`].
6243    pub fn Z3_mk_fixedpoint(c: Z3_context) -> Z3_fixedpoint;
6244
6245    /// Increment the reference counter of the given fixedpoint context
6246    pub fn Z3_fixedpoint_inc_ref(c: Z3_context, d: Z3_fixedpoint);
6247
6248    /// Decrement the reference counter of the given fixedpoint context.
6249    pub fn Z3_fixedpoint_dec_ref(c: Z3_context, d: Z3_fixedpoint);
6250
6251    /// Add a universal Horn clause as a named rule.
6252    /// The `horn_rule` should be of the form:
6253    ///
6254    /// ```text
6255    /// horn_rule ::= (forall (bound-vars) horn_rule)
6256    /// |  (=> atoms horn_rule)
6257    /// |  atom
6258    /// ```
6259    pub fn Z3_fixedpoint_add_rule(c: Z3_context, d: Z3_fixedpoint, rule: Z3_ast, name: Z3_symbol);
6260
6261    /// Add a Database fact.
6262    ///
6263    /// - `c`: - context
6264    /// - `d`: - fixed point context
6265    /// - `r`: - relation signature for the row.
6266    /// - `num_args`: - number of columns for the given row.
6267    /// - `args`: - array of the row elements.
6268    ///
6269    /// The number of arguments `num_args` should be equal to the number
6270    /// of sorts in the domain of `r`. Each sort in the domain should be an integral
6271    /// (bit-vector, Boolean or or finite domain sort).
6272    ///
6273    /// The call has the same effect as adding a rule where `r` is applied to the arguments.
6274    pub fn Z3_fixedpoint_add_fact(
6275        c: Z3_context,
6276        d: Z3_fixedpoint,
6277        r: Z3_func_decl,
6278        num_args: ::std::os::raw::c_uint,
6279        args: *mut ::std::os::raw::c_uint,
6280    );
6281
6282    /// Assert a constraint to the fixedpoint context.
6283    ///
6284    /// The constraints are used as background axioms when the fixedpoint engine uses the PDR mode.
6285    /// They are ignored for standard Datalog mode.
6286    pub fn Z3_fixedpoint_assert(c: Z3_context, d: Z3_fixedpoint, axiom: Z3_ast);
6287
6288    /// Pose a query against the asserted rules.
6289    ///
6290    /// ```text
6291    /// query ::= (exists (bound-vars) query)
6292    /// |  literals
6293    /// ```
6294    ///
6295    /// query returns
6296    /// - `Z3_L_FALSE` if the query is unsatisfiable.
6297    /// - `Z3_L_TRUE` if the query is satisfiable. Obtain the answer by calling [`Z3_fixedpoint_get_answer`].
6298    /// - `Z3_L_UNDEF` if the query was interrupted, timed out or otherwise failed.
6299    pub fn Z3_fixedpoint_query(c: Z3_context, d: Z3_fixedpoint, query: Z3_ast) -> Z3_lbool;
6300
6301    /// Pose multiple queries against the asserted rules.
6302    ///
6303    /// The queries are encoded as relations (function declarations).
6304    ///
6305    /// query returns
6306    /// - `Z3_L_FALSE` if the query is unsatisfiable.
6307    /// - `Z3_L_TRUE` if the query is satisfiable. Obtain the answer by calling [`Z3_fixedpoint_get_answer`].
6308    /// - `Z3_L_UNDEF` if the query was interrupted, timed out or otherwise failed.
6309    pub fn Z3_fixedpoint_query_relations(
6310        c: Z3_context,
6311        d: Z3_fixedpoint,
6312        num_relations: ::std::os::raw::c_uint,
6313        relations: *const Z3_func_decl,
6314    ) -> Z3_lbool;
6315
6316    /// Retrieve a formula that encodes satisfying answers to the query.
6317    ///
6318    ///
6319    /// When used in Datalog mode, the returned answer is a disjunction of conjuncts.
6320    /// Each conjunct encodes values of the bound variables of the query that are satisfied.
6321    /// In PDR mode, the returned answer is a single conjunction.
6322    ///
6323    /// When used in Datalog mode the previous call to `Z3_fixedpoint_query` must have returned `Z3_L_TRUE`.
6324    /// When used with the PDR engine, the previous call must have been either `Z3_L_TRUE` or `Z3_L_FALSE`.
6325    pub fn Z3_fixedpoint_get_answer(c: Z3_context, d: Z3_fixedpoint) -> Z3_ast;
6326
6327    /// Retrieve a string that describes the last status returned by [`Z3_fixedpoint_query`].
6328    ///
6329    /// Use this method when [`Z3_fixedpoint_query`] returns `Z3_L_UNDEF`.
6330    pub fn Z3_fixedpoint_get_reason_unknown(c: Z3_context, d: Z3_fixedpoint) -> Z3_string;
6331
6332    /// Update a named rule.
6333    /// A rule with the same name must have been previously created.
6334    pub fn Z3_fixedpoint_update_rule(c: Z3_context, d: Z3_fixedpoint, a: Z3_ast, name: Z3_symbol);
6335
6336    /// Query the PDR engine for the maximal levels properties are known about predicate.
6337    ///
6338    /// This call retrieves the maximal number of relevant unfoldings
6339    /// of `pred` with respect to the current exploration state.
6340    /// Note: this functionality is PDR specific.
6341    pub fn Z3_fixedpoint_get_num_levels(
6342        c: Z3_context,
6343        d: Z3_fixedpoint,
6344        pred: Z3_func_decl,
6345    ) -> ::std::os::raw::c_uint;
6346
6347    /// Retrieve the current cover of `pred` up to `level` unfoldings.
6348    /// Return just the delta that is known at `level`. To
6349    /// obtain the full set of properties of `pred` one should query
6350    /// at `level`+1 , `level`+2 etc, and include `level`=-1.
6351    ///
6352    /// Note: this functionality is PDR specific.
6353    pub fn Z3_fixedpoint_get_cover_delta(
6354        c: Z3_context,
6355        d: Z3_fixedpoint,
6356        level: ::std::os::raw::c_int,
6357        pred: Z3_func_decl,
6358    ) -> Z3_ast;
6359
6360    /// Add property about the predicate `pred`.
6361    /// Add a property of predicate `pred` at `level`.
6362    /// It gets pushed forward when possible.
6363    ///
6364    /// Note: level = -1 is treated as the fixedpoint. So passing -1 for the `level`
6365    /// means that the property is true of the fixed-point unfolding with respect to `pred`.
6366    ///
6367    /// Note: this functionality is PDR specific.
6368    pub fn Z3_fixedpoint_add_cover(
6369        c: Z3_context,
6370        d: Z3_fixedpoint,
6371        level: ::std::os::raw::c_int,
6372        pred: Z3_func_decl,
6373        property: Z3_ast,
6374    );
6375
6376    /// Retrieve statistics information from the last call to [`Z3_fixedpoint_query`].
6377    pub fn Z3_fixedpoint_get_statistics(c: Z3_context, d: Z3_fixedpoint) -> Z3_stats;
6378
6379    /// Register relation as Fixedpoint defined.
6380    /// Fixedpoint defined relations have least-fixedpoint semantics.
6381    /// For example, the relation is empty if it does not occur
6382    /// in a head or a fact.
6383    pub fn Z3_fixedpoint_register_relation(c: Z3_context, d: Z3_fixedpoint, f: Z3_func_decl);
6384
6385    /// Configure the predicate representation.
6386    ///
6387    /// It sets the predicate to use a set of domains given by the list of symbols.
6388    /// The domains given by the list of symbols must belong to a set
6389    /// of built-in domains.
6390    pub fn Z3_fixedpoint_set_predicate_representation(
6391        c: Z3_context,
6392        d: Z3_fixedpoint,
6393        f: Z3_func_decl,
6394        num_relations: ::std::os::raw::c_uint,
6395        relation_kinds: *const Z3_symbol,
6396    );
6397
6398    /// Retrieve set of rules from fixedpoint context.
6399    pub fn Z3_fixedpoint_get_rules(c: Z3_context, f: Z3_fixedpoint) -> Z3_ast_vector;
6400
6401    /// Retrieve set of background assertions from fixedpoint context.
6402    pub fn Z3_fixedpoint_get_assertions(c: Z3_context, f: Z3_fixedpoint) -> Z3_ast_vector;
6403
6404    /// Set parameters on fixedpoint context.
6405    ///
6406    /// # See also:
6407    ///
6408    /// - [`Z3_fixedpoint_get_help`]
6409    /// - [`Z3_fixedpoint_get_param_descrs`]
6410    pub fn Z3_fixedpoint_set_params(c: Z3_context, f: Z3_fixedpoint, p: Z3_params);
6411
6412    /// Return a string describing all fixedpoint available parameters.
6413    ///
6414    /// # See also:
6415    ///
6416    /// - [`Z3_fixedpoint_get_param_descrs`]
6417    /// - [`Z3_fixedpoint_set_params`]
6418    pub fn Z3_fixedpoint_get_help(c: Z3_context, f: Z3_fixedpoint) -> Z3_string;
6419
6420    /// Return the parameter description set for the given fixedpoint object.
6421    ///
6422    /// # See also:
6423    ///
6424    /// - [`Z3_fixedpoint_get_help`]
6425    /// - [`Z3_fixedpoint_set_params`]
6426    pub fn Z3_fixedpoint_get_param_descrs(c: Z3_context, f: Z3_fixedpoint) -> Z3_param_descrs;
6427
6428    /// Print the current rules and background axioms as a string.
6429    /// - `c`: - context.
6430    /// - `f`: - fixedpoint context.
6431    /// - `num_queries`: - number of additional queries to print.
6432    /// - `queries`: - additional queries.
6433    ///
6434    /// # See also:
6435    ///
6436    /// - [`Z3_fixedpoint_from_file`]
6437    /// - [`Z3_fixedpoint_from_string`]
6438    pub fn Z3_fixedpoint_to_string(
6439        c: Z3_context,
6440        f: Z3_fixedpoint,
6441        num_queries: ::std::os::raw::c_uint,
6442        queries: *mut Z3_ast,
6443    ) -> Z3_string;
6444
6445    /// Parse an SMT-LIB2 string with fixedpoint rules.
6446    /// Add the rules to the current fixedpoint context.
6447    /// Return the set of queries in the string.
6448    ///
6449    /// - `c`: - context.
6450    /// - `f`: - fixedpoint context.
6451    /// - `s`: - string containing SMT2 specification.
6452    ///
6453    /// # See also:
6454    ///
6455    /// - [`Z3_fixedpoint_from_file`]
6456    /// - [`Z3_fixedpoint_to_string`]
6457    pub fn Z3_fixedpoint_from_string(
6458        c: Z3_context,
6459        f: Z3_fixedpoint,
6460        s: Z3_string,
6461    ) -> Z3_ast_vector;
6462
6463    /// Parse an SMT-LIB2 file with fixedpoint rules.
6464    /// Add the rules to the current fixedpoint context.
6465    /// Return the set of queries in the file.
6466    ///
6467    /// - `c`: - context.
6468    /// - `f`: - fixedpoint context.
6469    /// - `s`: - path to file containing SMT2 specification.
6470    ///
6471    /// # See also:
6472    ///
6473    /// - [`Z3_fixedpoint_from_string`]
6474    /// - [`Z3_fixedpoint_to_string`]
6475    pub fn Z3_fixedpoint_from_file(c: Z3_context, f: Z3_fixedpoint, s: Z3_string) -> Z3_ast_vector;
6476}
6477/// The following utilities allows adding user-defined domains.
6478pub type Z3_fixedpoint_reduce_assign_callback_fptr = ::std::option::Option<
6479    unsafe extern "C" fn(
6480        arg1: *mut ::std::os::raw::c_void,
6481        arg2: Z3_func_decl,
6482        arg3: ::std::os::raw::c_uint,
6483        arg4: *const Z3_ast,
6484        arg5: ::std::os::raw::c_uint,
6485        arg6: *const Z3_ast,
6486    ),
6487>;
6488pub type Z3_fixedpoint_reduce_app_callback_fptr = ::std::option::Option<
6489    unsafe extern "C" fn(
6490        arg1: *mut ::std::os::raw::c_void,
6491        arg2: Z3_func_decl,
6492        arg3: ::std::os::raw::c_uint,
6493        arg4: *const Z3_ast,
6494        arg5: *mut Z3_ast,
6495    ),
6496>;
6497extern "C" {
6498    /// Initialize the context with a user-defined state.
6499    pub fn Z3_fixedpoint_init(c: Z3_context, d: Z3_fixedpoint, state: *mut ::std::os::raw::c_void);
6500
6501    /// Register a callback to destructive updates.
6502    ///
6503    /// Registers are identified with terms encoded as fresh constants,
6504    pub fn Z3_fixedpoint_set_reduce_assign_callback(
6505        c: Z3_context,
6506        d: Z3_fixedpoint,
6507        cb: Z3_fixedpoint_reduce_assign_callback_fptr,
6508    );
6509
6510    /// Register a callback for building terms based on the relational operators.
6511    pub fn Z3_fixedpoint_set_reduce_app_callback(
6512        c: Z3_context,
6513        d: Z3_fixedpoint,
6514        cb: Z3_fixedpoint_reduce_app_callback_fptr,
6515    );
6516}
6517
6518pub type Z3_fixedpoint_new_lemma_eh = ::std::option::Option<
6519    unsafe extern "C" fn(
6520        state: *mut ::std::os::raw::c_void,
6521        lemma: Z3_ast,
6522        level: ::std::os::raw::c_uint,
6523    ),
6524>;
6525pub type Z3_fixedpoint_predecessor_eh =
6526    ::std::option::Option<unsafe extern "C" fn(state: *mut ::std::os::raw::c_void)>;
6527pub type Z3_fixedpoint_unfold_eh =
6528    ::std::option::Option<unsafe extern "C" fn(state: *mut ::std::os::raw::c_void)>;
6529
6530extern "C" {
6531    /// Set export callback for lemmas.
6532    pub fn Z3_fixedpoint_add_callback(
6533        ctx: Z3_context,
6534        f: Z3_fixedpoint,
6535        state: *mut ::std::os::raw::c_void,
6536        new_lemma_eh: Z3_fixedpoint_new_lemma_eh,
6537        predecessor_eh: Z3_fixedpoint_predecessor_eh,
6538        unfold_eh: Z3_fixedpoint_unfold_eh,
6539    );
6540
6541    pub fn Z3_fixedpoint_add_constraint(
6542        c: Z3_context,
6543        d: Z3_fixedpoint,
6544        e: Z3_ast,
6545        lvl: ::std::os::raw::c_uint,
6546    );
6547
6548    /// Create a new optimize context.
6549    ///
6550    /// NOTE: User must use [`Z3_optimize_inc_ref`]
6551    /// and [`Z3_optimize_dec_ref`] to manage optimize objects,
6552    /// even if the context was created using [`Z3_mk_context`]
6553    /// instead of [`Z3_mk_context_rc`].
6554    pub fn Z3_mk_optimize(c: Z3_context) -> Z3_optimize;
6555
6556    /// Increment the reference counter of the given optimize context
6557    pub fn Z3_optimize_inc_ref(c: Z3_context, d: Z3_optimize);
6558
6559    /// Decrement the reference counter of the given optimize context.
6560    pub fn Z3_optimize_dec_ref(c: Z3_context, d: Z3_optimize);
6561
6562    /// Assert hard constraint to the optimization context.
6563    ///
6564    /// # See also:
6565    ///
6566    /// - [`Z3_optimize_assert_and_track`]
6567    /// - [`Z3_optimize_assert_soft`]
6568    pub fn Z3_optimize_assert(c: Z3_context, o: Z3_optimize, a: Z3_ast);
6569
6570    /// Assert tracked hard constraint to the optimization context.
6571    ///
6572    /// # See also:
6573    ///
6574    /// - [`Z3_optimize_assert`]
6575    /// - [`Z3_optimize_assert_soft`]
6576    pub fn Z3_optimize_assert_and_track(c: Z3_context, o: Z3_optimize, a: Z3_ast, t: Z3_ast);
6577
6578    /// Assert soft constraint to the optimization context.
6579    /// - `c`: - context
6580    /// - `o`: - optimization context
6581    /// - `a`: - formula
6582    /// - `weight`: - a positive weight, penalty for violating soft constraint
6583    /// - `id`: - optional identifier to group soft constraints
6584    ///
6585    /// # See also:
6586    ///
6587    /// - [`Z3_optimize_assert`]
6588    /// - [`Z3_optimize_assert_and_track`]
6589    pub fn Z3_optimize_assert_soft(
6590        c: Z3_context,
6591        o: Z3_optimize,
6592        a: Z3_ast,
6593        weight: Z3_string,
6594        id: Z3_symbol,
6595    ) -> ::std::os::raw::c_uint;
6596
6597    /// Add a maximization constraint.
6598    /// - `c`: - context
6599    /// - `o`: - optimization context
6600    /// - `t`: - arithmetical term
6601    ///
6602    /// # See also:
6603    ///
6604    /// - [`Z3_optimize_minimize`]
6605    pub fn Z3_optimize_maximize(c: Z3_context, o: Z3_optimize, t: Z3_ast)
6606        -> ::std::os::raw::c_uint;
6607
6608    /// Add a minimization constraint.
6609    /// - `c`: - context
6610    /// - `o`: - optimization context
6611    /// - `t`: - arithmetical term
6612    ///
6613    /// # See also:
6614    ///
6615    /// - [`Z3_optimize_maximize`]
6616    pub fn Z3_optimize_minimize(c: Z3_context, o: Z3_optimize, t: Z3_ast)
6617        -> ::std::os::raw::c_uint;
6618
6619    /// Create a backtracking point.
6620    ///
6621    /// The optimize solver contains a set of rules, added facts and assertions.
6622    /// The set of rules, facts and assertions are restored upon calling [`Z3_optimize_pop`].
6623    ///
6624    /// # See also:
6625    ///
6626    /// - [`Z3_optimize_pop`]
6627    pub fn Z3_optimize_push(c: Z3_context, d: Z3_optimize);
6628
6629    /// Backtrack one level.
6630    ///
6631    /// # Preconditions:
6632    ///
6633    /// - The number of calls to pop cannot exceed calls to push.
6634    ///
6635    /// # See also:
6636    ///
6637    /// - [`Z3_optimize_push`]
6638    pub fn Z3_optimize_pop(c: Z3_context, d: Z3_optimize);
6639
6640    /// Check consistency and produce optimal values.
6641    ///
6642    /// - `c`: - context
6643    /// - `o`: - optimization context
6644    /// - `num_assumptions`: - number of additional assumptions
6645    /// - `assumptions`: - the additional assumptions
6646    ///
6647    /// # See also:
6648    ///
6649    /// - [`Z3_optimize_get_reason_unknown`]
6650    /// - [`Z3_optimize_get_model`]
6651    /// - [`Z3_optimize_get_statistics`]
6652    /// - [`Z3_optimize_get_unsat_core`]
6653    pub fn Z3_optimize_check(
6654        c: Z3_context,
6655        o: Z3_optimize,
6656        num_assumptions: ::std::os::raw::c_uint,
6657        assumptions: *const Z3_ast,
6658    ) -> Z3_lbool;
6659
6660    /// Retrieve a string that describes the last status returned by [`Z3_optimize_check`].
6661    ///
6662    /// Use this method when [`Z3_optimize_check`] returns `Z3_L_UNDEF`.
6663    pub fn Z3_optimize_get_reason_unknown(c: Z3_context, d: Z3_optimize) -> Z3_string;
6664
6665    /// Retrieve the model for the last [`Z3_optimize_check`].
6666    ///
6667    /// The error handler is invoked if a model is not available because
6668    /// the commands above were not invoked for the given optimization
6669    /// solver, or if the result was `Z3_L_FALSE`.
6670    pub fn Z3_optimize_get_model(c: Z3_context, o: Z3_optimize) -> Z3_model;
6671
6672    /// Retrieve the unsat core for the last [`Z3_optimize_check`].
6673    ///
6674    /// The unsat core is a subset of the assumptions `a`.
6675    pub fn Z3_optimize_get_unsat_core(c: Z3_context, o: Z3_optimize) -> Z3_ast_vector;
6676
6677    /// Set parameters on optimization context.
6678    ///
6679    /// - `c`: - context
6680    /// - `o`: - optimization context
6681    /// - `p`: - parameters
6682    ///
6683    /// # See also:
6684    ///
6685    /// - [`Z3_optimize_get_help`]
6686    /// - [`Z3_optimize_get_param_descrs`]
6687    pub fn Z3_optimize_set_params(c: Z3_context, o: Z3_optimize, p: Z3_params);
6688
6689    /// Return the parameter description set for the given optimize object.
6690    ///
6691    /// - `c`: - context
6692    /// - `o`: - optimization context
6693    ///
6694    /// # See also:
6695    ///
6696    /// - [`Z3_optimize_get_help`]
6697    /// - [`Z3_optimize_set_params`]
6698    pub fn Z3_optimize_get_param_descrs(c: Z3_context, o: Z3_optimize) -> Z3_param_descrs;
6699
6700    /// Retrieve lower bound value or approximation for the i'th optimization objective.
6701    ///
6702    /// - `c`: - context
6703    /// - `o`: - optimization context
6704    /// - `idx`: - index of optimization objective
6705    ///
6706    /// # See also:
6707    ///
6708    /// - [`Z3_optimize_get_upper`]
6709    /// - [`Z3_optimize_get_lower_as_vector`]
6710    /// - [`Z3_optimize_get_upper_as_vector`]
6711    pub fn Z3_optimize_get_lower(
6712        c: Z3_context,
6713        o: Z3_optimize,
6714        idx: ::std::os::raw::c_uint,
6715    ) -> Z3_ast;
6716
6717    /// Retrieve upper bound value or approximation for the i'th optimization objective.
6718    ///
6719    /// - `c`: - context
6720    /// - `o`: - optimization context
6721    /// - `idx`: - index of optimization objective
6722    ///
6723    /// # See also:
6724    ///
6725    /// - [`Z3_optimize_get_lower`]
6726    /// - [`Z3_optimize_get_lower_as_vector`]
6727    /// - [`Z3_optimize_get_upper_as_vector`]
6728    pub fn Z3_optimize_get_upper(
6729        c: Z3_context,
6730        o: Z3_optimize,
6731        idx: ::std::os::raw::c_uint,
6732    ) -> Z3_ast;
6733
6734    /// Retrieve lower bound value or approximation for the i'th optimization objective.
6735    /// The returned vector is of length 3. It always contains numerals.
6736    /// The three numerals are coefficients a, b, c and encode the result of [`Z3_optimize_get_lower`]
6737    /// a * infinity + b + c * epsilon.
6738    ///
6739    /// - `c`: - context
6740    /// - `o`: - optimization context
6741    /// - `idx`: - index of optimization objective
6742    ///
6743    /// # See also:
6744    ///
6745    /// - [`Z3_optimize_get_lower`]
6746    /// - [`Z3_optimize_get_upper`]
6747    /// - [`Z3_optimize_get_upper_as_vector`]
6748    pub fn Z3_optimize_get_lower_as_vector(
6749        c: Z3_context,
6750        o: Z3_optimize,
6751        idx: ::std::os::raw::c_uint,
6752    ) -> Z3_ast_vector;
6753
6754    /// Retrieve upper bound value or approximation for the i'th optimization objective.
6755    ///
6756    /// - `c`: - context
6757    /// - `o`: - optimization context
6758    /// - `idx`: - index of optimization objective
6759    ///
6760    /// # See also:
6761    ///
6762    /// - [`Z3_optimize_get_lower`]
6763    /// - [`Z3_optimize_get_upper`]
6764    /// - [`Z3_optimize_get_lower_as_vector`]
6765    pub fn Z3_optimize_get_upper_as_vector(
6766        c: Z3_context,
6767        o: Z3_optimize,
6768        idx: ::std::os::raw::c_uint,
6769    ) -> Z3_ast_vector;
6770
6771    /// Print the current context as a string.
6772    /// - `c`: - context.
6773    /// - `o`: - optimization context.
6774    ///
6775    /// # See also:
6776    ///
6777    /// - [`Z3_optimize_from_file`]
6778    /// - [`Z3_optimize_from_string`]
6779    pub fn Z3_optimize_to_string(c: Z3_context, o: Z3_optimize) -> Z3_string;
6780
6781    /// Parse an SMT-LIB2 string with assertions,
6782    /// soft constraints and optimization objectives.
6783    /// Add the parsed constraints and objectives to the optimization context.
6784    ///
6785    /// - `c`: - context.
6786    /// - `o`: - optimize context.
6787    /// - `s`: - string containing SMT2 specification.
6788    ///
6789    /// # See also:
6790    ///
6791    /// - [`Z3_optimize_from_file`]
6792    /// - [`Z3_optimize_to_string`]
6793    pub fn Z3_optimize_from_string(c: Z3_context, o: Z3_optimize, s: Z3_string);
6794
6795    /// Parse an SMT-LIB2 file with assertions,
6796    /// soft constraints and optimization objectives.
6797    /// Add the parsed constraints and objectives to the optimization context.
6798    ///
6799    /// - `c`: - context.
6800    /// - `o`: - optimize context.
6801    /// - `s`: - string containing SMT2 specification.
6802    ///
6803    /// # See also:
6804    ///
6805    /// - [`Z3_optimize_from_string`]
6806    /// - [`Z3_optimize_to_string`]
6807    pub fn Z3_optimize_from_file(c: Z3_context, o: Z3_optimize, s: Z3_string);
6808
6809    /// Return a string containing a description of parameters accepted by optimize.
6810    ///
6811    /// # See also:
6812    ///
6813    /// - [`Z3_optimize_get_param_descrs`]
6814    /// - [`Z3_optimize_set_params`]
6815    pub fn Z3_optimize_get_help(c: Z3_context, t: Z3_optimize) -> Z3_string;
6816
6817    /// Retrieve statistics information from the last call to [`Z3_optimize_check`]
6818    pub fn Z3_optimize_get_statistics(c: Z3_context, d: Z3_optimize) -> Z3_stats;
6819
6820    /// Return the set of asserted formulas on the optimization context.
6821    pub fn Z3_optimize_get_assertions(c: Z3_context, o: Z3_optimize) -> Z3_ast_vector;
6822
6823    /// Return objectives on the optimization context.
6824    /// If the objective function is a max-sat objective it is returned
6825    /// as a Pseudo-Boolean (minimization) sum of the form (+ (if f1 w1 0) (if f2 w2 0) ...)
6826    /// If the objective function is entered as a maximization objective, then return
6827    /// the corresponding minimization objective. In this way the resulting objective
6828    /// function is always returned as a minimization objective.
6829    pub fn Z3_optimize_get_objectives(c: Z3_context, o: Z3_optimize) -> Z3_ast_vector;
6830
6831    /// Create the `RoundingMode` sort.
6832    ///
6833    /// - `c`: logical context
6834    ///
6835    /// # See also:
6836    ///
6837    /// - [`Z3_mk_fpa_rounding_mode_sort`]
6838    /// - [`Z3_mk_fpa_round_nearest_ties_to_away`] or [`Z3_mk_fpa_rna`]
6839    /// - [`Z3_mk_fpa_round_nearest_ties_to_even`] or [`Z3_mk_fpa_rne`]
6840    /// - [`Z3_mk_fpa_round_toward_negative`] or [`Z3_mk_fpa_rtn`]
6841    /// - [`Z3_mk_fpa_round_toward_positive`] or [`Z3_mk_fpa_rtp`]
6842    /// - [`Z3_mk_fpa_round_toward_zero`] or [`Z3_mk_fpa_rtz`]
6843    pub fn Z3_mk_fpa_rounding_mode_sort(c: Z3_context) -> Z3_sort;
6844
6845    /// Create a numeral of `RoundingMode` sort which represents the `NearestTiesToEven` rounding mode.
6846    ///
6847    /// This is the same as [`Z3_mk_fpa_rne`].
6848    ///
6849    /// - `c`: logical context
6850    ///
6851    /// # See also:
6852    ///
6853    /// - [`Z3_mk_fpa_rounding_mode_sort`]
6854    /// - [`Z3_mk_fpa_round_nearest_ties_to_away`]
6855    /// - [`Z3_mk_fpa_round_toward_negative`]
6856    /// - [`Z3_mk_fpa_round_toward_positive`]
6857    /// - [`Z3_mk_fpa_round_toward_zero`]
6858    pub fn Z3_mk_fpa_round_nearest_ties_to_even(c: Z3_context) -> Z3_ast;
6859
6860    /// Create a numeral of `RoundingMode` sort which represents the `NearestTiesToEven` rounding mode.
6861    ///
6862    /// This is the same as [`Z3_mk_fpa_round_nearest_ties_to_even`].
6863    ///
6864    /// - `c`: logical context
6865    ///
6866    /// # See also:
6867    ///
6868    /// - [`Z3_mk_fpa_rounding_mode_sort`]
6869    /// - [`Z3_mk_fpa_rna`]
6870    /// - [`Z3_mk_fpa_rtn`]
6871    /// - [`Z3_mk_fpa_rtp`]
6872    /// - [`Z3_mk_fpa_rtz`]
6873    pub fn Z3_mk_fpa_rne(c: Z3_context) -> Z3_ast;
6874
6875    /// Create a numeral of `RoundingMode` sort which represents the `NearestTiesToAway` rounding mode.
6876    ///
6877    /// This is the same as [`Z3_mk_fpa_rna`].
6878    ///
6879    /// - `c`: logical context
6880    ///
6881    /// # See also:
6882    ///
6883    /// - [`Z3_mk_fpa_rounding_mode_sort`]
6884    /// - [`Z3_mk_fpa_round_nearest_ties_to_even`]
6885    /// - [`Z3_mk_fpa_round_toward_negative`]
6886    /// - [`Z3_mk_fpa_round_toward_positive`]
6887    /// - [`Z3_mk_fpa_round_toward_zero`]
6888    pub fn Z3_mk_fpa_round_nearest_ties_to_away(c: Z3_context) -> Z3_ast;
6889
6890    /// Create a numeral of `RoundingMode` sort which represents the `NearestTiesToAway` rounding mode.
6891    ///
6892    /// This is the same as [`Z3_mk_fpa_round_nearest_ties_to_away`].
6893    ///
6894    /// - `c`: logical context
6895    ///
6896    /// # See also:
6897    ///
6898    /// - [`Z3_mk_fpa_rounding_mode_sort`]
6899    /// - [`Z3_mk_fpa_rne`]
6900    /// - [`Z3_mk_fpa_rtn`]
6901    /// - [`Z3_mk_fpa_rtp`]
6902    /// - [`Z3_mk_fpa_rtz`]
6903    pub fn Z3_mk_fpa_rna(c: Z3_context) -> Z3_ast;
6904
6905    /// Create a numeral of `RoundingMode` sort which represents the `TowardPositive` rounding mode.
6906    ///
6907    /// This is the same as [`Z3_mk_fpa_rtp`].
6908    ///
6909    /// - `c`: logical context
6910    ///
6911    /// # See also:
6912    ///
6913    /// - [`Z3_mk_fpa_rounding_mode_sort`]
6914    /// - [`Z3_mk_fpa_round_nearest_ties_to_away`]
6915    /// - [`Z3_mk_fpa_round_nearest_ties_to_even`]
6916    /// - [`Z3_mk_fpa_round_toward_negative`]
6917    /// - [`Z3_mk_fpa_round_toward_zero`]
6918    pub fn Z3_mk_fpa_round_toward_positive(c: Z3_context) -> Z3_ast;
6919
6920    /// Create a numeral of `RoundingMode` sort which represents the `TowardPositive` rounding mode.
6921    ///
6922    /// This is the same as [`Z3_mk_fpa_round_toward_positive`].
6923    ///
6924    /// - `c`: logical context
6925    ///
6926    /// # See also:
6927    ///
6928    /// - [`Z3_mk_fpa_rounding_mode_sort`]
6929    /// - [`Z3_mk_fpa_rna`]
6930    /// - [`Z3_mk_fpa_rne`]
6931    /// - [`Z3_mk_fpa_rtn`]
6932    /// - [`Z3_mk_fpa_rtz`]
6933    pub fn Z3_mk_fpa_rtp(c: Z3_context) -> Z3_ast;
6934
6935    /// Create a numeral of `RoundingMode` sort which represents the `TowardNegative` rounding mode.
6936    ///
6937    /// This is the same as [`Z3_mk_fpa_rtn`].
6938    ///
6939    /// - `c`: logical context
6940    ///
6941    /// # See also:
6942    ///
6943    /// - [`Z3_mk_fpa_rounding_mode_sort`]
6944    /// - [`Z3_mk_fpa_round_nearest_ties_to_away`]
6945    /// - [`Z3_mk_fpa_round_nearest_ties_to_even`]
6946    /// - [`Z3_mk_fpa_round_toward_positive`]
6947    /// - [`Z3_mk_fpa_round_toward_zero`]
6948    pub fn Z3_mk_fpa_round_toward_negative(c: Z3_context) -> Z3_ast;
6949
6950    /// Create a numeral of `RoundingMode` sort which represents the `TowardNegative` rounding mode.
6951    ///
6952    /// This is the same as [`Z3_mk_fpa_round_toward_negative`].
6953    ///
6954    /// - `c`: logical context
6955    ///
6956    /// # See also:
6957    ///
6958    /// - [`Z3_mk_fpa_rounding_mode_sort`]
6959    /// - [`Z3_mk_fpa_rna`]
6960    /// - [`Z3_mk_fpa_rne`]
6961    /// - [`Z3_mk_fpa_rtp`]
6962    /// - [`Z3_mk_fpa_rtz`]
6963    pub fn Z3_mk_fpa_rtn(c: Z3_context) -> Z3_ast;
6964
6965    /// Create a numeral of `RoundingMode` sort which represents the `TowardZero` rounding mode.
6966    ///
6967    /// This is the same as [`Z3_mk_fpa_rtz`].
6968    ///
6969    /// - `c`: logical context
6970    ///
6971    /// # See also:
6972    ///
6973    /// - [`Z3_mk_fpa_rounding_mode_sort`]
6974    /// - [`Z3_mk_fpa_round_nearest_ties_to_away`]
6975    /// - [`Z3_mk_fpa_round_nearest_ties_to_even`]
6976    /// - [`Z3_mk_fpa_round_toward_negative`]
6977    /// - [`Z3_mk_fpa_round_toward_positive`]
6978    pub fn Z3_mk_fpa_round_toward_zero(c: Z3_context) -> Z3_ast;
6979
6980    /// Create a numeral of `RoundingMode` sort which represents the `TowardZero` rounding mode.
6981    ///
6982    /// This is the same as [`Z3_mk_fpa_round_toward_zero`].
6983    ///
6984    /// - `c`: logical context
6985    ///
6986    /// # See also:
6987    ///
6988    /// - [`Z3_mk_fpa_rounding_mode_sort`]
6989    /// - [`Z3_mk_fpa_rna`]
6990    /// - [`Z3_mk_fpa_rne`]
6991    /// - [`Z3_mk_fpa_rtn`]
6992    /// - [`Z3_mk_fpa_rtp`]
6993    pub fn Z3_mk_fpa_rtz(c: Z3_context) -> Z3_ast;
6994
6995    /// Create a `FloatingPoint` sort.
6996    ///
6997    /// - `c`: logical context
6998    /// - `ebits`: number of exponent bits
6999    /// - `sbits`: number of significand bits
7000    ///
7001    /// NOTE: ebits must be larger than 1 and sbits must be larger than 2.
7002    ///
7003    /// # See also:
7004    ///
7005    /// - [`Z3_mk_fpa_sort_half`] or [`Z3_mk_fpa_sort_16`]
7006    /// - [`Z3_mk_fpa_sort_single`] or [`Z3_mk_fpa_sort_32`]
7007    /// - [`Z3_mk_fpa_sort_double`] or [`Z3_mk_fpa_sort_64`]
7008    /// - [`Z3_mk_fpa_sort_quadruple`] or [`Z3_mk_fpa_sort_128`]
7009    pub fn Z3_mk_fpa_sort(
7010        c: Z3_context,
7011        ebits: ::std::os::raw::c_uint,
7012        sbits: ::std::os::raw::c_uint,
7013    ) -> Z3_sort;
7014
7015    /// Create the half-precision (16-bit) `FloatingPoint` sort.
7016    ///
7017    /// This is the same as [`Z3_mk_fpa_sort_16`].
7018    ///
7019    /// - `c`: logical context
7020    ///
7021    /// # See also:
7022    ///
7023    /// - [`Z3_mk_fpa_sort_single`]
7024    /// - [`Z3_mk_fpa_sort_double`]
7025    /// - [`Z3_mk_fpa_sort_quadruple`]
7026    pub fn Z3_mk_fpa_sort_half(c: Z3_context) -> Z3_sort;
7027
7028    /// Create the half-precision (16-bit) `FloatingPoint` sort.
7029    ///
7030    /// This is the same as [`Z3_mk_fpa_sort_half`].
7031    ///
7032    /// - `c`: logical context
7033    ///
7034    /// # See also:
7035    ///
7036    /// - [`Z3_mk_fpa_sort_32`]
7037    /// - [`Z3_mk_fpa_sort_64`]
7038    /// - [`Z3_mk_fpa_sort_128`]
7039    pub fn Z3_mk_fpa_sort_16(c: Z3_context) -> Z3_sort;
7040
7041    /// Create the single-precision (32-bit) `FloatingPoint` sort.
7042    ///
7043    /// This is the same as [`Z3_mk_fpa_sort_32`].
7044    ///
7045    /// - `c`: logical context.
7046    ///
7047    /// # See also:
7048    ///
7049    /// - [`Z3_mk_fpa_sort_half`]
7050    /// - [`Z3_mk_fpa_sort_double`]
7051    /// - [`Z3_mk_fpa_sort_quadruple`]
7052    pub fn Z3_mk_fpa_sort_single(c: Z3_context) -> Z3_sort;
7053
7054    /// Create the single-precision (32-bit) `FloatingPoint` sort.
7055    ///
7056    /// This is the same as [`Z3_mk_fpa_sort_single`].
7057    ///
7058    /// - `c`: logical context
7059    ///
7060    /// # See also:
7061    ///
7062    /// - [`Z3_mk_fpa_sort_16`]
7063    /// - [`Z3_mk_fpa_sort_64`]
7064    /// - [`Z3_mk_fpa_sort_128`]
7065    pub fn Z3_mk_fpa_sort_32(c: Z3_context) -> Z3_sort;
7066
7067    /// Create the double-precision (64-bit) `FloatingPoint` sort.
7068    ///
7069    /// This is the same as [`Z3_mk_fpa_sort_64`].
7070    ///
7071    /// - `c`: logical context
7072    ///
7073    /// # See also:
7074    ///
7075    /// - [`Z3_mk_fpa_sort_half`]
7076    /// - [`Z3_mk_fpa_sort_single`]
7077    /// - [`Z3_mk_fpa_sort_quadruple`]
7078    pub fn Z3_mk_fpa_sort_double(c: Z3_context) -> Z3_sort;
7079
7080    /// Create the double-precision (64-bit) `FloatingPoint` sort.
7081    ///
7082    /// This is the same as [`Z3_mk_fpa_sort_double`].
7083    ///
7084    /// - `c`: logical context
7085    ///
7086    /// # See also:
7087    ///
7088    /// - [`Z3_mk_fpa_sort_16`]
7089    /// - [`Z3_mk_fpa_sort_32`]
7090    /// - [`Z3_mk_fpa_sort_128`]
7091    pub fn Z3_mk_fpa_sort_64(c: Z3_context) -> Z3_sort;
7092
7093    /// Create the quadruple-precision (128-bit) `FloatingPoint` sort.
7094    ///
7095    /// This is the same as [`Z3_mk_fpa_sort_128`].
7096    ///
7097    /// - `c`: logical context
7098    ///
7099    /// # See also:
7100    ///
7101    /// - [`Z3_mk_fpa_sort_half`]
7102    /// - [`Z3_mk_fpa_sort_single`]
7103    /// - [`Z3_mk_fpa_sort_double`]
7104    pub fn Z3_mk_fpa_sort_quadruple(c: Z3_context) -> Z3_sort;
7105
7106    /// Create the quadruple-precision (128-bit) `FloatingPoint` sort.
7107    ///
7108    /// This is the same as [`Z3_mk_fpa_sort_quadruple`].
7109    ///
7110    /// - `c`: logical context
7111    ///
7112    /// # See also:
7113    ///
7114    /// - [`Z3_mk_fpa_sort_16`]
7115    /// - [`Z3_mk_fpa_sort_32`]
7116    /// - [`Z3_mk_fpa_sort_64`]
7117    pub fn Z3_mk_fpa_sort_128(c: Z3_context) -> Z3_sort;
7118
7119    /// Create a floating-point NaN of sort `s`.
7120    ///
7121    /// - `c`: logical context
7122    /// - `s`: target sort
7123    ///
7124    /// # See also:
7125    ///
7126    /// - [`Z3_mk_fpa_inf`]
7127    /// - [`Z3_mk_fpa_is_nan`]
7128    /// - [`Z3_mk_fpa_zero`]
7129    pub fn Z3_mk_fpa_nan(c: Z3_context, s: Z3_sort) -> Z3_ast;
7130
7131    /// Create a floating-point infinity of sort `s`.
7132    ///
7133    /// - `c`: logical context
7134    /// - `s`: target sort
7135    /// - `negative`: indicates whether the result should be negative
7136    ///
7137    /// When `negative` is true, -oo will be generated instead of +oo.
7138    ///
7139    /// # See also:
7140    ///
7141    /// - [`Z3_mk_fpa_is_infinite`]
7142    /// - [`Z3_mk_fpa_nan`]
7143    /// - [`Z3_mk_fpa_zero`]
7144    pub fn Z3_mk_fpa_inf(c: Z3_context, s: Z3_sort, negative: bool) -> Z3_ast;
7145
7146    /// Create a floating-point zero of sort `s`.
7147    ///
7148    /// - `c`: logical context
7149    /// - `s`: target sort
7150    /// - `negative`: indicates whether the result should be negative
7151    ///
7152    /// When `negative` is true, -zero will be generated instead of +zero.
7153    ///
7154    /// # See also:
7155    ///
7156    /// - [`Z3_mk_fpa_inf`]
7157    /// - [`Z3_mk_fpa_is_zero`]
7158    /// - [`Z3_mk_fpa_nan`]
7159    pub fn Z3_mk_fpa_zero(c: Z3_context, s: Z3_sort, negative: bool) -> Z3_ast;
7160
7161    /// Create an expression of `FloatingPoint` sort from three bit-vector expressions.
7162    ///
7163    /// This is the operator named `fp` in the SMT FP theory definition.
7164    /// Note that `sign` is required to be a bit-vector of size 1. Significand and exponent
7165    /// are required to be longer than 1 and 2 respectively. The `FloatingPoint` sort
7166    /// of the resulting expression is automatically determined from the bit-vector sizes
7167    /// of the arguments. The exponent is assumed to be in IEEE-754 biased representation.
7168    ///
7169    /// - `c`: logical context
7170    /// - `sgn`: sign
7171    /// - `exp`: exponent
7172    /// - `sig`: significand
7173    ///
7174    /// # See also:
7175    ///
7176    /// - [`Z3_mk_fpa_numeral_double`]
7177    /// - [`Z3_mk_fpa_numeral_float`]
7178    /// - [`Z3_mk_fpa_numeral_int`]
7179    /// - [`Z3_mk_fpa_numeral_int_uint`]
7180    /// - [`Z3_mk_fpa_numeral_int64_uint64`]
7181    /// - [`Z3_mk_numeral`]
7182    pub fn Z3_mk_fpa_fp(c: Z3_context, sgn: Z3_ast, exp: Z3_ast, sig: Z3_ast) -> Z3_ast;
7183
7184    /// Create a numeral of `FloatingPoint` sort from a float.
7185    ///
7186    /// This function is used to create numerals that fit in a float value.
7187    /// It is slightly faster than [`Z3_mk_numeral`] since it is not necessary to parse a string.
7188    ///
7189    /// - `c`: logical context
7190    /// - `v`: value
7191    /// - `ty`: sort
7192    ///
7193    /// `ty` must be a `FloatingPoint` sort
7194    ///
7195    /// # See also:
7196    ///
7197    /// - [`Z3_mk_fpa_fp`]
7198    /// - [`Z3_mk_fpa_numeral_double`]
7199    /// - [`Z3_mk_fpa_numeral_int`]
7200    /// - [`Z3_mk_fpa_numeral_int_uint`]
7201    /// - [`Z3_mk_fpa_numeral_int64_uint64`]
7202    /// - [`Z3_mk_numeral`]
7203    pub fn Z3_mk_fpa_numeral_float(c: Z3_context, v: f32, ty: Z3_sort) -> Z3_ast;
7204
7205    /// Create a numeral of `FloatingPoint` sort from a double.
7206    ///
7207    /// This function is used to create numerals that fit in a double value.
7208    /// It is slightly faster than [`Z3_mk_numeral`]
7209    ///
7210    /// - `c`: logical context
7211    /// - `v`: value
7212    /// - `ty`: sort
7213    ///
7214    /// `ty` must be a `FloatingPoint` sort
7215    ///
7216    /// # See also:
7217    ///
7218    /// - [`Z3_mk_fpa_fp`]
7219    /// - [`Z3_mk_fpa_numeral_float`]
7220    /// - [`Z3_mk_fpa_numeral_int`]
7221    /// - [`Z3_mk_fpa_numeral_int_uint`]
7222    /// - [`Z3_mk_fpa_numeral_int64_uint64`]
7223    /// - [`Z3_mk_numeral`]
7224    pub fn Z3_mk_fpa_numeral_double(c: Z3_context, v: f64, ty: Z3_sort) -> Z3_ast;
7225
7226    /// Create a numeral of `FloatingPoint` sort from a signed integer.
7227    ///
7228    /// - `c`: logical context
7229    /// - `v`: value
7230    /// - `ty`: result sort
7231    ///
7232    /// `ty` must be a `FloatingPoint` sort
7233    ///
7234    /// # See also:
7235    ///
7236    /// - [`Z3_mk_fpa_fp`]
7237    /// - [`Z3_mk_fpa_numeral_double`]
7238    /// - [`Z3_mk_fpa_numeral_float`]
7239    /// - [`Z3_mk_fpa_numeral_int_uint`]
7240    /// - [`Z3_mk_fpa_numeral_int64_uint64`]
7241    /// - [`Z3_mk_numeral`]
7242    pub fn Z3_mk_fpa_numeral_int(c: Z3_context, v: ::std::os::raw::c_int, ty: Z3_sort) -> Z3_ast;
7243
7244    /// Create a numeral of `FloatingPoint` sort from a sign bit and two integers.
7245    ///
7246    /// - `c`: logical context
7247    /// - `sgn`: sign bit (true == negative)
7248    /// - `sig`: significand
7249    /// - `exp`: exponent
7250    /// - `ty`: result sort
7251    ///
7252    /// `ty` must be a `FloatingPoint` sort
7253    ///
7254    /// # See also:
7255    ///
7256    /// - [`Z3_mk_fpa_fp`]
7257    /// - [`Z3_mk_fpa_numeral_double`]
7258    /// - [`Z3_mk_fpa_numeral_float`]
7259    /// - [`Z3_mk_fpa_numeral_int`]
7260    /// - [`Z3_mk_fpa_numeral_int64_uint64`]
7261    /// - [`Z3_mk_numeral`]
7262    pub fn Z3_mk_fpa_numeral_int_uint(
7263        c: Z3_context,
7264        sgn: bool,
7265        exp: ::std::os::raw::c_int,
7266        sig: ::std::os::raw::c_uint,
7267        ty: Z3_sort,
7268    ) -> Z3_ast;
7269
7270    /// Create a numeral of `FloatingPoint` sort from a sign bit and two 64-bit integers.
7271    ///
7272    /// - `c`: logical context
7273    /// - `sgn`: sign bit (true == negative)
7274    /// - `sig`: significand
7275    /// - `exp`: exponent
7276    /// - `ty`: result sort
7277    ///
7278    /// `ty` must be a `FloatingPoint` sort
7279    ///
7280    /// # See also:
7281    ///
7282    /// - [`Z3_mk_fpa_fp`]
7283    /// - [`Z3_mk_fpa_numeral_double`]
7284    /// - [`Z3_mk_fpa_numeral_float`]
7285    /// - [`Z3_mk_fpa_numeral_int`]
7286    /// - [`Z3_mk_fpa_numeral_int_uint`]
7287    /// - [`Z3_mk_numeral`]
7288    pub fn Z3_mk_fpa_numeral_int64_uint64(
7289        c: Z3_context,
7290        sgn: bool,
7291        exp: i64,
7292        sig: u64,
7293        ty: Z3_sort,
7294    ) -> Z3_ast;
7295
7296    /// Floating-point absolute value
7297    ///
7298    /// - `c`: logical context
7299    /// - `t`: term of `FloatingPoint` sort
7300    ///
7301    /// # See also:
7302    ///
7303    /// - [`Z3_mk_fpa_is_negative`]
7304    /// - [`Z3_mk_fpa_is_positive`]
7305    /// - [`Z3_mk_fpa_neg`]
7306    pub fn Z3_mk_fpa_abs(c: Z3_context, t: Z3_ast) -> Z3_ast;
7307
7308    /// Floating-point negation
7309    ///
7310    /// - `c`: logical context
7311    /// - `t`: term of `FloatingPoint` sort
7312    ///
7313    /// # See also:
7314    ///
7315    /// - [`Z3_mk_fpa_abs`]
7316    /// - [`Z3_mk_fpa_is_negative`]
7317    /// - [`Z3_mk_fpa_is_positive`]
7318    pub fn Z3_mk_fpa_neg(c: Z3_context, t: Z3_ast) -> Z3_ast;
7319
7320    /// Floating-point addition
7321    ///
7322    /// - `c`: logical context
7323    /// - `rm`: term of `RoundingMode` sort
7324    /// - `t1`: term of `FloatingPoint` sort
7325    /// - `t2`: term of `FloatingPoint` sort
7326    ///
7327    /// `rm` must be of `RoundingMode` sort, `t1` and `t2` must have the same `FloatingPoint` sort.
7328    pub fn Z3_mk_fpa_add(c: Z3_context, rm: Z3_ast, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
7329
7330    /// Floating-point subtraction
7331    ///
7332    /// - `c`: logical context
7333    /// - `rm`: term of `RoundingMode` sort
7334    /// - `t1`: term of `FloatingPoint` sort
7335    /// - `t2`: term of `FloatingPoint` sort
7336    ///
7337    /// `rm` must be of `RoundingMode` sort, `t1` and `t2` must have the same `FloatingPoint` sort.
7338    pub fn Z3_mk_fpa_sub(c: Z3_context, rm: Z3_ast, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
7339
7340    /// Floating-point multiplication
7341    ///
7342    /// - `c`: logical context
7343    /// - `rm`: term of `RoundingMode` sort
7344    /// - `t1`: term of `FloatingPoint` sort
7345    /// - `t2`: term of `FloatingPoint` sort
7346    ///
7347    /// `rm` must be of `RoundingMode` sort, `t1` and `t2` must have the same `FloatingPoint` sort.
7348    pub fn Z3_mk_fpa_mul(c: Z3_context, rm: Z3_ast, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
7349
7350    /// Floating-point division
7351    ///
7352    /// - `c`: logical context
7353    /// - `rm`: term of `RoundingMode` sort
7354    /// - `t1`: term of `FloatingPoint` sort.
7355    /// - `t2`: term of `FloatingPoint` sort
7356    ///
7357    /// The nodes `rm` must be of `RoundingMode` sort, `t1` and `t2` must have the same `FloatingPoint` sort.
7358    pub fn Z3_mk_fpa_div(c: Z3_context, rm: Z3_ast, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
7359
7360    /// Floating-point fused multiply-add.
7361    ///
7362    /// - `c`: logical context
7363    /// - `rm`: term of `RoundingMode` sort
7364    /// - `t1`: term of `FloatingPoint` sort
7365    /// - `t2`: term of `FloatingPoint` sort
7366    /// - `t3`: term of `FloatingPoint` sort
7367    ///
7368    /// The result is round((t1 * t2) + t3)
7369    ///
7370    /// `rm` must be of `RoundingMode` sort, `t1`, `t2`, and `t3` must have the same `FloatingPoint` sort.
7371    pub fn Z3_mk_fpa_fma(c: Z3_context, rm: Z3_ast, t1: Z3_ast, t2: Z3_ast, t3: Z3_ast) -> Z3_ast;
7372
7373    /// Floating-point square root
7374    ///
7375    /// - `c`: logical context
7376    /// - `rm`: term of `RoundingMode` sort
7377    /// - `t`: term of `FloatingPoint` sort
7378    ///
7379    /// `rm` must be of `RoundingMode` sort, `t` must have `FloatingPoint` sort.
7380    pub fn Z3_mk_fpa_sqrt(c: Z3_context, rm: Z3_ast, t: Z3_ast) -> Z3_ast;
7381
7382    /// Floating-point remainder
7383    ///
7384    /// - `c`: logical context
7385    /// - `t1`: term of `FloatingPoint` sort
7386    /// - `t2`: term of `FloatingPoint` sort
7387    ///
7388    /// `t1` and `t2` must have the same `FloatingPoint` sort.
7389    pub fn Z3_mk_fpa_rem(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
7390
7391    /// Floating-point roundToIntegral. Rounds a floating-point number to
7392    /// the closest integer, again represented as a floating-point number.
7393    ///
7394    /// - `c`: logical context
7395    /// - `rm`: term of `RoundingMode` sort
7396    /// - `t`: term of `FloatingPoint` sort
7397    ///
7398    /// `t` must be of `FloatingPoint` sort.
7399    pub fn Z3_mk_fpa_round_to_integral(c: Z3_context, rm: Z3_ast, t: Z3_ast) -> Z3_ast;
7400
7401    /// Minimum of floating-point numbers.
7402    ///
7403    /// - `c`: logical context
7404    /// - `t1`: term of `FloatingPoint` sort
7405    /// - `t2`: term of `FloatingPoint` sort
7406    ///
7407    /// `t1` and `t2` must have the same `FloatingPoint` sort.
7408    ///
7409    /// # See also:
7410    ///
7411    /// - [`Z3_mk_fpa_max`]
7412    pub fn Z3_mk_fpa_min(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
7413
7414    /// Maximum of floating-point numbers.
7415    ///
7416    /// - `c`: logical context
7417    /// - `t1`: term of `FloatingPoint` sort
7418    /// - `t2`: term of `FloatingPoint` sort
7419    ///
7420    /// `t1` and `t2` must have the same `FloatingPoint` sort.
7421    ///
7422    /// # See also:
7423    ///
7424    /// - [`Z3_mk_fpa_min`]
7425    pub fn Z3_mk_fpa_max(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
7426
7427    /// Floating-point less than or equal.
7428    ///
7429    /// - `c`: logical context
7430    /// - `t1`: term of `FloatingPoint` sort
7431    /// - `t2`: term of `FloatingPoint` sort
7432    ///
7433    /// `t1` and `t2` must have the same `FloatingPoint` sort.
7434    ///
7435    /// # See also:
7436    ///
7437    /// - [`Z3_mk_fpa_eq`]
7438    /// - [`Z3_mk_fpa_geq`]
7439    /// - [`Z3_mk_fpa_gt`]
7440    /// - [`Z3_mk_fpa_lt`]
7441    pub fn Z3_mk_fpa_leq(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
7442
7443    /// Floating-point less than.
7444    ///
7445    /// - `c`: logical context
7446    /// - `t1`: term of `FloatingPoint` sort
7447    /// - `t2`: term of `FloatingPoint` sort
7448    ///
7449    /// `t1` and `t2` must have the same `FloatingPoint` sort.
7450    ///
7451    /// # See also:
7452    ///
7453    /// - [`Z3_mk_fpa_eq`]
7454    /// - [`Z3_mk_fpa_geq`]
7455    /// - [`Z3_mk_fpa_gt`]
7456    /// - [`Z3_mk_fpa_leq`]
7457    pub fn Z3_mk_fpa_lt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
7458
7459    /// Floating-point greater than or equal.
7460    ///
7461    /// - `c`: logical context
7462    /// - `t1`: term of `FloatingPoint` sort
7463    /// - `t2`: term of `FloatingPoint` sort
7464    ///
7465    /// `t1` and `t2` must have the same `FloatingPoint` sort.
7466    ///
7467    /// # See also:
7468    ///
7469    /// - [`Z3_mk_fpa_eq`]
7470    /// - [`Z3_mk_fpa_gt`]
7471    /// - [`Z3_mk_fpa_leq`]
7472    /// - [`Z3_mk_fpa_lt`]
7473    pub fn Z3_mk_fpa_geq(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
7474
7475    /// Floating-point greater than.
7476    ///
7477    /// - `c`: logical context
7478    /// - `t1`: term of `FloatingPoint` sort
7479    /// - `t2`: term of `FloatingPoint` sort
7480    ///
7481    /// `t1` and `t2` must have the same `FloatingPoint` sort.
7482    ///
7483    /// # See also:
7484    ///
7485    /// - [`Z3_mk_fpa_eq`]
7486    /// - [`Z3_mk_fpa_geq`]
7487    /// - [`Z3_mk_fpa_leq`]
7488    /// - [`Z3_mk_fpa_lt`]
7489    pub fn Z3_mk_fpa_gt(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
7490
7491    /// Floating-point equality.
7492    ///
7493    /// - `c`: logical context
7494    /// - `t1`: term of `FloatingPoint` sort
7495    /// - `t2`: term of `FloatingPoint` sort
7496    ///
7497    /// Note that this is IEEE 754 equality (as opposed to SMT-LIB =).
7498    ///
7499    /// `t1` and `t2` must have the same `FloatingPoint` sort.
7500    ///
7501    /// # See also:
7502    ///
7503    /// - [`Z3_mk_fpa_geq`]
7504    /// - [`Z3_mk_fpa_gt`]
7505    /// - [`Z3_mk_fpa_leq`]
7506    /// - [`Z3_mk_fpa_lt`]
7507    pub fn Z3_mk_fpa_eq(c: Z3_context, t1: Z3_ast, t2: Z3_ast) -> Z3_ast;
7508
7509    /// Predicate indicating whether `t` is a normal floating-point number.
7510    ///
7511    /// - `c`: logical context
7512    /// - `t`: term of `FloatingPoint` sort
7513    ///
7514    /// `t` must have `FloatingPoint` sort.
7515    ///
7516    /// # See also:
7517    ///
7518    /// - [`Z3_mk_fpa_is_infinite`]
7519    /// - [`Z3_mk_fpa_is_nan`]
7520    /// - [`Z3_mk_fpa_is_subnormal`]
7521    /// - [`Z3_mk_fpa_is_zero`]
7522    pub fn Z3_mk_fpa_is_normal(c: Z3_context, t: Z3_ast) -> Z3_ast;
7523
7524    /// Predicate indicating whether `t` is a subnormal floating-point number.
7525    ///
7526    /// - `c`: logical context
7527    /// - `t`: term of `FloatingPoint` sort
7528    ///
7529    /// `t` must have `FloatingPoint` sort.
7530    ///
7531    /// # See also:
7532    ///
7533    /// - [`Z3_mk_fpa_is_infinite`]
7534    /// - [`Z3_mk_fpa_is_nan`]
7535    /// - [`Z3_mk_fpa_is_normal`]
7536    /// - [`Z3_mk_fpa_is_zero`]
7537    pub fn Z3_mk_fpa_is_subnormal(c: Z3_context, t: Z3_ast) -> Z3_ast;
7538
7539    /// Predicate indicating whether `t` is a floating-point number with zero value, i.e., +zero or -zero.
7540    ///
7541    /// - `c`: logical context
7542    /// - `t`: term of `FloatingPoint` sort
7543    ///
7544    /// `t` must have `FloatingPoint` sort.
7545    ///
7546    /// # See also:
7547    ///
7548    /// - [`Z3_mk_fpa_is_infinite`]
7549    /// - [`Z3_mk_fpa_is_nan`]
7550    /// - [`Z3_mk_fpa_is_normal`]
7551    /// - [`Z3_mk_fpa_is_subnormal`]
7552    /// - [`Z3_mk_fpa_is_zero`]
7553    /// - [`Z3_mk_fpa_zero`]
7554    pub fn Z3_mk_fpa_is_zero(c: Z3_context, t: Z3_ast) -> Z3_ast;
7555
7556    /// Predicate indicating whether `t` is a floating-point number representing +oo or -oo.
7557    ///
7558    /// - `c`: logical context
7559    /// - `t`: term of `FloatingPoint` sort
7560    ///
7561    /// `t` must have `FloatingPoint` sort.
7562    ///
7563    /// # See also:
7564    ///
7565    /// - [`Z3_mk_fpa_inf`]
7566    /// - [`Z3_mk_fpa_is_infinite`]
7567    /// - [`Z3_mk_fpa_is_nan`]
7568    /// - [`Z3_mk_fpa_is_normal`]
7569    /// - [`Z3_mk_fpa_is_subnormal`]
7570    /// - [`Z3_mk_fpa_is_zero`]
7571    pub fn Z3_mk_fpa_is_infinite(c: Z3_context, t: Z3_ast) -> Z3_ast;
7572
7573    /// Predicate indicating whether `t` is a NaN.
7574    ///
7575    /// - `c`: logical context
7576    /// - `t`: term of `FloatingPoint` sort
7577    ///
7578    /// `t` must have `FloatingPoint` sort.
7579    ///
7580    /// # See also:
7581    ///
7582    /// - [`Z3_mk_fpa_is_infinite`]
7583    /// - [`Z3_mk_fpa_is_normal`]
7584    /// - [`Z3_mk_fpa_is_subnormal`]
7585    /// - [`Z3_mk_fpa_is_zero`]
7586    /// - [`Z3_mk_fpa_nan`]
7587    pub fn Z3_mk_fpa_is_nan(c: Z3_context, t: Z3_ast) -> Z3_ast;
7588
7589    /// Predicate indicating whether `t` is a negative floating-point number.
7590    ///
7591    /// - `c`: logical context
7592    /// - `t`: term of `FloatingPoint` sort
7593    ///
7594    /// `t` must have `FloatingPoint` sort.
7595    ///
7596    /// # See also:
7597    ///
7598    /// - [`Z3_mk_fpa_abs`]
7599    /// - [`Z3_mk_fpa_is_positive`]
7600    /// - [`Z3_mk_fpa_neg`]
7601    pub fn Z3_mk_fpa_is_negative(c: Z3_context, t: Z3_ast) -> Z3_ast;
7602
7603    /// Predicate indicating whether `t` is a positive floating-point number.
7604    ///
7605    /// - `c`: logical context
7606    /// - `t`: term of `FloatingPoint` sort
7607    ///
7608    /// `t` must have `FloatingPoint` sort.
7609    ///
7610    /// # See also:
7611    ///
7612    /// - [`Z3_mk_fpa_abs`]
7613    /// - [`Z3_mk_fpa_is_negative`]
7614    /// - [`Z3_mk_fpa_neg`]
7615    pub fn Z3_mk_fpa_is_positive(c: Z3_context, t: Z3_ast) -> Z3_ast;
7616
7617    /// Conversion of a single IEEE 754-2008 bit-vector into a floating-point number.
7618    ///
7619    /// Produces a term that represents the conversion of a bit-vector term `bv` to a
7620    /// floating-point term of sort `s`.
7621    ///
7622    /// - `c`: logical context
7623    /// - `bv`: a bit-vector term
7624    /// - `s`: floating-point sort
7625    ///
7626    /// `s` must be a `FloatingPoint` sort, `t` must be of bit-vector sort, and the bit-vector
7627    /// size of `bv` must be equal to ebits+sbits of `s`. The format of the bit-vector is
7628    /// as defined by the IEEE 754-2008 interchange format.
7629    pub fn Z3_mk_fpa_to_fp_bv(c: Z3_context, bv: Z3_ast, s: Z3_sort) -> Z3_ast;
7630
7631    /// Conversion of a `FloatingPoint` term into another term of different `FloatingPoint` sort.
7632    ///
7633    /// Produces a term that represents the conversion of a floating-point term `t` to a
7634    /// floating-point term of sort `s`. If necessary, the result will be rounded according
7635    /// to rounding mode `rm`.
7636    ///
7637    /// - `c`: logical context
7638    /// - `rm`: term of `RoundingMode` sort
7639    /// - `t`: term of `FloatingPoint` sort
7640    /// - `s`: floating-point sort
7641    ///
7642    /// `s` must be a `FloatingPoint` sort, `rm` must be of `RoundingMode` sort, `t` must be
7643    /// of floating-point sort.
7644    pub fn Z3_mk_fpa_to_fp_float(c: Z3_context, rm: Z3_ast, t: Z3_ast, s: Z3_sort) -> Z3_ast;
7645
7646    /// Conversion of a term of real sort into a term of `FloatingPoint` sort.
7647    ///
7648    /// Produces a term that represents the conversion of term `t` of real sort into a
7649    /// floating-point term of sort `s`. If necessary, the result will be rounded according
7650    /// to rounding mode `rm`.
7651    ///
7652    /// - `c`: logical context
7653    /// - `rm`: term of `RoundingMode` sort
7654    /// - `t`: term of Real sort
7655    /// - `s`: floating-point sort
7656    ///
7657    /// `s` must be a `FloatingPoint` sort, `rm` must be of `RoundingMode` sort, `t` must be of
7658    /// Real sort.
7659    pub fn Z3_mk_fpa_to_fp_real(c: Z3_context, rm: Z3_ast, t: Z3_ast, s: Z3_sort) -> Z3_ast;
7660
7661    /// Conversion of a 2's complement signed bit-vector term into a term of `FloatingPoint` sort.
7662    ///
7663    /// Produces a term that represents the conversion of the bit-vector term `t` into a
7664    /// floating-point term of sort `s`. The bit-vector `t` is taken to be in signed
7665    /// 2's complement format. If necessary, the result will be rounded according
7666    /// to rounding mode `rm`.
7667    ///
7668    /// - `c`: logical context
7669    /// - `rm`: term of `RoundingMode` sort
7670    /// - `t`: term of bit-vector sort
7671    /// - `s`: floating-point sort
7672    ///
7673    /// `s` must be a `FloatingPoint` sort, `rm` must be of `RoundingMode` sort, `t` must be
7674    /// of bit-vector sort.
7675    pub fn Z3_mk_fpa_to_fp_signed(c: Z3_context, rm: Z3_ast, t: Z3_ast, s: Z3_sort) -> Z3_ast;
7676
7677    /// Conversion of a 2's complement unsigned bit-vector term into a term of `FloatingPoint` sort.
7678    ///
7679    /// Produces a term that represents the conversion of the bit-vector term `t` into a
7680    /// floating-point term of sort `s`. The bit-vector `t` is taken to be in unsigned
7681    /// 2's complement format. If necessary, the result will be rounded according
7682    /// to rounding mode `rm`.
7683    ///
7684    /// - `c`: logical context
7685    /// - `rm`: term of `RoundingMode` sort
7686    /// - `t`: term of bit-vector sort
7687    /// - `s`: floating-point sort
7688    ///
7689    /// `s` must be a `FloatingPoint` sort, `rm` must be of `RoundingMode` sort, `t` must be
7690    /// of bit-vector sort.
7691    pub fn Z3_mk_fpa_to_fp_unsigned(c: Z3_context, rm: Z3_ast, t: Z3_ast, s: Z3_sort) -> Z3_ast;
7692
7693    /// Conversion of a floating-point term into an unsigned bit-vector.
7694    ///
7695    /// Produces a term that represents the conversion of the floating-point term `t` into a
7696    /// bit-vector term of size `sz` in unsigned 2's complement format. If necessary, the result
7697    /// will be rounded according to rounding mode `rm`.
7698    ///
7699    /// - `c`: logical context
7700    /// - `rm`: term of `RoundingMode` sort
7701    /// - `t`: term of `FloatingPoint` sort
7702    /// - `sz`: size of the resulting bit-vector
7703    pub fn Z3_mk_fpa_to_ubv(
7704        c: Z3_context,
7705        rm: Z3_ast,
7706        t: Z3_ast,
7707        sz: ::std::os::raw::c_uint,
7708    ) -> Z3_ast;
7709
7710    /// Conversion of a floating-point term into a signed bit-vector.
7711    ///
7712    /// Produces a term that represents the conversion of the floating-point term `t` into a
7713    /// bit-vector term of size `sz` in signed 2's complement format. If necessary, the result
7714    /// will be rounded according to rounding mode `rm`.
7715    ///
7716    /// - `c`: logical context
7717    /// - `rm`: term of `RoundingMode` sort
7718    /// - `t`: term of `FloatingPoint` sort
7719    /// - `sz`: size of the resulting bit-vector
7720    pub fn Z3_mk_fpa_to_sbv(
7721        c: Z3_context,
7722        rm: Z3_ast,
7723        t: Z3_ast,
7724        sz: ::std::os::raw::c_uint,
7725    ) -> Z3_ast;
7726
7727    /// Conversion of a floating-point term into a real-numbered term.
7728    ///
7729    /// Produces a term that represents the conversion of the floating-point term `t` into a
7730    /// real number. Note that this type of conversion will often result in non-linear
7731    /// constraints over real terms.
7732    ///
7733    /// - `c`: logical context
7734    /// - `t`: term of `FloatingPoint` sort
7735    pub fn Z3_mk_fpa_to_real(c: Z3_context, t: Z3_ast) -> Z3_ast;
7736
7737    /// Retrieves the number of bits reserved for the exponent in a `FloatingPoint` sort.
7738    ///
7739    /// - `c`: logical context
7740    /// - `s`: `FloatingPoint` sort
7741    ///
7742    /// # See also:
7743    ///
7744    /// - [`Z3_fpa_get_sbits`]
7745    pub fn Z3_fpa_get_ebits(c: Z3_context, s: Z3_sort) -> ::std::os::raw::c_uint;
7746
7747    /// Retrieves the number of bits reserved for the significand in a `FloatingPoint` sort.
7748    ///
7749    /// - `c`: logical context
7750    /// - `s`: `FloatingPoint` sort
7751    ///
7752    /// # See also:
7753    ///
7754    /// - [`Z3_fpa_get_ebits`]
7755    pub fn Z3_fpa_get_sbits(c: Z3_context, s: Z3_sort) -> ::std::os::raw::c_uint;
7756
7757    /// Checks whether a given floating-point numeral is a NaN.
7758    ///
7759    /// - `c`: logical context
7760    /// - `t`: a floating-point numeral
7761    ///
7762    /// # See also:
7763    ///
7764    /// - [`Z3_fpa_is_numeral_inf`]
7765    /// - [`Z3_fpa_is_numeral_normal`]
7766    /// - [`Z3_fpa_is_numeral_subnormal`]
7767    /// - [`Z3_fpa_is_numeral_zero`]
7768    pub fn Z3_fpa_is_numeral_nan(c: Z3_context, t: Z3_ast) -> bool;
7769
7770    /// Checks whether a given floating-point numeral is a +oo or -oo.
7771    ///
7772    /// - `c`: logical context
7773    /// - `t`: a floating-point numeral
7774    ///
7775    /// # See also:
7776    ///
7777    /// - [`Z3_fpa_is_numeral_nan`]
7778    /// - [`Z3_fpa_is_numeral_normal`]
7779    /// - [`Z3_fpa_is_numeral_subnormal`]
7780    /// - [`Z3_fpa_is_numeral_zero`]
7781    pub fn Z3_fpa_is_numeral_inf(c: Z3_context, t: Z3_ast) -> bool;
7782
7783    /// Checks whether a given floating-point numeral is +zero or -zero.
7784    ///
7785    /// - `c`: logical context
7786    /// - `t`: a floating-point numeral
7787    ///
7788    /// # See also:
7789    ///
7790    /// - [`Z3_fpa_is_numeral_inf`]
7791    /// - [`Z3_fpa_is_numeral_nan`]
7792    /// - [`Z3_fpa_is_numeral_normal`]
7793    /// - [`Z3_fpa_is_numeral_subnormal`]
7794    pub fn Z3_fpa_is_numeral_zero(c: Z3_context, t: Z3_ast) -> bool;
7795
7796    /// Checks whether a given floating-point numeral is normal.
7797    ///
7798    /// - `c`: logical context
7799    /// - `t`: a floating-point numeral
7800    ///
7801    /// # See also:
7802    ///
7803    /// - [`Z3_fpa_is_numeral_inf`]
7804    /// - [`Z3_fpa_is_numeral_nan`]
7805    /// - [`Z3_fpa_is_numeral_subnormal`]
7806    /// - [`Z3_fpa_is_numeral_zero`]
7807    pub fn Z3_fpa_is_numeral_normal(c: Z3_context, t: Z3_ast) -> bool;
7808
7809    /// Checks whether a given floating-point numeral is subnormal.
7810    ///
7811    /// - `c`: logical context
7812    /// - `t`: a floating-point numeral
7813    ///
7814    /// # See also:
7815    ///
7816    /// - [`Z3_fpa_is_numeral_inf`]
7817    /// - [`Z3_fpa_is_numeral_nan`]
7818    /// - [`Z3_fpa_is_numeral_normal`]
7819    /// - [`Z3_fpa_is_numeral_zero`]
7820    pub fn Z3_fpa_is_numeral_subnormal(c: Z3_context, t: Z3_ast) -> bool;
7821
7822    /// Checks whether a given floating-point numeral is positive.
7823    ///
7824    /// - `c`: logical context
7825    /// - `t`: a floating-point numeral
7826    ///
7827    /// # See also:
7828    ///
7829    /// - [`Z3_fpa_is_numeral_negative`]
7830    pub fn Z3_fpa_is_numeral_positive(c: Z3_context, t: Z3_ast) -> bool;
7831
7832    /// Checks whether a given floating-point numeral is negative.
7833    ///
7834    /// - `c`: logical context
7835    /// - `t`: a floating-point numeral
7836    ///
7837    /// # See also:
7838    ///
7839    /// - [`Z3_fpa_is_numeral_positive`]
7840    pub fn Z3_fpa_is_numeral_negative(c: Z3_context, t: Z3_ast) -> bool;
7841
7842    /// Retrieves the sign of a floating-point literal as a bit-vector expression.
7843    ///
7844    /// - `c`: logical context
7845    /// - `t`: a floating-point numeral
7846    ///
7847    /// Remarks: NaN is an invalid argument.
7848    pub fn Z3_fpa_get_numeral_sign_bv(c: Z3_context, t: Z3_ast) -> Z3_ast;
7849
7850    /// Retrieves the significand of a floating-point literal as a bit-vector expression.
7851    ///
7852    /// - `c`: logical context
7853    /// - `t`: a floating-point numeral
7854    ///
7855    /// Remarks: NaN is an invalid argument.
7856    pub fn Z3_fpa_get_numeral_significand_bv(c: Z3_context, t: Z3_ast) -> Z3_ast;
7857
7858    /// Retrieves the sign of a floating-point literal.
7859    ///
7860    /// - `c`: logical context
7861    /// - `t`: a floating-point numeral
7862    /// - `sgn`: sign
7863    ///
7864    /// Remarks: sets `sgn` to 0 if `t` is positive and to 1 otherwise, except for
7865    /// NaN, which is an invalid argument.
7866    pub fn Z3_fpa_get_numeral_sign(
7867        c: Z3_context,
7868        t: Z3_ast,
7869        sgn: *mut ::std::os::raw::c_int,
7870    ) -> bool;
7871
7872    /// Return the significand value of a floating-point numeral as a string.
7873    ///
7874    /// - `c`: logical context
7875    /// - `t`: a floating-point numeral
7876    ///
7877    /// Remarks: The significand `s` is always `0.0 <= s < 2.0`; the resulting string is
7878    /// long enough to represent the real significand precisely.
7879    pub fn Z3_fpa_get_numeral_significand_string(c: Z3_context, t: Z3_ast) -> Z3_string;
7880
7881    /// Return the significand value of a floating-point numeral as a uint64.
7882    ///
7883    /// - `c`: logical context
7884    /// - `t`: a floating-point numeral
7885    /// - `n`: pointer to output uint64
7886    ///
7887    /// Remarks: This function extracts the significand bits in `t`, without the
7888    /// hidden bit or normalization. Sets the `ErrorCode::InvalidArg` error code if the
7889    /// significand does not fit into a uint64. NaN is an invalid argument.
7890    pub fn Z3_fpa_get_numeral_significand_uint64(c: Z3_context, t: Z3_ast, n: *mut u64) -> bool;
7891
7892    /// Return the exponent value of a floating-point numeral as a string.
7893    ///
7894    /// - `c`: logical context
7895    /// - `t`: a floating-point numeral
7896    /// - `biased`: flag to indicate whether the result is in biased representation
7897    ///
7898    /// Remarks: This function extracts the exponent in `t`, without normalization.
7899    /// NaN is an invalid argument.
7900    pub fn Z3_fpa_get_numeral_exponent_string(c: Z3_context, t: Z3_ast, biased: bool) -> Z3_string;
7901
7902    /// Return the exponent value of a floating-point numeral as a signed 64-bit integer
7903    ///
7904    /// - `c`: logical context
7905    /// - `t`: a floating-point numeral
7906    /// - `n`: exponent
7907    /// - `biased`: flag to indicate whether the result is in biased representation
7908    ///
7909    /// Remarks: This function extracts the exponent in `t`, without normalization.
7910    /// NaN is an invalid argument.
7911    pub fn Z3_fpa_get_numeral_exponent_int64(
7912        c: Z3_context,
7913        t: Z3_ast,
7914        n: *mut i64,
7915        biased: bool,
7916    ) -> bool;
7917
7918    /// Retrieves the exponent of a floating-point literal as a bit-vector expression.
7919    ///
7920    /// - `c`: logical context
7921    /// - `t`: a floating-point numeral
7922    /// - `biased`: flag to indicate whether the result is in biased representation
7923    ///
7924    /// Remarks: This function extracts the exponent in `t`, without normalization.
7925    /// NaN is an invalid arguments.
7926    pub fn Z3_fpa_get_numeral_exponent_bv(c: Z3_context, t: Z3_ast, biased: bool) -> Z3_ast;
7927
7928    /// Conversion of a floating-point term into a bit-vector term in IEEE 754-2008 format.
7929    ///
7930    /// - `c`: logical context
7931    /// - `t`: term of `FloatingPoint` sort
7932    ///
7933    /// `t` must have `FloatingPoint` sort. The size of the resulting bit-vector is automatically
7934    /// determined.
7935    ///
7936    /// Note that IEEE 754-2008 allows multiple different representations of NaN. This conversion
7937    /// knows only one NaN and it will always produce the same bit-vector representation of
7938    /// that NaN.
7939    pub fn Z3_mk_fpa_to_ieee_bv(c: Z3_context, t: Z3_ast) -> Z3_ast;
7940
7941    /// Conversion of a real-sorted significand and an integer-sorted exponent into a term of `FloatingPoint` sort.
7942    ///
7943    /// Produces a term that represents the conversion of `sig * 2^exp` into a
7944    /// floating-point term of sort `s`. If necessary, the result will be rounded
7945    /// according to rounding mode `rm`.
7946    ///
7947    /// - `c`: logical context
7948    /// - `rm`: term of `RoundingMode` sort
7949    /// - `exp`: exponent term of Int sort
7950    /// - `sig`: significand term of Real sort
7951    /// - `s`: `FloatingPoint` sort
7952    ///
7953    /// `s` must be a `FloatingPoint` sort, `rm` must be of `RoundingMode` sort,
7954    /// `exp` must be of int sort, `sig` must be of real sort.
7955    pub fn Z3_mk_fpa_to_fp_int_real(
7956        c: Z3_context,
7957        rm: Z3_ast,
7958        exp: Z3_ast,
7959        sig: Z3_ast,
7960        s: Z3_sort,
7961    ) -> Z3_ast;
7962
7963    /// Pose a query against the asserted rules at the given level.
7964    ///
7965    /// ```text
7966    /// query ::= (exists (bound-vars) query)
7967    /// |  literals
7968    /// ```
7969    ///
7970    /// query returns
7971    /// - `Z3_L_FALSE` if the query is unsatisfiable.
7972    /// - `Z3_L_TRUE` if the query is satisfiable. Obtain the answer by
7973    ///   calling [`Z3_fixedpoint_get_answer`].
7974    /// - `Z3_L_UNDEF` if the query was interrupted, timed out or otherwise failed.
7975    pub fn Z3_fixedpoint_query_from_lvl(
7976        c: Z3_context,
7977        d: Z3_fixedpoint,
7978        query: Z3_ast,
7979        lvl: ::std::os::raw::c_uint,
7980    ) -> Z3_lbool;
7981
7982    /// Retrieve a bottom-up (from query) sequence of ground facts
7983    ///
7984    /// The previous call to [`Z3_fixedpoint_query`]
7985    /// must have returned `Z3_L_TRUE`.
7986    pub fn Z3_fixedpoint_get_ground_sat_answer(c: Z3_context, d: Z3_fixedpoint) -> Z3_ast;
7987
7988    /// Obtain the list of rules along the counterexample trace.
7989    pub fn Z3_fixedpoint_get_rules_along_trace(c: Z3_context, d: Z3_fixedpoint) -> Z3_ast_vector;
7990
7991    /// Obtain the list of rules along the counterexample trace.
7992    pub fn Z3_fixedpoint_get_rule_names_along_trace(c: Z3_context, d: Z3_fixedpoint) -> Z3_symbol;
7993
7994    /// Add an assumed invariant of predicate `pred`.
7995    ///
7996    /// Note: this functionality is Spacer specific.
7997    pub fn Z3_fixedpoint_add_invariant(
7998        c: Z3_context,
7999        d: Z3_fixedpoint,
8000        pred: Z3_func_decl,
8001        property: Z3_ast,
8002    );
8003
8004    /// Retrieve reachable states of a predicate.
8005    ///
8006    /// Note: this functionality is Spacer specific.
8007    pub fn Z3_fixedpoint_get_reachable(
8008        c: Z3_context,
8009        d: Z3_fixedpoint,
8010        pred: Z3_func_decl,
8011    ) -> Z3_ast;
8012
8013    /// Project variables given a model
8014    pub fn Z3_qe_model_project(
8015        c: Z3_context,
8016        m: Z3_model,
8017        num_bounds: ::std::os::raw::c_uint,
8018        bound: *const Z3_app,
8019        body: Z3_ast,
8020    ) -> Z3_ast;
8021
8022    /// Project variables given a model
8023    pub fn Z3_qe_model_project_skolem(
8024        c: Z3_context,
8025        m: Z3_model,
8026        num_bounds: ::std::os::raw::c_uint,
8027        bound: *const Z3_app,
8028        body: Z3_ast,
8029        map: Z3_ast_map,
8030    ) -> Z3_ast;
8031
8032    /// Extrapolates a model of a formula
8033    pub fn Z3_model_extrapolate(c: Z3_context, m: Z3_model, fml: Z3_ast) -> Z3_ast;
8034
8035    /// Best-effort quantifier elimination
8036    pub fn Z3_qe_lite(c: Z3_context, vars: Z3_ast_vector, body: Z3_ast) -> Z3_ast;
8037}
8038
8039#[cfg(not(windows))]
8040#[link(name = "z3")]
8041extern "C" {}
8042
8043#[cfg(windows)]
8044#[link(name = "libz3")]
8045extern "C" {}