false
, undefined
, true
. More...
const char *
. More...
horn_rule
should be of the form: More...
pred
. Add a property of predicate pred
at level
. It gets pushed forward when possible. More...
true
if a
can be used as value in the Z3 real algebraic number package. More...
true
if a
is positive, and false
otherwise. More...
true
if a
is negative, and false
otherwise. More...
true
if a
is zero, and false
otherwise. More...
a
is positive, 0 if a
is zero, and -1 if a
is negative. More...
true
if a < b, and false
otherwise. More...
true
if a > b, and false
otherwise. More...
true
if a <= b, and false
otherwise. More...
true
if a >= b, and false
otherwise. More...
true
if a == b, and false
otherwise. More...
true
if a != b, and false
otherwise. More...
Z3_ast
reference counters. Managing reference counters is a burden and error-prone, but allows the user to use the memory more efficiently. The user must invoke Z3_inc_ref for any Z3_ast
returned by Z3, and Z3_dec_ref whenever the Z3_ast
is not needed anymore. This idiom is similar to the one used in BDD (binary decision diagrams) packages such as CUDD. More...
c
should have been created using Z3_mk_context_rc. This function is a NOOP if c
was created using Z3_mk_context. More...
c
should have been created using Z3_mk_context_rc. This function is a NOOP if c
was created using Z3_mk_context. More...
k
with value v
to the parameter set p
. More...
k
with value v
to the parameter set p
. More...
k
with value v
to the parameter set p
. More...
k
with value v
to the parameter set p
. More...
p
against the parameter description set d
. More...
n
. More...
i
. More...
s
. More...
true
. More...
false
. More...
l = r
. More...
distinct(args[0], ..., args[num_args-1])
. More...
not(a)
. More...
ite(t1, t2, t3)
. More...
t1 iff t2
. More...
t1 implies t2
. More...
t1 xor t2
. More...
args[0] and ... and args[num_args-1]
. More...
args[0] or ... or args[num_args-1]
. More...
args[0] + ... + args[num_args-1]
. More...
args[0] * ... * args[num_args-1]
. More...
args[0] - ... - args[num_args - 1]
. More...
- arg
. More...
arg1 div arg2
. More...
arg1 mod arg2
. More...
arg1 rem arg2
. More...
arg1 ^ arg2
. More...
high
down to low
from a bit-vector of size m
to yield a new bit-vector of size n
, where n = high - low + 1
. More...
m+i
, where m
is the size of the given bit-vector. More...
m+i
, where m
is the size of the given bit-vector. More...
i
. More...
i
of a bit-vector and yields a boolean. More...
t1
to the left i
times. More...
t1
to the right i
times. More...
t1
to the left t2
times. More...
t1
to the right t2
times. More...
n
bit bit-vector from the integer argument t1
. More...
t1
. If is_signed
is false, then the bit-vector t1
is treated as unsigned. So the result is non-negative and in the range [0..2^N-1]
, where N are the number of bits in t1
. If is_signed
is true, t1
is treated as a signed bit-vector. More...
t1
and t2
does not overflow. More...
t1
and t2
does not underflow. More...
t1
and t2
does not overflow. More...
t1
and t2
does not underflow. More...
t1
and t2
does not overflow. More...
t1
is interpreted as a signed bit-vector. More...
t1
and t2
does not overflow. More...
t1
and t2
does not underflow. More...
a
is the array and i
is the index of the array that gets read. More...
a
is the array and idxs
are the indices of the array that gets read. More...
set
has k
elements set to true.
s
is a sequence sort. More...
s
is a regular expression sort. More...
s
is a string sort. More...
s
is a character sort. More...
s
is a string constant. More...
s
. Characters outside the basic printable ASCII range are escaped. More...
s
. The string can contain escape sequences. Characters in the range 1 to 255 are literal. Characters in the range 0, and 256 above are escaped. More...
s
. More...
s
. More...
seq
. More...
a
. More...
prefix
is a prefix of s
. More...
suffix
is a suffix of s
. More...
container
contains containee
. More...
s1
is lexicographically strictly less than s2
. More...
s1
is equal or lexicographically strictly less than s2
. More...
offset
of length
. More...
src
with dst
in s
. More...
s
the unit sequence positioned at position index
. The sequence is empty if the index is out of bounds. More...
s
the element positioned at position index
. The function is under-specified if the index is out of bounds. More...
s
. More...
substr
in s
starting from offset offset
. 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. The value is -1 if offset
is negative or larger than the length of s
. More...
substr
in s
. If s
does not contain substr
, then the value is -1,. More...
f
over the sequence s
. More...
f
over the sequence s
starting at index i
. More...
f
over the sequence s
with accumulator a. More...
f
over the sequence s
with accumulator a
starting at index i
. More...
seq
. More...
seq
is in the language generated by the regular expression re
. More...
re+
. More...
re*
. More...
[re]. More...
r
is repeated between lo
and hi
times. The lo
should be below hi
with one exception: when supplying the value hi
as 0, the meaning is to repeat the argument r
at least lo
number of times, and with an unbounded upper bound. More...
re
. More...
re
. More...
re
. More...
a
. The relation is identified by the index id
. More...
a
and index id
. More...
a
and index id
. More...
a
identified using index id
. More...
body
that contains bound variables of the same sorts as the sorts listed in the array sorts
. The bound variables are de-Bruijn indices created using Z3_mk_bound. The array decl_names
contains the names that the quantified formula uses for the bound variables. Z3 applies the convention that the last element in the decl_names
and sorts
array refers to the variable with index 0, the second to last element of decl_names
and sorts
refers to the variable with index 1, etc. More...
body
that contains bound variables of the same sorts as the sorts listed in the array sorts
. The bound variables are de-Bruijn indices created using Z3_mk_bound. The array decl_names
contains the names that the quantified formula uses for the bound variables. Z3 applies the convention that the last element in the decl_names
and sorts
array refers to the variable with index 0, the second to last element of decl_names
and sorts
refers to the variable with index 1, etc. The sort of the resulting expression is
(Array sorts range) where range
is the sort of body
. For example, if the lambda binds two variables of sort Int
and Bool
, and the body
has sort Real
, the sort of the expression is
(Array Int Bool Real). More...
Z3_INT_SYMBOL
if the symbol was constructed using Z3_mk_int_symbol, and Z3_STRING_SYMBOL
if the symbol was constructed using Z3_mk_string_symbol. More...
s
. More...
Z3_sort
into Z3_ast
. This is just type casting. More...
r
. Return false
if the call failed. That is, Z3_get_sort_kind(s) == Z3_FINITE_DOMAIN_SORT. More...
Z3_func_decl
into Z3_ast
. This is just type casting. More...
f
. More...
Z3_get_domain_size
. More...
Z3_app
into Z3_ast
. This is just type casting. More...
t
is an constant, then the number of arguments is 0. More...
t
. The identifier is unique up to structural equality. Thus, two ast nodes created by the same context and having the same children and same function symbols have the same identifiers. Ast nodes created in the same context, but having different children or different functions have different identifiers. Variables and quantifiers are also assigned different identifiers according to their structure. More...
Z3_get_ast_id
returns an identifier that is unique over the set of live AST objects. More...
true
if the given expression t
is well sorted. More...
Z3_L_TRUE
if a
is true, Z3_L_FALSE
if it is false, and Z3_L_UNDEF
otherwise. More...
true
if the given AST is a real algebraic number. More...
ast
into an APP_AST
. This is just type casting. More...
precision
decimal places. More...
true
if the call succeeded. More...
true
if the call succeeded. More...
uint64_t
int. Return true
if the call succeeded. More...
int64_t
int. Return true
if the call succeeded. More...
int64_t
int. Return true
if the call succeeded. More...
a
using the arguments args
. The number of arguments num_args
should coincide with the number of arguments to a
. If a
is a quantifier, then num_args has to be 1. More...
from[i]
in a
with to[i]
, for i
smaller than num_exprs
. The result is the new AST. The arrays from
and to
must have size num_exprs
. For every i
smaller than num_exprs
, we must have that sort of from[i]
must be equal to sort of to[i]
. More...
a
with the expressions in to
. For every i
smaller than num_exprs
, the variable with de-Bruijn index i
is replaced with term to[i]
. Note that a variable is created using the function Z3_mk_bound. More...
from
with new expressions in to
. More...
a
from context source
to context target
. AST a
must have been created using context source
. More...
t
in the given model. Return true
if succeeded, and store the result in v
. More...
a
in the model m
. Return NULL
, if the model does not assign an interpretation for a
. That should be interpreted as: the value of a
does not matter. More...
a
in the model m
. More...
f
in the model m
. Return NULL
, if the model does not assign an interpretation for f
. That should be interpreted as: the f
does not matter. More...
m
assigns an interpretation to. More...
m
assigns an interpretation. More...
s
. More...
c
to context dst
. More...
(_ as-array f)
AST node is a construct for assigning interpretations for arrays in Z3. It is the array such that forall indices i
we have that (select (_ as-array f) i)
is equal to (f i)
. This procedure returns true
if the a
is an as-array
AST node. More...
f
associated with a (_ as_array f)
node. More...
Z3_func_interp
object. More...
Z3_func_interp
object. More...
f
in a particular point. More...
Z3_func_entry
object. More...
Z3_func_entry
object. More...
Z3_func_entry
object. More...
Z3_func_entry
object. More...
Z3_parser_context
object. More...
Z3_parser_context
object. More...
a
to the given goal. The formula is split according to the following procedure that is applied until a fixed-point: Conjunctions are split into separate formulas. Negations are distributed over disjunctions, resulting in separate formulas. If the goal is false
, adding new formulas is a no-op. If the formula a
is true
, then nothing is added. If the formula a
is false
, then the entire goal is replaced by the formula false
. More...
true
if the given goal contains the formula false
. More...
true
if the goal is empty, and it is precise or the product of a under approximation. More...
true
if the goal contains false, and it is precise or the product of an over approximation. More...
g
from the context source
to the context target
. More...
(help-tactic)
in the SMT 2.0 front-end. More...
(help-tactic)
in the SMT 2.0 front-end. More...
t1
to a given goal and t2
to every subgoal produced by t1
. More...
t1
to a given goal, if it fails then returns the result of t2
applied to the given goal. More...
t1
to a given goal and then t2
to every subgoal produced by t1
. The subgoals are processed in parallel. More...
t
to a given goal for ms
milliseconds. If t
does not terminate in ms
milliseconds, then it fails. More...
t
to a given goal is the probe p
evaluates to true. If p
evaluates to false, then the new tactic behaves like the skip tactic. More...
t1
to a given goal if the probe p
evaluates to true, and t2
if p
evaluates to false. More...
t
until the goal is not modified anymore or the maximum number of iterations max
is reached. More...
p
evaluates to false. More...
t
using the given set of parameters. More...
(help-simplifier)
in the SMT 2.0 front-end. More...
t1
to a given goal and t2
to every subgoal produced by t1
. More...
t
using the given set of parameters. More...
p1
is less than the value returned by p2
. More...
p1
is greater than the value returned by p2
. More...
p1
is less than or equal to the value returned by p2
. More...
p1
is greater than or equal to the value returned by p2
. More...
p1
is equal to the value returned by p2
. More...
p1
and p2
evaluates to true. More...
p1
or p2
evaluates to true. More...
p
does not evaluate to true. More...
i
probe. More...
t
to the goal g
. More...
t
to the goal g
using the parameter set p
. More...
Z3_apply_result
object. More...
Z3_apply_result
object. More...
Z3_apply_result
object returned by Z3_tactic_apply into a string. More...
Z3_apply_result
object returned by Z3_tactic_apply. More...
Z3_apply_result
object returned by Z3_tactic_apply. More...
s
from the context source
to the context target
. More...
n
backtracking points. More...
a
into the solver, and track it (in the unsat) core using the Boolean constant p
. More...
Z3_solver_get_level
based on the trail. More...
propagate_fixed
, propagate_eq
, propagate_diseq
, and propagate_final
callbacks. The callback adds a propagation consequence based on the fixed values passed ids
and equalities eqs
based on parameters lhs
, rhs
. More...
value
. If the variable is an integer or real, the initial Simplex tableau is recalibrated to attempt to follow the value assignment. More...
true
or false
. The number of (non-constant) cubes is by default 1. For the sat solver cubing is controlled using parameters sat.lookahead.cube.cutoff and sat.lookahead.cube.fraction. More...
a
. More...
Z3_L_UNDEF
) for the commands Z3_solver_check and Z3_solver_check_assumptions. More...
s
. More...
true
if the given statistical data is a unsigned integer. More...
true
if the given statistical data is a double. More...
i
in the AST vector v
. More...
i
of the AST vector v
with the AST a
. More...
v
. More...
a
in the end of the AST vector v
. The size of v
is increased by one. More...
v
from context s
into an AST vector in context t
. More...
m
contains the AST key k
. More...
k
. More...
s
. More...
s
. More...
s
. More...
t
is a normal floating-point number. More...
t
is a subnormal floating-point number. More...
t
is a floating-point number with zero value, i.e., +zero or -zero. More...
t
is a floating-point number representing +oo or -oo. More...
t
is a NaN. More...
t
is a negative floating-point number. More...
t
is a positive floating-point number. More...
value
. If the variable is an integer or real, the initial Simplex tableau is recalibrated to attempt to follow the value assignment. More...
a
. More...
a
, b
, c
and encode the result of Z3_optimize_get_lower a * infinity + b + c * epsilon
. More...
(+ (if f1 w1 0) (if f2 w2 0) ...)
If the objective function is entered as a maximization objective, then return the corresponding minimization objective. In this way the resulting objective function is always returned as a minimization objective. More...
p
and q
with respect to the "variable" x
. More...
a[n-1]*x^{n-1} + ... + a[0]
. The output vector roots
must have size n
. It returns the number of roots of the polynomial. More...
a + b
. More...
a - b
. More...
a * b
. More...
a / b
. More...
-a
. More...
1/a
. More...
a^k
. More...
true
if a < b
. More...
true
if a > b
. More...
true
if a <= b
. More...
true
if a >= b
. More...
true
if a == b
. More...
true
if a != b
. More...
a = n/d
, moreover n
and d
are not represented using rational functions. More...
true
if a
represents a rational number. More...
true
if a
represents an algebraic number. More...
true
if a
represents an infinitesimal. More...
true
if a
represents a transcendental number. More...
Definition at line 339 of file z3_fixedpoint.h.
◆ Z3_fixedpoint_predecessor_eh typedef void(* Z3_fixedpoint_predecessor_eh) (void *state)Definition at line 340 of file z3_fixedpoint.h.
◆ Z3_fixedpoint_reduce_app_callback_fptr typedef void Z3_fixedpoint_reduce_app_callback_fptr(void *, Z3_func_decl, unsigned, Z3_ast const[], Z3_ast *)Definition at line 318 of file z3_fixedpoint.h.
◆ Z3_fixedpoint_reduce_assign_callback_fptr typedef void Z3_fixedpoint_reduce_assign_callback_fptr(void *, Z3_func_decl, unsigned, Z3_ast const[], unsigned, Z3_ast const[])The following utilities allows adding user-defined domains.
Definition at line 313 of file z3_fixedpoint.h.
◆ Z3_fixedpoint_unfold_eh typedef void(* Z3_fixedpoint_unfold_eh) (void *state)Definition at line 341 of file z3_fixedpoint.h.
◆ Z3_stringZ3 string type. It is just an alias for const char *
.
Most of the types in the C API are opaque pointers.
Z3_config:
configuration object used to initialize logical contexts.Z3_context:
manager of all other Z3 objects, global configuration options, etc.Z3_symbol:
Lisp-like symbol used to name types, constants, and functions. A symbol can be created using string or integers.Z3_ast:
abstract syntax tree node. That is, the data-structure used in Z3 to represent terms, formulas and types.Z3_sort:
kind of AST used to represent types.Z3_func_decl:
kind of AST used to represent function symbols.Z3_app:
kind of AST used to represent function applications.Z3_pattern:
kind of AST used to represent pattern and multi-patterns used to guide quantifier instantiation.Z3_constructor:
type constructor for a (recursive) datatype.Z3_constructor_list:
list of constructors for a (recursive) datatype.Z3_params:
parameter set used to configure many components such as: simplifiers, tactics, solvers, etc.Z3_param_descrs:
provides a collection of parameter names, their types, default values and documentation strings. Solvers, tactics, and other objects accept different collection of parameters.Z3_parser_context:
context for incrementally parsing strings. Declarations can be added incrementally to the parser state.Z3_model:
model for the constraints asserted into the logical context.Z3_func_interp:
interpretation of a function in a model.Z3_func_entry:
representation of the value of a Z3_func_interp
at a particular point.Z3_fixedpoint:
context for the recursive predicate solver.Z3_optimize:
context for solving optimization queries.Z3_ast_vector:
vector of Z3_ast
objects.Z3_ast_map:
mapping from Z3_ast
to Z3_ast
objects.Z3_goal:
set of formulas that can be solved and/or transformed using tactics and solvers.Z3_tactic:
basic building block for creating custom solvers for specific problem domains.Z3_simplifier:
basic building block for creating custom pre-processing simplifiers.Z3_probe:
function/predicate used to inspect a goal and collect information that may be used to decide which solver and/or preprocessing step will be used.Z3_apply_result:
collection of subgoals resulting from applying of a tactic to a goal.Z3_solver:
(incremental) solver, possibly specialized by a particular tactic or logic.Z3_stats:
statistical data for a solver.Definition at line 53 of file z3_api.h.
◆ Z3_string_ptr ◆ Z3_ast_kindThe different kinds of Z3 AST (abstract syntax trees). That is, terms, formulas and types.
Definition at line 140 of file z3_api.h.
Z3_ast_kind
The different kinds of Z3 AST (abstract syntax trees). That is, terms, formulas and types.
◆ Z3_ast_print_modeZ3 pretty printing modes (See Z3_set_ast_print_mode).
Definition at line 1324 of file z3_api.h.
Z3_ast_print_mode
Z3 pretty printing modes (See Z3_set_ast_print_mode).
@ Z3_PRINT_SMTLIB2_COMPLIANT
◆ Z3_decl_kindThe different kinds of interpreted function kinds.
T1: p T2: (implies p q) [mp T1 T2]: qThe second antecedents may also be a proof for (iff p q).
T1: (R t s) [symmetry T1]: (R s t)T1 is the antecedent of this proof object.
T1: (R t s) T2: (R s u) [trans T1 T2]: (R t u)
Z3_OP_PR_TRANSITIVITY_STAR: Condensed transitivity proof. It combines several symmetry and transitivity proofs. Example:
T1: (R a b) T2: (R c b) T3: (R c d) [trans* T1 T2 T3]: (R a d)
R must be a symmetric and transitive relation.
Assuming that this proof object is a proof for (R s t), then a proof checker must check if it is possible to prove (R s t) using the antecedents, symmetry and transitivity. That is, if there is a path from s to t, if we view every antecedent (R a b) as an edge between a and b.
T1: (R t_1 s_1) ... Tn: (R t_n s_n) [monotonicity T1 ... Tn]: (R (f t_1 ... t_n) (f s_1 ... s_n))Remark: if t_i == s_i, then the antecedent Ti is suppressed. That is, reflexivity proofs are suppressed to save space.
T1: (~ p q)
T1: f [proof-bind T1] forall (x) f
Z3_OP_PR_DISTRIBUTIVITY: Distributivity proof object. Given that f (= or) distributes over g (= and), produces a proof for
(= (f a (g c d)) (g (f a c) (f a d)))
If f and g are associative, this proof also justifies the following equality:
(= (f (g a b) (g c d)) (g (f a c) (f a d) (f b c) (f b d)))
where each f and g can have arbitrary number of arguments.
This proof object has no antecedents. Remark. This rule is used by the CNF conversion pass and instantiated by f = or, and g = and.
Z3_OP_PR_AND_ELIM: Given a proof for (and l_1 ... l_n), produces a proof for l_i
T1: (and l_1 ... l_n)
T1: (not (or l_1 ... l_n)) [not-or-elim T1]: (not l_i)
Z3_OP_PR_REWRITE: A proof for a local rewriting step (= t s). The head function symbol of t is interpreted.
This proof object has no antecedents. The conclusion of a rewrite rule is either an equality (= t s), an equivalence (iff t s), or equi-satisfiability (~ t s). Remark: if f is bool, then = is iff. Examples:
(= (+ x 0) x) (= (+ x 1 2) (+ 3 x)) (iff (or x false) x)
(iff (forall (x_1 ... x_m) (and p_1[x_1 ... x_m] ... p_n[x_1 ... x_m])) (and (forall (x_1 ... x_m) p_1[x_1 ... x_m]) ... (forall (x_1 ... x_m) p_n[x_1 ... x_m])))This proof object has no antecedents.
Z3_OP_PR_ELIM_UNUSED_VARS: A proof for (iff (forall (x_1 ... x_n y_1 ... y_m) p[x_1 ... x_n]) (forall (x_1 ... x_n) p[x_1 ... x_n]))
It is used to justify the elimination of unused variables. This proof object has no antecedents.
Z3_OP_PR_DER: A proof for destructive equality resolution: (iff (forall (x) (or (not (= x t)) P[x])) P[t]) if x does not occur in t.
This proof object has no antecedents.
Several variables can be eliminated simultaneously.
T1: false [lemma T1]: (or (not l_1) ... (not l_n))This proof object has one antecedent: a hypothetical proof for false. It converts the proof in a proof for (or (not l_1) ... (not l_n)), when T1 contains the open hypotheses: l_1, ..., l_n. The hypotheses are closed after an application of a lemma. Furthermore, there are no other open hypotheses in the subtree covered by the lemma.
T1: (or l_1 ... l_n l_1' ... l_m') T2: (not l_1) ... T(n+1): (not l_n) [unit-resolution T1 ... T(n+1)]: (or l_1' ... l_m')
T1: p [iff-true T1]: (iff p true)
T1: (not p) [iff-false T1]: (iff p false)
[comm]: (= (f a b) (f b a)) f is a commutative operator. This proof object has no antecedents. Remark: if f is bool, then = is iff.
(or (not (and p q)) p) (or (not (and p q)) q) (or (not (and p q r)) p) (or (not (and p q r)) q) (or (not (and p q r)) r) ... (or (and p q) (not p) (not q)) (or (not (or p q)) p q) (or (or p q) (not p)) (or (or p q) (not q)) (or (not (iff p q)) (not p) q) (or (not (iff p q)) p (not q)) (or (iff p q) (not p) (not q)) (or (iff p q) p q) (or (not (ite a b c)) (not a) b) (or (not (ite a b c)) a c) (or (ite a b c) (not a) (not b)) (or (ite a b c) a (not c)) (or (not (not a)) (not a)) (or (not a) a)This proof object has no antecedents. Note: all axioms are propositional tautologies. Note also that 'and' and 'or' can take multiple arguments. You can recover the propositional tautologies by unfolding the Boolean connectives in the axioms a small bounded number of steps (=3).
Z3_OP_PR_DEF_INTRO: Introduces a name for a formula/term. Suppose e is an expression with free variables x, and def-intro introduces the name n(x). The possible cases are:
When e is of Boolean type:
or:
when e only occurs positively.
When e is of the form (ite cond th el):
Otherwise: [def-intro]: (= n e)
Z3_OP_PR_APPLY_DEF:
[apply-def T1]: F ~ n
F is 'equivalent' to n, given that T1 is a proof that n is a name for F.
Z3_OP_PR_IFF_OEQ:
T1: (iff p q) [iff~ T1]: (~ p q)
T1: (not s_1) ~ r_1 T2: (not s_2) ~ r_2 T3: s_1 ~ r_1' T4: s_2 ~ r_2' [nnf-pos T1 T2 T3 T4]: (~ (iff s_1 s_2) (and (or r_1 r_2') (or r_1' r_2)))The negation normal form steps NNF_POS and NNF_NEG are used in the following cases: (a) When creating the NNF of a positive force quantifier. The quantifier is retained (unless the bound variables are eliminated). Example
T1: q ~ q_new [nnf-pos T1]: (~ (forall (x T) q) (forall (x T) q_new))(b) When recursively creating NNF over Boolean formulas, where the top-level connective is changed during NNF conversion. The relevant Boolean connectives for NNF_POS are 'implies', 'iff', 'xor', 'ite'. NNF_NEG furthermore handles the case where negation is pushed over Boolean connectives 'and' and 'or'.
T1: (not s_1) ~ r_1 ... Tn: (not s_n) ~ r_n [nnf-neg T1 ... Tn]: (not (and s_1 ... s_n)) ~ (or r_1 ... r_n) and T1: (not s_1) ~ r_1 ... Tn: (not s_n) ~ r_n [nnf-neg T1 ... Tn]: (not (or s_1 ... s_n)) ~ (and r_1 ... r_n) and T1: (not s_1) ~ r_1 T2: (not s_2) ~ r_2 T3: s_1 ~ r_1' T4: s_2 ~ r_2' [nnf-neg T1 T2 T3 T4]: (~ (not (iff s_1 s_2)) (and (or r_1 r_2) (or r_1' r_2')))
[sk]: (~ (not (forall x (p x y))) (not (p (sk y) y))) [sk]: (~ (exists x (p x y)) (p (sk y) y))This proof object has no antecedents.
T1: p T2: (~ p q) [mp~ T1 T2]: q
- farkas - followed by rational coefficients. Multiply the coefficients to the inequalities in the lemma, add the (negated) inequalities and obtain a contradiction. - triangle-eq - Indicates a lemma related to the equivalence: (iff (= t1 t2) (and (<= t1 t2) (<= t2 t1))) - gcd-test - Indicates an integer linear arithmetic lemma that uses a gcd test.
Z3_OP_PR_HYPER_RESOLVE: Hyper-resolution rule.
The premises of the rules is a sequence of clauses. The first clause argument is the main clause of the rule. with a literal from the first (main) clause.
Premises of the rules are of the form
or
(=> (and l1 l2 .. ln) l0)
or in the most general (ground) form:
(=> (and ln+1 ln+2 .. ln+m) (or l0 l1 .. ln))
In other words we use the following (Prolog style) convention for Horn implications: The head of a Horn implication is position 0, the first conjunct in the body of an implication is position 1 the second conjunct in the body of an implication is position 2
For general implications where the head is a disjunction, the first n positions correspond to the n disjuncts in the head. The next m positions correspond to the m conjuncts in the body.
The premises can be universally quantified so that the most general non-ground form is:
(forall (vars) (=> (and ln+1 ln+2 .. ln+m) (or l0 l1 .. ln)))
The hyper-resolution rule takes a sequence of parameters. The parameters are substitutions of bound variables separated by pairs of literal positions from the main clause and side clause.
n+1
arguments, where the first argument is the relation and the remaining n
elements correspond to the n
columns of the relation.Z3_OP_RA_NEGATION_FILTER: Intersect the first relation with respect to negation of the second relation (the function takes two arguments). Logically, the specification can be described by a function
target = filter_by_negation(pos, neg, columns)
where columns are pairs c1, d1, .., cN, dN of columns from pos and neg, such that target are elements in x in pos, such that there is no y in neg that agrees with x on the columns c1, d1, .., cN, dN.
n+1
arguments, where the first argument is a relation, and the remaining n
arguments correspond to a record.Z3_OP_FPA_BV2RM: Conversion of a 3-bit bit-vector term to a floating-point rounding-mode term
The conversion uses the following values: 0 = 000 = Z3_OP_FPA_RM_NEAREST_TIES_TO_EVEN, 1 = 001 = Z3_OP_FPA_RM_NEAREST_TIES_TO_AWAY, 2 = 010 = Z3_OP_FPA_RM_TOWARD_POSITIVE, 3 = 011 = Z3_OP_FPA_RM_TOWARD_NEGATIVE, 4 = 100 = Z3_OP_FPA_RM_TOWARD_ZERO.
Definition at line 963 of file z3_api.h.
Z3_decl_kind
The different kinds of interpreted function kinds.
@ Z3_OP_FPA_ROUND_TO_INTEGRAL
@ Z3_OP_PR_UNIT_RESOLUTION
@ Z3_OP_SPECIAL_RELATION_TRC
@ Z3_OP_PR_MODUS_PONENS_OEQ
@ Z3_OP_FPA_RM_TOWARD_NEGATIVE
@ Z3_OP_FPA_RM_NEAREST_TIES_TO_EVEN
@ Z3_OP_PR_ELIM_UNUSED_VARS
@ Z3_OP_FPA_RM_NEAREST_TIES_TO_AWAY
@ Z3_OP_FPA_RM_TOWARD_ZERO
@ Z3_OP_FPA_RM_TOWARD_POSITIVE
@ Z3_OP_SPECIAL_RELATION_PO
@ Z3_OP_SPECIAL_RELATION_TC
@ Z3_OP_SPECIAL_RELATION_TO
@ Z3_OP_FPA_TO_FP_UNSIGNED
@ Z3_OP_RA_NEGATION_FILTER
@ Z3_OP_SPECIAL_RELATION_PLO
@ Z3_OP_PR_ASSUMPTION_ADD
@ Z3_OP_PR_TRANSITIVITY_STAR
@ Z3_OP_SEQ_REPLACE_RE_ALL
@ Z3_OP_SPECIAL_RELATION_LO
@ Z3_OP_PR_DISTRIBUTIVITY
◆ Z3_error_codeZ3 error codes (See Z3_get_error_code).
Definition at line 1348 of file z3_api.h.
Z3_error_code
Z3 error codes (See Z3_get_error_code).
◆ Z3_goal_precZ3 custom error handler (See Z3_set_error_handler).
Definitions for update_api.py
callback functions for user propagator.
A Goal is essentially a set of formulas. Z3 provide APIs for building strategies/tactics for solving and transforming Goals. Some of these transformations apply under/over approximations.
Definition at line 1389 of file z3_api.h.
Z3_goal_prec
Z3 custom error handler (See Z3_set_error_handler).
◆ Z3_lboolLifted Boolean type: false
, undefined
, true
.
Definition at line 60 of file z3_api.h.
Z3_lbool
Lifted Boolean type: false, undefined, true.
◆ Z3_param_kindThe different kinds of parameters that can be associated with parameter sets. (see Z3_mk_params).
Definition at line 1307 of file z3_api.h.
Z3_param_kind
The different kinds of parameters that can be associated with parameter sets. (see Z3_mk_params).
◆ Z3_parameter_kindThe different kinds of parameters that can be associated with function symbols.
Definition at line 94 of file z3_api.h.
Z3_parameter_kind
The different kinds of parameters that can be associated with function symbols.
◆ Z3_sort_kindThe different kinds of Z3 types (See Z3_get_sort_kind).
Enumerator Z3_UNINTERPRETED_SORT Z3_BOOL_SORT Z3_INT_SORT Z3_REAL_SORT Z3_BV_SORT Z3_ARRAY_SORT Z3_DATATYPE_SORT Z3_RELATION_SORT Z3_FINITE_DOMAIN_SORT Z3_FLOATING_POINT_SORT Z3_ROUNDING_MODE_SORT Z3_SEQ_SORT Z3_RE_SORT Z3_CHAR_SORT Z3_TYPE_VAR Z3_UNKNOWN_SORTDefinition at line 108 of file z3_api.h.
Z3_sort_kind
The different kinds of Z3 types (See Z3_get_sort_kind).
◆ Z3_symbol_kindThe different kinds of symbol. In Z3, a symbol can be represented using integers and strings (See Z3_get_symbol_kind).
Definition at line 74 of file z3_api.h.
Z3_symbol_kind
The different kinds of symbol. In Z3, a symbol can be represented using integers and strings (See Z3_...
◆ Z3_add_const_interp() void Z3_API Z3_add_const_interp ( Z3_context c, Z3_model m, Z3_func_decl f, Z3_ast a ) ◆ Z3_add_func_interp() Z3_func_interp Z3_API Z3_add_func_interp ( Z3_context c, Z3_model m, Z3_func_decl f, Z3_ast default_value )Create a fresh func_interp object, add it to a model for a specified function. It has reference count 0.
Referenced by model::add_func_interp(), and ModelRef::update_value().
◆ Z3_add_rec_def() void Z3_API Z3_add_rec_def ( Z3_context c, Z3_func_decl f, unsigned n, Z3_ast args[], Z3_ast body )Define the body of a recursive function.
After declaring a recursive function or a collection of mutually recursive functions, use this function to provide the definition for the recursive function.
Referenced by z3py::RecAddDefinition(), and context::recdef().
◆ Z3_algebraic_add() Z3_ast Z3_API Z3_algebraic_add ( Z3_context c, Z3_ast a, Z3_ast b )Return the value a + b.
Return the value a / b.
Return true
if a == b, and false
otherwise.
Given a multivariate polynomial p(x_0, ..., x_{n-1}), return the sign of p(a[0], ..., a[n-1]).
Return true
if a >= b, and false
otherwise.
Return true
if a > b, and false
otherwise.
Return true
if a
is negative, and false
otherwise.
Return true
if a
is positive, and false
otherwise.
Return true
if a
can be used as value in the Z3 real algebraic number package.
Return true
if a
is zero, and false
otherwise.
Return true
if a <= b, and false
otherwise.
Return true
if a < b, and false
otherwise.
Return the value a * b.
Return true
if a != b, and false
otherwise.
Return the a^k.
Return the a^(1/k)
Given a multivariate polynomial p(x_0, ..., x_{n-1}, x_n), returns the roots of the univariate polynomial p(a[0], ..., a[n-1], x_n).
Return 1 if a
is positive, 0 if a
is zero, and -1 if a
is negative.
Return the value a - b.
Convert a Z3_app
into Z3_ast
. This is just type casting.
Append user-defined string to interaction log.
The interaction log is opened using Z3_open_log. It contains the formulas that are checked using Z3. You can use this command to append comments, for instance.
Referenced by z3py::append_log().
◆ Z3_apply_result_dec_ref() void Z3_API Z3_apply_result_dec_ref ( Z3_context c, Z3_apply_result r ) ◆ Z3_apply_result_get_num_subgoals() unsigned Z3_API Z3_apply_result_get_num_subgoals ( Z3_context c, Z3_apply_result r ) ◆ Z3_apply_result_get_subgoal() Z3_goal Z3_API Z3_apply_result_get_subgoal ( Z3_context c, Z3_apply_result r, unsigned i ) ◆ Z3_apply_result_inc_ref() void Z3_API Z3_apply_result_inc_ref ( Z3_context c, Z3_apply_result r ) ◆ Z3_apply_result_to_string() Z3_string Z3_API Z3_apply_result_to_string ( Z3_context c, Z3_apply_result r ) ◆ Z3_ast_map_contains() bool Z3_API Z3_ast_map_contains ( Z3_context c, Z3_ast_map m, Z3_ast k ) ◆ Z3_ast_map_dec_ref() void Z3_API Z3_ast_map_dec_ref ( Z3_context c, Z3_ast_map m )Decrement the reference counter of the given AST map.
Referenced by AstMap::__del__().
◆ Z3_ast_map_erase() void Z3_API Z3_ast_map_erase ( Z3_context c, Z3_ast_map m, Z3_ast k ) ◆ Z3_ast_map_find() Z3_ast Z3_API Z3_ast_map_find ( Z3_context c, Z3_ast_map m, Z3_ast k )Return the value associated with the key k
.
The procedure invokes the error handler if k
is not in the map.
Referenced by AstMap::__getitem__().
◆ Z3_ast_map_inc_ref() void Z3_API Z3_ast_map_inc_ref ( Z3_context c, Z3_ast_map m )Increment the reference counter of the given AST map.
◆ Z3_ast_map_insert() void Z3_API Z3_ast_map_insert ( Z3_context c, Z3_ast_map m, Z3_ast k, Z3_ast v ) ◆ Z3_ast_map_keys() Z3_ast_vector Z3_API Z3_ast_map_keys ( Z3_context c, Z3_ast_map m )Return the keys stored in the given map.
Referenced by AstMap::keys().
◆ Z3_ast_map_reset() void Z3_API Z3_ast_map_reset ( Z3_context c, Z3_ast_map m ) ◆ Z3_ast_map_size() unsigned Z3_API Z3_ast_map_size ( Z3_context c, Z3_ast_map m ) ◆ Z3_ast_map_to_string() Z3_string Z3_API Z3_ast_map_to_string ( Z3_context c, Z3_ast_map m ) ◆ Z3_ast_to_string() Z3_string Z3_API Z3_ast_to_string ( Z3_context c, Z3_ast a ) ◆ Z3_ast_vector_dec_ref() void Z3_API Z3_ast_vector_dec_ref ( Z3_context c, Z3_ast_vector v ) ◆ Z3_ast_vector_get() Z3_ast Z3_API Z3_ast_vector_get ( Z3_context c, Z3_ast_vector v, unsigned i ) ◆ Z3_ast_vector_inc_ref() void Z3_API Z3_ast_vector_inc_ref ( Z3_context c, Z3_ast_vector v ) ◆ Z3_ast_vector_push() void Z3_API Z3_ast_vector_push ( Z3_context c, Z3_ast_vector v, Z3_ast a ) ◆ Z3_ast_vector_resize() void Z3_API Z3_ast_vector_resize ( Z3_context c, Z3_ast_vector v, unsigned n ) ◆ Z3_ast_vector_set() void Z3_API Z3_ast_vector_set ( Z3_context c, Z3_ast_vector v, unsigned i, Z3_ast a ) ◆ Z3_ast_vector_size() unsigned Z3_API Z3_ast_vector_size ( Z3_context c, Z3_ast_vector v ) ◆ Z3_ast_vector_to_string() Z3_string Z3_API Z3_ast_vector_to_string ( Z3_context c, Z3_ast_vector v ) ◆ Z3_ast_vector_translate() Z3_ast_vector Z3_API Z3_ast_vector_translate ( Z3_context s, Z3_ast_vector v, Z3_context t ) ◆ Z3_benchmark_to_smtlib_string()Convert the given benchmark into SMT-LIB formatted string.
Z3_benchmark_to_smtlib_string
.
Referenced by solver::to_smt2(), and Solver::to_smt2().
◆ Z3_close_log() void Z3_API Z3_close_log ( void ) ◆ Z3_constructor_num_fields() unsigned Z3_API Z3_constructor_num_fields ( Z3_context c, Z3_constructor constr )Retrieve the number of fields of a constructor.
Update record field with a value.
This corresponds to the 'with' construct in OCaml. It has the effect of updating a record field with a given value. The remaining fields are left unchanged. It is the record equivalent of an array store (see
use concurrency control for dec-ref. Reference counting decrements are allowed in separate threads from the context. If this setting is not invoked, reference counting decrements are not going to be thread safe.
◆ Z3_enable_trace() void Z3_API Z3_enable_trace ( Z3_string tag ) ◆ Z3_eval_smtlib2_string()Parse and evaluate and SMT-LIB2 command sequence. The state from a previous call is saved so the next evaluation builds on top of the previous call.
Destroy all allocated resources.
Any pointers previously returned by the API become invalid. Can be used for memory leak detection.
◆ Z3_fixedpoint_add_callback()set export callback for lemmas
◆ Z3_fixedpoint_add_constraint() void Z3_API Z3_fixedpoint_add_constraint ( Z3_context c, Z3_fixedpoint d, Z3_ast e, unsigned lvl ) ◆ Z3_fixedpoint_add_cover() void Z3_API Z3_fixedpoint_add_cover ( Z3_context c, Z3_fixedpoint d, int level, Z3_func_decl pred, Z3_ast property )Add property about the predicate pred
. Add a property of predicate pred
at level
. It gets pushed forward when possible.
Note: level = -1 is treated as the fixedpoint. So passing -1 for the level
means that the property is true of the fixed-point unfolding with respect to pred
.
Note: this functionality is PDR specific.
Referenced by fixedpoint::add_cover(), and Fixedpoint::add_cover().
◆ Z3_fixedpoint_add_fact() void Z3_API Z3_fixedpoint_add_fact ( Z3_context c, Z3_fixedpoint d, Z3_func_decl r, unsigned num_args, unsigned args[] )Add a Database fact.
The number of arguments num_args
should be equal to the number of sorts in the domain of r
. Each sort in the domain should be an integral (bit-vector, Boolean or or finite domain sort).
The call has the same effect as adding a rule where r
is applied to the arguments.
Referenced by fixedpoint::add_fact().
◆ Z3_fixedpoint_add_rule() void Z3_API Z3_fixedpoint_add_rule ( Z3_context c, Z3_fixedpoint d, Z3_ast rule, Z3_symbol name )Add a universal Horn clause as a named rule. The horn_rule
should be of the form:
horn_rule ::= (
forall(bound-vars) horn_rule)
| (=> atoms horn_rule)
| atom
expr forall(expr const &x, expr const &b)
Referenced by fixedpoint::add_rule(), and Fixedpoint::add_rule().
◆ Z3_fixedpoint_assert() void Z3_API Z3_fixedpoint_assert ( Z3_context c, Z3_fixedpoint d, Z3_ast axiom )Assert a constraint to the fixedpoint context.
The constraints are used as background axioms when the fixedpoint engine uses the PDR mode. They are ignored for standard Datalog mode.
Referenced by Fixedpoint::assert_exprs().
◆ Z3_fixedpoint_dec_ref() void Z3_API Z3_fixedpoint_dec_ref ( Z3_context c, Z3_fixedpoint d ) ◆ Z3_fixedpoint_from_file() Z3_ast_vector Z3_API Z3_fixedpoint_from_file ( Z3_context c, Z3_fixedpoint f, Z3_string s ) ◆ Z3_fixedpoint_from_string() Z3_ast_vector Z3_API Z3_fixedpoint_from_string ( Z3_context c, Z3_fixedpoint f, Z3_string s ) ◆ Z3_fixedpoint_get_answer() Z3_ast Z3_API Z3_fixedpoint_get_answer ( Z3_context c, Z3_fixedpoint d )Retrieve a formula that encodes satisfying answers to the query.
When used in Datalog mode, the returned answer is a disjunction of conjuncts. Each conjunct encodes values of the bound variables of the query that are satisfied. In PDR mode, the returned answer is a single conjunction.
When used in Datalog mode the previous call to Z3_fixedpoint_query must have returned Z3_L_TRUE
. When used with the PDR engine, the previous call must have been either Z3_L_TRUE
or Z3_L_FALSE
.
Referenced by fixedpoint::get_answer(), and Fixedpoint::get_answer().
◆ Z3_fixedpoint_get_assertions() Z3_ast_vector Z3_API Z3_fixedpoint_get_assertions ( Z3_context c, Z3_fixedpoint f ) ◆ Z3_fixedpoint_get_cover_delta() Z3_ast Z3_API Z3_fixedpoint_get_cover_delta ( Z3_context c, Z3_fixedpoint d, int level, Z3_func_decl pred )Retrieve the current cover of pred
up to level
unfoldings. Return just the delta that is known at level
. To obtain the full set of properties of pred
one should query at level+1
, level+2
etc, and include level=-1
.
Note: this functionality is PDR specific.
Referenced by fixedpoint::get_cover_delta(), and Fixedpoint::get_cover_delta().
◆ Z3_fixedpoint_get_help() Z3_string Z3_API Z3_fixedpoint_get_help ( Z3_context c, Z3_fixedpoint f ) ◆ Z3_fixedpoint_get_num_levels() unsigned Z3_API Z3_fixedpoint_get_num_levels ( Z3_context c, Z3_fixedpoint d, Z3_func_decl pred )Query the PDR engine for the maximal levels properties are known about predicate.
This call retrieves the maximal number of relevant unfoldings of pred
with respect to the current exploration state. Note: this functionality is PDR specific.
Referenced by fixedpoint::get_num_levels(), and Fixedpoint::get_num_levels().
◆ Z3_fixedpoint_get_param_descrs() Z3_param_descrs Z3_API Z3_fixedpoint_get_param_descrs ( Z3_context c, Z3_fixedpoint f ) ◆ Z3_fixedpoint_get_reason_unknown() Z3_string Z3_API Z3_fixedpoint_get_reason_unknown ( Z3_context c, Z3_fixedpoint d ) ◆ Z3_fixedpoint_get_rules() Z3_ast_vector Z3_API Z3_fixedpoint_get_rules ( Z3_context c, Z3_fixedpoint f ) ◆ Z3_fixedpoint_get_statistics() Z3_stats Z3_API Z3_fixedpoint_get_statistics ( Z3_context c, Z3_fixedpoint d ) ◆ Z3_fixedpoint_inc_ref() void Z3_API Z3_fixedpoint_inc_ref ( Z3_context c, Z3_fixedpoint d ) ◆ Z3_fixedpoint_init() void Z3_API Z3_fixedpoint_init ( Z3_context c, Z3_fixedpoint d, void * state )Initialize the context with a user-defined state.
◆ Z3_fixedpoint_query() Z3_lbool Z3_API Z3_fixedpoint_query ( Z3_context c, Z3_fixedpoint d, Z3_ast query )Pose a query against the asserted rules.
query ::= (
exists(bound-vars) query)
| literals
expr exists(expr const &x, expr const &b)
query returns
Z3_L_FALSE
if the query is unsatisfiable.Z3_L_TRUE
if the query is satisfiable. Obtain the answer by calling Z3_fixedpoint_get_answer.Z3_L_UNDEF
if the query was interrupted, timed out or otherwise failed.Referenced by fixedpoint::query(), and Fixedpoint::query().
◆ Z3_fixedpoint_query_relations() Z3_lbool Z3_API Z3_fixedpoint_query_relations ( Z3_context c, Z3_fixedpoint d, unsigned num_relations, Z3_func_decl const relations[] )Pose multiple queries against the asserted rules.
The queries are encoded as relations (function declarations).
query returns
Z3_L_FALSE
if the query is unsatisfiable.Z3_L_TRUE
if the query is satisfiable. Obtain the answer by calling Z3_fixedpoint_get_answer.Z3_L_UNDEF
if the query was interrupted, timed out or otherwise failed.Referenced by fixedpoint::query(), and Fixedpoint::query().
◆ Z3_fixedpoint_register_relation() void Z3_API Z3_fixedpoint_register_relation ( Z3_context c, Z3_fixedpoint d, Z3_func_decl f ) ◆ Z3_fixedpoint_set_params() void Z3_API Z3_fixedpoint_set_params ( Z3_context c, Z3_fixedpoint f, Z3_params p ) ◆ Z3_fixedpoint_set_predicate_representation() void Z3_API Z3_fixedpoint_set_predicate_representation ( Z3_context c, Z3_fixedpoint d, Z3_func_decl f, unsigned num_relations, Z3_symbol const relation_kinds[] )Configure the predicate representation.
It sets the predicate to use a set of domains given by the list of symbols. The domains given by the list of symbols must belong to a set of built-in domains.
Referenced by Fixedpoint::set_predicate_representation().
◆ Z3_fixedpoint_set_reduce_app_callback()Register a callback for building terms based on the relational operators.
◆ Z3_fixedpoint_set_reduce_assign_callback()Register a callback to destructive updates.
Registers are identified with terms encoded as fresh constants,
◆ Z3_fixedpoint_to_string() Z3_string Z3_API Z3_fixedpoint_to_string ( Z3_context c, Z3_fixedpoint f, unsigned num_queries, Z3_ast queries[] ) ◆ Z3_fixedpoint_update_rule() void Z3_API Z3_fixedpoint_update_rule ( Z3_context c, Z3_fixedpoint d, Z3_ast a, Z3_symbol name ) ◆ Z3_fpa_get_ebits() unsigned Z3_API Z3_fpa_get_ebits ( Z3_context c, Z3_sort s ) ◆ Z3_fpa_get_numeral_exponent_bv() Z3_ast Z3_API Z3_fpa_get_numeral_exponent_bv ( Z3_context c, Z3_ast t, bool biased )Retrieves the exponent of a floating-point literal as a bit-vector expression.
Remarks: This function extracts the exponent in t
, without normalization. NaN is an invalid arguments.
Referenced by FPNumRef::exponent_as_bv().
◆ Z3_fpa_get_numeral_exponent_int64() bool Z3_API Z3_fpa_get_numeral_exponent_int64 ( Z3_context c, Z3_ast t, int64_t * n, bool biased )Return the exponent value of a floating-point numeral as a signed 64-bit integer.
t
corresponds to a floating point numeral, otherwise invokes exception handler or returns false
Remarks: This function extracts the exponent in t
, without normalization. NaN is an invalid argument.
Referenced by FPNumRef::exponent_as_long().
◆ Z3_fpa_get_numeral_exponent_string() Z3_string Z3_API Z3_fpa_get_numeral_exponent_string ( Z3_context c, Z3_ast t, bool biased )Return the exponent value of a floating-point numeral as a string.
t
corresponds to a floating point numeral, otherwise invokes exception handler or returns false
Remarks: This function extracts the exponent in t
, without normalization. NaN is an invalid argument.
Referenced by FPNumRef::exponent().
◆ Z3_fpa_get_numeral_sign() bool Z3_API Z3_fpa_get_numeral_sign ( Z3_context c, Z3_ast t, int * sgn )Retrieves the sign of a floating-point literal.
t
corresponds to a floating point numeral, otherwise invokes exception handler or returns false
Remarks: sets sgn
to 0 if ‘t’ is positive and to 1 otherwise, except for NaN, which is an invalid argument.
Referenced by FPNumRef::sign().
◆ Z3_fpa_get_numeral_sign_bv() Z3_ast Z3_API Z3_fpa_get_numeral_sign_bv ( Z3_context c, Z3_ast t )Retrieves the sign of a floating-point literal as a bit-vector expression.
Remarks: NaN is an invalid argument.
Referenced by FPNumRef::sign_as_bv().
◆ Z3_fpa_get_numeral_significand_bv() Z3_ast Z3_API Z3_fpa_get_numeral_significand_bv ( Z3_context c, Z3_ast t )Retrieves the significand of a floating-point literal as a bit-vector expression.
Remarks: NaN is an invalid argument.
Referenced by FPNumRef::significand_as_bv().
◆ Z3_fpa_get_numeral_significand_string() Z3_string Z3_API Z3_fpa_get_numeral_significand_string ( Z3_context c, Z3_ast t )Return the significand value of a floating-point numeral as a string.
t
corresponds to a floating point numeral, otherwise invokes exception handler or returns false
Remarks: The significand s
is always 0.0 <= s < 2.0
; the resulting string is long enough to represent the real significand precisely.
Referenced by FPNumRef::significand().
◆ Z3_fpa_get_numeral_significand_uint64() bool Z3_API Z3_fpa_get_numeral_significand_uint64 ( Z3_context c, Z3_ast t, uint64_t * n )Return the significand value of a floating-point numeral as a uint64.
Remarks: This function extracts the significand bits in t
, without the hidden bit or normalization. Sets the Z3_INVALID_ARG
error code if the significand does not fit into a uint64
. NaN is an invalid argument.
Referenced by FPNumRef::significand_as_long().
◆ Z3_fpa_get_sbits() unsigned Z3_API Z3_fpa_get_sbits ( Z3_context c, Z3_sort s ) ◆ Z3_fpa_is_numeral_inf() bool Z3_API Z3_fpa_is_numeral_inf ( Z3_context c, Z3_ast t ) ◆ Z3_fpa_is_numeral_nan() bool Z3_API Z3_fpa_is_numeral_nan ( Z3_context c, Z3_ast t ) ◆ Z3_fpa_is_numeral_negative() bool Z3_API Z3_fpa_is_numeral_negative ( Z3_context c, Z3_ast t ) ◆ Z3_fpa_is_numeral_normal() bool Z3_API Z3_fpa_is_numeral_normal ( Z3_context c, Z3_ast t ) ◆ Z3_fpa_is_numeral_positive() bool Z3_API Z3_fpa_is_numeral_positive ( Z3_context c, Z3_ast t ) ◆ Z3_fpa_is_numeral_subnormal() bool Z3_API Z3_fpa_is_numeral_subnormal ( Z3_context c, Z3_ast t ) ◆ Z3_fpa_is_numeral_zero() bool Z3_API Z3_fpa_is_numeral_zero ( Z3_context c, Z3_ast t ) ◆ Z3_func_decl_to_ast() Z3_ast Z3_API Z3_func_decl_to_ast ( Z3_context c, Z3_func_decl f ) ◆ Z3_func_decl_to_string() Z3_string Z3_API Z3_func_decl_to_string ( Z3_context c, Z3_func_decl d ) ◆ Z3_func_entry_dec_ref() void Z3_API Z3_func_entry_dec_ref ( Z3_context c, Z3_func_entry e ) ◆ Z3_func_entry_get_arg() Z3_ast Z3_API Z3_func_entry_get_arg ( Z3_context c, Z3_func_entry e, unsigned i ) ◆ Z3_func_entry_get_num_args() unsigned Z3_API Z3_func_entry_get_num_args ( Z3_context c, Z3_func_entry e ) ◆ Z3_func_entry_get_value() Z3_ast Z3_API Z3_func_entry_get_value ( Z3_context c, Z3_func_entry e ) ◆ Z3_func_entry_inc_ref() void Z3_API Z3_func_entry_inc_ref ( Z3_context c, Z3_func_entry e ) ◆ Z3_func_interp_add_entry() void Z3_API Z3_func_interp_add_entry ( Z3_context c, Z3_func_interp fi, Z3_ast_vector args, Z3_ast value )add a function entry to a function interpretation.
It is assumed that entries added to a function cover disjoint arguments. If an two entries are added with the same arguments, only the second insertion survives and the first inserted entry is removed.
Referenced by func_interp::add_entry(), and ModelRef::update_value().
◆ Z3_func_interp_dec_ref() void Z3_API Z3_func_interp_dec_ref ( Z3_context c, Z3_func_interp f ) ◆ Z3_func_interp_get_arity() unsigned Z3_API Z3_func_interp_get_arity ( Z3_context c, Z3_func_interp f )Return the arity (number of arguments) of the given function interpretation.
Referenced by FuncInterp::arity().
◆ Z3_func_interp_get_else() Z3_ast Z3_API Z3_func_interp_get_else ( Z3_context c, Z3_func_interp f )Return the 'else' value of the given function interpretation.
A function interpretation is represented as a finite map and an 'else' value. This procedure returns the 'else' value.
Referenced by func_interp::else_value(), and FuncInterp::else_value().
◆ Z3_func_interp_get_entry() Z3_func_entry Z3_API Z3_func_interp_get_entry ( Z3_context c, Z3_func_interp f, unsigned i ) ◆ Z3_func_interp_get_num_entries() unsigned Z3_API Z3_func_interp_get_num_entries ( Z3_context c, Z3_func_interp f )Return the number of entries in the given function interpretation.
A function interpretation is represented as a finite map and an 'else' value. Each entry in the finite map represents the value of a function given a set of arguments. This procedure return the number of element in the finite map of f
.
Referenced by func_interp::num_entries(), and FuncInterp::num_entries().
◆ Z3_func_interp_inc_ref() void Z3_API Z3_func_interp_inc_ref ( Z3_context c, Z3_func_interp f ) ◆ Z3_func_interp_set_else() void Z3_API Z3_func_interp_set_else ( Z3_context c, Z3_func_interp f, Z3_ast else_value )Return the 'else' value of the given function interpretation.
A function interpretation is represented as a finite map and an 'else' value. This procedure can be used to update the 'else' value.
Referenced by func_interp::set_else().
◆ Z3_get_algebraic_number_lower() Z3_ast Z3_API Z3_get_algebraic_number_lower ( Z3_context c, Z3_ast a, unsigned precision )Return a lower bound for the given real algebraic number. The interval isolating the number is smaller than 1/10^precision. The result is a numeral AST of sort Real.
Referenced by expr::algebraic_lower().
◆ Z3_get_algebraic_number_upper() Z3_ast Z3_API Z3_get_algebraic_number_upper ( Z3_context c, Z3_ast a, unsigned precision )Return a upper bound for the given real algebraic number. The interval isolating the number is smaller than 1/10^precision. The result is a numeral AST of sort Real.
Referenced by expr::algebraic_upper(), and AlgebraicNumRef::approx().
◆ Z3_get_app_arg() Z3_ast Z3_API Z3_get_app_arg ( Z3_context c, Z3_app a, unsigned i ) ◆ Z3_get_app_decl() Z3_func_decl Z3_API Z3_get_app_decl ( Z3_context c, Z3_app a ) ◆ Z3_get_app_num_args() unsigned Z3_API Z3_get_app_num_args ( Z3_context c, Z3_app a ) ◆ Z3_get_arity() unsigned Z3_API Z3_get_arity ( Z3_context c, Z3_func_decl d ) ◆ Z3_get_array_sort_domain() Z3_sort Z3_API Z3_get_array_sort_domain ( Z3_context c, Z3_sort t ) ◆ Z3_get_array_sort_domain_n() Z3_sort Z3_API Z3_get_array_sort_domain_n ( Z3_context c, Z3_sort t, unsigned idx ) ◆ Z3_get_array_sort_range() Z3_sort Z3_API Z3_get_array_sort_range ( Z3_context c, Z3_sort t ) ◆ Z3_get_as_array_func_decl() Z3_func_decl Z3_API Z3_get_as_array_func_decl ( Z3_context c, Z3_ast a ) ◆ Z3_get_ast_hash() unsigned Z3_API Z3_get_ast_hash ( Z3_context c, Z3_ast a )Return a hash code for the given AST. The hash code is structural but two different AST objects can map to the same hash. The result of Z3_get_ast_id
returns an identifier that is unique over the set of live AST objects.
Referenced by ast::hash(), and AstRef::hash().
◆ Z3_get_ast_id() unsigned Z3_API Z3_get_ast_id ( Z3_context c, Z3_ast t ) ◆ Z3_get_ast_kind() Z3_ast_kind Z3_API Z3_get_ast_kind ( Z3_context c, Z3_ast a ) ◆ Z3_get_bool_value() Z3_lbool Z3_API Z3_get_bool_value ( Z3_context c, Z3_ast a )Return Z3_L_TRUE
if a
is true, Z3_L_FALSE
if it is false, and Z3_L_UNDEF
otherwise.
Referenced by expr::bool_value().
◆ Z3_get_bv_sort_size() unsigned Z3_API Z3_get_bv_sort_size ( Z3_context c, Z3_sort t ) ◆ Z3_get_datatype_sort_constructor() Z3_func_decl Z3_API Z3_get_datatype_sort_constructor ( Z3_context c, Z3_sort t, unsigned idx ) ◆ Z3_get_datatype_sort_constructor_accessor() Z3_func_decl Z3_API Z3_get_datatype_sort_constructor_accessor ( Z3_context c, Z3_sort t, unsigned idx_c, unsigned idx_a ) ◆ Z3_get_datatype_sort_num_constructors() unsigned Z3_API Z3_get_datatype_sort_num_constructors ( Z3_context c, Z3_sort t ) ◆ Z3_get_datatype_sort_recognizer() Z3_func_decl Z3_API Z3_get_datatype_sort_recognizer ( Z3_context c, Z3_sort t, unsigned idx ) ◆ Z3_get_decl_ast_parameter() Z3_ast Z3_API Z3_get_decl_ast_parameter ( Z3_context c, Z3_func_decl d, unsigned idx ) ◆ Z3_get_decl_double_parameter() double Z3_API Z3_get_decl_double_parameter ( Z3_context c, Z3_func_decl d, unsigned idx ) ◆ Z3_get_decl_func_decl_parameter() Z3_func_decl Z3_API Z3_get_decl_func_decl_parameter ( Z3_context c, Z3_func_decl d, unsigned idx ) ◆ Z3_get_decl_int_parameter() int Z3_API Z3_get_decl_int_parameter ( Z3_context c, Z3_func_decl d, unsigned idx ) ◆ Z3_get_decl_kind() Z3_decl_kind Z3_API Z3_get_decl_kind ( Z3_context c, Z3_func_decl d ) ◆ Z3_get_decl_name() Z3_symbol Z3_API Z3_get_decl_name ( Z3_context c, Z3_func_decl d ) ◆ Z3_get_decl_num_parameters() unsigned Z3_API Z3_get_decl_num_parameters ( Z3_context c, Z3_func_decl d ) ◆ Z3_get_decl_parameter_kind() Z3_parameter_kind Z3_API Z3_get_decl_parameter_kind ( Z3_context c, Z3_func_decl d, unsigned idx )Return the parameter type associated with a declaration.
Referenced by parameter::parameter(), and FuncDeclRef::params().
◆ Z3_get_decl_rational_parameter() Z3_string Z3_API Z3_get_decl_rational_parameter ( Z3_context c, Z3_func_decl d, unsigned idx ) ◆ Z3_get_decl_sort_parameter() Z3_sort Z3_API Z3_get_decl_sort_parameter ( Z3_context c, Z3_func_decl d, unsigned idx ) ◆ Z3_get_decl_symbol_parameter() Z3_symbol Z3_API Z3_get_decl_symbol_parameter ( Z3_context c, Z3_func_decl d, unsigned idx ) ◆ Z3_get_denominator() Z3_ast Z3_API Z3_get_denominator ( Z3_context c, Z3_ast a ) ◆ Z3_get_domain() Z3_sort Z3_API Z3_get_domain ( Z3_context c, Z3_func_decl d, unsigned i ) ◆ Z3_get_domain_size() unsigned Z3_API Z3_get_domain_size ( Z3_context c, Z3_func_decl d )Return the number of parameters of the given declaration.
Return the estimated allocated memory in bytes.
◆ Z3_get_finite_domain_sort_size() bool Z3_API Z3_get_finite_domain_sort_size ( Z3_context c, Z3_sort s, uint64_t * r )Store the size of the sort in r
. Return false
if the call failed. That is, Z3_get_sort_kind(s) == Z3_FINITE_DOMAIN_SORT.
Referenced by FiniteDomainSortRef::size().
◆ Z3_get_full_version() Z3_string Z3_API Z3_get_full_version ( void ) ◆ Z3_get_func_decl_id() unsigned Z3_API Z3_get_func_decl_id ( Z3_context c, Z3_func_decl f ) ◆ Z3_get_global_param_descrs() Z3_param_descrs Z3_API Z3_get_global_param_descrs ( Z3_context c ) ◆ Z3_get_implied_equalities() Z3_lbool Z3_API Z3_get_implied_equalities ( Z3_context c, Z3_solver s, unsigned num_terms, Z3_ast const terms[], unsigned class_ids[] )Retrieve congruence class representatives for terms.
The function can be used for relying on Z3 to identify equal terms under the current set of assumptions. The array of terms and array of class identifiers should have the same length. The class identifiers are numerals that are assigned to the same value for their corresponding terms if the current context forces the terms to be equal. You cannot deduce that terms corresponding to different numerals must be all different, (especially when using non-convex theories). All implied equalities are returned by this call. This means that two terms map to the same class identifier if and only if the current context implies that they are equal.
A side-effect of the function is a satisfiability check on the assertions on the solver that is passed in. The function return Z3_L_FALSE
if the current assertions are not satisfiable.
Return index of de-Bruijn bound variable.
Referenced by z3py::get_var_index().
◆ Z3_get_lstring() Z3_char_ptr Z3_API Z3_get_lstring ( Z3_context c, Z3_ast s, unsigned * length )Retrieve the string constant stored in s
. The string can contain escape sequences. Characters in the range 1 to 255 are literal. Characters in the range 0, and 256 above are escaped.
Referenced by SeqRef::as_string().
◆ Z3_get_num_probes() unsigned Z3_API Z3_get_num_probes ( Z3_context c ) ◆ Z3_get_num_simplifiers() unsigned Z3_API Z3_get_num_simplifiers ( Z3_context c ) ◆ Z3_get_num_tactics() unsigned Z3_API Z3_get_num_tactics ( Z3_context c ) ◆ Z3_get_numeral_binary_string() Z3_string Z3_API Z3_get_numeral_binary_string ( Z3_context c, Z3_ast a ) ◆ Z3_get_numeral_decimal_string() Z3_string Z3_API Z3_get_numeral_decimal_string ( Z3_context c, Z3_ast a, unsigned precision ) ◆ Z3_get_numeral_double() double Z3_API Z3_get_numeral_double ( Z3_context c, Z3_ast a )Return numeral as a double.
Referenced by expr::is_numeral().
◆ Z3_get_numeral_int() bool Z3_API Z3_get_numeral_int ( Z3_context c, Z3_ast v, int * i ) ◆ Z3_get_numeral_int64() bool Z3_API Z3_get_numeral_int64 ( Z3_context c, Z3_ast v, int64_t * i ) ◆ Z3_get_numeral_rational_int64() bool Z3_API Z3_get_numeral_rational_int64 ( Z3_context c, Z3_ast v, int64_t * num, int64_t * den )Similar to Z3_get_numeral_string, but only succeeds if the value can fit as a rational number as machine int64_t
int. Return true
if the call succeeded.
Return numeral value, as a pair of 64 bit numbers if the representation fits.
Return true
if the numeral value fits in 64 bit numerals, false
otherwise.
Return i'th ast in pattern.
◆ Z3_get_pattern_num_terms() unsigned Z3_API Z3_get_pattern_num_terms ( Z3_context c, Z3_pattern p )Return number of terms in pattern.
◆ Z3_get_probe_name() Z3_string Z3_API Z3_get_probe_name ( Z3_context c, unsigned i ) ◆ Z3_get_quantifier_body() Z3_ast Z3_API Z3_get_quantifier_body ( Z3_context c, Z3_ast a ) ◆ Z3_get_quantifier_bound_name() Z3_symbol Z3_API Z3_get_quantifier_bound_name ( Z3_context c, Z3_ast a, unsigned i )Return symbol of the i'th bound variable.
Referenced by QuantifierRef::var_name().
◆ Z3_get_quantifier_bound_sort() Z3_sort Z3_API Z3_get_quantifier_bound_sort ( Z3_context c, Z3_ast a, unsigned i )Return sort of the i'th bound variable.
Referenced by QuantifierRef::var_sort().
◆ Z3_get_quantifier_id() Z3_symbol Z3_API Z3_get_quantifier_id ( Z3_context c, Z3_ast a )Obtain id of quantifier.
Referenced by QuantifierRef::qid().
◆ Z3_get_quantifier_no_pattern_ast() Z3_ast Z3_API Z3_get_quantifier_no_pattern_ast ( Z3_context c, Z3_ast a, unsigned i ) ◆ Z3_get_quantifier_num_bound() unsigned Z3_API Z3_get_quantifier_num_bound ( Z3_context c, Z3_ast a )Return number of bound variables of quantifier.
Referenced by QuantifierRef::num_vars().
◆ Z3_get_quantifier_num_no_patterns() unsigned Z3_API Z3_get_quantifier_num_no_patterns ( Z3_context c, Z3_ast a ) ◆ Z3_get_quantifier_num_patterns() unsigned Z3_API Z3_get_quantifier_num_patterns ( Z3_context c, Z3_ast a ) ◆ Z3_get_quantifier_pattern_ast() Z3_pattern Z3_API Z3_get_quantifier_pattern_ast ( Z3_context c, Z3_ast a, unsigned i ) ◆ Z3_get_quantifier_skolem_id() Z3_symbol Z3_API Z3_get_quantifier_skolem_id ( Z3_context c, Z3_ast a ) ◆ Z3_get_quantifier_weight() unsigned Z3_API Z3_get_quantifier_weight ( Z3_context c, Z3_ast a )Obtain weight of quantifier.
Referenced by QuantifierRef::weight().
◆ Z3_get_range() Z3_sort Z3_API Z3_get_range ( Z3_context c, Z3_func_decl d )Return the range of the given declaration.
If d
is a constant (i.e., has zero arguments), then this function returns the sort of the constant.
Referenced by func_decl::range(), and FuncDeclRef::range().
◆ Z3_get_re_sort_basis() Z3_sort Z3_API Z3_get_re_sort_basis ( Z3_context c, Z3_sort s ) ◆ Z3_get_relation_arity() unsigned Z3_API Z3_get_relation_arity ( Z3_context c, Z3_sort s )Return arity of relation.
Return sort at i'th column of relation sort.
Return the name of the idx simplifier.
Return the sort of an AST node.
The AST node must be a constant, application, numeral, bound variable, or quantifier.
Referenced by z3py::deserialize(), expr::get_sort(), z3py::is_array_sort(), z3py::is_sort(), SeqRef::is_string(), BoolRef::sort(), ArithRef::sort(), BitVecRef::sort(), ArrayRef::sort(), DatatypeRef::sort(), FiniteDomainRef::sort(), FPRef::sort(), and SeqRef::sort().
◆ Z3_get_sort_id() unsigned Z3_API Z3_get_sort_id ( Z3_context c, Z3_sort s )Return a unique identifier for s
.
Referenced by sort::id().
◆ Z3_get_sort_kind() Z3_sort_kind Z3_API Z3_get_sort_kind ( Z3_context c, Z3_sort t ) ◆ Z3_get_sort_name() Z3_symbol Z3_API Z3_get_sort_name ( Z3_context c, Z3_sort d ) ◆ Z3_get_string() Z3_string Z3_API Z3_get_string ( Z3_context c, Z3_ast s )Retrieve the string constant stored in s
. Characters outside the basic printable ASCII range are escaped.
Referenced by expr::get_string().
◆ Z3_get_string_contents() void Z3_API Z3_get_string_contents ( Z3_context c, Z3_ast s, unsigned length, unsigned contents[] )Retrieve the unescaped string constant stored in s
.
Referenced by expr::get_u32string().
◆ Z3_get_string_length() unsigned Z3_API Z3_get_string_length ( Z3_context c, Z3_ast s )Retrieve the length of the unescaped string constant stored in s
.
Referenced by expr::get_u32string().
◆ Z3_get_symbol_int() int Z3_API Z3_get_symbol_int ( Z3_context c, Z3_symbol s ) ◆ Z3_get_symbol_kind() Z3_symbol_kind Z3_API Z3_get_symbol_kind ( Z3_context c, Z3_symbol s ) ◆ Z3_get_symbol_string() Z3_string Z3_API Z3_get_symbol_string ( Z3_context c, Z3_symbol s )Return the symbol name.
Z3_get_symbol_string
.
Referenced by symbol::str(), and z3py::to_symbol().
◆ Z3_get_tactic_name() Z3_string Z3_API Z3_get_tactic_name ( Z3_context c, unsigned i ) ◆ Z3_get_tuple_sort_field_decl() Z3_func_decl Z3_API Z3_get_tuple_sort_field_decl ( Z3_context c, Z3_sort t, unsigned i )Return the i-th field declaration (i.e., projection function declaration) of the given tuple sort.
Set a global (or module) parameter. This setting is shared by all Z3 contexts.
When a Z3 module is initialized it will use the value of these parameters when Z3_params objects are not provided.
The name of parameter can be composed of characters [a-z][A-Z], digits [0-9], '-' and '_'. The character '.' is a delimiter (more later).
The parameter names are case-insensitive. The character '-' should be viewed as an "alias" for '_'. Thus, the following parameter names are considered equivalent: "pp.decimal-precision" and "PP.DECIMAL_PRECISION".
This function can be used to set parameters for a specific Z3 module. This can be done by using <module-name>.<parameter-name>. For example: Z3_global_param_set('pp.decimal', 'true') will set the parameter "decimal" in the module "pp" to true.
Referenced by z3py::set_param(), and z3::set_param().
◆ Z3_goal_assert() void Z3_API Z3_goal_assert ( Z3_context c, Z3_goal g, Z3_ast a )Add a new formula a
to the given goal. The formula is split according to the following procedure that is applied until a fixed-point: Conjunctions are split into separate formulas. Negations are distributed over disjunctions, resulting in separate formulas. If the goal is false
, adding new formulas is a no-op. If the formula a
is true
, then nothing is added. If the formula a
is false
, then the entire goal is replaced by the formula false
.
Referenced by goal::add(), and Goal::assert_exprs().
◆ Z3_goal_convert_model() Z3_model Z3_API Z3_goal_convert_model ( Z3_context c, Z3_goal g, Z3_model m ) ◆ Z3_goal_dec_ref() void Z3_API Z3_goal_dec_ref ( Z3_context c, Z3_goal g ) ◆ Z3_goal_depth() unsigned Z3_API Z3_goal_depth ( Z3_context c, Z3_goal g )Return the depth of the given goal. It tracks how many transformations were applied to it.
Referenced by goal::depth(), and Goal::depth().
◆ Z3_goal_formula() Z3_ast Z3_API Z3_goal_formula ( Z3_context c, Z3_goal g, unsigned idx ) ◆ Z3_goal_inc_ref() void Z3_API Z3_goal_inc_ref ( Z3_context c, Z3_goal g ) ◆ Z3_goal_inconsistent() bool Z3_API Z3_goal_inconsistent ( Z3_context c, Z3_goal g ) ◆ Z3_goal_is_decided_sat() bool Z3_API Z3_goal_is_decided_sat ( Z3_context c, Z3_goal g )Return true
if the goal is empty, and it is precise or the product of a under approximation.
Referenced by goal::is_decided_sat().
◆ Z3_goal_is_decided_unsat() bool Z3_API Z3_goal_is_decided_unsat ( Z3_context c, Z3_goal g )Return true
if the goal contains false, and it is precise or the product of an over approximation.
Referenced by goal::is_decided_unsat().
◆ Z3_goal_num_exprs() unsigned Z3_API Z3_goal_num_exprs ( Z3_context c, Z3_goal g )Return the number of formulas, subformulas and terms in the given goal.
Referenced by goal::num_exprs().
◆ Z3_goal_precision() Z3_goal_prec Z3_API Z3_goal_precision ( Z3_context c, Z3_goal g )Return the "precision" of the given goal. Goals can be transformed using over and under approximations. A under approximation is applied when the objective is to find a model for a given goal. An over approximation is applied when the objective is to find a proof for a given goal.
Referenced by Goal::prec(), and goal::precision().
◆ Z3_goal_reset() void Z3_API Z3_goal_reset ( Z3_context c, Z3_goal g )Erase all formulas from the given goal.
Referenced by goal::reset().
◆ Z3_goal_size() unsigned Z3_API Z3_goal_size ( Z3_context c, Z3_goal g ) ◆ Z3_goal_to_dimacs_string() Z3_string Z3_API Z3_goal_to_dimacs_string ( Z3_context c, Z3_goal g, bool include_names )Convert a goal into a DIMACS formatted string. The goal must be in CNF. You can convert a goal to CNF by applying the tseitin-cnf tactic. Bit-vectors are not automatically converted to Booleans either, so if the caller intends to preserve satisfiability, it should apply bit-blasting tactics. Quantifiers and theory atoms will not be encoded.
Referenced by goal::dimacs(), and Goal::dimacs().
◆ Z3_goal_to_string() Z3_string Z3_API Z3_goal_to_string ( Z3_context c, Z3_goal g ) ◆ Z3_goal_translate() Z3_goal Z3_API Z3_goal_translate ( Z3_context source, Z3_goal g, Z3_context target )Copy a goal g
from the context source
to the context target
.
Referenced by Goal::translate().
◆ Z3_inc_ref() void Z3_API Z3_inc_ref ( Z3_context c, Z3_ast a ) ◆ Z3_interrupt() void Z3_API Z3_interrupt ( Z3_context c ) ◆ Z3_is_algebraic_number() bool Z3_API Z3_is_algebraic_number ( Z3_context c, Z3_ast a ) ◆ Z3_is_app() bool Z3_API Z3_is_app ( Z3_context c, Z3_ast a ) ◆ Z3_is_as_array() bool Z3_API Z3_is_as_array ( Z3_context c, Z3_ast a )The (_ as-array f)
AST node is a construct for assigning interpretations for arrays in Z3. It is the array such that forall indices i
we have that (select (_ as-array f) i)
is equal to (f i)
. This procedure returns true
if the a
is an as-array
AST node.
Z3 current solvers have minimal support for as_array
nodes.
Referenced by z3py::is_as_array().
◆ Z3_is_char_sort() bool Z3_API Z3_is_char_sort ( Z3_context c, Z3_sort s )Check if s
is a character sort.
Compare terms.
◆ Z3_is_eq_sort() bool Z3_API Z3_is_eq_sort ( Z3_context c, Z3_sort s1, Z3_sort s2 ) ◆ Z3_is_lambda() bool Z3_API Z3_is_lambda ( Z3_context c, Z3_ast a ) ◆ Z3_is_numeral_ast() bool Z3_API Z3_is_numeral_ast ( Z3_context c, Z3_ast a )Referenced by z3py::is_real().
◆ Z3_is_quantifier_exists() bool Z3_API Z3_is_quantifier_exists ( Z3_context c, Z3_ast a ) ◆ Z3_is_quantifier_forall() bool Z3_API Z3_is_quantifier_forall ( Z3_context c, Z3_ast a ) ◆ Z3_is_re_sort() bool Z3_API Z3_is_re_sort ( Z3_context c, Z3_sort s )Check if s
is a regular expression sort.
Check if s
is a sequence sort.
Take the absolute value of an integer.
◆ Z3_mk_add() Z3_ast Z3_API Z3_mk_add ( Z3_context c, unsigned num_args, Z3_ast const args[] )Create an AST node representing args[0] + ... + args[num_args-1]
.
The array args
must have num_args
elements. All arguments must have int or real sort.
Referenced by z3py::Sum().
◆ Z3_mk_and() Z3_ast Z3_API Z3_mk_and ( Z3_context c, unsigned num_args, Z3_ast const args[] )Create an AST node representing args[0] and ... and args[num_args-1]
.
The array args
must have num_args
elements. All arguments must have Boolean sort.
Referenced by z3py::And(), and goal::as_expr().
◆ Z3_mk_app() Z3_ast Z3_API Z3_mk_app ( Z3_context c, Z3_func_decl d, unsigned num_args, Z3_ast const args[] ) ◆ Z3_mk_array_default() Z3_ast Z3_API Z3_mk_array_default ( Z3_context c, Z3_ast array )Access the array default value. Produces the default range value, for arrays that can be represented as finite maps with a default range value.
Referenced by ArrayRef::default().
◆ Z3_mk_array_ext() Z3_ast Z3_API Z3_mk_array_ext ( Z3_context c, Z3_ast arg1, Z3_ast arg2 )Create array extensionality index given two arrays with the same sort. The meaning is given by the axiom: (=> (= (select A (array-ext A B)) (select B (array-ext A B))) (= A B))
Referenced by z3py::Ext().
◆ Z3_mk_array_sort() Z3_sort Z3_API Z3_mk_array_sort ( Z3_context c, Z3_sort domain, Z3_sort range ) ◆ Z3_mk_array_sort_n() Z3_sort Z3_API Z3_mk_array_sort_n ( Z3_context c, unsigned n, Z3_sort const * domain, Z3_sort range ) ◆ Z3_mk_as_array() Z3_ast Z3_API Z3_mk_as_array ( Z3_context c, Z3_func_decl f )Create array with the same interpretation as a function. The array satisfies the property (f x) = (select (_ as-array f) x) for every argument x.
Referenced by z3::as_array().
◆ Z3_mk_ast_map() Z3_ast_map Z3_API Z3_mk_ast_map ( Z3_context c )Return an empty mapping from AST to AST.
◆ Z3_mk_ast_vector() Z3_ast_vector Z3_API Z3_mk_ast_vector ( Z3_context c ) ◆ Z3_mk_atleast() Z3_ast Z3_API Z3_mk_atleast ( Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k )Pseudo-Boolean relations.
Encode p1 + p2 + ... + pn >= k
Referenced by z3py::AtLeast().
◆ Z3_mk_atmost() Z3_ast Z3_API Z3_mk_atmost ( Z3_context c, unsigned num_args, Z3_ast const args[], unsigned k )Pseudo-Boolean relations.
Encode p1 + p2 + ... + pn <= k
Referenced by z3py::AtMost().
◆ Z3_mk_bit2bool() Z3_ast Z3_API Z3_mk_bit2bool ( Z3_context c, unsigned i, Z3_ast t1 )Extracts the bit at position i
of a bit-vector and yields a boolean.
The node t1
must have a bit-vector sort.
Referenced by expr::bit2bool().
◆ Z3_mk_bool_sort() Z3_sort Z3_API Z3_mk_bool_sort ( Z3_context c ) ◆ Z3_mk_bound() Z3_ast Z3_API Z3_mk_bound ( Z3_context c, unsigned index, Z3_sort ty )Create a variable.
Variables are intended to be bound by a scope created by a quantifier. So we call them bound variables even if they appear as free variables in the expression produced by Z3_mk_bound
.
Bound variables are indexed by de-Bruijn indices. It is perhaps easiest to explain the meaning of de-Bruijn indices by indicating the compilation process from non-de-Bruijn formulas to de-Bruijn format.
abs(forall (x1) phi) = forall (x1) abs1(phi, x1, 0) abs(forall (x1, x2) phi) = abs(forall (x1) abs(forall (x2) phi)) abs1(x, x, n) = b_n abs1(y, x, n) = y abs1(f(t1,...,tn), x, n) = f(abs1(t1,x,n), ..., abs1(tn,x,n)) abs1(forall (x1) phi, x, n) = forall (x1) (abs1(phi, x, n+1))
The last line is significant: the index of a bound variable is different depending on the scope in which it appears. The deeper x appears, the higher is its index.
Referenced by z3py::Var(), and context::variable().
◆ Z3_mk_bv2int() Z3_ast Z3_API Z3_mk_bv2int ( Z3_context c, Z3_ast t1, bool is_signed )Create an integer from the bit-vector argument t1
. If is_signed
is false, then the bit-vector t1
is treated as unsigned. So the result is non-negative and in the range [0..2^N-1]
, where N are the number of bits in t1
. If is_signed
is true, t1
is treated as a signed bit-vector.
The node t1
must have a bit-vector sort.
Referenced by z3py::BV2Int().
◆ Z3_mk_bv_numeral() Z3_ast Z3_API Z3_mk_bv_numeral ( Z3_context c, unsigned sz, bool const * bits ) ◆ Z3_mk_bv_sort() Z3_sort Z3_API Z3_mk_bv_sort ( Z3_context c, unsigned sz ) ◆ Z3_mk_bvadd() Z3_ast Z3_API Z3_mk_bvadd ( Z3_context c, Z3_ast t1, Z3_ast t2 ) ◆ Z3_mk_bvadd_no_overflow() Z3_ast Z3_API Z3_mk_bvadd_no_overflow ( Z3_context c, Z3_ast t1, Z3_ast t2, bool is_signed )Create a predicate that checks that the bit-wise addition of t1
and t2
does not overflow.
The nodes t1
and t2
must have the same bit-vector sort. The returned node is of sort Bool.
Referenced by z3py::BVAddNoOverflow().
◆ Z3_mk_bvadd_no_underflow() Z3_ast Z3_API Z3_mk_bvadd_no_underflow ( Z3_context c, Z3_ast t1, Z3_ast t2 )Create a predicate that checks that the bit-wise signed addition of t1
and t2
does not underflow.
The nodes t1
and t2
must have the same bit-vector sort. The returned node is of sort Bool.
Referenced by z3py::BVAddNoUnderflow().
◆ Z3_mk_bvand() Z3_ast Z3_API Z3_mk_bvand ( Z3_context c, Z3_ast t1, Z3_ast t2 ) ◆ Z3_mk_bvashr() Z3_ast Z3_API Z3_mk_bvashr ( Z3_context c, Z3_ast t1, Z3_ast t2 )Arithmetic shift right.
It is like logical shift right except that the most significant bits of the result always copy the most significant bit of the second argument.
The semantics of shift operations varies between environments. This definition does not necessarily capture directly the semantics of the programming language or assembly architecture you are modeling.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by BitVecRef::__rrshift__(), BitVecRef::__rshift__(), and z3::ashr().
◆ Z3_mk_bvlshr() Z3_ast Z3_API Z3_mk_bvlshr ( Z3_context c, Z3_ast t1, Z3_ast t2 )Logical shift right.
It is equivalent to unsigned division by 2^x
where x
is the value of the third argument.
NB. The semantics of shift operations varies between environments. This definition does not necessarily capture directly the semantics of the programming language or assembly architecture you are modeling.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by z3py::LShR(), and z3::lshr().
◆ Z3_mk_bvmul() Z3_ast Z3_API Z3_mk_bvmul ( Z3_context c, Z3_ast t1, Z3_ast t2 ) ◆ Z3_mk_bvmul_no_overflow() Z3_ast Z3_API Z3_mk_bvmul_no_overflow ( Z3_context c, Z3_ast t1, Z3_ast t2, bool is_signed )Create a predicate that checks that the bit-wise multiplication of t1
and t2
does not overflow.
The nodes t1
and t2
must have the same bit-vector sort. The returned node is of sort Bool.
Referenced by z3py::BVMulNoOverflow().
◆ Z3_mk_bvmul_no_underflow() Z3_ast Z3_API Z3_mk_bvmul_no_underflow ( Z3_context c, Z3_ast t1, Z3_ast t2 )Create a predicate that checks that the bit-wise signed multiplication of t1
and t2
does not underflow.
The nodes t1
and t2
must have the same bit-vector sort. The returned node is of sort Bool.
Referenced by z3py::BVMulNoUnderflow().
◆ Z3_mk_bvnand() Z3_ast Z3_API Z3_mk_bvnand ( Z3_context c, Z3_ast t1, Z3_ast t2 )Bitwise nand.
The nodes t1
and t2
must have the same bit-vector sort.
Standard two's complement unary minus.
The node t1
must have bit-vector sort.
Referenced by BitVecRef::__neg__().
◆ Z3_mk_bvneg_no_overflow() Z3_ast Z3_API Z3_mk_bvneg_no_overflow ( Z3_context c, Z3_ast t1 )Check that bit-wise negation does not overflow when t1
is interpreted as a signed bit-vector.
The node t1
must have bit-vector sort. The returned node is of sort Bool.
Referenced by z3py::BVSNegNoOverflow().
◆ Z3_mk_bvnor() Z3_ast Z3_API Z3_mk_bvnor ( Z3_context c, Z3_ast t1, Z3_ast t2 )Bitwise nor.
The nodes t1
and t2
must have the same bit-vector sort.
Take conjunction of bits in vector, return vector of length 1.
The node t1
must have a bit-vector sort.
Referenced by z3py::BVRedAnd().
◆ Z3_mk_bvredor() Z3_ast Z3_API Z3_mk_bvredor ( Z3_context c, Z3_ast t1 )Take disjunction of bits in vector, return vector of length 1.
The node t1
must have a bit-vector sort.
Referenced by z3py::BVRedOr().
◆ Z3_mk_bvsdiv() Z3_ast Z3_API Z3_mk_bvsdiv ( Z3_context c, Z3_ast t1, Z3_ast t2 )Two's complement signed division.
It is defined in the following way:
floor
of t1/t2
if t2
is different from zero, and t1*t2 >= 0
.ceiling
of t1/t2
if t2
is different from zero, and t1*t2 < 0
.If t2
is zero, then the result is undefined.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by BitVecRef::__div__(), and BitVecRef::__rdiv__().
◆ Z3_mk_bvsdiv_no_overflow() Z3_ast Z3_API Z3_mk_bvsdiv_no_overflow ( Z3_context c, Z3_ast t1, Z3_ast t2 )Create a predicate that checks that the bit-wise signed division of t1
and t2
does not overflow.
The nodes t1
and t2
must have the same bit-vector sort. The returned node is of sort Bool.
Referenced by z3py::BVSDivNoOverflow().
◆ Z3_mk_bvsge() Z3_ast Z3_API Z3_mk_bvsge ( Z3_context c, Z3_ast t1, Z3_ast t2 )Two's complement signed greater than or equal to.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by BitVecRef::__ge__(), and z3::sge().
◆ Z3_mk_bvsgt() Z3_ast Z3_API Z3_mk_bvsgt ( Z3_context c, Z3_ast t1, Z3_ast t2 )Two's complement signed greater than.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by BitVecRef::__gt__(), and z3::sgt().
◆ Z3_mk_bvshl() Z3_ast Z3_API Z3_mk_bvshl ( Z3_context c, Z3_ast t1, Z3_ast t2 )Shift left.
It is equivalent to multiplication by 2^x
where x
is the value of the third argument.
NB. The semantics of shift operations varies between environments. This definition does not necessarily capture directly the semantics of the programming language or assembly architecture you are modeling.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by BitVecRef::__lshift__(), BitVecRef::__rlshift__(), and z3::shl().
◆ Z3_mk_bvsle() Z3_ast Z3_API Z3_mk_bvsle ( Z3_context c, Z3_ast t1, Z3_ast t2 )Two's complement signed less than or equal to.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by BitVecRef::__le__(), and z3::sle().
◆ Z3_mk_bvslt() Z3_ast Z3_API Z3_mk_bvslt ( Z3_context c, Z3_ast t1, Z3_ast t2 )Two's complement signed less than.
It abbreviates:
(or (and (= (extract[|m-1|:|m-1|] t1) bit1)
(= (extract[|m-1|:|m-1|] t2) bit0))
(and (= (extract[|m-1|:|m-1|] t1) (extract[|m-1|:|m-1|] t2))
(bvult t1 t2)))
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by BitVecRef::__lt__(), and z3::slt().
◆ Z3_mk_bvsmod() Z3_ast Z3_API Z3_mk_bvsmod ( Z3_context c, Z3_ast t1, Z3_ast t2 ) ◆ Z3_mk_bvsrem() Z3_ast Z3_API Z3_mk_bvsrem ( Z3_context c, Z3_ast t1, Z3_ast t2 )Two's complement signed remainder (sign follows dividend).
It is defined as t1 - (t1 /s t2) * t2
, where /s
represents signed division. The most significant bit (sign) of the result is equal to the most significant bit of t1
.
If t2
is zero, then the result is undefined.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by z3py::SRem(), and z3::srem().
◆ Z3_mk_bvsub() Z3_ast Z3_API Z3_mk_bvsub ( Z3_context c, Z3_ast t1, Z3_ast t2 ) ◆ Z3_mk_bvsub_no_overflow() Z3_ast Z3_API Z3_mk_bvsub_no_overflow ( Z3_context c, Z3_ast t1, Z3_ast t2 )Create a predicate that checks that the bit-wise signed subtraction of t1
and t2
does not overflow.
The nodes t1
and t2
must have the same bit-vector sort. The returned node is of sort Bool.
Referenced by z3py::BVSubNoOverflow().
◆ Z3_mk_bvsub_no_underflow() Z3_ast Z3_API Z3_mk_bvsub_no_underflow ( Z3_context c, Z3_ast t1, Z3_ast t2, bool is_signed )Create a predicate that checks that the bit-wise subtraction of t1
and t2
does not underflow.
The nodes t1
and t2
must have the same bit-vector sort. The returned node is of sort Bool.
Referenced by z3py::BVSubNoUnderflow().
◆ Z3_mk_bvudiv() Z3_ast Z3_API Z3_mk_bvudiv ( Z3_context c, Z3_ast t1, Z3_ast t2 )Unsigned division.
It is defined as the floor
of t1/t2
if t2
is different from zero. If t2
is zero, then the result is undefined.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by z3py::UDiv(), and z3::udiv().
◆ Z3_mk_bvuge() Z3_ast Z3_API Z3_mk_bvuge ( Z3_context c, Z3_ast t1, Z3_ast t2 )Unsigned greater than or equal to.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by z3py::UGE(), and z3::uge().
◆ Z3_mk_bvugt() Z3_ast Z3_API Z3_mk_bvugt ( Z3_context c, Z3_ast t1, Z3_ast t2 )Unsigned greater than.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by z3py::UGT(), and z3::ugt().
◆ Z3_mk_bvule() Z3_ast Z3_API Z3_mk_bvule ( Z3_context c, Z3_ast t1, Z3_ast t2 )Unsigned less than or equal to.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by z3py::ULE(), and z3::ule().
◆ Z3_mk_bvult() Z3_ast Z3_API Z3_mk_bvult ( Z3_context c, Z3_ast t1, Z3_ast t2 )Unsigned less than.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by z3py::ULT(), and z3::ult().
◆ Z3_mk_bvurem() Z3_ast Z3_API Z3_mk_bvurem ( Z3_context c, Z3_ast t1, Z3_ast t2 )Unsigned remainder.
It is defined as t1 - (t1 /u t2) * t2
, where /u
represents unsigned division.
If t2
is zero, then the result is undefined.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by z3py::URem(), and z3::urem().
◆ Z3_mk_bvxnor() Z3_ast Z3_API Z3_mk_bvxnor ( Z3_context c, Z3_ast t1, Z3_ast t2 )Bitwise xnor.
The nodes t1
and t2
must have the same bit-vector sort.
Create less than or equal to between two characters.
Referenced by CharRef::__le__().
◆ Z3_mk_char_sort() Z3_sort Z3_API Z3_mk_char_sort ( Z3_context c )Create a sort for unicode characters.
The sort for characters can be changed to ASCII by setting the global parameter encoding
to ascii
, or alternative to 16 bit characters by setting encoding
to bmp
.
Referenced by context::char_sort(), and z3py::CharSort().
◆ Z3_mk_char_to_bv() Z3_ast Z3_API Z3_mk_char_to_bv ( Z3_context c, Z3_ast ch ) ◆ Z3_mk_char_to_int() Z3_ast Z3_API Z3_mk_char_to_int ( Z3_context c, Z3_ast ch ) ◆ Z3_mk_concat() Z3_ast Z3_API Z3_mk_concat ( Z3_context c, Z3_ast t1, Z3_ast t2 )Concatenate the given bit-vectors.
The nodes t1
and t2
must have (possibly different) bit-vector sorts
The result is a bit-vector of size n1+n2
, where n1
(n2
) is the size of t1
(t2
).
Referenced by z3py::Concat().
◆ Z3_mk_config() Z3_config Z3_API Z3_mk_config ( void )Create a configuration object for the Z3 context object.
Configurations are created in order to assign parameters prior to creating contexts for Z3 interaction. For example, if the users wishes to use proof generation, then call:
Z3_set_param_value(cfg, "proof", "true")
The following parameters can be set:
- proof (Boolean) Enable proof generation - debug_ref_count (Boolean) Enable debug support for Z3_ast reference counting - trace (Boolean) Tracing support for VCC - trace_file_name (String) Trace out file for VCC traces - timeout (unsigned) default timeout (in milliseconds) used for solvers - well_sorted_check type checker - auto_config use heuristics to automatically select solver and configure it - model model generation for solvers, this parameter can be overwritten when creating a solver - model_validate validate models produced by solvers - unsat_core unsat-core generation for solvers, this parameter can be overwritten when creating a solver - encoding the string encoding used internally (must be either "unicode" - 18 bit, "bmp" - 16 bit or "ascii" - 8 bit)
Referenced by Context::__init__(), and config::config().
◆ Z3_mk_const() Z3_ast Z3_API Z3_mk_const ( Z3_context c, Z3_symbol s, Z3_sort ty )Declare and create a constant.
This function is a shorthand for:
Z3_func_decl Z3_API Z3_mk_func_decl(Z3_context c, Z3_symbol s, unsigned domain_size, Z3_sort const domain[], Z3_sort range)
Declare a constant or function.
Z3_ast Z3_API Z3_mk_app(Z3_context c, Z3_func_decl d, unsigned num_args, Z3_ast const args[])
Create a constant or function application.
System.IntPtr Z3_func_decl
Referenced by z3py::Array(), z3py::BitVec(), z3py::Bool(), z3py::Const(), context::constant(), z3py::FP(), z3py::Int(), z3py::Real(), and z3py::String().
◆ Z3_mk_const_array() Z3_ast Z3_API Z3_mk_const_array ( Z3_context c, Z3_sort domain, Z3_ast v )Create the constant array.
The resulting term is an array, such that a select
on an arbitrary index produces the value v
.
Referenced by z3::const_array(), and z3py::K().
◆ Z3_mk_constructor() Z3_constructor Z3_API Z3_mk_constructor ( Z3_context c, Z3_symbol name, Z3_symbol recognizer, unsigned num_fields, Z3_symbol const field_names[], Z3_sort_opt const sorts[], unsigned sort_refs[] )Create a constructor.
Referenced by constructors::add(), and z3py::CreateDatatypes().
◆ Z3_mk_constructor_list() Z3_constructor_list Z3_API Z3_mk_constructor_list ( Z3_context c, unsigned num_constructors, Z3_constructor const constructors[] ) ◆ Z3_mk_context() Z3_context Z3_API Z3_mk_context ( Z3_config c )Create a context using the given configuration.
After a context is created, the configuration cannot be changed, although some parameters can be changed using Z3_update_param_value. All main interaction with Z3 happens in the context of a Z3_context
.
In contrast to Z3_mk_context_rc
the life time of Z3_ast
objects persists with the life time of the context.
Note that all other reference counted objects, including Z3_model
, Z3_solver
, Z3_func_interp
have to be managed by the caller. Their reference counts are not handled by the context.
Create a context using the given configuration. This function is similar to Z3_mk_context. However, in the context returned by this function, the user is responsible for managing Z3_ast
reference counters. Managing reference counters is a burden and error-prone, but allows the user to use the memory more efficiently. The user must invoke Z3_inc_ref for any Z3_ast
returned by Z3, and Z3_dec_ref whenever the Z3_ast
is not needed anymore. This idiom is similar to the one used in BDD (binary decision diagrams) packages such as CUDD.
Remarks:
Z3_sort
, Z3_func_decl
, Z3_app
, Z3_pattern
are Z3_ast's
.Z3_context
.Z3_ast
is created twice, Z3 will return the same pointer twice.Create datatype, such as lists, trees, records, enumerations or unions of records. The datatype may be recursive. Return the datatype sort.
Referenced by context::datatype().
◆ Z3_mk_datatype_sort() Z3_sort Z3_API Z3_mk_datatype_sort ( Z3_context c, Z3_symbol name )create a forward reference to a recursive datatype being declared. The forward reference can be used in a nested occurrence: the range of an array or as element sort of a sequence. The forward reference should only be used when used in an accessor for a recursive datatype that gets declared.
Forward references can replace the use sort references, that are unsigned integers in the Z3_mk_constructor
call
Referenced by context::datatype_sort(), and z3py::DatatypeSort().
◆ Z3_mk_datatypes() void Z3_API Z3_mk_datatypes ( Z3_context c, unsigned num_sorts, Z3_symbol const sort_names[], Z3_sort sorts[], Z3_constructor_list constructor_lists[] ) ◆ Z3_mk_distinct() Z3_ast Z3_API Z3_mk_distinct ( Z3_context c, unsigned num_args, Z3_ast const args[] )Create an AST node representing distinct(args[0], ..., args[num_args-1])
.
The distinct
construct is used for declaring the arguments pairwise distinct. That is, Forall 0 <= i < j < num_args. not args[i] = args[j]
.
All arguments must have the same sort.
Referenced by ExprRef::__ne__(), and z3py::Distinct().
◆ Z3_mk_div() Z3_ast Z3_API Z3_mk_div ( Z3_context c, Z3_ast arg1, Z3_ast arg2 )Create an AST node representing arg1 div arg2
.
The arguments must either both have int type or both have real type. If the arguments have int type, then the result type is an int type, otherwise the the result type is real.
Referenced by ArithRef::__div__(), and ArithRef::__rdiv__().
◆ Z3_mk_divides() Z3_ast Z3_API Z3_mk_divides ( Z3_context c, Z3_ast t1, Z3_ast t2 )Create division predicate.
The nodes t1
and t2
must be of integer sort. The predicate is true when t1
divides t2
. For the predicate to be part of linear integer arithmetic, the first argument t1
must be a non-zero integer.
Create a enumeration sort.
An enumeration sort with n
elements. This function will also declare the functions corresponding to the enumerations.
For example, if this function is called with three symbols A, B, C and the name S, then s
is a sort whose name is S, and the function returns three terms corresponding to A, B, C in enum_consts
. The array enum_testers
has three predicates of type (s -> Bool)
. The first predicate (corresponding to A) is true when applied to A, and false otherwise. Similarly for the other predicates.
Referenced by context::enumeration_sort(), and z3py::EnumSort().
◆ Z3_mk_eq() Z3_ast Z3_API Z3_mk_eq ( Z3_context c, Z3_ast l, Z3_ast r )Create an AST node representing l = r
.
The nodes l
and r
must have the same type.
Referenced by ExprRef::__eq__().
◆ Z3_mk_exists() Z3_ast Z3_API Z3_mk_exists ( Z3_context c, unsigned weight, unsigned num_patterns, Z3_pattern const patterns[], unsigned num_decls, Z3_sort const sorts[], Z3_symbol const decl_names[], Z3_ast body ) ◆ Z3_mk_exists_const() Z3_ast Z3_API Z3_mk_exists_const ( Z3_context c, unsigned weight, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], Z3_ast body )Similar to Z3_mk_forall_const.
Create an existential quantifier using a list of constants that will form the set of bound variables.
Referenced by z3::exists().
◆ Z3_mk_ext_rotate_left() Z3_ast Z3_API Z3_mk_ext_rotate_left ( Z3_context c, Z3_ast t1, Z3_ast t2 )Rotate bits of t1
to the left t2
times.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by z3py::RotateLeft().
◆ Z3_mk_ext_rotate_right() Z3_ast Z3_API Z3_mk_ext_rotate_right ( Z3_context c, Z3_ast t1, Z3_ast t2 )Rotate bits of t1
to the right t2
times.
The nodes t1
and t2
must have the same bit-vector sort.
Referenced by z3py::RotateRight().
◆ Z3_mk_extract() Z3_ast Z3_API Z3_mk_extract ( Z3_context c, unsigned high, unsigned low, Z3_ast t1 )Extract the bits high
down to low
from a bit-vector of size m
to yield a new bit-vector of size n
, where n = high - low + 1
.
The node t1
must have a bit-vector sort.
Referenced by z3py::Extract(), and expr::extract().
◆ Z3_mk_false() Z3_ast Z3_API Z3_mk_false ( Z3_context c ) ◆ Z3_mk_finite_domain_sort() Z3_sort Z3_API Z3_mk_finite_domain_sort ( Z3_context c, Z3_symbol name, uint64_t size )Create a named finite domain sort.
To create constants that belong to the finite domain, use the APIs for creating numerals and pass a numeric constant together with the sort returned by this call. The numeric constant should be between 0 and the less than the size of the domain.
Referenced by z3py::FiniteDomainSort().
◆ Z3_mk_fixedpoint() Z3_fixedpoint Z3_API Z3_mk_fixedpoint ( Z3_context c ) ◆ Z3_mk_forall() Z3_ast Z3_API Z3_mk_forall ( Z3_context c, unsigned weight, unsigned num_patterns, Z3_pattern const patterns[], unsigned num_decls, Z3_sort const sorts[], Z3_symbol const decl_names[], Z3_ast body )Create a forall formula. It takes an expression body
that contains bound variables of the same sorts as the sorts listed in the array sorts
. The bound variables are de-Bruijn indices created using Z3_mk_bound. The array decl_names
contains the names that the quantified formula uses for the bound variables. Z3 applies the convention that the last element in the decl_names
and sorts
array refers to the variable with index 0, the second to last element of decl_names
and sorts
refers to the variable with index 1, etc.
Create a universal quantifier using a list of constants that will form the set of bound variables.
Referenced by z3::forall().
◆ Z3_mk_fpa_abs() Z3_ast Z3_API Z3_mk_fpa_abs ( Z3_context c, Z3_ast t ) ◆ Z3_mk_fpa_add() Z3_ast Z3_API Z3_mk_fpa_add ( Z3_context c, Z3_ast rm, Z3_ast t1, Z3_ast t2 )Floating-point addition.
rm
must be of RoundingMode sort, t1
and t2
must have the same FloatingPoint sort.
Floating-point division.
The nodes rm
must be of RoundingMode sort, t1
and t2
must have the same FloatingPoint sort.
Floating-point equality.
Note that this is IEEE 754 equality (as opposed to SMT-LIB =
).
t1
and t2
must have the same FloatingPoint sort.
Floating-point fused multiply-add.
The result is round((t1 * t2) + t3)
.
rm
must be of RoundingMode sort, t1
, t2
, and t3
must have the same FloatingPoint sort.
Maximum of floating-point numbers.
t1
, t2
must have the same FloatingPoint sort.
Minimum of floating-point numbers.
t1
, t2
must have the same FloatingPoint sort.
Floating-point multiplication.
rm
must be of RoundingMode sort, t1
and t2
must have the same FloatingPoint sort.
Floating-point remainder.
t1
and t2
must have the same FloatingPoint sort.
Floating-point roundToIntegral. Rounds a floating-point number to the closest integer, again represented as a floating-point number.
t
must be of FloatingPoint sort.
Floating-point square root.
rm
must be of RoundingMode sort, t
must have FloatingPoint sort.
Floating-point subtraction.
rm
must be of RoundingMode sort, t1
and t2
must have the same FloatingPoint sort.
Conversion of a single IEEE 754-2008 bit-vector into a floating-point number.
Produces a term that represents the conversion of a bit-vector term bv
to a floating-point term of sort s
.
s
must be a FloatingPoint sort, t
must be of bit-vector sort, and the bit-vector size of bv
must be equal to ebits+sbits
of s
. The format of the bit-vector is as defined by the IEEE 754-2008 interchange format.
Referenced by z3py::fpBVToFP(), z3py::fpToFP(), and expr::mk_from_ieee_bv().
◆ Z3_mk_fpa_to_fp_float() Z3_ast Z3_API Z3_mk_fpa_to_fp_float ( Z3_context c, Z3_ast rm, Z3_ast t, Z3_sort s )Conversion of a FloatingPoint term into another term of different FloatingPoint sort.
Produces a term that represents the conversion of a floating-point term t
to a floating-point term of sort s
. If necessary, the result will be rounded according to rounding mode rm
.
s
must be a FloatingPoint sort, rm
must be of RoundingMode sort, t
must be of floating-point sort.
Referenced by z3py::fpFPToFP(), and z3py::fpToFP().
◆ Z3_mk_fpa_to_fp_int_real() Z3_ast Z3_API Z3_mk_fpa_to_fp_int_real ( Z3_context c, Z3_ast rm, Z3_ast exp, Z3_ast sig, Z3_sort s )Conversion of a real-sorted significand and an integer-sorted exponent into a term of FloatingPoint sort.
Produces a term that represents the conversion of sig * 2^exp
into a floating-point term of sort s
. If necessary, the result will be rounded according to rounding mode rm
.
s
must be a FloatingPoint sort, rm
must be of RoundingMode sort, exp
must be of int sort, sig
must be of real sort.
Conversion of a term of real sort into a term of FloatingPoint sort.
Produces a term that represents the conversion of term t
of real sort into a floating-point term of sort s
. If necessary, the result will be rounded according to rounding mode rm
.
s
must be a FloatingPoint sort, rm
must be of RoundingMode sort, t
must be of real sort.
Referenced by z3py::fpRealToFP(), and z3py::fpToFP().
◆ Z3_mk_fpa_to_fp_signed() Z3_ast Z3_API Z3_mk_fpa_to_fp_signed ( Z3_context c, Z3_ast rm, Z3_ast t, Z3_sort s )Conversion of a 2's complement signed bit-vector term into a term of FloatingPoint sort.
Produces a term that represents the conversion of the bit-vector term t
into a floating-point term of sort s
. The bit-vector t
is taken to be in signed 2's complement format. If necessary, the result will be rounded according to rounding mode rm
.
s
must be a FloatingPoint sort, rm
must be of RoundingMode sort, t
must be of bit-vector sort.
Referenced by z3py::fpSignedToFP(), and z3py::fpToFP().
◆ Z3_mk_fpa_to_fp_unsigned() Z3_ast Z3_API Z3_mk_fpa_to_fp_unsigned ( Z3_context c, Z3_ast rm, Z3_ast t, Z3_sort s )Conversion of a 2's complement unsigned bit-vector term into a term of FloatingPoint sort.
Produces a term that represents the conversion of the bit-vector term t
into a floating-point term of sort s
. The bit-vector t
is taken to be in unsigned 2's complement format. If necessary, the result will be rounded according to rounding mode rm
.
s
must be a FloatingPoint sort, rm
must be of RoundingMode sort, t
must be of bit-vector sort.
Referenced by z3py::fpToFPUnsigned(), and z3py::fpUnsignedToFP().
◆ Z3_mk_fpa_to_ieee_bv() Z3_ast Z3_API Z3_mk_fpa_to_ieee_bv ( Z3_context c, Z3_ast t )Conversion of a floating-point term into a bit-vector term in IEEE 754-2008 format.
t
must have FloatingPoint sort. The size of the resulting bit-vector is automatically determined.
Note that IEEE 754-2008 allows multiple different representations of NaN. This conversion knows only one NaN and it will always produce the same bit-vector representation of that NaN.
Referenced by z3py::fpToIEEEBV(), and expr::mk_to_ieee_bv().
◆ Z3_mk_fpa_to_real() Z3_ast Z3_API Z3_mk_fpa_to_real ( Z3_context c, Z3_ast t )Conversion of a floating-point term into a real-numbered term.
Produces a term that represents the conversion of the floating-point term t
into a real number. Note that this type of conversion will often result in non-linear constraints over real terms.
Referenced by z3py::fpToReal().
◆ Z3_mk_fpa_to_sbv() Z3_ast Z3_API Z3_mk_fpa_to_sbv ( Z3_context c, Z3_ast rm, Z3_ast t, unsigned sz )Conversion of a floating-point term into a signed bit-vector.
Produces a term that represents the conversion of the floating-point term t
into a bit-vector term of size sz
in signed 2's complement format. If necessary, the result will be rounded according to rounding mode rm
.
Referenced by z3py::fpToSBV().
◆ Z3_mk_fpa_to_ubv() Z3_ast Z3_API Z3_mk_fpa_to_ubv ( Z3_context c, Z3_ast rm, Z3_ast t, unsigned sz )Conversion of a floating-point term into an unsigned bit-vector.
Produces a term that represents the conversion of the floating-point term t
into a bit-vector term of size sz
in unsigned 2's complement format. If necessary, the result will be rounded according to rounding mode rm
.
Referenced by z3py::fpToUBV().
◆ Z3_mk_fpa_zero() Z3_ast Z3_API Z3_mk_fpa_zero ( Z3_context c, Z3_sort s, bool negative ) ◆ Z3_mk_fresh_const() Z3_ast Z3_API Z3_mk_fresh_const ( Z3_context c, Z3_string prefix, Z3_sort ty ) ◆ Z3_mk_fresh_func_decl() Z3_func_decl Z3_API Z3_mk_fresh_func_decl ( Z3_context c, Z3_string prefix, unsigned domain_size, Z3_sort const domain[], Z3_sort range )Declare a fresh constant or function.
Z3 will generate an unique name for this function declaration. If prefix is different from NULL
, then the name generate by Z3 will start with prefix
.
Referenced by z3py::FreshFunction().
◆ Z3_mk_full_set() Z3_ast Z3_API Z3_mk_full_set ( Z3_context c, Z3_sort domain ) ◆ Z3_mk_func_decl() Z3_func_decl Z3_API Z3_mk_func_decl ( Z3_context c, Z3_symbol s, unsigned domain_size, Z3_sort const domain[], Z3_sort range )Declare a constant or function.
After declaring a constant or function, the function Z3_mk_app can be used to create a constant or function application.
Referenced by z3py::Function(), and context::function().
◆ Z3_mk_ge() Z3_ast Z3_API Z3_mk_ge ( Z3_context c, Z3_ast t1, Z3_ast t2 )Create greater than or equal to.
The nodes t1
and t2
must have the same sort, and must be int or real.
Referenced by ArithRef::__ge__().
◆ Z3_mk_goal() Z3_goal Z3_API Z3_mk_goal ( Z3_context c, bool models, bool unsat_cores, bool proofs )Create a goal (aka problem). A goal is essentially a set of formulas, that can be solved and/or transformed using tactics and solvers.
If models
is true
, then model generation is enabled for the new goal.
If unsat_cores
is true
, then unsat core generation is enabled for the new goal.
If proofs
is true
, then proof generation is enabled for the new goal. Remark, the Z3 context c
must have been created with proof generation support.
Referenced by goal::goal().
◆ Z3_mk_gt() Z3_ast Z3_API Z3_mk_gt ( Z3_context c, Z3_ast t1, Z3_ast t2 )Create greater than.
The nodes t1
and t2
must have the same sort, and must be int or real.
Referenced by ArithRef::__gt__().
◆ Z3_mk_iff() Z3_ast Z3_API Z3_mk_iff ( Z3_context c, Z3_ast t1, Z3_ast t2 )Create an AST node representing t1 iff t2
.
The nodes t1
and t2
must have Boolean sort.
Create an AST node representing t1 implies t2
.
The nodes t1
and t2
must have Boolean sort.
Referenced by z3py::Implies().
◆ Z3_mk_int() Z3_ast Z3_API Z3_mk_int ( Z3_context c, int v, Z3_sort ty ) ◆ Z3_mk_int2bv() Z3_ast Z3_API Z3_mk_int2bv ( Z3_context c, unsigned n, Z3_ast t1 )Create an n
bit bit-vector from the integer argument t1
.
The resulting bit-vector has n
bits, where the i'th bit (counting from 0 to n-1
) is 1 if (t1 div 2^i) mod 2 is 1.
The node t1
must have integer sort.
Referenced by z3py::Int2BV().
◆ Z3_mk_int2real() Z3_ast Z3_API Z3_mk_int2real ( Z3_context c, Z3_ast t1 )Coerce an integer to a real.
There is also a converse operation exposed. It follows the semantics prescribed by the SMT-LIB standard.
You can take the floor of a real by creating an auxiliary integer constant k
and and asserting mk_int2real(k) <= t1 < mk_int2real(k)+1
.
The node t1
must have sort integer.
Referenced by z3::to_real(), and z3py::ToReal().
◆ Z3_mk_int64() Z3_ast Z3_API Z3_mk_int64 ( Z3_context c, int64_t v, Z3_sort ty ) ◆ Z3_mk_int_sort() Z3_sort Z3_API Z3_mk_int_sort ( Z3_context c ) ◆ Z3_mk_int_symbol() Z3_symbol Z3_API Z3_mk_int_symbol ( Z3_context c, int i ) ◆ Z3_mk_int_to_str() Z3_ast Z3_API Z3_mk_int_to_str ( Z3_context c, Z3_ast s ) ◆ Z3_mk_is_int() Z3_ast Z3_API Z3_mk_is_int ( Z3_context c, Z3_ast t1 ) ◆ Z3_mk_ite() Z3_ast Z3_API Z3_mk_ite ( Z3_context c, Z3_ast t1, Z3_ast t2, Z3_ast t3 )Create an AST node representing an if-then-else: ite(t1, t2, t3)
.
The node t1
must have Boolean sort, t2
and t3
must have the same sort. The sort of the new node is equal to the sort of t2
and t3
.
Referenced by z3py::If().
◆ Z3_mk_lambda() Z3_ast Z3_API Z3_mk_lambda ( Z3_context c, unsigned num_decls, Z3_sort const sorts[], Z3_symbol const decl_names[], Z3_ast body )Create a lambda expression. It takes an expression body
that contains bound variables of the same sorts as the sorts listed in the array sorts
. The bound variables are de-Bruijn indices created using Z3_mk_bound. The array decl_names
contains the names that the quantified formula uses for the bound variables. Z3 applies the convention that the last element in the decl_names
and sorts
array refers to the variable with index 0, the second to last element of decl_names
and sorts
refers to the variable with index 1, etc. The sort of the resulting expression is (Array sorts range) where
range
is the sort of body
. For example, if the lambda binds two variables of sort Int
and Bool
, and the body
has sort Real
, the sort of the expression is (Array Int Bool Real).
Create a lambda expression using a list of constants that form the set of bound variables.
Referenced by z3::lambda(), and z3py::Lambda().
◆ Z3_mk_le() Z3_ast Z3_API Z3_mk_le ( Z3_context c, Z3_ast t1, Z3_ast t2 )Create less than or equal to.
The nodes t1
and t2
must have the same sort, and must be int or real.
Referenced by ArithRef::__le__().
◆ Z3_mk_linear_order() Z3_func_decl Z3_API Z3_mk_linear_order ( Z3_context c, Z3_sort a, unsigned id ) ◆ Z3_mk_list_sort() Z3_sort Z3_API Z3_mk_list_sort ( Z3_context c, Z3_symbol name, Z3_sort elem_sort, Z3_func_decl * nil_decl, Z3_func_decl * is_nil_decl, Z3_func_decl * cons_decl, Z3_func_decl * is_cons_decl, Z3_func_decl * head_decl, Z3_func_decl * tail_decl )Create a list sort.
A list sort over elem_sort
This function declares the corresponding constructors and testers for lists.
Create a string constant out of the string that is passed in It takes the length of the string as well to take into account 0 characters. The string is treated as if it is unescaped so a sequence of characters \u{0} is treated as 5 characters and not the character 0.
Referenced by context::string_val().
◆ Z3_mk_lt() Z3_ast Z3_API Z3_mk_lt ( Z3_context c, Z3_ast t1, Z3_ast t2 )Create less than.
The nodes t1
and t2
must have the same sort, and must be int or real.
Referenced by ArithRef::__lt__().
◆ Z3_mk_map() Z3_ast Z3_API Z3_mk_map ( Z3_context c, Z3_func_decl f, unsigned n, Z3_ast const * args )Map f on the argument arrays.
The n
nodes args
must be of array sorts [domain_i -> range_i]
. The function declaration f
must have type range_1 .. range_n -> range
. v
must have sort range. The sort of the result is [domain_i -> range]
.
Referenced by z3py::Map().
◆ Z3_mk_mod() Z3_ast Z3_API Z3_mk_mod ( Z3_context c, Z3_ast arg1, Z3_ast arg2 ) ◆ Z3_mk_model() Z3_model Z3_API Z3_mk_model ( Z3_context c ) ◆ Z3_mk_mul() Z3_ast Z3_API Z3_mk_mul ( Z3_context c, unsigned num_args, Z3_ast const args[] )Create an AST node representing args[0] * ... * args[num_args-1]
.
The array args
must have num_args
elements. All arguments must have int or real sort.
Referenced by z3py::Product().
◆ Z3_mk_not() Z3_ast Z3_API Z3_mk_not ( Z3_context c, Z3_ast a )Create an AST node representing not(a)
.
The node a
must have Boolean sort.
Referenced by z3py::Not().
◆ Z3_mk_numeral() Z3_ast Z3_API Z3_mk_numeral ( Z3_context c, Z3_string numeral, Z3_sort ty )Create a numeral of a given sort.
[num]*[.[num]*][E[+|-][num]+]
. If the given sort is a real, then the numeral can be a rational, that is, a string of the form [num]* / [num]*
. 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.
Referenced by z3py::BitVecVal(), context::bv_val(), z3py::FiniteDomainVal(), z3py::FPVal(), context::int_val(), z3py::IntVal(), context::real_val(), and z3py::RealVal().
◆ Z3_mk_optimize() Z3_optimize Z3_API Z3_mk_optimize ( Z3_context c ) ◆ Z3_mk_or() Z3_ast Z3_API Z3_mk_or ( Z3_context c, unsigned num_args, Z3_ast const args[] )Create an AST node representing args[0] or ... or args[num_args-1]
.
The array args
must have num_args
elements. All arguments must have Boolean sort.
Referenced by z3py::Or().
◆ Z3_mk_params() Z3_params Z3_API Z3_mk_params ( Z3_context c )Create a Z3 (empty) parameter set. Starting at Z3 4.0, parameter sets are used to configure many components such as: simplifiers, tactics, solvers, etc.
Referenced by params::params().
◆ Z3_mk_parser_context() Z3_parser_context Z3_API Z3_mk_parser_context ( Z3_context c )Create a parser context.
A parser context maintains state between calls to Z3_parser_context_parse_string
where the caller can pass in a set of SMTLIB2 commands. It maintains all the declarations from previous calls together with of sorts and function declarations (including 0-ary) that are added directly to the context.
Create a pattern for quantifier instantiation.
Z3 uses pattern matching to instantiate quantifiers. If a pattern is not provided for a quantifier, then Z3 will automatically compute a set of patterns for it. However, for optimal performance, the user should provide the patterns.
Patterns comprise a list of terms. The list should be non-empty. If the list comprises of more than one term, it is a called a multi-pattern.
In general, one can pass in a list of (multi-)patterns in the quantifier constructor.
Referenced by z3py::MultiPattern().
◆ Z3_mk_pbeq() Z3_ast Z3_API Z3_mk_pbeq ( Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k )Pseudo-Boolean relations.
Encode k1*p1 + k2*p2 + ... + kn*pn = k
Referenced by z3py::PbEq().
◆ Z3_mk_pbge() Z3_ast Z3_API Z3_mk_pbge ( Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k )Pseudo-Boolean relations.
Encode k1*p1 + k2*p2 + ... + kn*pn >= k
Referenced by z3py::PbGe().
◆ Z3_mk_pble() Z3_ast Z3_API Z3_mk_pble ( Z3_context c, unsigned num_args, Z3_ast const args[], int const coeffs[], int k )Pseudo-Boolean relations.
Encode k1*p1 + k2*p2 + ... + kn*pn <= k
Referenced by z3py::PbLe().
◆ Z3_mk_piecewise_linear_order() Z3_func_decl Z3_API Z3_mk_piecewise_linear_order ( Z3_context c, Z3_sort a, unsigned id ) ◆ Z3_mk_power() Z3_ast Z3_API Z3_mk_power ( Z3_context c, Z3_ast arg1, Z3_ast arg2 ) ◆ Z3_mk_probe() Z3_probe Z3_API Z3_mk_probe ( Z3_context c, Z3_string name )Return a probe associated with the given name. The complete list of probes may be obtained using the procedures Z3_get_num_probes and Z3_get_probe_name. It may also be obtained using the command (help-tactic)
in the SMT 2.0 front-end.
Probes are used to inspect a goal (aka problem) and collect information that may be used to decide which solver and/or preprocessing step will be used.
Referenced by probe::probe().
◆ Z3_mk_quantifier() Z3_ast Z3_API Z3_mk_quantifier ( Z3_context c, bool is_forall, unsigned weight, unsigned num_patterns, Z3_pattern const patterns[], unsigned num_decls, Z3_sort const sorts[], Z3_symbol const decl_names[], Z3_ast body )Create a quantifier - universal or existential, with pattern hints. See the documentation for Z3_mk_forall for an explanation of the parameters.
Create a universal or existential quantifier using a list of constants that will form the set of bound variables.
◆ Z3_mk_quantifier_const_ex() Z3_ast Z3_API Z3_mk_quantifier_const_ex ( Z3_context c, bool is_forall, unsigned weight, Z3_symbol quantifier_id, Z3_symbol skolem_id, unsigned num_bound, Z3_app const bound[], unsigned num_patterns, Z3_pattern const patterns[], unsigned num_no_patterns, Z3_ast const no_patterns[], Z3_ast body )Create a universal or existential quantifier using a list of constants that will form the set of bound variables.
Referenced by z3py::is_quantifier().
◆ Z3_mk_quantifier_ex() Z3_ast Z3_API Z3_mk_quantifier_ex ( Z3_context c, bool is_forall, unsigned weight, Z3_symbol quantifier_id, Z3_symbol skolem_id, unsigned num_patterns, Z3_pattern const patterns[], unsigned num_no_patterns, Z3_ast const no_patterns[], unsigned num_decls, Z3_sort const sorts[], Z3_symbol const decl_names[], Z3_ast body )Create a quantifier - universal or existential, with pattern hints, no patterns, and attributes.
Create a regular expression that accepts all singleton sequences of the regular expression sort.
Referenced by z3py::AllChar().
◆ Z3_mk_re_complement() Z3_ast Z3_API Z3_mk_re_complement ( Z3_context c, Z3_ast re ) ◆ Z3_mk_re_concat() Z3_ast Z3_API Z3_mk_re_concat ( Z3_context c, unsigned n, Z3_ast const args[] )Create the concatenation of the regular languages.
Referenced by z3py::Concat().
◆ Z3_mk_re_diff() Z3_ast Z3_API Z3_mk_re_diff ( Z3_context c, Z3_ast re1, Z3_ast re2 ) ◆ Z3_mk_re_empty() Z3_ast Z3_API Z3_mk_re_empty ( Z3_context c, Z3_sort re )Create an empty regular expression of sort re
.
Referenced by z3py::Empty(), and z3::re_empty().
◆ Z3_mk_re_full() Z3_ast Z3_API Z3_mk_re_full ( Z3_context c, Z3_sort re )Create an universal regular expression of sort re
.
Referenced by z3py::Full(), and z3::re_full().
◆ Z3_mk_re_intersect() Z3_ast Z3_API Z3_mk_re_intersect ( Z3_context c, unsigned n, Z3_ast const args[] ) ◆ Z3_mk_re_loop() Z3_ast Z3_API Z3_mk_re_loop ( Z3_context c, Z3_ast r, unsigned lo, unsigned hi )Create a regular expression loop. The supplied regular expression r
is repeated between lo
and hi
times. The lo
should be below hi
with one exception: when supplying the value hi
as 0, the meaning is to repeat the argument r
at least lo
number of times, and with an unbounded upper bound.
Referenced by z3py::Loop(), and expr::loop().
◆ Z3_mk_re_option() Z3_ast Z3_API Z3_mk_re_option ( Z3_context c, Z3_ast re ) ◆ Z3_mk_re_plus() Z3_ast Z3_API Z3_mk_re_plus ( Z3_context c, Z3_ast re ) ◆ Z3_mk_re_power() Z3_ast Z3_API Z3_mk_re_power ( Z3_context c, Z3_ast re, unsigned n )Create a power regular expression.
◆ Z3_mk_re_range() Z3_ast Z3_API Z3_mk_re_range ( Z3_context c, Z3_ast lo, Z3_ast hi )Create the range regular expression over two sequences of length 1.
Referenced by z3py::Range().
◆ Z3_mk_re_sort() Z3_sort Z3_API Z3_mk_re_sort ( Z3_context c, Z3_sort seq ) ◆ Z3_mk_re_star() Z3_ast Z3_API Z3_mk_re_star ( Z3_context c, Z3_ast re ) ◆ Z3_mk_re_union() Z3_ast Z3_API Z3_mk_re_union ( Z3_context c, unsigned n, Z3_ast const args[] )Create the union of the regular languages.
Referenced by z3py::Union().
◆ Z3_mk_real() Z3_ast Z3_API Z3_mk_real ( Z3_context c, int num, int den ) ◆ Z3_mk_real2int() Z3_ast Z3_API Z3_mk_real2int ( Z3_context c, Z3_ast t1 ) ◆ Z3_mk_real_int64() Z3_ast Z3_API Z3_mk_real_int64 ( Z3_context c, int64_t num, int64_t den ) ◆ Z3_mk_real_sort() Z3_sort Z3_API Z3_mk_real_sort ( Z3_context c ) ◆ Z3_mk_rec_func_decl() Z3_func_decl Z3_API Z3_mk_rec_func_decl ( Z3_context c, Z3_symbol s, unsigned domain_size, Z3_sort const domain[], Z3_sort range )Declare a recursive function.
After declaring recursive function, it should be associated with a recursive definition Z3_add_rec_def. The function Z3_mk_app can be used to create a constant or function application.
Referenced by context::recfun(), and z3py::RecFunction().
◆ Z3_mk_rem() Z3_ast Z3_API Z3_mk_rem ( Z3_context c, Z3_ast arg1, Z3_ast arg2 )Create an AST node representing arg1 rem arg2
.
The arguments must have int type.
◆ Z3_mk_repeat() Z3_ast Z3_API Z3_mk_repeat ( Z3_context c, unsigned i, Z3_ast t1 ) ◆ Z3_mk_rotate_left() Z3_ast Z3_API Z3_mk_rotate_left ( Z3_context c, unsigned i, Z3_ast t1 )Rotate bits of t1
to the left i
times.
The node t1
must have a bit-vector sort.
Referenced by expr::rotate_left().
◆ Z3_mk_rotate_right() Z3_ast Z3_API Z3_mk_rotate_right ( Z3_context c, unsigned i, Z3_ast t1 )Rotate bits of t1
to the right i
times.
The node t1
must have a bit-vector sort.
Referenced by expr::rotate_right().
◆ Z3_mk_sbv_to_str() Z3_ast Z3_API Z3_mk_sbv_to_str ( Z3_context c, Z3_ast s ) ◆ Z3_mk_select() Z3_ast Z3_API Z3_mk_select ( Z3_context c, Z3_ast a, Z3_ast i )Array read. The argument a
is the array and i
is the index of the array that gets read.
The node a
must have an array sort [domain -> range]
, and i
must have the sort domain
. The sort of the result is range
.
Referenced by ArrayRef::default(), and z3::select().
◆ Z3_mk_select_n() Z3_ast Z3_API Z3_mk_select_n ( Z3_context c, Z3_ast a, unsigned n, Z3_ast const * idxs ) ◆ Z3_mk_seq_at() Z3_ast Z3_API Z3_mk_seq_at ( Z3_context c, Z3_ast s, Z3_ast index )Retrieve from s
the unit sequence positioned at position index
. The sequence is empty if the index is out of bounds.
Referenced by expr::at(), and SeqRef::at().
◆ Z3_mk_seq_concat() Z3_ast Z3_API Z3_mk_seq_concat ( Z3_context c, unsigned n, Z3_ast const args[] )Concatenate sequences.
Referenced by z3py::Concat().
◆ Z3_mk_seq_contains() Z3_ast Z3_API Z3_mk_seq_contains ( Z3_context c, Z3_ast container, Z3_ast containee ) ◆ Z3_mk_seq_empty() Z3_ast Z3_API Z3_mk_seq_empty ( Z3_context c, Z3_sort seq )Create an empty sequence of the sequence sort seq
.
Referenced by z3py::Empty(), and z3::empty().
◆ Z3_mk_seq_extract() Z3_ast Z3_API Z3_mk_seq_extract ( Z3_context c, Z3_ast s, Z3_ast offset, Z3_ast length ) ◆ Z3_mk_seq_foldl() Z3_ast Z3_API Z3_mk_seq_foldl ( Z3_context c, Z3_ast f, Z3_ast a, Z3_ast s ) ◆ Z3_mk_seq_foldli() Z3_ast Z3_API Z3_mk_seq_foldli ( Z3_context c, Z3_ast f, Z3_ast i, Z3_ast a, Z3_ast s )Create a fold with index tracking of the function f
over the sequence s
with accumulator a
starting at index i
.
Referenced by z3::foldli(), and z3py::SeqFoldLeftI().
◆ Z3_mk_seq_in_re() Z3_ast Z3_API Z3_mk_seq_in_re ( Z3_context c, Z3_ast seq, Z3_ast re )Check if seq
is in the language generated by the regular expression re
.
Referenced by z3::in_re(), and z3py::InRe().
◆ Z3_mk_seq_index() Z3_ast Z3_API Z3_mk_seq_index ( Z3_context c, Z3_ast s, Z3_ast substr, Z3_ast offset )Return index of the first occurrence of substr
in s
starting from offset offset
. 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. The value is -1 if offset
is negative or larger than the length of s
.
Referenced by z3::indexof(), and z3py::IndexOf().
◆ Z3_mk_seq_last_index() Z3_ast Z3_API Z3_mk_seq_last_index ( Z3_context c, Z3_ast s, Z3_ast substr ) ◆ Z3_mk_seq_length() Z3_ast Z3_API Z3_mk_seq_length ( Z3_context c, Z3_ast s ) ◆ Z3_mk_seq_map() Z3_ast Z3_API Z3_mk_seq_map ( Z3_context c, Z3_ast f, Z3_ast s ) ◆ Z3_mk_seq_mapi() Z3_ast Z3_API Z3_mk_seq_mapi ( Z3_context c, Z3_ast f, Z3_ast i, Z3_ast s ) ◆ Z3_mk_seq_nth() Z3_ast Z3_API Z3_mk_seq_nth ( Z3_context c, Z3_ast s, Z3_ast index )Retrieve from s
the element positioned at position index
. The function is under-specified if the index is out of bounds.
Referenced by SeqRef::__getitem__(), and expr::nth().
◆ Z3_mk_seq_prefix() Z3_ast Z3_API Z3_mk_seq_prefix ( Z3_context c, Z3_ast prefix, Z3_ast s ) ◆ Z3_mk_seq_replace() Z3_ast Z3_API Z3_mk_seq_replace ( Z3_context c, Z3_ast s, Z3_ast src, Z3_ast dst ) ◆ Z3_mk_seq_sort() Z3_sort Z3_API Z3_mk_seq_sort ( Z3_context c, Z3_sort s ) ◆ Z3_mk_seq_suffix() Z3_ast Z3_API Z3_mk_seq_suffix ( Z3_context c, Z3_ast suffix, Z3_ast s ) ◆ Z3_mk_seq_to_re() Z3_ast Z3_API Z3_mk_seq_to_re ( Z3_context c, Z3_ast seq ) ◆ Z3_mk_seq_unit() Z3_ast Z3_API Z3_mk_seq_unit ( Z3_context c, Z3_ast a ) ◆ Z3_mk_set_add() Z3_ast Z3_API Z3_mk_set_add ( Z3_context c, Z3_ast set, Z3_ast elem ) ◆ Z3_mk_set_complement() Z3_ast Z3_API Z3_mk_set_complement ( Z3_context c, Z3_ast arg ) ◆ Z3_mk_set_del() Z3_ast Z3_API Z3_mk_set_del ( Z3_context c, Z3_ast set, Z3_ast elem ) ◆ Z3_mk_set_difference() Z3_ast Z3_API Z3_mk_set_difference ( Z3_context c, Z3_ast arg1, Z3_ast arg2 ) ◆ Z3_mk_set_has_size() Z3_ast Z3_API Z3_mk_set_has_size ( Z3_context c, Z3_ast set, Z3_ast k )Create predicate that holds if Boolean array set
has k
elements set to true.
Referenced by z3py::SetHasSize().
◆ Z3_mk_set_intersect() Z3_ast Z3_API Z3_mk_set_intersect ( Z3_context c, unsigned num_args, Z3_ast const args[] ) ◆ Z3_mk_set_member() Z3_ast Z3_API Z3_mk_set_member ( Z3_context c, Z3_ast elem, Z3_ast set ) ◆ Z3_mk_set_sort() Z3_sort Z3_API Z3_mk_set_sort ( Z3_context c, Z3_sort ty )Create Set type.
◆ Z3_mk_set_subset() Z3_ast Z3_API Z3_mk_set_subset ( Z3_context c, Z3_ast arg1, Z3_ast arg2 ) ◆ Z3_mk_set_union() Z3_ast Z3_API Z3_mk_set_union ( Z3_context c, unsigned num_args, Z3_ast const args[] ) ◆ Z3_mk_sign_ext() Z3_ast Z3_API Z3_mk_sign_ext ( Z3_context c, unsigned i, Z3_ast t1 )Sign-extend of the given bit-vector to the (signed) equivalent bit-vector of size m+i
, where m
is the size of the given bit-vector.
The node t1
must have a bit-vector sort.
Referenced by z3::sext(), and z3py::SignExt().
◆ Z3_mk_simple_solver() Z3_solver Z3_API Z3_mk_simple_solver ( Z3_context c ) ◆ Z3_mk_simplifier() Z3_simplifier Z3_API Z3_mk_simplifier ( Z3_context c, Z3_string name )Return a simplifier associated with the given name. The complete list of simplifiers may be obtained using the procedures Z3_get_num_simplifiers and Z3_get_simplifier_name. It may also be obtained using the command (help-simplifier)
in the SMT 2.0 front-end.
Simplifiers are the basic building block for creating custom solvers for specific problem domains.
Referenced by simplifier::simplifier().
◆ Z3_mk_solver() Z3_solver Z3_API Z3_mk_solver ( Z3_context c )Create a new solver. This solver is a "combined solver" (see combined_solver module) that internally uses a non-incremental (solver1) and an incremental solver (solver2). This combined solver changes its behaviour based on how it is used and how its parameters are set.
If the solver is used in a non incremental way (i.e. no calls to Z3_solver_push() or Z3_solver_pop(), and no calls to Z3_solver_assert() or Z3_solver_assert_and_track() after checking satisfiability without an intervening Z3_solver_reset()) then solver1 will be used. This solver will apply Z3's "default" tactic.
The "default" tactic will attempt to probe the logic used by the assertions and will apply a specialized tactic if one is supported. Otherwise the general (and-then simplify smt)
tactic will be used.
If the solver is used in an incremental way then the combined solver will switch to using solver2 (which behaves similarly to the general "smt" tactic).
Note however it is possible to set the solver2_timeout
, solver2_unknown
, and ignore_solver1
parameters of the combined solver to change its behaviour.
The function Z3_solver_get_model retrieves a model if the assertions is satisfiable (i.e., the result is Z3_L_TRUE
) and model construction is enabled. The function Z3_solver_get_model can also be used even if the result is Z3_L_UNDEF
, but the returned model is not guaranteed to satisfy quantified assertions.
Referenced by solver::solver().
◆ Z3_mk_solver_for_logic() Z3_solver Z3_API Z3_mk_solver_for_logic ( Z3_context c, Z3_symbol logic ) ◆ Z3_mk_solver_from_tactic() Z3_solver Z3_API Z3_mk_solver_from_tactic ( Z3_context c, Z3_tactic t ) ◆ Z3_mk_store() Z3_ast Z3_API Z3_mk_store ( Z3_context c, Z3_ast a, Z3_ast i, Z3_ast v )Array update.
The node a
must have an array sort [domain -> range]
, i
must have sort domain
, v
must have sort range. The sort of the result is [domain -> range]
. The semantics of this function is given by the theory of arrays described in the SMT-LIB standard. See http://smtlib.org for more details. The result of this function is an array that is equal to a
(with respect to select
) on all indices except for i
, where it maps to v
(and the select
of a
with respect to i
may be a different value).
Referenced by z3::store(), and z3py::Update().
◆ Z3_mk_store_n() Z3_ast Z3_API Z3_mk_store_n ( Z3_context c, Z3_ast a, unsigned n, Z3_ast const * idxs, Z3_ast v ) ◆ Z3_mk_str_le() Z3_ast Z3_API Z3_mk_str_le ( Z3_context c, Z3_ast prefix, Z3_ast s ) ◆ Z3_mk_str_lt() Z3_ast Z3_API Z3_mk_str_lt ( Z3_context c, Z3_ast prefix, Z3_ast s ) ◆ Z3_mk_str_to_int() Z3_ast Z3_API Z3_mk_str_to_int ( Z3_context c, Z3_ast s ) ◆ Z3_mk_string() Z3_ast Z3_API Z3_mk_string ( Z3_context c, Z3_string s )Create a string constant out of the string that is passed in The string may contain escape encoding for non-printable characters or characters outside of the basic printable ASCII range. For example, the escape encoding \u{0} represents the character 0 and the encoding \u{100} represents the character 256.
Referenced by context::string_val(), and z3py::StringVal().
◆ Z3_mk_string_from_code() Z3_ast Z3_API Z3_mk_string_from_code ( Z3_context c, Z3_ast a ) ◆ Z3_mk_string_sort() Z3_sort Z3_API Z3_mk_string_sort ( Z3_context c )Create a sort for unicode strings.
The sort for characters can be changed to ASCII by setting the global parameter encoding
to ascii
, or alternative to 16 bit characters by setting encoding
to bmp
.
Referenced by z3py::ReSort(), and context::string_sort().
◆ Z3_mk_string_symbol() Z3_symbol Z3_API Z3_mk_string_symbol ( Z3_context c, Z3_string s ) ◆ Z3_mk_string_to_code() Z3_ast Z3_API Z3_mk_string_to_code ( Z3_context c, Z3_ast a ) ◆ Z3_mk_sub() Z3_ast Z3_API Z3_mk_sub ( Z3_context c, unsigned num_args, Z3_ast const args[] )Create an AST node representing args[0] - ... - args[num_args - 1]
.
The array args
must have num_args
elements. All arguments must have int or real sort.
Return a tactic associated with the given name. The complete list of tactics may be obtained using the procedures Z3_get_num_tactics and Z3_get_tactic_name. It may also be obtained using the command (help-tactic)
in the SMT 2.0 front-end.
Tactics are the basic building block for creating custom solvers for specific problem domains.
Referenced by tactic::tactic().
◆ Z3_mk_transitive_closure() Z3_func_decl Z3_API Z3_mk_transitive_closure ( Z3_context c, Z3_func_decl f ) ◆ Z3_mk_tree_order() Z3_func_decl Z3_API Z3_mk_tree_order ( Z3_context c, Z3_sort a, unsigned id ) ◆ Z3_mk_true() Z3_ast Z3_API Z3_mk_true ( Z3_context c ) ◆ Z3_mk_tuple_sort() Z3_sort Z3_API Z3_mk_tuple_sort ( Z3_context c, Z3_symbol mk_tuple_name, unsigned num_fields, Z3_symbol const field_names[], Z3_sort const field_sorts[], Z3_func_decl * mk_tuple_decl, Z3_func_decl proj_decl[] )Create a tuple type.
A tuple with n
fields has a constructor and n
projections. This function will also declare the constructor and projection functions.
num_fields
allocated by the user.
Referenced by context::tuple_sort().
◆ Z3_mk_type_variable() Z3_sort Z3_API Z3_mk_type_variable ( Z3_context c, Z3_symbol s )Create a type variable.
Functions using type variables can be applied to instantiations that match the signature of the function. Assertions using type variables correspond to assertions over all possible instantiations.
Referenced by z3py::DeclareTypeVar().
◆ Z3_mk_u32string() Z3_ast Z3_API Z3_mk_u32string ( Z3_context c, unsigned len, unsigned const chars[] )Create a string constant out of the string that is passed in It takes the length of the string as well to take into account 0 characters. The string is unescaped.
Referenced by context::string_val().
◆ Z3_mk_ubv_to_str() Z3_ast Z3_API Z3_mk_ubv_to_str ( Z3_context c, Z3_ast s )Unsigned bit-vector to string conversion.
Referenced by expr::ubvtos().
◆ Z3_mk_unary_minus() Z3_ast Z3_API Z3_mk_unary_minus ( Z3_context c, Z3_ast arg )Create an AST node representing - arg
.
The arguments must have int or real type.
Referenced by ArithRef::__neg__().
◆ Z3_mk_uninterpreted_sort() Z3_sort Z3_API Z3_mk_uninterpreted_sort ( Z3_context c, Z3_symbol s ) ◆ Z3_mk_unsigned_int() Z3_ast Z3_API Z3_mk_unsigned_int ( Z3_context c, unsigned v, Z3_sort ty ) ◆ Z3_mk_unsigned_int64() Z3_ast Z3_API Z3_mk_unsigned_int64 ( Z3_context c, uint64_t v, Z3_sort ty ) ◆ Z3_mk_xor() Z3_ast Z3_API Z3_mk_xor ( Z3_context c, Z3_ast t1, Z3_ast t2 )Create an AST node representing t1 xor t2
.
The nodes t1
and t2
must have Boolean sort.
Referenced by z3py::Xor().
◆ Z3_mk_zero_ext() Z3_ast Z3_API Z3_mk_zero_ext ( Z3_context c, unsigned i, Z3_ast t1 )Extend the given bit-vector with zeros to the (unsigned) equivalent bit-vector of size m+i
, where m
is the size of the given bit-vector.
The node t1
must have a bit-vector sort.
Referenced by z3py::ZeroExt(), and z3::zext().
◆ Z3_model_dec_ref() void Z3_API Z3_model_dec_ref ( Z3_context c, Z3_model m ) ◆ Z3_model_eval() bool Z3_API Z3_model_eval ( Z3_context c, Z3_model m, Z3_ast t, bool model_completion, Z3_ast * v )Evaluate the AST node t
in the given model. Return true
if succeeded, and store the result in v
.
If model_completion
is true
, then Z3 will assign an interpretation for any constant or function that does not have an interpretation in m
. These constants and functions were essentially don't cares.
If model_completion
is false
, then Z3 will not assign interpretations to constants for functions that do not have interpretations in m
. Evaluation behaves as the identify function in this case.
The evaluation may fail for the following reasons:
t
contains a quantifier.m
is partial, that is, it doesn't have a complete interpretation for uninterpreted functions. That is, the option MODEL_PARTIAL=true
was used.t
is type incorrect.Z3_interrupt
was invoked during evaluation.Referenced by model::eval(), and ModelRef::eval().
◆ Z3_model_get_const_decl() Z3_func_decl Z3_API Z3_model_get_const_decl ( Z3_context c, Z3_model m, unsigned i ) ◆ Z3_model_get_const_interp() Z3_ast Z3_API Z3_model_get_const_interp ( Z3_context c, Z3_model m, Z3_func_decl a )Return the interpretation (i.e., assignment) of constant a
in the model m
. Return NULL
, if the model does not assign an interpretation for a
. That should be interpreted as: the value of a
does not matter.
Referenced by model::get_const_interp(), and ModelRef::get_interp().
◆ Z3_model_get_func_decl() Z3_func_decl Z3_API Z3_model_get_func_decl ( Z3_context c, Z3_model m, unsigned i ) ◆ Z3_model_get_func_interp() Z3_func_interp Z3_API Z3_model_get_func_interp ( Z3_context c, Z3_model m, Z3_func_decl f )Return the interpretation of the function f
in the model m
. Return NULL
, if the model does not assign an interpretation for f
. That should be interpreted as: the f
does not matter.
Referenced by model::get_func_interp(), and ModelRef::get_interp().
◆ Z3_model_get_num_consts() unsigned Z3_API Z3_model_get_num_consts ( Z3_context c, Z3_model m ) ◆ Z3_model_get_num_funcs() unsigned Z3_API Z3_model_get_num_funcs ( Z3_context c, Z3_model m ) ◆ Z3_model_get_num_sorts() unsigned Z3_API Z3_model_get_num_sorts ( Z3_context c, Z3_model m )Return the number of uninterpreted sorts that m
assigns an interpretation to.
Z3 also provides an interpretation for uninterpreted sorts used in a formula. The interpretation for a sort s
is a finite set of distinct values. We say this finite set is the "universe" of s
.
Referenced by ModelRef::num_sorts().
◆ Z3_model_get_sort() Z3_sort Z3_API Z3_model_get_sort ( Z3_context c, Z3_model m, unsigned i ) ◆ Z3_model_get_sort_universe() Z3_ast_vector Z3_API Z3_model_get_sort_universe ( Z3_context c, Z3_model m, Z3_sort s ) ◆ Z3_model_has_interp() bool Z3_API Z3_model_has_interp ( Z3_context c, Z3_model m, Z3_func_decl a )Test if there exists an interpretation (i.e., assignment) for a
in the model m
.
Referenced by model::has_interp().
◆ Z3_model_inc_ref() void Z3_API Z3_model_inc_ref ( Z3_context c, Z3_model m ) ◆ Z3_model_to_string() Z3_string Z3_API Z3_model_to_string ( Z3_context c, Z3_model m )Convert the given model into a string.
Z3_model_to_string
.
Referenced by ModelRef::sexpr(), and model::to_string().
◆ Z3_model_translate() Z3_model Z3_API Z3_model_translate ( Z3_context c, Z3_model m, Z3_context dst ) ◆ Z3_open_log() bool Z3_API Z3_open_log ( Z3_string filename ) ◆ Z3_optimize_assert() void Z3_API Z3_optimize_assert ( Z3_context c, Z3_optimize o, Z3_ast a ) ◆ Z3_optimize_assert_and_track() void Z3_API Z3_optimize_assert_and_track ( Z3_context c, Z3_optimize o, Z3_ast a, Z3_ast t ) ◆ Z3_optimize_assert_soft() unsigned Z3_API Z3_optimize_assert_soft ( Z3_context c, Z3_optimize o, Z3_ast a, Z3_string weight, Z3_symbol id ) ◆ Z3_optimize_check() Z3_lbool Z3_API Z3_optimize_check ( Z3_context c, Z3_optimize o, unsigned num_assumptions, Z3_ast const assumptions[] ) ◆ Z3_optimize_dec_ref() void Z3_API Z3_optimize_dec_ref ( Z3_context c, Z3_optimize d ) ◆ Z3_optimize_from_file() void Z3_API Z3_optimize_from_file ( Z3_context c, Z3_optimize o, Z3_string s ) ◆ Z3_optimize_from_string() void Z3_API Z3_optimize_from_string ( Z3_context c, Z3_optimize o, Z3_string s ) ◆ Z3_optimize_get_assertions() Z3_ast_vector Z3_API Z3_optimize_get_assertions ( Z3_context c, Z3_optimize o ) ◆ Z3_optimize_get_help() Z3_string Z3_API Z3_optimize_get_help ( Z3_context c, Z3_optimize t ) ◆ Z3_optimize_get_lower() Z3_ast Z3_API Z3_optimize_get_lower ( Z3_context c, Z3_optimize o, unsigned idx ) ◆ Z3_optimize_get_lower_as_vector() Z3_ast_vector Z3_API Z3_optimize_get_lower_as_vector ( Z3_context c, Z3_optimize o, unsigned idx ) ◆ Z3_optimize_get_model() Z3_model Z3_API Z3_optimize_get_model ( Z3_context c, Z3_optimize o )Retrieve the model for the last Z3_optimize_check.
The error handler is invoked if a model is not available because the commands above were not invoked for the given optimization solver, or if the result was Z3_L_FALSE
.
Referenced by optimize::get_model(), and Optimize::model().
◆ Z3_optimize_get_objectives() Z3_ast_vector Z3_API Z3_optimize_get_objectives ( Z3_context c, Z3_optimize o )Return objectives on the optimization context. If the objective function is a max-sat objective it is returned as a Pseudo-Boolean (minimization) sum of the form (+ (if f1 w1 0) (if f2 w2 0) ...)
If the objective function is entered as a maximization objective, then return the corresponding minimization objective. In this way the resulting objective function is always returned as a minimization objective.
Referenced by optimize::objectives(), and Optimize::objectives().
◆ Z3_optimize_get_param_descrs() Z3_param_descrs Z3_API Z3_optimize_get_param_descrs ( Z3_context c, Z3_optimize o ) ◆ Z3_optimize_get_reason_unknown() Z3_string Z3_API Z3_optimize_get_reason_unknown ( Z3_context c, Z3_optimize d ) ◆ Z3_optimize_get_statistics() Z3_stats Z3_API Z3_optimize_get_statistics ( Z3_context c, Z3_optimize d ) ◆ Z3_optimize_get_unsat_core() Z3_ast_vector Z3_API Z3_optimize_get_unsat_core ( Z3_context c, Z3_optimize o ) ◆ Z3_optimize_get_upper() Z3_ast Z3_API Z3_optimize_get_upper ( Z3_context c, Z3_optimize o, unsigned idx ) ◆ Z3_optimize_get_upper_as_vector() Z3_ast_vector Z3_API Z3_optimize_get_upper_as_vector ( Z3_context c, Z3_optimize o, unsigned idx ) ◆ Z3_optimize_inc_ref() void Z3_API Z3_optimize_inc_ref ( Z3_context c, Z3_optimize d ) ◆ Z3_optimize_maximize() unsigned Z3_API Z3_optimize_maximize ( Z3_context c, Z3_optimize o, Z3_ast t ) ◆ Z3_optimize_minimize() unsigned Z3_API Z3_optimize_minimize ( Z3_context c, Z3_optimize o, Z3_ast t ) ◆ Z3_optimize_pop() void Z3_API Z3_optimize_pop ( Z3_context c, Z3_optimize d ) ◆ Z3_optimize_push() void Z3_API Z3_optimize_push ( Z3_context c, Z3_optimize d ) ◆ Z3_optimize_register_model_eh() void Z3_API Z3_optimize_register_model_eh ( Z3_context c, Z3_optimize o, Z3_model m, void * ctx, Z3_model_eh model_eh ) ◆ Z3_optimize_set_initial_value() void Z3_API Z3_optimize_set_initial_value ( Z3_context c, Z3_optimize o, Z3_ast v, Z3_ast val )provide an initialization hint to the solver. The initialization hint is used to calibrate an initial value of the expression that represents a variable. If the variable is Boolean, the initial phase is set according to value
. If the variable is an integer or real, the initial Simplex tableau is recalibrated to attempt to follow the value assignment.
Referenced by optimize::set_initial_value(), and Optimize::set_initial_value().
◆ Z3_optimize_set_params() void Z3_API Z3_optimize_set_params ( Z3_context c, Z3_optimize o, Z3_params p ) ◆ Z3_optimize_to_string() Z3_string Z3_API Z3_optimize_to_string ( Z3_context c, Z3_optimize o ) ◆ Z3_param_descrs_dec_ref() void Z3_API Z3_param_descrs_dec_ref ( Z3_context c, Z3_param_descrs p ) ◆ Z3_param_descrs_get_documentation() Z3_string Z3_API Z3_param_descrs_get_documentation ( Z3_context c, Z3_param_descrs p, Z3_symbol s ) ◆ Z3_param_descrs_get_kind() Z3_param_kind Z3_API Z3_param_descrs_get_kind ( Z3_context c, Z3_param_descrs p, Z3_symbol n ) ◆ Z3_param_descrs_get_name() Z3_symbol Z3_API Z3_param_descrs_get_name ( Z3_context c, Z3_param_descrs p, unsigned i ) ◆ Z3_param_descrs_inc_ref() void Z3_API Z3_param_descrs_inc_ref ( Z3_context c, Z3_param_descrs p ) ◆ Z3_param_descrs_size() unsigned Z3_API Z3_param_descrs_size ( Z3_context c, Z3_param_descrs p ) ◆ Z3_param_descrs_to_string() Z3_string Z3_API Z3_param_descrs_to_string ( Z3_context c, Z3_param_descrs p ) ◆ Z3_params_dec_ref() void Z3_API Z3_params_dec_ref ( Z3_context c, Z3_params p ) ◆ Z3_params_inc_ref() void Z3_API Z3_params_inc_ref ( Z3_context c, Z3_params p ) ◆ Z3_params_set_bool() void Z3_API Z3_params_set_bool ( Z3_context c, Z3_params p, Z3_symbol k, bool v ) ◆ Z3_params_set_double() void Z3_API Z3_params_set_double ( Z3_context c, Z3_params p, Z3_symbol k, double v ) ◆ Z3_params_set_symbol() void Z3_API Z3_params_set_symbol ( Z3_context c, Z3_params p, Z3_symbol k, Z3_symbol v ) ◆ Z3_params_set_uint() void Z3_API Z3_params_set_uint ( Z3_context c, Z3_params p, Z3_symbol k, unsigned v ) ◆ Z3_params_to_string() Z3_string Z3_API Z3_params_to_string ( Z3_context c, Z3_params p )Convert a parameter set into a string. This function is mainly used for printing the contents of a parameter set.
Referenced by ParamsRef::__repr__().
◆ Z3_params_validate() void Z3_API Z3_params_validate ( Z3_context c, Z3_params p, Z3_param_descrs d )Validate the parameter set p
against the parameter description set d
.
The procedure invokes the error handler if p
is invalid.
Referenced by ParamsRef::validate().
◆ Z3_parse_smtlib2_file() Z3_ast_vector Z3_API Z3_parse_smtlib2_file ( Z3_context c, Z3_string file_name, unsigned num_sorts, Z3_symbol const sort_names[], Z3_sort const sorts[], unsigned num_decls, Z3_symbol const decl_names[], Z3_func_decl const decls[] ) ◆ Z3_parse_smtlib2_string() Z3_ast_vector Z3_API Z3_parse_smtlib2_string ( Z3_context c, Z3_string str, unsigned num_sorts, Z3_symbol const sort_names[], Z3_sort const sorts[], unsigned num_decls, Z3_symbol const decl_names[], Z3_func_decl const decls[] )Parse the given string using the SMT-LIB2 parser.
It returns a formula comprising of the conjunction of assertions in the scope (up to push/pop) at the end of the string.
Referenced by z3py::parse_smt2_string(), and context::parse_string().
◆ Z3_parser_context_add_decl() void Z3_API Z3_parser_context_add_decl ( Z3_context c, Z3_parser_context pc, Z3_func_decl f ) ◆ Z3_parser_context_add_sort() void Z3_API Z3_parser_context_add_sort ( Z3_context c, Z3_parser_context pc, Z3_sort s ) ◆ Z3_parser_context_dec_ref() void Z3_API Z3_parser_context_dec_ref ( Z3_context c, Z3_parser_context pc ) ◆ Z3_parser_context_from_string() Z3_ast_vector Z3_API Z3_parser_context_from_string ( Z3_context c, Z3_parser_context pc, Z3_string s ) ◆ Z3_parser_context_inc_ref() void Z3_API Z3_parser_context_inc_ref ( Z3_context c, Z3_parser_context pc )Increment the reference counter of the given Z3_parser_context
object.
Return the nonzero subresultants of p
and q
with respect to the "variable" x
.
p
, q
and x
are Z3 expressions where p
and q
are arithmetic terms. Note that, any subterm that cannot be viewed as a polynomial is assumed to be a variable. Example: f(a)
is a considered to be a variable in the polynomial f(a)*f(a) + 2*f(a) + 1
Return a probe that evaluates to "true" when p1
and p2
evaluates to true.
Execute the probe over the goal. The probe always produce a double value. "Boolean" probes return 0.0 for false, and a value different from 0.0 for true.
Referenced by Probe::__call__(), and probe::apply().
◆ Z3_probe_const() Z3_probe Z3_API Z3_probe_const ( Z3_context x, double val )Return a probe that always evaluates to val.
Referenced by probe::probe().
◆ Z3_probe_dec_ref() void Z3_API Z3_probe_dec_ref ( Z3_context c, Z3_probe p ) ◆ Z3_probe_eq() Z3_probe Z3_API Z3_probe_eq ( Z3_context x, Z3_probe p1, Z3_probe p2 )Return a probe that evaluates to "true" when the value returned by p1
is equal to the value returned by p2
.
Referenced by Probe::__eq__().
◆ Z3_probe_ge() Z3_probe Z3_API Z3_probe_ge ( Z3_context x, Z3_probe p1, Z3_probe p2 )Return a probe that evaluates to "true" when the value returned by p1
is greater than or equal to the value returned by p2
.
Referenced by Probe::__ge__().
◆ Z3_probe_get_descr() ◆ Z3_probe_gt() Z3_probe Z3_API Z3_probe_gt ( Z3_context x, Z3_probe p1, Z3_probe p2 )Return a probe that evaluates to "true" when the value returned by p1
is greater than the value returned by p2
.
Referenced by Probe::__gt__().
◆ Z3_probe_inc_ref() void Z3_API Z3_probe_inc_ref ( Z3_context c, Z3_probe p ) ◆ Z3_probe_le() Z3_probe Z3_API Z3_probe_le ( Z3_context x, Z3_probe p1, Z3_probe p2 )Return a probe that evaluates to "true" when the value returned by p1
is less than or equal to the value returned by p2
.
Referenced by Probe::__le__().
◆ Z3_probe_lt() Z3_probe Z3_API Z3_probe_lt ( Z3_context x, Z3_probe p1, Z3_probe p2 )Return a probe that evaluates to "true" when the value returned by p1
is less than the value returned by p2
.
Referenced by Probe::__lt__().
◆ Z3_probe_not() Z3_probe Z3_API Z3_probe_not ( Z3_context x, Z3_probe p ) ◆ Z3_probe_or() Z3_probe Z3_API Z3_probe_or ( Z3_context x, Z3_probe p1, Z3_probe p2 )Return a probe that evaluates to "true" when p1
or p2
evaluates to true.
Query constructor for declared functions.
Referenced by constructors::query().
◆ Z3_rcf_add() Z3_rcf_num Z3_API Z3_rcf_add ( Z3_context c, Z3_rcf_num a, Z3_rcf_num b )Return the value a + b
.
Extract a coefficient from an algebraic number.
Delete a RCF numeral created using the RCF API.
◆ Z3_rcf_div() Z3_rcf_num Z3_API Z3_rcf_div ( Z3_context c, Z3_rcf_num a, Z3_rcf_num b )Return the value a / b
.
Return true
if a == b
.
Return the index of a field extension.
◆ Z3_rcf_ge() bool Z3_API Z3_rcf_ge ( Z3_context c, Z3_rcf_num a, Z3_rcf_num b )Return true
if a >= b
.
Extract the "numerator" and "denominator" of the given RCF numeral. We have that a = n/d
, moreover n
and d
are not represented using rational functions.
Return true
if a > b
.
Return the name of an infinitesimal.
Extract an interval from an algebraic number.
Return the value 1/a
.
Return true
if a
represents an algebraic number.
Return true
if a
represents an infinitesimal.
Return true
if a
represents a rational number.
Return true
if a
represents a transcendental number.
Return true
if a <= b
.
Return true
if a < b
.
Return e (Euler's constant)
◆ Z3_rcf_mk_infinitesimal() Z3_rcf_num Z3_API Z3_rcf_mk_infinitesimal ( Z3_context c )Return a new infinitesimal that is smaller than all elements in the Z3 field.
◆ Z3_rcf_mk_pi() Z3_rcf_num Z3_API Z3_rcf_mk_pi ( Z3_context c )Return Pi.
◆ Z3_rcf_mk_rational() Z3_rcf_num Z3_API Z3_rcf_mk_rational ( Z3_context c, Z3_string val )Return a RCF rational using the given string.
◆ Z3_rcf_mk_roots() unsigned Z3_API Z3_rcf_mk_roots ( Z3_context c, unsigned n, Z3_rcf_num const a[], Z3_rcf_num roots[] )Store in roots the roots of the polynomial a[n-1]*x^{n-1} + ... + a[0]
. The output vector roots
must have size n
. It returns the number of roots of the polynomial.
Return a RCF small integer.
◆ Z3_rcf_mul() Z3_rcf_num Z3_API Z3_rcf_mul ( Z3_context c, Z3_rcf_num a, Z3_rcf_num b )Return the value a * b
.
Return the value -a
.
Return true
if a != b
.
Return the number of coefficients in an algebraic number.
Return the number of sign condition polynomial coefficients of an algebraic number.
Return the number of sign conditions of an algebraic number.
Convert the RCF numeral into a string in decimal notation.
◆ Z3_rcf_num_to_string() Z3_string Z3_API Z3_rcf_num_to_string ( Z3_context c, Z3_rcf_num a, bool compact, bool html )Convert the RCF numeral into a string.
◆ Z3_rcf_power() Z3_rcf_num Z3_API Z3_rcf_power ( Z3_context c, Z3_rcf_num a, unsigned k )Return the value a^k
.
Extract the j-th polynomial coefficient of the i-th sign condition.
Extract the sign of a sign condition from an algebraic number.
Return the value a - b
.
Return the name of a transcendental.
Reset all allocated resources.
Use this facility on out-of memory errors. It allows discharging the previous state and resuming afresh. Any pointers previously returned by the API become invalid.
◆ Z3_set_ast_print_mode()Select mode for the format used for pretty-printing AST nodes.
The default mode for pretty printing AST nodes is to produce SMT-LIB style output where common subexpressions are printed at each occurrence. The mode is called Z3_PRINT_SMTLIB_FULL
. To print shared common subexpressions only once, use the Z3_PRINT_LOW_LEVEL
mode. To print in way that conforms to SMT-LIB standards and uses let expressions to share common sub-expressions use Z3_PRINT_SMTLIB2_COMPLIANT
.
Register a Z3 error handler.
A call to a Z3 function may return a non Z3_OK
error code, when it is not used correctly. An error handler can be registered and will be called in this case. To disable the use of the error handler, simply register with h=NULL
.
Referenced by z3py::user_prop_fresh().
◆ Z3_set_param_value() ◆ Z3_simplifier_and_then() Z3_simplifier Z3_API Z3_simplifier_and_then ( Z3_context c, Z3_simplifier t1, Z3_simplifier t2 )Return a simplifier that applies t1
to a given goal and t2
to every subgoal produced by t1
.
Return a string containing a description of the simplifier with the given name.
◆ Z3_simplifier_get_help() Z3_string Z3_API Z3_simplifier_get_help ( Z3_context c, Z3_simplifier t ) ◆ Z3_simplifier_get_param_descrs() Z3_param_descrs Z3_API Z3_simplifier_get_param_descrs ( Z3_context c, Z3_simplifier t ) ◆ Z3_simplifier_inc_ref() void Z3_API Z3_simplifier_inc_ref ( Z3_context c, Z3_simplifier t ) ◆ Z3_simplifier_using_params() Z3_simplifier Z3_API Z3_simplifier_using_params ( Z3_context c, Z3_simplifier t, Z3_params p ) ◆ Z3_simplify() Z3_ast Z3_API Z3_simplify ( Z3_context c, Z3_ast a )Interface to simplifier.
Provides an interface to the AST simplifier used by Z3. It returns an AST object which is equal to the argument. The returned AST is simplified using algebraic simplification rules, such as constant propagation (propagating true/false over logical connectives).
Referenced by expr::simplify(), and z3py::simplify().
◆ Z3_simplify_ex() Z3_ast Z3_API Z3_simplify_ex ( Z3_context c, Z3_ast a, Z3_params p ) ◆ Z3_simplify_get_help() Z3_string Z3_API Z3_simplify_get_help ( Z3_context c ) ◆ Z3_simplify_get_param_descrs() Z3_param_descrs Z3_API Z3_simplify_get_param_descrs ( Z3_context c ) ◆ Z3_solver_add_simplifier() Z3_solver Z3_API Z3_solver_add_simplifier ( Z3_context c, Z3_solver solver, Z3_simplifier simplifier ) ◆ Z3_solver_assert() void Z3_API Z3_solver_assert ( Z3_context c, Z3_solver s, Z3_ast a ) ◆ Z3_solver_assert_and_track() void Z3_API Z3_solver_assert_and_track ( Z3_context c, Z3_solver s, Z3_ast a, Z3_ast p ) ◆ Z3_solver_check() Z3_lbool Z3_API Z3_solver_check ( Z3_context c, Z3_solver s )Check whether the assertions in a given solver are consistent or not.
The function Z3_solver_get_model retrieves a model if the assertions is satisfiable (i.e., the result is Z3_L_TRUE
) and model construction is enabled. Note that if the call returns Z3_L_UNDEF
, Z3 does not ensure that calls to Z3_solver_get_model succeed and any models produced in this case are not guaranteed to satisfy the assertions.
The function Z3_solver_get_proof retrieves a proof if proof generation was enabled when the context was created, and the assertions are unsatisfiable (i.e., the result is Z3_L_FALSE
).
Referenced by solver::check().
◆ Z3_solver_check_assumptions() Z3_lbool Z3_API Z3_solver_check_assumptions ( Z3_context c, Z3_solver s, unsigned num_assumptions, Z3_ast const assumptions[] ) ◆ Z3_solver_congruence_next() Z3_ast Z3_API Z3_solver_congruence_next ( Z3_context c, Z3_solver s, Z3_ast a )retrieve the next expression in the congruence class. The set of congruent siblings form a cyclic list. Repeated calls on the siblings will result in returning to the original expression.
Referenced by Solver::next().
◆ Z3_solver_congruence_root() Z3_ast Z3_API Z3_solver_congruence_root ( Z3_context c, Z3_solver s, Z3_ast a )retrieve the congruence closure root of an expression. The root is retrieved relative to the state where the solver was in when it completed. If it completed during a set of case splits, the congruence roots are relative to these case splits. That is, the congruences are not consequences but they are true under the current state.
Referenced by Solver::root().
◆ Z3_solver_cube() Z3_ast_vector Z3_API Z3_solver_cube ( Z3_context c, Z3_solver s, Z3_ast_vector vars, unsigned backtrack_level )extract a next cube for a solver. The last cube is the constant true
or false
. The number of (non-constant) cubes is by default 1. For the sat solver cubing is controlled using parameters sat.lookahead.cube.cutoff and sat.lookahead.cube.fraction.
The third argument is a vector of variables that may be used for cubing. The contents of the vector is only used in the first call. The initial list of variables is used in subsequent calls until it returns the unsatisfiable cube. The vector is modified to contain a set of Autarky variables that occur in clauses that are affected by the (last literal in the) cube. These variables could be used by a different cuber (on a different solver object) for further recursive cubing.
The last argument is a backtracking level. It instructs the cube process to backtrack below the indicated level for the next cube.
Referenced by solver::cube().
◆ Z3_solver_dec_ref() void Z3_API Z3_solver_dec_ref ( Z3_context c, Z3_solver s ) ◆ Z3_solver_from_file() void Z3_API Z3_solver_from_file ( Z3_context c, Z3_solver s, Z3_string file_name ) ◆ Z3_solver_from_string() void Z3_API Z3_solver_from_string ( Z3_context c, Z3_solver s, Z3_string str ) ◆ Z3_solver_get_assertions() Z3_ast_vector Z3_API Z3_solver_get_assertions ( Z3_context c, Z3_solver s ) ◆ Z3_solver_get_consequences() Z3_lbool Z3_API Z3_solver_get_consequences ( Z3_context c, Z3_solver s, Z3_ast_vector assumptions, Z3_ast_vector variables, Z3_ast_vector consequences ) ◆ Z3_solver_get_help() Z3_string Z3_API Z3_solver_get_help ( Z3_context c, Z3_solver s ) ◆ Z3_solver_get_levels() void Z3_API Z3_solver_get_levels ( Z3_context c, Z3_solver s, Z3_ast_vector literals, unsigned sz, unsigned levels[] )retrieve the decision depth of Boolean literals (variables or their negations). Assumes a check-sat call and no other calls (to extract models) have been invoked.
Referenced by solver::trail(), and Solver::trail_levels().
◆ Z3_solver_get_model() Z3_model Z3_API Z3_solver_get_model ( Z3_context c, Z3_solver s ) ◆ Z3_solver_get_non_units() Z3_ast_vector Z3_API Z3_solver_get_non_units ( Z3_context c, Z3_solver s ) ◆ Z3_solver_get_num_scopes() unsigned Z3_API Z3_solver_get_num_scopes ( Z3_context c, Z3_solver s ) ◆ Z3_solver_get_param_descrs() Z3_param_descrs Z3_API Z3_solver_get_param_descrs ( Z3_context c, Z3_solver s ) ◆ Z3_solver_get_proof() Z3_ast Z3_API Z3_solver_get_proof ( Z3_context c, Z3_solver s ) ◆ Z3_solver_get_reason_unknown() Z3_string Z3_API Z3_solver_get_reason_unknown ( Z3_context c, Z3_solver s ) ◆ Z3_solver_get_statistics() Z3_stats Z3_API Z3_solver_get_statistics ( Z3_context c, Z3_solver s ) ◆ Z3_solver_get_trail() Z3_ast_vector Z3_API Z3_solver_get_trail ( Z3_context c, Z3_solver s )Return the trail modulo model conversion, in order of decision level The decision level can be retrieved using Z3_solver_get_level
based on the trail.
Referenced by solver::trail(), and Solver::trail().
◆ Z3_solver_get_units() Z3_ast_vector Z3_API Z3_solver_get_units ( Z3_context c, Z3_solver s ) ◆ Z3_solver_get_unsat_core() Z3_ast_vector Z3_API Z3_solver_get_unsat_core ( Z3_context c, Z3_solver s )Retrieve the unsat core for the last Z3_solver_check_assumptions The unsat core is a subset of the assumptions a
.
By default, the unsat core will not be minimized. Generation of a minimized unsat core can be enabled via the "sat.core.minimize"
and "smt.core.minimize"
settings for SAT and SMT cores respectively. Generation of minimized unsat cores will be more expensive.
Referenced by solver::unsat_core(), and Solver::unsat_core().
◆ Z3_solver_import_model_converter() void Z3_API Z3_solver_import_model_converter ( Z3_context ctx, Z3_solver src, Z3_solver dst )Ad-hoc method for importing model conversion from solver.
This method is used for scenarios where src
has been used to solve a set of formulas and was interrupted. The dst
solver may be a strengthening of src
obtained from cubing (assigning a subset of literals or adding constraints over the assertions available in src
). If dst
ends up being satisfiable, the model for dst
may not correspond to a model of the original formula due to inprocessing in src
. This method is used to take the side-effect of inprocessing into account when returning a model for dst
.
Referenced by Solver::import_model_converter().
◆ Z3_solver_inc_ref() void Z3_API Z3_solver_inc_ref ( Z3_context c, Z3_solver s ) ◆ Z3_solver_interrupt() void Z3_API Z3_solver_interrupt ( Z3_context c, Z3_solver s )Solver local interrupt. Normally you should use Z3_interrupt to cancel solvers because only one solver is enabled concurrently per context. However, per GitHub issue #1006, there are use cases where it is more convenient to cancel a specific solver. Solvers that are not selected for interrupts are left alone.
Referenced by Solver::interrupt().
◆ Z3_solver_next_split() bool Z3_API Z3_solver_next_split ( Z3_context c, Z3_solver_callback cb, Z3_ast t, unsigned idx, Z3_lbool phase )Sets the next (registered) expression to split on. The function returns false and ignores the given expression in case the expression is already assigned internally (due to relevancy propagation, this assignments might not have been reported yet by the fixed callback). In case the function is called in the decide callback, it overrides the currently selected variable and phase.
Referenced by user_propagator_base::next_split(), and UserPropagateBase::next_split().
◆ Z3_solver_pop() void Z3_API Z3_solver_pop ( Z3_context c, Z3_solver s, unsigned n ) ◆ Z3_solver_propagate_consequence() bool Z3_API Z3_solver_propagate_consequence ( Z3_context c, Z3_solver_callback cb, unsigned num_fixed, Z3_ast const * fixed, unsigned num_eqs, Z3_ast const * eq_lhs, Z3_ast const * eq_rhs, Z3_ast conseq )propagate a consequence based on fixed values and equalities.
A client may invoke it during the propagate_fixed
, propagate_eq
, propagate_diseq
, and propagate_final
callbacks. The callback adds a propagation consequence based on the fixed values passed ids
and equalities eqs
based on parameters lhs
, rhs
.
The solver might discard the propagation in case it is true in the current state. The function returns false in this case; otw. the function returns true. At least one propagation in the final callback has to return true in order to prevent the solver from finishing.
Assume the callback has the signature: propagate_consequence_eh(context, solver_cb, num_ids, ids, num_eqs, lhs, rhs, consequence)
.
num_ids
containing terms that are fixed in the current scope num_eqs - number of equalities used as premise to propagation lhs - left side of equalities rhs - right side of equalities consequence - consequence to propagate. It is typically an atomic formula, but it can be an arbitrary formula.
Referenced by user_propagator_base::conflict(), user_propagator_base::propagate(), and UserPropagateBase::propagate().
◆ Z3_solver_propagate_created() void Z3_API Z3_solver_propagate_created ( Z3_context c, Z3_solver s, Z3_created_eh created_eh ) ◆ Z3_solver_propagate_decide() void Z3_API Z3_solver_propagate_decide ( Z3_context c, Z3_solver s, Z3_decide_eh decide_eh ) ◆ Z3_solver_propagate_declare() Z3_func_decl Z3_API Z3_solver_propagate_declare ( Z3_context c, Z3_symbol name, unsigned n, Z3_sort * domain, Z3_sort range )Create uninterpreted function declaration for the user propagator. When expressions using the function are created by the solver invoke a callback to Z3_solver_propagate_created with arguments
Referenced by z3py::PropagateFunction(), and context::user_propagate_function().
◆ Z3_solver_propagate_diseq() void Z3_API Z3_solver_propagate_diseq ( Z3_context c, Z3_solver s, Z3_eq_eh eq_eh ) ◆ Z3_solver_propagate_eq() void Z3_API Z3_solver_propagate_eq ( Z3_context c, Z3_solver s, Z3_eq_eh eq_eh ) ◆ Z3_solver_propagate_final() void Z3_API Z3_solver_propagate_final ( Z3_context c, Z3_solver s, Z3_final_eh final_eh )register a callback on final check. This provides freedom to the propagator to delay actions or implement a branch-and bound solver. The final check is invoked when all decision variables have been assigned by the solver.
The final_eh
callback takes as argument the original user_context that was used when calling Z3_solver_propagate_init
, and it takes a callback context with the opaque type Z3_solver_callback
. The callback context is passed as argument to invoke the Z3_solver_propagate_consequence
function. The callback context can only be accessed (for propagation and for dynamically registering expressions) within a callback. If the callback context gets used for propagation or conflicts, those propagations take effect and may trigger new decision variables to be set.
Referenced by UserPropagateBase::add_final(), and user_propagator_base::register_final().
◆ Z3_solver_propagate_fixed() void Z3_API Z3_solver_propagate_fixed ( Z3_context c, Z3_solver s, Z3_fixed_eh fixed_eh ) ◆ Z3_solver_propagate_init() void Z3_API Z3_solver_propagate_init ( Z3_context c, Z3_solver s, void * user_context, Z3_push_eh push_eh, Z3_pop_eh pop_eh, Z3_fresh_eh fresh_eh )register a user-propagator with the solver.
Referenced by user_propagator_base::user_propagator_base().
◆ Z3_solver_propagate_register() void Z3_API Z3_solver_propagate_register ( Z3_context c, Z3_solver s, Z3_ast e ) ◆ Z3_solver_propagate_register_cb() void Z3_API Z3_solver_propagate_register_cb ( Z3_context c, Z3_solver_callback cb, Z3_ast e ) ◆ Z3_solver_push() void Z3_API Z3_solver_push ( Z3_context c, Z3_solver s ) ◆ Z3_solver_register_on_clause() void Z3_API Z3_solver_register_on_clause ( Z3_context c, Z3_solver s, void * user_context, Z3_on_clause_eh on_clause_eh )register a callback to that retrieves assumed, inferred and deleted clauses during search.
Referenced by on_clause::on_clause().
◆ Z3_solver_reset() void Z3_API Z3_solver_reset ( Z3_context c, Z3_solver s ) ◆ Z3_solver_set_initial_value() void Z3_API Z3_solver_set_initial_value ( Z3_context c, Z3_solver s, Z3_ast v, Z3_ast val )provide an initialization hint to the solver. The initialization hint is used to calibrate an initial value of the expression that represents a variable. If the variable is Boolean, the initial phase is set according to value
. If the variable is an integer or real, the initial Simplex tableau is recalibrated to attempt to follow the value assignment.
Referenced by solver::set_initial_value(), and Solver::set_initial_value().
◆ Z3_solver_set_params() void Z3_API Z3_solver_set_params ( Z3_context c, Z3_solver s, Z3_params p ) ◆ Z3_solver_to_dimacs_string() Z3_string Z3_API Z3_solver_to_dimacs_string ( Z3_context c, Z3_solver s, bool include_names ) ◆ Z3_solver_to_string() Z3_string Z3_API Z3_solver_to_string ( Z3_context c, Z3_solver s ) ◆ Z3_solver_translate() Z3_solver Z3_API Z3_solver_translate ( Z3_context source, Z3_solver s, Z3_context target ) ◆ Z3_sort_to_ast() Z3_ast Z3_API Z3_sort_to_ast ( Z3_context c, Z3_sort s )Convert a Z3_sort
into Z3_ast
. This is just type casting.
Referenced by SortRef::as_ast().
◆ Z3_sort_to_string() Z3_string Z3_API Z3_sort_to_string ( Z3_context c, Z3_sort s ) ◆ Z3_stats_dec_ref() void Z3_API Z3_stats_dec_ref ( Z3_context c, Z3_stats s ) ◆ Z3_stats_get_double_value() double Z3_API Z3_stats_get_double_value ( Z3_context c, Z3_stats s, unsigned idx ) ◆ Z3_stats_get_key() Z3_string Z3_API Z3_stats_get_key ( Z3_context c, Z3_stats s, unsigned idx ) ◆ Z3_stats_get_uint_value() unsigned Z3_API Z3_stats_get_uint_value ( Z3_context c, Z3_stats s, unsigned idx ) ◆ Z3_stats_inc_ref() void Z3_API Z3_stats_inc_ref ( Z3_context c, Z3_stats s )Increment the reference counter of the given statistics object.
Referenced by stats::operator=().
◆ Z3_stats_is_double() bool Z3_API Z3_stats_is_double ( Z3_context c, Z3_stats s, unsigned idx )Return true
if the given statistical data is a double.
Referenced by stats::is_double().
◆ Z3_stats_is_uint() bool Z3_API Z3_stats_is_uint ( Z3_context c, Z3_stats s, unsigned idx ) ◆ Z3_stats_size() unsigned Z3_API Z3_stats_size ( Z3_context c, Z3_stats s ) ◆ Z3_stats_to_string() Z3_string Z3_API Z3_stats_to_string ( Z3_context c, Z3_stats s ) ◆ Z3_substitute() Z3_ast Z3_API Z3_substitute ( Z3_context c, Z3_ast a, unsigned num_exprs, Z3_ast const from[], Z3_ast const to[] )Substitute every occurrence of from[i]
in a
with to[i]
, for i
smaller than num_exprs
. The result is the new AST. The arrays from
and to
must have size num_exprs
. For every i
smaller than num_exprs
, we must have that sort of from[i]
must be equal to sort of to[i]
.
Referenced by expr::substitute(), and z3py::substitute().
◆ Z3_substitute_funs() Z3_ast Z3_API Z3_substitute_funs ( Z3_context c, Z3_ast a, unsigned num_funs, Z3_func_decl const from[], Z3_ast const to[] )Substitute functions in from
with new expressions in to
.
The expressions in to
can have free variables. The free variable in to
at index 0 refers to the first argument of from
, the free variable at index 1 corresponds to the second argument.
Referenced by expr::substitute(), and z3py::substitute_funs().
◆ Z3_substitute_vars() Z3_ast Z3_API Z3_substitute_vars ( Z3_context c, Z3_ast a, unsigned num_exprs, Z3_ast const to[] )Substitute the variables in a
with the expressions in to
. For every i
smaller than num_exprs
, the variable with de-Bruijn index i
is replaced with term to[i]
. Note that a variable is created using the function Z3_mk_bound.
Referenced by expr::substitute(), and z3py::substitute_vars().
◆ Z3_tactic_and_then() Z3_tactic Z3_API Z3_tactic_and_then ( Z3_context c, Z3_tactic t1, Z3_tactic t2 )Return a tactic that applies t1
to a given goal and t2
to every subgoal produced by t1
.
Referenced by Tactic::param_descrs().
◆ Z3_tactic_apply() Z3_apply_result Z3_API Z3_tactic_apply ( Z3_context c, Z3_tactic t, Z3_goal g ) ◆ Z3_tactic_apply_ex() Z3_apply_result Z3_API Z3_tactic_apply_ex ( Z3_context c, Z3_tactic t, Z3_goal g, Z3_params p ) ◆ Z3_tactic_cond() Z3_tactic Z3_API Z3_tactic_cond ( Z3_context c, Z3_probe p, Z3_tactic t1, Z3_tactic t2 )Return a tactic that applies t1
to a given goal if the probe p
evaluates to true, and t2
if p
evaluates to false.
Referenced by z3py::Cond(), and z3::cond().
◆ Z3_tactic_dec_ref() void Z3_API Z3_tactic_dec_ref ( Z3_context c, Z3_tactic g ) ◆ Z3_tactic_fail() Z3_tactic Z3_API Z3_tactic_fail ( Z3_context c )Return a tactic that always fails.
◆ Z3_tactic_fail_if() Z3_tactic Z3_API Z3_tactic_fail_if ( Z3_context c, Z3_probe p ) ◆ Z3_tactic_fail_if_not_decided() Z3_tactic Z3_API Z3_tactic_fail_if_not_decided ( Z3_context c )Return a tactic that fails if the goal is not trivially satisfiable (i.e., empty) or trivially unsatisfiable (i.e., contains false).
◆ Z3_tactic_get_descr() ◆ Z3_tactic_get_help() Z3_string Z3_API Z3_tactic_get_help ( Z3_context c, Z3_tactic t ) ◆ Z3_tactic_get_param_descrs() Z3_param_descrs Z3_API Z3_tactic_get_param_descrs ( Z3_context c, Z3_tactic t ) ◆ Z3_tactic_inc_ref() void Z3_API Z3_tactic_inc_ref ( Z3_context c, Z3_tactic t ) ◆ Z3_tactic_or_else() Z3_tactic Z3_API Z3_tactic_or_else ( Z3_context c, Z3_tactic t1, Z3_tactic t2 )Return a tactic that first applies t1
to a given goal, if it fails then returns the result of t2
applied to the given goal.
Referenced by Tactic::param_descrs().
◆ Z3_tactic_par_and_then() Z3_tactic Z3_API Z3_tactic_par_and_then ( Z3_context c, Z3_tactic t1, Z3_tactic t2 )Return a tactic that applies t1
to a given goal and then t2
to every subgoal produced by t1
. The subgoals are processed in parallel.
Referenced by z3py::ParThen().
◆ Z3_tactic_par_or() Z3_tactic Z3_API Z3_tactic_par_or ( Z3_context c, unsigned num, Z3_tactic const ts[] )Return a tactic that applies the given tactics in parallel.
Referenced by z3py::ParOr().
◆ Z3_tactic_repeat() Z3_tactic Z3_API Z3_tactic_repeat ( Z3_context c, Z3_tactic t, unsigned max )Return a tactic that keeps applying t
until the goal is not modified anymore or the maximum number of iterations max
is reached.
Referenced by z3py::Repeat().
◆ Z3_tactic_skip() Z3_tactic Z3_API Z3_tactic_skip ( Z3_context c )Return a tactic that just return the given goal.
◆ Z3_tactic_try_for() Z3_tactic Z3_API Z3_tactic_try_for ( Z3_context c, Z3_tactic t, unsigned ms )Return a tactic that applies t
to a given goal for ms
milliseconds. If t
does not terminate in ms
milliseconds, then it fails.
Referenced by z3py::TryFor().
◆ Z3_tactic_using_params() Z3_tactic Z3_API Z3_tactic_using_params ( Z3_context c, Z3_tactic t, Z3_params p ) ◆ Z3_tactic_when() Z3_tactic Z3_API Z3_tactic_when ( Z3_context c, Z3_probe p, Z3_tactic t )Return a tactic that applies t
to a given goal is the probe p
evaluates to true. If p
evaluates to false, then the new tactic behaves like the skip tactic.
Referenced by z3py::When(), and z3::when().
◆ Z3_to_app() Z3_app Z3_API Z3_to_app ( Z3_context c, Z3_ast a )Convert an ast
into an APP_AST
. This is just type casting.
Z3_ast_kind Z3_API Z3_get_ast_kind(Z3_context c, Z3_ast a)
Return the kind of the given AST.
Convert an AST into a FUNC_DECL_AST. This is just type casting.
Referenced by z3py::get_map_func().
◆ Z3_toggle_warning_messages() void Z3_API Z3_toggle_warning_messages ( bool enabled )Enable/disable printing warning messages to the console.
Warnings are printed after passing true
, warning messages are suppressed after calling this method with false
.
Translate/Copy the AST a
from context source
to context target
. AST a
must have been created using context source
.
Referenced by AstRef::translate().
◆ Z3_update_param_value() void Z3_API Z3_update_param_value ( Z3_context c, Z3_string param_id, Z3_string param_value ) ◆ Z3_update_term() Z3_ast Z3_API Z3_update_term ( Z3_context c, Z3_ast a, unsigned num_args, Z3_ast const args[] )Update the arguments of term a
using the arguments args
. The number of arguments num_args
should coincide with the number of arguments to a
. If a
is a quantifier, then num_args has to be 1.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4