3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-25 18:15:32 +00:00

merge with Z3Prover/master

This commit is contained in:
Thai Trinh 2018-06-25 19:44:46 +08:00
parent 57845d4809
commit aacb7289be
1147 changed files with 59004 additions and 63575 deletions

View file

@ -36,14 +36,6 @@ DEFINE_TYPE(Z3_fixedpoint);
DEFINE_TYPE(Z3_optimize);
DEFINE_TYPE(Z3_rcf_num);
#ifndef __int64
#define __int64 long long
#endif
#ifndef __uint64
#define __uint64 unsigned long long
#endif
/** \defgroup capi C API */
/*@{*/
@ -80,9 +72,9 @@ DEFINE_TYPE(Z3_rcf_num);
*/
/**
\brief Z3 Boolean type. It is just an alias for \c int.
\brief Z3 Boolean type. It is just an alias for \c bool.
*/
typedef int Z3_bool;
typedef bool Z3_bool;
/**
\brief Z3 string type. It is just an alias for \ccode{const char *}.
@ -91,14 +83,14 @@ typedef const char * Z3_string;
typedef Z3_string * Z3_string_ptr;
/**
\brief True value. It is just an alias for \c 1.
\brief True value. It is just an alias for \c true.
*/
#define Z3_TRUE 1
#define Z3_TRUE true
/**
\brief False value. It is just an alias for \c 0.
\brief False value. It is just an alias for \c false.
*/
#define Z3_FALSE 0
#define Z3_FALSE false
/**
\brief Lifted Boolean type: \c false, \c undefined, \c true.
@ -220,8 +212,6 @@ typedef enum
- Z3_OP_OEQ Binary equivalence modulo namings. This binary predicate is used in proof terms.
It captures equisatisfiability and equivalence modulo renamings.
- Z3_OP_INTERP Marks a sub-formula for interpolation.
- Z3_OP_ANUM Arithmetic numeral.
- Z3_OP_AGNUM Arithmetic algebraic numeral. Algebraic numbers are used to represent irrational numbers in Z3.
@ -270,7 +260,7 @@ typedef enum
- Z3_OP_ARRAY_MAP Array map operator.
It satisfies map[f](a1,..,a_n)[i] = f(a1[i],...,a_n[i]) for every i.
- Z3_OP_SET_UNION Set union between two Booelan arrays (two arrays whose range type is Boolean). The function is binary.
- Z3_OP_SET_UNION Set union between two Boolean arrays (two arrays whose range type is Boolean). The function is binary.
- Z3_OP_SET_INTERSECT Set intersection between two Boolean arrays. The function is binary.
@ -406,7 +396,7 @@ typedef enum
- Z3_OP_BSMUL_NO_UDFL: check that bit-wise signed multiplication does not underflow.
Signed multiplication underflows if the operands have opposite signs and the result of multiplication
does not fit within the avaialble bits. Z3_mk_bvmul_no_underflow.
does not fit within the available bits. Z3_mk_bvmul_no_underflow.
- Z3_OP_BSDIV_I: Binary signed division.
It has the same semantics as Z3_OP_BSDIV, but created in a context where the second operand can be assumed to be non-zero.
@ -459,7 +449,7 @@ typedef enum
[trans T1 T2]: (R t u)
}
- Z3_OP_PR_TRANSITIVITY_STAR: Condensed transitivity proof. This proof object is only used if the parameter PROOF_MODE is 1.
- Z3_OP_PR_TRANSITIVITY_STAR: Condensed transitivity proof.
It combines several symmetry and transitivity proofs.
Example:
@ -485,7 +475,7 @@ typedef enum
[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 supressed to save space.
That is, reflexivity proofs are suppressed to save space.
- Z3_OP_PR_QUANT_INTRO: Given a proof for (~ p q), produces a proof for (~ (forall (x) p) (forall (x) q)).
@ -539,21 +529,14 @@ typedef enum
}
- Z3_OP_PR_REWRITE_STAR: A proof for rewriting an expression t into an expression s.
This proof object is used if the parameter PROOF_MODE is 1.
This proof object can have n antecedents.
The antecedents are proofs for equalities used as substitution rules.
The object is also used in a few cases if the parameter PROOF_MODE is 2.
The cases are:
The proof rule is used in a few cases. The cases are:
- When applying contextual simplification (CONTEXT_SIMPLIFIER=true)
- When converting bit-vectors to Booleans (BIT2BOOL=true)
- When pulling ite expression up (PULL_CHEAP_ITE_TREES=true)
- Z3_OP_PR_PULL_QUANT: A proof for (iff (f (forall (x) q(x)) r) (forall (x) (f (q x) r))). This proof object has no antecedents.
- Z3_OP_PR_PULL_QUANT_STAR: A proof for (iff P Q) where Q is in prenex normal form.
This proof object is only used if the parameter PROOF_MODE is 1.
This proof object has no antecedents.
- Z3_OP_PR_PUSH_QUANT: A proof for:
\nicebox{
@ -726,15 +709,6 @@ typedef enum
[nnf-neg T1 T2 T3 T4]: (~ (not (iff s_1 s_2))
(and (or r_1 r_2) (or r_1' r_2')))
}
- Z3_OP_PR_NNF_STAR: A proof for (~ P Q) where Q is in negation normal form.
This proof object is only used if the parameter PROOF_MODE is 1.
This proof object may have n antecedents. Each antecedent is a PR_DEF_INTRO.
- Z3_OP_PR_CNF_STAR: A proof for (~ P Q) where Q is in conjunctive normal form.
This proof object is only used if the parameter PROOF_MODE is 1.
This proof object may have n antecedents. Each antecedent is a PR_DEF_INTRO.
- Z3_OP_PR_SKOLEMIZE: Proof for:
@ -832,7 +806,7 @@ typedef enum
- Z3_OP_RA_FILTER: Filter (restrict) a relation with respect to a predicate.
The first argument is a relation.
The second argument is a predicate with free de-Brujin indices
The second argument is a predicate with free de-Bruijn indices
corresponding to the columns of the relation.
So the first column in the relation has index 0.
@ -876,6 +850,8 @@ typedef enum
- Z3_OP_DT_RECOGNISER: datatype recognizer.
- Z3_OP_DT_IS: datatype recognizer.
- Z3_OP_DT_ACCESSOR: datatype accessor.
- Z3_OP_DT_UPDATE_FIELD: datatype field update.
@ -969,7 +945,7 @@ typedef enum
- Z3_OP_FPA_TO_FP: Floating-point conversion (various)
- Z3_OP_FPA_TO_FP_UNSIGNED: Floating-point conversion from unsigend bit-vector
- Z3_OP_FPA_TO_FP_UNSIGNED: Floating-point conversion from unsigned bit-vector
- Z3_OP_FPA_TO_UBV: Floating-point conversion to unsigned bit-vector
@ -984,7 +960,7 @@ typedef enum
of non-relevant terms in theory_fpa)
- Z3_OP_FPA_BV2RM: Conversion of a 3-bit bit-vector term to a
floating-point rouding-mode term
floating-point rounding-mode term
The conversion uses the following values:
0 = 000 = Z3_OP_FPA_RM_NEAREST_TIES_TO_EVEN,
@ -1013,7 +989,6 @@ typedef enum {
Z3_OP_NOT,
Z3_OP_IMPLIES,
Z3_OP_OEQ,
Z3_OP_INTERP,
// Arithmetic
Z3_OP_ANUM = 0x200,
@ -1140,7 +1115,6 @@ typedef enum {
Z3_OP_PR_REWRITE,
Z3_OP_PR_REWRITE_STAR,
Z3_OP_PR_PULL_QUANT,
Z3_OP_PR_PULL_QUANT_STAR,
Z3_OP_PR_PUSH_QUANT,
Z3_OP_PR_ELIM_UNUSED_VARS,
Z3_OP_PR_DER,
@ -1157,8 +1131,6 @@ typedef enum {
Z3_OP_PR_IFF_OEQ,
Z3_OP_PR_NNF_POS,
Z3_OP_PR_NNF_NEG,
Z3_OP_PR_NNF_STAR,
Z3_OP_PR_CNF_STAR,
Z3_OP_PR_SKOLEMIZE,
Z3_OP_PR_MODUS_PONENS_OEQ,
Z3_OP_PR_TH_LEMMA,
@ -1220,6 +1192,7 @@ typedef enum {
// Datatypes
Z3_OP_DT_CONSTRUCTOR=0x800,
Z3_OP_DT_RECOGNISER,
Z3_OP_DT_IS,
Z3_OP_DT_ACCESSOR,
Z3_OP_DT_UPDATE_FIELD,
@ -1331,7 +1304,7 @@ typedef enum {
- Z3_IOB: Index out of bounds.
- Z3_INVALID_ARG: Invalid argument was provided.
- Z3_PARSER_ERROR: An error occurred when parsing a string or file.
- Z3_NO_PARSER: Parser output is not available, that is, user didn't invoke #Z3_parse_smtlib_string or #Z3_parse_smtlib_file.
- Z3_NO_PARSER: Parser output is not available, that is, user didn't invoke #Z3_parse_smtlib2_string or #Z3_parse_smtlib2_file.
- Z3_INVALID_PATTERN: Invalid pattern was used to build a quantifier.
- Z3_MEMOUT_FAIL: A memory allocation failure was encountered.
- Z3_FILE_ACCESS_ERRROR: A file could not be accessed.
@ -1474,7 +1447,6 @@ extern "C" {
/*@{*/
/**
\deprecated
\brief Create a configuration object for the Z3 context object.
Configurations are created in order to assign parameters prior to creating
@ -1507,7 +1479,6 @@ extern "C" {
Z3_config Z3_API Z3_mk_config(void);
/**
\deprecated
\brief Delete the given configuration object.
\sa Z3_mk_config
@ -1517,7 +1488,6 @@ extern "C" {
void Z3_API Z3_del_config(Z3_config c);
/**
\deprecated
\brief Set a configuration parameter.
The following parameters can be set for
@ -1534,7 +1504,6 @@ extern "C" {
/*@{*/
/**
\deprecated
\brief Create a context using the given configuration.
After a context is created, the configuration cannot be changed,
@ -1614,7 +1583,6 @@ extern "C" {
void Z3_API Z3_dec_ref(Z3_context c, Z3_ast a);
/**
\deprecated
\brief Set a value of a context parameter.
\sa Z3_global_param_set
@ -1864,7 +1832,7 @@ extern "C" {
def_API('Z3_mk_finite_domain_sort', SORT, (_in(CONTEXT), _in(SYMBOL), _in(UINT64)))
*/
Z3_sort Z3_API Z3_mk_finite_domain_sort(Z3_context c, Z3_symbol name, __uint64 size);
Z3_sort Z3_API Z3_mk_finite_domain_sort(Z3_context c, Z3_symbol name, uint64_t size);
/**
\brief Create an array type.
@ -1922,7 +1890,7 @@ extern "C" {
\param c logical context
\param name name of the enumeration sort.
\param n number of elemenets in enumeration sort.
\param n number of elements in enumeration sort.
\param enum_names names of the enumerated elements.
\param enum_consts constants corresponding to the enumerated elements.
\param enum_testers predicates testing if terms of the enumeration sort correspond to an enumeration.
@ -2857,9 +2825,8 @@ extern "C" {
/**
\brief Create an \c n bit bit-vector from the integer argument \c t1.
NB. This function is essentially treated as uninterpreted.
So you cannot expect Z3 to precisely reflect the semantics of this function
when solving constraints with this function.
The resulting bit-vector has \c n bits, where the i'th bit (counting
from 0 to \c n-1) is 1 if \c (t1 div 2^i) mod 2 is 1.
The node \c t1 must have integer sort.
@ -2874,9 +2841,6 @@ extern "C" {
and in the range \ccode{[0..2^N-1]}, where N are the number of bits in \c t1.
If \c is_signed is true, \c t1 is treated as a signed bit-vector.
This function is essentially treated as uninterpreted.
So you cannot expect Z3 to precisely reflect the semantics of this function
when solving constraints with this function.
The node \c t1 must have a bit-vector sort.
@ -3186,7 +3150,7 @@ extern "C" {
\param c logical context.
\param num numerator of rational.
\param den denomerator of rational.
\param den denominator of rational.
\pre den != 0
@ -3201,7 +3165,7 @@ extern "C" {
/**
\brief Create a numeral of an int, bit-vector, or finite-domain sort.
This function can be use to create numerals that fit in a machine integer.
This function can be used to create numerals that fit in a machine integer.
It is slightly faster than #Z3_mk_numeral since it is not necessary to parse a string.
\sa Z3_mk_numeral
@ -3213,7 +3177,7 @@ extern "C" {
/**
\brief Create a numeral of a int, bit-vector, or finite-domain sort.
This function can be use to create numerals that fit in a machine unsinged integer.
This function can be used to create numerals that fit in a machine unsigned integer.
It is slightly faster than #Z3_mk_numeral since it is not necessary to parse a string.
\sa Z3_mk_numeral
@ -3225,26 +3189,26 @@ extern "C" {
/**
\brief Create a numeral of a int, bit-vector, or finite-domain sort.
This function can be use to create numerals that fit in a machine __int64 integer.
This function can be used to create numerals that fit in a machine \c int64_t integer.
It is slightly faster than #Z3_mk_numeral since it is not necessary to parse a string.
\sa Z3_mk_numeral
def_API('Z3_mk_int64', AST, (_in(CONTEXT), _in(INT64), _in(SORT)))
*/
Z3_ast Z3_API Z3_mk_int64(Z3_context c, __int64 v, Z3_sort ty);
Z3_ast Z3_API Z3_mk_int64(Z3_context c, int64_t v, Z3_sort ty);
/**
\brief Create a numeral of a int, bit-vector, or finite-domain sort.
This function can be use to create numerals that fit in a machine __uint64 integer.
This function can be used to create numerals that fit in a machine \c uint64_t integer.
It is slightly faster than #Z3_mk_numeral since it is not necessary to parse a string.
\sa Z3_mk_numeral
def_API('Z3_mk_unsigned_int64', AST, (_in(CONTEXT), _in(UINT64), _in(SORT)))
*/
Z3_ast Z3_API Z3_mk_unsigned_int64(Z3_context c, __uint64 v, Z3_sort ty);
Z3_ast Z3_API Z3_mk_unsigned_int64(Z3_context c, uint64_t v, Z3_sort ty);
/**
\brief create a bit-vector numeral from a vector of Booleans.
@ -3493,8 +3457,8 @@ extern "C" {
Z3_ast Z3_API Z3_mk_re_range(Z3_context c, Z3_ast lo, Z3_ast hi);
/**
\brief Create a regular expression loop. The supplied regular expression \c r is repated
between \c lo and \c hi times. The \c lo should be below \c hi with one exection: when
\brief Create a regular expression loop. The supplied regular expression \c r is repeated
between \c lo and \c hi times. The \c lo should be below \c hi with one exception: when
supplying the value \c hi as 0, the meaning is to repeat the argument \c r at least
\c lo number of times, and with an unbounded upper bound.
@ -3893,7 +3857,7 @@ extern "C" {
def_API('Z3_get_finite_domain_sort_size', BOOL, (_in(CONTEXT), _in(SORT), _out(UINT64)))
*/
Z3_bool_opt Z3_API Z3_get_finite_domain_sort_size(Z3_context c, Z3_sort s, __uint64* r);
Z3_bool_opt Z3_API Z3_get_finite_domain_sort_size(Z3_context c, Z3_sort s, uint64_t* r);
/**
\brief Return the domain of the given array sort.
@ -4248,7 +4212,7 @@ extern "C" {
Z3_sort Z3_API Z3_get_decl_sort_parameter(Z3_context c, Z3_func_decl d, unsigned idx);
/**
\brief Return the expresson value associated with an expression parameter.
\brief Return the expression value associated with an expression parameter.
\pre Z3_get_decl_parameter_kind(c, d, idx) == Z3_PARAMETER_AST
@ -4257,7 +4221,7 @@ extern "C" {
Z3_ast Z3_API Z3_get_decl_ast_parameter(Z3_context c, Z3_func_decl d, unsigned idx);
/**
\brief Return the expresson value associated with an expression parameter.
\brief Return the expression value associated with an expression parameter.
\pre Z3_get_decl_parameter_kind(c, d, idx) == Z3_PARAMETER_FUNC_DECL
@ -4327,7 +4291,7 @@ extern "C" {
/**
\brief Return a hash code for the given AST.
The hash code is structural. You can use Z3_get_ast_id interchangably with
The hash code is structural. You can use Z3_get_ast_id interchangeably with
this function.
def_API('Z3_get_ast_hash', UINT, (_in(CONTEXT), _in(AST)))
@ -4375,7 +4339,7 @@ extern "C" {
Z3_bool Z3_API Z3_is_numeral_ast(Z3_context c, Z3_ast a);
/**
\brief Return true if the give AST is a real algebraic number.
\brief Return true if the given AST is a real algebraic number.
def_API('Z3_is_algebraic_number', BOOL, (_in(CONTEXT), _in(AST)))
*/
@ -4450,7 +4414,7 @@ extern "C" {
def_API('Z3_get_numeral_small', BOOL, (_in(CONTEXT), _in(AST), _out(INT64), _out(INT64)))
*/
Z3_bool Z3_API Z3_get_numeral_small(Z3_context c, Z3_ast a, __int64* num, __int64* den);
Z3_bool Z3_API Z3_get_numeral_small(Z3_context c, Z3_ast a, int64_t* num, int64_t* den);
/**
\brief Similar to #Z3_get_numeral_string, but only succeeds if
@ -4478,7 +4442,7 @@ extern "C" {
/**
\brief Similar to #Z3_get_numeral_string, but only succeeds if
the value can fit in a machine __uint64 int. Return Z3_TRUE if the call succeeded.
the value can fit in a machine \c uint64_t int. Return Z3_TRUE if the call succeeded.
\pre Z3_get_ast_kind(c, v) == Z3_NUMERAL_AST
@ -4486,11 +4450,11 @@ extern "C" {
def_API('Z3_get_numeral_uint64', BOOL, (_in(CONTEXT), _in(AST), _out(UINT64)))
*/
Z3_bool Z3_API Z3_get_numeral_uint64(Z3_context c, Z3_ast v, __uint64* u);
Z3_bool Z3_API Z3_get_numeral_uint64(Z3_context c, Z3_ast v, uint64_t* u);
/**
\brief Similar to #Z3_get_numeral_string, but only succeeds if
the value can fit in a machine __int64 int. Return Z3_TRUE if the call succeeded.
the value can fit in a machine \c int64_t int. Return Z3_TRUE if the call succeeded.
\pre Z3_get_ast_kind(c, v) == Z3_NUMERAL_AST
@ -4498,11 +4462,11 @@ extern "C" {
def_API('Z3_get_numeral_int64', BOOL, (_in(CONTEXT), _in(AST), _out(INT64)))
*/
Z3_bool Z3_API Z3_get_numeral_int64(Z3_context c, Z3_ast v, __int64* i);
Z3_bool Z3_API Z3_get_numeral_int64(Z3_context c, Z3_ast v, int64_t* i);
/**
\brief Similar to #Z3_get_numeral_string, but only succeeds if
the value can fit as a rational number as machine __int64 int. Return Z3_TRUE if the call succeeded.
the value can fit as a rational number as machine \c int64_t int. Return Z3_TRUE if the call succeeded.
\pre Z3_get_ast_kind(c, v) == Z3_NUMERAL_AST
@ -4510,7 +4474,7 @@ extern "C" {
def_API('Z3_get_numeral_rational_int64', BOOL, (_in(CONTEXT), _in(AST), _out(INT64), _out(INT64)))
*/
Z3_bool Z3_API Z3_get_numeral_rational_int64(Z3_context c, Z3_ast v, __int64* num, __int64* den);
Z3_bool Z3_API Z3_get_numeral_rational_int64(Z3_context c, Z3_ast v, int64_t* num, int64_t* den);
/**
\brief Return a lower bound for the given real algebraic number.
@ -4556,7 +4520,7 @@ extern "C" {
Z3_ast Z3_API Z3_get_pattern(Z3_context c, Z3_pattern p, unsigned idx);
/**
\brief Return index of de-Brujin bound variable.
\brief Return index of de-Bruijn bound variable.
\pre Z3_get_ast_kind(a) == Z3_VAR_AST
@ -4659,7 +4623,7 @@ extern "C" {
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 simplificaiton rules,
The returned AST is simplified using algebraic simplification rules,
such as constant propagation (propagating true/false over logical connectives).
def_API('Z3_simplify', AST, (_in(CONTEXT), _in(AST)))
@ -4861,9 +4825,9 @@ extern "C" {
Z3_func_decl Z3_API Z3_model_get_func_decl(Z3_context c, Z3_model m, unsigned i);
/**
\brief Return the number of uninterpreted sorts that \c m assigs an interpretation to.
\brief Return the number of uninterpreted sorts that \c m assigns an interpretation to.
Z3 also provides an intepretation for uninterpreted sorts used in a formua.
Z3 also provides an interpretation for uninterpreted sorts used in a formula.
The interpretation for a sort \c s is a finite set of distinct values. We say this finite set is
the "universe" of \c s.
@ -4896,6 +4860,13 @@ extern "C" {
*/
Z3_ast_vector Z3_API Z3_model_get_sort_universe(Z3_context c, Z3_model m, Z3_sort s);
/**
\brief translate model from context c to context \c dst.
def_API('Z3_model_translate', MODEL, (_in(CONTEXT), _in(MODEL), _in(CONTEXT)))
*/
Z3_model Z3_API Z3_model_translate(Z3_context c, Z3_model m, Z3_context dst);
/**
\brief The \ccode{(_ as-array f)} AST node is a construct for assigning interpretations for arrays in Z3.
It is the array such that forall indices \c i we have that \ccode{(select (_ as-array f) i)} is equal to \ccode{(f i)}.
@ -4964,7 +4935,7 @@ extern "C" {
unsigned Z3_API Z3_func_interp_get_num_entries(Z3_context c, Z3_func_interp f);
/**
\brief Return a "point" of the given function intepretation. It represents the
\brief Return a "point" of the given function interpretation. It represents the
value of \c f in a particular point.
\pre i < Z3_func_interp_get_num_entries(c, f)
@ -5006,7 +4977,7 @@ extern "C" {
\brief add a function entry to a function interpretation.
\param c logical context
\param fi a function interpregation to be updated.
\param fi a function interpretation to be updated.
\param args list of arguments. They should be constant values (such as integers) and be of the same types as the domain of the function.
\param value value of the function when the parameters match args.
@ -5201,9 +5172,9 @@ extern "C" {
It returns a formula comprising of the conjunction of assertions in the scope
(up to push/pop) at the end of the string.
def_API('Z3_parse_smtlib2_string', AST, (_in(CONTEXT), _in(STRING), _in(UINT), _in_array(2, SYMBOL), _in_array(2, SORT), _in(UINT), _in_array(5, SYMBOL), _in_array(5, FUNC_DECL)))
def_API('Z3_parse_smtlib2_string', AST_VECTOR, (_in(CONTEXT), _in(STRING), _in(UINT), _in_array(2, SYMBOL), _in_array(2, SORT), _in(UINT), _in_array(5, SYMBOL), _in_array(5, FUNC_DECL)))
*/
Z3_ast Z3_API Z3_parse_smtlib2_string(Z3_context c,
Z3_ast_vector Z3_API Z3_parse_smtlib2_string(Z3_context c,
Z3_string str,
unsigned num_sorts,
Z3_symbol const sort_names[],
@ -5215,9 +5186,9 @@ extern "C" {
/**
\brief Similar to #Z3_parse_smtlib2_string, but reads the benchmark from a file.
def_API('Z3_parse_smtlib2_file', AST, (_in(CONTEXT), _in(STRING), _in(UINT), _in_array(2, SYMBOL), _in_array(2, SORT), _in(UINT), _in_array(5, SYMBOL), _in_array(5, FUNC_DECL)))
def_API('Z3_parse_smtlib2_file', AST_VECTOR, (_in(CONTEXT), _in(STRING), _in(UINT), _in_array(2, SYMBOL), _in_array(2, SORT), _in(UINT), _in_array(5, SYMBOL), _in_array(5, FUNC_DECL)))
*/
Z3_ast Z3_API Z3_parse_smtlib2_file(Z3_context c,
Z3_ast_vector Z3_API Z3_parse_smtlib2_file(Z3_context c,
Z3_string file_name,
unsigned num_sorts,
Z3_symbol const sort_names[],
@ -5227,6 +5198,17 @@ extern "C" {
Z3_func_decl const decls[]);
/**
\brief 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.
\returns output generated from processing commands.
def_API('Z3_eval_smtlib2_string', STRING, (_in(CONTEXT), _in(STRING),))
*/
Z3_string Z3_API Z3_eval_smtlib2_string(Z3_context, Z3_string str);
/**
\brief Retrieve that last error message information generated from parsing.
@ -5459,12 +5441,21 @@ extern "C" {
Z3_bool Z3_API Z3_goal_is_decided_unsat(Z3_context c, Z3_goal g);
/**
\brief Copy a goal \c g from the context \c source to a the context \c target.
\brief Copy a goal \c g from the context \c source to the context \c target.
def_API('Z3_goal_translate', GOAL, (_in(CONTEXT), _in(GOAL), _in(CONTEXT)))
*/
Z3_goal Z3_API Z3_goal_translate(Z3_context source, Z3_goal g, Z3_context target);
/**
\brief Convert a model of the formulas of a goal to a model of an original goal.
The model may be null, in which case the returned model is valid if the goal was
established satisfiable.
def_API('Z3_goal_convert_model', MODEL, (_in(CONTEXT), _in(GOAL), _in(MODEL)))
*/
Z3_model Z3_API Z3_goal_convert_model(Z3_context c, Z3_goal g, Z3_model m);
/**
\brief Convert a goal into a string.
@ -5472,6 +5463,13 @@ extern "C" {
*/
Z3_string Z3_API Z3_goal_to_string(Z3_context c, Z3_goal g);
/**
\brief Convert a goal into a DIMACS formatted string.
def_API('Z3_goal_to_dimacs_string', STRING, (_in(CONTEXT), _in(GOAL)))
*/
Z3_string Z3_API Z3_goal_to_dimacs_string(Z3_context c, Z3_goal g);
/*@}*/
/** @name Tactics and Probes */
@ -5824,14 +5822,6 @@ extern "C" {
*/
Z3_goal Z3_API Z3_apply_result_get_subgoal(Z3_context c, Z3_apply_result r, unsigned i);
/**
\brief Convert a model for the subgoal \c Z3_apply_result_get_subgoal(c, r, i) into a model for the original goal \c g.
Where \c g is the goal used to create \c r using \c Z3_tactic_apply(c, t, g).
def_API('Z3_apply_result_convert_model', MODEL, (_in(CONTEXT), _in(APPLY_RESULT), _in(UINT), _in(MODEL)))
*/
Z3_model Z3_API Z3_apply_result_convert_model(Z3_context c, Z3_apply_result r, unsigned i, Z3_model m);
/*@}*/
/** @name Solvers*/
@ -5925,12 +5915,19 @@ extern "C" {
Z3_solver Z3_API Z3_mk_solver_from_tactic(Z3_context c, Z3_tactic t);
/**
\brief Copy a solver \c s from the context \c source to a the context \c target.
\brief Copy a solver \c s from the context \c source to the context \c target.
def_API('Z3_solver_translate', SOLVER, (_in(CONTEXT), _in(SOLVER), _in(CONTEXT)))
*/
Z3_solver Z3_API Z3_solver_translate(Z3_context source, Z3_solver s, Z3_context target);
/**
\brief Ad-hoc method for importing model convertion from solver.
def_API('Z3_solver_import_model_converter', VOID, (_in(CONTEXT), _in(SOLVER), _in(SOLVER)))
*/
void Z3_API Z3_solver_import_model_converter(Z3_context ctx, Z3_solver src, Z3_solver dst);
/**
\brief Return a string describing all solver available parameters.
@ -6031,13 +6028,6 @@ extern "C" {
*/
void Z3_API Z3_solver_assert_and_track(Z3_context c, Z3_solver s, Z3_ast a, Z3_ast p);
/**
\brief Return the set of asserted formulas on the solver.
def_API('Z3_solver_get_assertions', AST_VECTOR, (_in(CONTEXT), _in(SOLVER)))
*/
Z3_ast_vector Z3_API Z3_solver_get_assertions(Z3_context c, Z3_solver s);
/**
\brief load solver assertions from a file.
@ -6052,6 +6042,20 @@ extern "C" {
*/
void Z3_API Z3_solver_from_string(Z3_context c, Z3_solver s, Z3_string file_name);
/**
\brief Return the set of asserted formulas on the solver.
def_API('Z3_solver_get_assertions', AST_VECTOR, (_in(CONTEXT), _in(SOLVER)))
*/
Z3_ast_vector Z3_API Z3_solver_get_assertions(Z3_context c, Z3_solver s);
/**
\brief Return the set of units modulo model conversion.
def_API('Z3_solver_get_units', AST_VECTOR, (_in(CONTEXT), _in(SOLVER)))
*/
Z3_ast_vector Z3_API Z3_solver_get_units(Z3_context c, Z3_solver s);
/**
\brief Check whether the assertions in a given solver are consistent or not.
@ -6119,6 +6123,28 @@ extern "C" {
Z3_ast_vector assumptions,
Z3_ast_vector variables,
Z3_ast_vector consequences);
/**
\brief extract a next cube for a solver. The last cube is the constant \c true or \c 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 occor 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.
def_API('Z3_solver_cube', AST_VECTOR, (_in(CONTEXT), _in(SOLVER), _in(AST_VECTOR), _in(UINT)))
*/
Z3_ast_vector Z3_API Z3_solver_cube(Z3_context c, Z3_solver s, Z3_ast_vector vars, unsigned backtrack_level);
/**
\brief Retrieve the model for the last #Z3_solver_check or #Z3_solver_check_assumptions
@ -6255,7 +6281,7 @@ extern "C" {
def_API('Z3_get_estimated_alloc_size', UINT64, ())
*/
__uint64 Z3_API Z3_get_estimated_alloc_size(void);
uint64_t Z3_API Z3_get_estimated_alloc_size(void);
/*@}*/