mirror of
https://github.com/Z3Prover/z3
synced 2025-08-14 23:05:26 +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,10 +156,13 @@ public:
|
|||
auto simplifier_factory = sexpr2simplifier(ctx, m_simplifier);
|
||||
ctx.init_manager();
|
||||
auto* s = ctx.get_solver();
|
||||
if (!s)
|
||||
return;
|
||||
if (s->get_num_assertions() > 0)
|
||||
throw cmd_exception("set-simplifier cannot be invoked if there are already assertions");
|
||||
if (s)
|
||||
ctx.set_solver(mk_simplifier_solver(s, &simplifier_factory));
|
||||
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));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue