mirror of
https://github.com/Z3Prover/z3
synced 2025-06-23 06:13:40 +00:00
Added decide-callback to user-propagator (#5978)
* Fixed registering expressions in push/pop * Reused existing function * Reverted reusing can_propagate * Added decide-callback to user-propagator * Refactoring * Fixed index
This commit is contained in:
parent
9ecd4f8406
commit
e11496bc65
16 changed files with 284 additions and 87 deletions
|
@ -2,6 +2,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "ast/ast.h"
|
||||
#include "util/lbool.h"
|
||||
|
||||
namespace user_propagator {
|
||||
|
||||
|
@ -17,14 +18,14 @@ namespace user_propagator {
|
|||
virtual ~context_obj() = default;
|
||||
};
|
||||
|
||||
typedef std::function<void(void*, callback*)> final_eh_t;
|
||||
typedef std::function<void(void*, callback*, expr*, expr*)> fixed_eh_t;
|
||||
typedef std::function<void(void*, callback*, expr*, expr*)> eq_eh_t;
|
||||
typedef std::function<void*(void*, ast_manager&, context_obj*&)> fresh_eh_t;
|
||||
typedef std::function<void(void*, callback*)> push_eh_t;
|
||||
typedef std::function<void(void*, callback*, unsigned)> pop_eh_t;
|
||||
typedef std::function<void(void*, callback*, expr*)> created_eh_t;
|
||||
|
||||
typedef std::function<void(void*, callback*)> final_eh_t;
|
||||
typedef std::function<void(void*, callback*, expr*, expr*)> fixed_eh_t;
|
||||
typedef std::function<void(void*, callback*, expr*, expr*)> eq_eh_t;
|
||||
typedef std::function<void*(void*, ast_manager&, context_obj*&)> fresh_eh_t;
|
||||
typedef std::function<void(void*, callback*)> push_eh_t;
|
||||
typedef std::function<void(void*, callback*, unsigned)> pop_eh_t;
|
||||
typedef std::function<void(void*, callback*, expr*)> created_eh_t;
|
||||
typedef std::function<void(void*, callback*, expr*&, unsigned&, lbool&)> decide_eh_t;
|
||||
|
||||
class plugin : public decl_plugin {
|
||||
public:
|
||||
|
@ -85,6 +86,10 @@ namespace user_propagator {
|
|||
throw default_exception("user-propagators are only supported on the SMT solver");
|
||||
}
|
||||
|
||||
virtual void user_propagate_register_decide(decide_eh_t& r) {
|
||||
throw default_exception("user-propagators are only supported on the SMT solver");
|
||||
}
|
||||
|
||||
virtual void user_propagate_clear() {
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue