mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
FPA API: Renaming for consistency with final SMT standard.
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
3418f1875e
commit
657595818e
11 changed files with 146 additions and 138 deletions
|
@ -88,6 +88,7 @@ extern "C" {
|
|||
Z3_CATCH_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort(Z3_context c, unsigned ebits, unsigned sbits) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_mk_fpa_sort(c, ebits, sbits);
|
||||
|
@ -105,18 +106,34 @@ extern "C" {
|
|||
return Z3_mk_fpa_sort(c, 5, 11);
|
||||
}
|
||||
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_16(__in Z3_context c) {
|
||||
return Z3_mk_fpa_sort(c, 5, 11);
|
||||
}
|
||||
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_single(__in Z3_context c) {
|
||||
return Z3_mk_fpa_sort(c, 8, 24);
|
||||
}
|
||||
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_32(__in Z3_context c) {
|
||||
return Z3_mk_fpa_sort(c, 8, 24);
|
||||
}
|
||||
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_double(__in Z3_context c) {
|
||||
return Z3_mk_fpa_sort(c, 11, 53);
|
||||
}
|
||||
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_64(__in Z3_context c) {
|
||||
return Z3_mk_fpa_sort(c, 11, 53);
|
||||
}
|
||||
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_quadruple(__in Z3_context c) {
|
||||
return Z3_mk_fpa_sort(c, 15, 113);
|
||||
}
|
||||
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_128(__in Z3_context c) {
|
||||
return Z3_mk_fpa_sort(c, 15, 113);
|
||||
}
|
||||
|
||||
Z3_ast Z3_API Z3_mk_fpa_nan(Z3_context c, Z3_sort s) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_mk_fpa_nan(c, s);
|
||||
|
@ -373,22 +390,12 @@ extern "C" {
|
|||
Z3_TRY;
|
||||
LOG_Z3_mk_fpa_convert(c, s, rm, t);
|
||||
RESET_ERROR_CODE();
|
||||
api::context * ctx = mk_c(c);
|
||||
api::context * ctx = mk_c(c);
|
||||
expr * args [2] = { to_expr(rm), to_expr(t) };
|
||||
Z3_ast r = of_ast(ctx->m().mk_app(ctx->float_util().get_family_id(), OP_TO_FLOAT,
|
||||
Z3_ast r = of_ast(ctx->m().mk_app(ctx->float_util().get_family_id(), OP_FLOAT_TO_FP,
|
||||
to_sort(s)->get_num_parameters(), to_sort(s)->get_parameters(),
|
||||
2, args));
|
||||
RETURN_Z3(r);
|
||||
Z3_CATCH_RETURN(0);
|
||||
}
|
||||
|
||||
Z3_ast Z3_API Z3_mk_fpa_to_ieee_bv(__in Z3_context c, __in Z3_ast t) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_mk_fpa_to_ieee_bv(c, t);
|
||||
RESET_ERROR_CODE();
|
||||
api::context * ctx = mk_c(c);
|
||||
Z3_ast r = of_ast(ctx->float_util().mk_float_to_ieee_bv(to_expr(t)));
|
||||
RETURN_Z3(r);
|
||||
Z3_CATCH_RETURN(0);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -117,6 +117,19 @@ extern "C" {
|
|||
*/
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_half(__in Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Create the half-precision (16-bit) floating point sort.
|
||||
|
||||
\param c logical context.
|
||||
\param ebits number of exponent bits
|
||||
\param sbits number of significand bits
|
||||
|
||||
\remark ebits must be larger than 1 and sbits must be larger than 2.
|
||||
|
||||
def_API('Z3_mk_fpa_sort_16', SORT, (_in(CONTEXT),))
|
||||
*/
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_16(__in Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Create the single-precision (32-bit) floating point sort.
|
||||
|
||||
|
@ -130,6 +143,19 @@ extern "C" {
|
|||
*/
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_single(__in Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Create the single-precision (32-bit) floating point sort.
|
||||
|
||||
\param c logical context.
|
||||
\param ebits number of exponent bits
|
||||
\param sbits number of significand bits
|
||||
|
||||
\remark ebits must be larger than 1 and sbits must be larger than 2.
|
||||
|
||||
def_API('Z3_mk_fpa_sort_32', SORT, (_in(CONTEXT),))
|
||||
*/
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_32(__in Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Create the double-precision (64-bit) floating point sort.
|
||||
|
||||
|
@ -143,6 +169,19 @@ extern "C" {
|
|||
*/
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_double(__in Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Create the double-precision (64-bit) floating point sort.
|
||||
|
||||
\param c logical context.
|
||||
\param ebits number of exponent bits
|
||||
\param sbits number of significand bits
|
||||
|
||||
\remark ebits must be larger than 1 and sbits must be larger than 2.
|
||||
|
||||
def_API('Z3_mk_fpa_sort_64', SORT, (_in(CONTEXT),))
|
||||
*/
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort__64(__in Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Create the quadruple-precision (128-bit) floating point sort.
|
||||
|
||||
|
@ -156,6 +195,18 @@ extern "C" {
|
|||
*/
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_quadruple(__in Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Create the quadruple-precision (128-bit) floating point sort.
|
||||
|
||||
\param c logical context.
|
||||
\param ebits number of exponent bits
|
||||
\param sbits number of significand bits
|
||||
|
||||
\remark ebits must be larger than 1 and sbits must be larger than 2.
|
||||
|
||||
def_API('Z3_mk_fpa_sort_128', SORT, (_in(CONTEXT),))
|
||||
*/
|
||||
Z3_sort Z3_API Z3_mk_fpa_sort_128(__in Z3_context c);
|
||||
|
||||
/**
|
||||
\brief Create a NaN of sort s.
|
||||
|
@ -504,18 +555,6 @@ extern "C" {
|
|||
*/
|
||||
Z3_ast Z3_API Z3_mk_fpa_convert(__in Z3_context c, __in Z3_sort s, __in Z3_ast rm, __in Z3_ast t);
|
||||
|
||||
/**
|
||||
\brief Conversion of a floating point term to a bit-vector term in IEEE754 format.
|
||||
|
||||
\param c logical context.
|
||||
\param t floating-point term.
|
||||
|
||||
t must have floating point sort. The size of the resulting bit-vector is automatically determined.
|
||||
|
||||
def_API('Z3_mk_fpa_to_ieee_bv', AST, (_in(CONTEXT),_in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_fpa_to_ieee_bv(__in Z3_context c, __in Z3_ast t);
|
||||
|
||||
/*@}*/
|
||||
/*@}*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue