mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
expose mk_divides over API. Corresponds to a = b (mod m), #723
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f8469b65d1
commit
f4b803de95
5 changed files with 24 additions and 9 deletions
|
@ -88,6 +88,7 @@ extern "C" {
|
|||
MK_ARITH_PRED(Z3_mk_gt, OP_GT);
|
||||
MK_ARITH_PRED(Z3_mk_le, OP_LE);
|
||||
MK_ARITH_PRED(Z3_mk_ge, OP_GE);
|
||||
MK_ARITH_PRED(Z3_mk_divides, OP_IDIVIDES);
|
||||
MK_UNARY(Z3_mk_int2real, mk_c(c)->get_arith_fid(), OP_TO_REAL, SKIP);
|
||||
MK_UNARY(Z3_mk_real2int, mk_c(c)->get_arith_fid(), OP_TO_INT, SKIP);
|
||||
MK_UNARY(Z3_mk_is_int, mk_c(c)->get_arith_fid(), OP_IS_INT, SKIP);
|
||||
|
|
|
@ -150,7 +150,7 @@ extern "C" {
|
|||
Z3_CATCH_RETURN("");
|
||||
}
|
||||
|
||||
Z3_string Z3_API Z3_get_lstring(Z3_context c, Z3_ast s, unsigned* length) {
|
||||
Z3_char_ptr Z3_API Z3_get_lstring(Z3_context c, Z3_ast s, unsigned* length) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_get_lstring(c, s, length);
|
||||
RESET_ERROR_CODE();
|
||||
|
|
|
@ -80,6 +80,7 @@ typedef bool Z3_bool;
|
|||
\brief Z3 string type. It is just an alias for \ccode{const char *}.
|
||||
*/
|
||||
typedef const char * Z3_string;
|
||||
typedef char const* Z3_char_ptr;
|
||||
typedef Z3_string * Z3_string_ptr;
|
||||
|
||||
/**
|
||||
|
@ -2494,6 +2495,17 @@ extern "C" {
|
|||
*/
|
||||
Z3_ast Z3_API Z3_mk_ge(Z3_context c, Z3_ast t1, Z3_ast t2);
|
||||
|
||||
/**
|
||||
\brief Create division predicate.
|
||||
|
||||
The nodes \c t1 and \c t2 must be of integer sort.
|
||||
The predicate is true when \c t1 divides \c t2. For the predicate to be part of
|
||||
linear integer arithmetic, the first argument \c t1 must be a non-zero integer.
|
||||
|
||||
def_API('Z3_mk_divides', AST, (_in(CONTEXT), _in(AST), _in(AST)))
|
||||
*/
|
||||
Z3_ast Z3_API Z3_mk_divides(Z3_context c, Z3_ast t1, Z3_ast t2);
|
||||
|
||||
/**
|
||||
\brief Coerce an integer to a real.
|
||||
|
||||
|
@ -3454,9 +3466,9 @@ extern "C" {
|
|||
|
||||
\pre Z3_is_string(c, s)
|
||||
|
||||
def_API('Z3_get_lstring' ,STRING ,(_in(CONTEXT), _in(AST), _out(UINT)))
|
||||
def_API('Z3_get_lstring' ,CHAR_PTR ,(_in(CONTEXT), _in(AST), _out(UINT)))
|
||||
*/
|
||||
Z3_string Z3_API Z3_get_lstring(Z3_context c, Z3_ast s, unsigned* length);
|
||||
Z3_char_ptr Z3_API Z3_get_lstring(Z3_context c, Z3_ast s, unsigned* length);
|
||||
|
||||
/**
|
||||
\brief Create an empty sequence of the sequence sort \c seq.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue