3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-24 01:01:19 +00:00

Refactor find_tactic_cmd to use std::optional<tactic_cmd*> (#8331)

* Initial plan

* Refactor find_tactic_cmd to use std::optional<tactic_cmd*>

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
Copilot 2026-01-25 12:38:34 -08:00 committed by Nikolaj Bjorner
parent 46af26e72c
commit e30c3b3656
4 changed files with 15 additions and 13 deletions

View file

@ -654,9 +654,9 @@ static tactic * mk_skip_if_failed(cmd_context & ctx, sexpr * n) {
tactic * sexpr2tactic(cmd_context & ctx, sexpr * n) {
if (n->is_symbol()) {
tactic_cmd * cmd = ctx.find_tactic_cmd(n->get_symbol());
if (cmd != nullptr)
return cmd->mk(ctx.m());
auto cmd = ctx.find_tactic_cmd(n->get_symbol());
if (cmd)
return (*cmd)->mk(ctx.m());
sexpr * decl = ctx.find_user_tactic(n->get_symbol());
if (decl != nullptr)
return sexpr2tactic(ctx, decl);