mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
resolved merge conflicts
This commit is contained in:
commit
027331aef2
134 changed files with 4579 additions and 651 deletions
|
@ -8944,7 +8944,31 @@ def fpFP(sgn, exp, sig, ctx=None):
|
|||
return FPRef(Z3_mk_fpa_fp(ctx.ref(), sgn.ast, exp.ast, sig.ast), ctx)
|
||||
|
||||
def fpToFP(a1, a2=None, a3=None, ctx=None):
|
||||
"""Create a Z3 floating-point conversion expression from other terms."""
|
||||
"""Create a Z3 floating-point conversion expression from other term sorts
|
||||
to floating-point.
|
||||
|
||||
From a bit-vector term in IEEE 754-2008 format:
|
||||
>>> x = FPVal(1.0, Float32())
|
||||
>>> x_bv = fpToIEEEBV(x)
|
||||
>>> simplify(fpToFP(x_bv, Float32()))
|
||||
1
|
||||
|
||||
From a floating-point term with different precision:
|
||||
>>> x = FPVal(1.0, Float32())
|
||||
>>> x_db = fpToFP(RNE(), x, Float64())
|
||||
>>> x_db.sort()
|
||||
FPSort(11, 53)
|
||||
|
||||
From a real term:
|
||||
>>> x_r = RealVal(1.5)
|
||||
>>> simplify(fpToFP(RNE(), x_r, Float32()))
|
||||
1.5
|
||||
|
||||
From a signed bit-vector term:
|
||||
>>> x_signed = BitVecVal(-5, BitVecSort(32))
|
||||
>>> simplify(fpToFP(RNE(), x_signed, Float32()))
|
||||
-1.25*(2**2)
|
||||
"""
|
||||
ctx = _get_ctx(ctx)
|
||||
if is_bv(a1) and is_fp_sort(a2):
|
||||
return FPRef(Z3_mk_fpa_to_fp_bv(ctx.ref(), a1.ast, a2.ast), ctx)
|
||||
|
|
|
@ -62,7 +62,7 @@ DEFINE_TYPE(Z3_rcf_num);
|
|||
- \c Z3_constructor: type constructor for a (recursive) datatype.
|
||||
- \c Z3_constructor_list: list of constructors for a (recursive) datatype.
|
||||
- \c Z3_params: parameter set used to configure many components such as: simplifiers, tactics, solvers, etc.
|
||||
- \c 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.
|
||||
- \c 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.
|
||||
- \c Z3_model: model for the constraints asserted into the logical context.
|
||||
- \c Z3_func_interp: interpretation of a function in a model.
|
||||
- \c Z3_func_entry: representation of the value of a \c Z3_func_interp at a particular point.
|
||||
|
@ -1129,7 +1129,7 @@ typedef enum {
|
|||
Z3_OP_SEQ_EXTRACT,
|
||||
Z3_OP_SEQ_REPLACE,
|
||||
Z3_OP_SEQ_AT,
|
||||
Z3_OP_SEQ_LENGTH,
|
||||
Z3_OP_SEQ_LENGTH,
|
||||
Z3_OP_SEQ_INDEX,
|
||||
Z3_OP_SEQ_TO_RE,
|
||||
Z3_OP_SEQ_IN_RE,
|
||||
|
@ -1457,7 +1457,7 @@ extern "C" {
|
|||
/*@{*/
|
||||
|
||||
/**
|
||||
\deprecated
|
||||
\deprecated
|
||||
\brief Create a context using the given configuration.
|
||||
|
||||
After a context is created, the configuration cannot be changed,
|
||||
|
@ -1474,6 +1474,11 @@ extern "C" {
|
|||
Z3_solver, Z3_func_interp have to be managed by the caller.
|
||||
Their reference counts are not handled by the context.
|
||||
|
||||
Further remarks:
|
||||
- Z3_sort, Z3_func_decl, Z3_app, Z3_pattern are Z3_ast's.
|
||||
- Z3 uses hash-consing, i.e., when the same Z3_ast is created twice,
|
||||
Z3 will return the same pointer twice.
|
||||
|
||||
\sa Z3_del_context
|
||||
|
||||
def_API('Z3_mk_context', CONTEXT, (_in(CONFIG),))
|
||||
|
@ -1492,11 +1497,13 @@ extern "C" {
|
|||
anymore. This idiom is similar to the one used in
|
||||
BDD (binary decision diagrams) packages such as CUDD.
|
||||
|
||||
Remark: Z3_sort, Z3_func_decl, Z3_app, Z3_pattern are
|
||||
Z3_ast's.
|
||||
Remarks:
|
||||
|
||||
After a context is created, the configuration cannot be changed.
|
||||
All main interaction with Z3 happens in the context of a \c Z3_context.
|
||||
- Z3_sort, Z3_func_decl, Z3_app, Z3_pattern are Z3_ast's.
|
||||
- After a context is created, the configuration cannot be changed.
|
||||
- All main interaction with Z3 happens in the context of a \c Z3_context.
|
||||
- Z3 uses hash-consing, i.e., when the same Z3_ast is created twice,
|
||||
Z3 will return the same pointer twice.
|
||||
|
||||
def_API('Z3_mk_context_rc', CONTEXT, (_in(CONFIG),))
|
||||
*/
|
||||
|
@ -3185,11 +3192,11 @@ extern "C" {
|
|||
|
||||
def_API('Z3_is_string', BOOL, (_in(CONTEXT), _in(AST)))
|
||||
*/
|
||||
Z3_bool Z3_API Z3_is_string(Z3_context c, Z3_ast s);
|
||||
Z3_bool Z3_API Z3_is_string(Z3_context c, Z3_ast s);
|
||||
|
||||
/**
|
||||
\brief Retrieve the string constant stored in \c s.
|
||||
|
||||
|
||||
\pre Z3_is_string(c, s)
|
||||
|
||||
def_API('Z3_get_string' ,STRING ,(_in(CONTEXT), _in(AST)))
|
||||
|
@ -3285,7 +3292,7 @@ extern "C" {
|
|||
def_API('Z3_mk_seq_index' ,AST ,(_in(CONTEXT), _in(AST), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_seq_index(Z3_context c, Z3_ast s, Z3_ast substr, Z3_ast offset);
|
||||
|
||||
|
||||
/**
|
||||
\brief Create a regular expression that accepts the sequence \c seq.
|
||||
|
||||
|
@ -4429,8 +4436,8 @@ 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,
|
||||
such as constant propagation (propagating true/false over logical connectives).
|
||||
The returned AST is simplified using algebraic simplificaiton rules,
|
||||
such as constant propagation (propagating true/false over logical connectives).
|
||||
|
||||
def_API('Z3_simplify', AST, (_in(CONTEXT), _in(AST)))
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue