3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-27 16:38:45 +00:00
fixes to simplifier command front-end
This commit is contained in:
Nikolaj Bjorner 2023-01-31 09:32:34 -08:00
parent 238d604a10
commit 971b9d4081
6 changed files with 43 additions and 26 deletions

View file

@ -481,16 +481,11 @@ static tactic * mk_repeat(cmd_context & ctx, sexpr * n) {
return repeat(t, max);
}
static tactic * mk_using_params(cmd_context & ctx, sexpr * n) {
params_ref sexpr2params(cmd_context& ctx, sexpr * n, param_descrs const& descrs) {
SASSERT(n->is_composite());
unsigned num_children = n->get_num_children();
if (num_children < 2)
throw cmd_exception("invalid using-params combinator, at least one argument expected", n->get_line(), n->get_pos());
if (num_children == 2)
return sexpr2tactic(ctx, n->get_child(1));
tactic_ref t = sexpr2tactic(ctx, n->get_child(1));
param_descrs descrs;
t->collect_param_descrs(descrs);
params_ref p;
unsigned i = 2;
while (i < num_children) {
@ -535,6 +530,20 @@ static tactic * mk_using_params(cmd_context & ctx, sexpr * n) {
throw cmd_exception("invalid using-params combinator, unsupported parameter kind");
}
}
return p;
}
static tactic * mk_using_params(cmd_context & ctx, sexpr * n) {
SASSERT(n->is_composite());
unsigned num_children = n->get_num_children();
if (num_children < 2)
throw cmd_exception("invalid using-params combinator, at least one argument expected", n->get_line(), n->get_pos());
if (num_children == 2)
return sexpr2tactic(ctx, n->get_child(1));
tactic_ref t = sexpr2tactic(ctx, n->get_child(1));
param_descrs descrs;
t->collect_param_descrs(descrs);
params_ref p = sexpr2params(ctx, n, descrs);
return using_params(t.get(), p);
}