mirror of
https://github.com/Z3Prover/z3
synced 2025-05-08 00:05:46 +00:00
model-add/del
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
3de8c193ea
commit
caaf0ba33c
28 changed files with 271 additions and 251 deletions
|
@ -868,6 +868,9 @@ void cmd_context::insert(symbol const & s, object_ref * r) {
|
|||
void cmd_context::model_add(symbol const & s, unsigned arity, sort *const* domain, expr * t) {
|
||||
if (!m_mc0) m_mc0 = alloc(generic_model_converter, m());
|
||||
func_decl_ref fn(m().mk_func_decl(s, arity, domain, m().get_sort(t)), m());
|
||||
dictionary<func_decls>::entry * e = m_func_decls.insert_if_not_there2(s, func_decls());
|
||||
func_decls & fs = e->get_data().m_value;
|
||||
fs.insert(m(), fn);
|
||||
m_mc0->add(fn, t);
|
||||
}
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ protected:
|
|||
void erase_macro(symbol const& s);
|
||||
bool macros_find(symbol const& s, unsigned n, expr*const* args, expr*& t) const;
|
||||
|
||||
ref<generic_model_converter> m_mc0;
|
||||
generic_model_converter_ref m_mc0;
|
||||
|
||||
public:
|
||||
cmd_context(bool main_ctx = true, ast_manager * m = 0, symbol const & l = symbol::null);
|
||||
|
@ -324,6 +324,7 @@ public:
|
|||
void set_numeral_as_real(bool f) { m_numeral_as_real = f; }
|
||||
void set_interactive_mode(bool flag) { m_interactive_mode = flag; }
|
||||
void set_ignore_check(bool flag) { m_ignore_check = flag; }
|
||||
bool ignore_check() const { return m_ignore_check; }
|
||||
void set_exit_on_error(bool flag) { m_exit_on_error = flag; }
|
||||
bool exit_on_error() const { return m_exit_on_error; }
|
||||
bool interactive_mode() const { return m_interactive_mode; }
|
||||
|
|
|
@ -200,6 +200,8 @@ public:
|
|||
if (!m_tactic) {
|
||||
throw cmd_exception("check-sat-using needs a tactic argument");
|
||||
}
|
||||
if (ctx.ignore_check())
|
||||
return;
|
||||
params_ref p = ctx.params().merge_default_params(ps());
|
||||
tactic_ref tref = using_params(sexpr2tactic(ctx, m_tactic), p);
|
||||
tref->set_logic(ctx.get_logic());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue