mirror of
https://github.com/Z3Prover/z3
synced 2025-05-03 22:05:45 +00:00
Propagator (#5845)
* user propagator without ids Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * user propagator without ids Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * fix signature Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * references #5818 Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * fix c++ build Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * switch to vs 2022 Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * switch 2022 Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * Update propagator example (I) (#5835) * fix #5829 * na Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * switch to vs 2022 Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * Adapted the example to the changes in the propagator Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com> * context goes out of scope in stack allocation, so can't used scoped context when passing objects around * parameter check Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * add rewriter Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * Fixed bug in user-propagator "created" (#5843) Co-authored-by: Clemens Eisenhofer <56730610+CEisenhofer@users.noreply.github.com>
This commit is contained in:
parent
2e15e2aa4d
commit
2e00f2f32d
22 changed files with 261 additions and 328 deletions
|
@ -1433,10 +1433,10 @@ Z3_DECLARE_CLOSURE(Z3_error_handler, void, (Z3_context c, Z3_error_code e));
|
|||
Z3_DECLARE_CLOSURE(Z3_push_eh, void, (void* ctx));
|
||||
Z3_DECLARE_CLOSURE(Z3_pop_eh, void, (void* ctx, unsigned num_scopes));
|
||||
Z3_DECLARE_CLOSURE(Z3_fresh_eh, void*, (void* ctx, Z3_context new_context));
|
||||
Z3_DECLARE_CLOSURE(Z3_fixed_eh, void, (void* ctx, Z3_solver_callback cb, unsigned id, Z3_ast value));
|
||||
Z3_DECLARE_CLOSURE(Z3_eq_eh, void, (void* ctx, Z3_solver_callback cb, unsigned x, unsigned y));
|
||||
Z3_DECLARE_CLOSURE(Z3_fixed_eh, void, (void* ctx, Z3_solver_callback cb, Z3_ast t, Z3_ast value));
|
||||
Z3_DECLARE_CLOSURE(Z3_eq_eh, void, (void* ctx, Z3_solver_callback cb, Z3_ast s, Z3_ast t));
|
||||
Z3_DECLARE_CLOSURE(Z3_final_eh, void, (void* ctx, Z3_solver_callback cb));
|
||||
Z3_DECLARE_CLOSURE(Z3_created_eh, void, (void* ctx, Z3_solver_callback cb, Z3_ast e, unsigned id));
|
||||
Z3_DECLARE_CLOSURE(Z3_created_eh, void, (void* ctx, Z3_solver_callback cb, Z3_ast t));
|
||||
|
||||
|
||||
/**
|
||||
|
@ -6761,10 +6761,10 @@ extern "C" {
|
|||
\brief register an expression to propagate on with the solver.
|
||||
Only expressions of type Bool and type Bit-Vector can be registered for propagation.
|
||||
|
||||
def_API('Z3_solver_propagate_register', UINT, (_in(CONTEXT), _in(SOLVER), _in(AST)))
|
||||
def_API('Z3_solver_propagate_register', VOID, (_in(CONTEXT), _in(SOLVER), _in(AST)))
|
||||
*/
|
||||
|
||||
unsigned Z3_API Z3_solver_propagate_register(Z3_context c, Z3_solver s, Z3_ast e);
|
||||
void Z3_API Z3_solver_propagate_register(Z3_context c, Z3_solver s, Z3_ast e);
|
||||
|
||||
/**
|
||||
\brief register an expression to propagate on with the solver.
|
||||
|
@ -6772,9 +6772,9 @@ extern "C" {
|
|||
Unlike \ref Z3_solver_propagate_register, this function takes a solver callback context
|
||||
as argument. It can be invoked during a callback to register new expressions.
|
||||
|
||||
def_API('Z3_solver_propagate_register_cb', UINT, (_in(CONTEXT), _in(SOLVER_CALLBACK), _in(AST)))
|
||||
def_API('Z3_solver_propagate_register_cb', VOID, (_in(CONTEXT), _in(SOLVER_CALLBACK), _in(AST)))
|
||||
*/
|
||||
unsigned Z3_API Z3_solver_propagate_register_cb(Z3_context c, Z3_solver_callback cb, Z3_ast e);
|
||||
void Z3_API Z3_solver_propagate_register_cb(Z3_context c, Z3_solver_callback cb, Z3_ast e);
|
||||
|
||||
/**
|
||||
\brief propagate a consequence based on fixed values.
|
||||
|
@ -6782,10 +6782,10 @@ extern "C" {
|
|||
The callback adds a propagation consequence based on the fixed values of the
|
||||
\c ids.
|
||||
|
||||
def_API('Z3_solver_propagate_consequence', VOID, (_in(CONTEXT), _in(SOLVER_CALLBACK), _in(UINT), _in_array(2, UINT), _in(UINT), _in_array(4, UINT), _in_array(4, UINT), _in(AST)))
|
||||
def_API('Z3_solver_propagate_consequence', VOID, (_in(CONTEXT), _in(SOLVER_CALLBACK), _in(UINT), _in_array(2, AST), _in(UINT), _in_array(4, AST), _in_array(4, AST), _in(AST)))
|
||||
*/
|
||||
|
||||
void Z3_API Z3_solver_propagate_consequence(Z3_context c, Z3_solver_callback, unsigned num_fixed, unsigned const* fixed_ids, unsigned num_eqs, unsigned const* eq_lhs, unsigned const* eq_rhs, Z3_ast conseq);
|
||||
void Z3_API Z3_solver_propagate_consequence(Z3_context c, Z3_solver_callback, unsigned num_fixed, Z3_ast const* fixed, unsigned num_eqs, Z3_ast const* eq_lhs, Z3_ast const* eq_rhs, Z3_ast conseq);
|
||||
|
||||
/**
|
||||
\brief Check whether the assertions in a given solver are consistent or not.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue