mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
add solver object to get_implied_equalities
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
01826fa8c9
commit
b6459a8a92
4 changed files with 29 additions and 24 deletions
|
@ -24,6 +24,7 @@ Revision History:
|
|||
#include"api_model.h"
|
||||
#include"smt_implied_equalities.h"
|
||||
#include"cancel_eh.h"
|
||||
#include"api_solver.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
@ -113,14 +114,16 @@ extern "C" {
|
|||
}
|
||||
|
||||
Z3_lbool Z3_API Z3_get_implied_equalities(Z3_context c,
|
||||
Z3_solver s,
|
||||
unsigned num_terms,
|
||||
Z3_ast const terms[],
|
||||
unsigned class_ids[]) {
|
||||
Z3_TRY;
|
||||
LOG_Z3_get_implied_equalities(c, num_terms, terms, class_ids);
|
||||
LOG_Z3_get_implied_equalities(c, s, num_terms, terms, class_ids);
|
||||
ast_manager& m = mk_c(c)->m();
|
||||
RESET_ERROR_CODE();
|
||||
CHECK_SEARCHING(c);
|
||||
lbool result = smt::implied_equalities(mk_c(c)->get_smt_kernel(), num_terms, to_exprs(terms), class_ids);
|
||||
lbool result = smt::implied_equalities(m, *to_solver_ref(s), num_terms, to_exprs(terms), class_ids);
|
||||
return static_cast<Z3_lbool>(result);
|
||||
Z3_CATCH_RETURN(Z3_L_UNDEF);
|
||||
}
|
||||
|
|
|
@ -7123,18 +7123,19 @@ END_MLAPI_EXCLUDE
|
|||
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.
|
||||
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.
|
||||
|
||||
\sa Z3_check_and_get_model
|
||||
\sa Z3_check
|
||||
|
||||
\deprecated Subsumed by Z3_solver API
|
||||
\deprecated To be moved outside of API.
|
||||
|
||||
def_API('Z3_get_implied_equalities', UINT, (_in(CONTEXT), _in(UINT), _in_array(1, AST), _out_array(1, UINT)))
|
||||
def_API('Z3_get_implied_equalities', UINT, (_in(CONTEXT), _in(SOLVER), _in(UINT), _in_array(2, AST), _out_array(2, UINT)))
|
||||
*/
|
||||
Z3_lbool Z3_API Z3_get_implied_equalities(
|
||||
__in Z3_context c,
|
||||
__in Z3_solver s,
|
||||
__in unsigned num_terms,
|
||||
__in_ecount(num_terms) Z3_ast const terms[],
|
||||
__out_ecount(num_terms) unsigned class_ids[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue