mirror of
https://github.com/Z3Prover/z3
synced 2025-08-14 14:55:25 +00:00
fix #7647 - with respect to scope level
This commit is contained in:
parent
3fac441f3d
commit
b0c8a5cf21
1 changed files with 5 additions and 2 deletions
|
@ -156,9 +156,12 @@ public:
|
||||||
auto simplifier_factory = sexpr2simplifier(ctx, m_simplifier);
|
auto simplifier_factory = sexpr2simplifier(ctx, m_simplifier);
|
||||||
ctx.init_manager();
|
ctx.init_manager();
|
||||||
auto* s = ctx.get_solver();
|
auto* s = ctx.get_solver();
|
||||||
|
if (!s)
|
||||||
|
return;
|
||||||
if (s->get_num_assertions() > 0)
|
if (s->get_num_assertions() > 0)
|
||||||
throw cmd_exception("set-simplifier cannot be invoked if there are already assertions");
|
throw cmd_exception("set-simplifier cannot be invoked if there are already assertions");
|
||||||
if (s)
|
if (s->get_scope_level() > 0)
|
||||||
|
throw cmd_exception("set-simplifier cannot be invoked above base scope level");
|
||||||
ctx.set_solver(mk_simplifier_solver(s, &simplifier_factory));
|
ctx.set_solver(mk_simplifier_solver(s, &simplifier_factory));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue