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