From 1e7a9e3e61c3cc2dbb8fea6744ee369ea0dbdc4b Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Sun, 8 May 2022 12:03:13 -0700 Subject: [PATCH] fix #6023 --- src/cmd_context/parametric_cmd.h | 1 + src/opt/opt_cmds.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/cmd_context/parametric_cmd.h b/src/cmd_context/parametric_cmd.h index fa90e7d33..c5f715eb6 100644 --- a/src/cmd_context/parametric_cmd.h +++ b/src/cmd_context/parametric_cmd.h @@ -34,6 +34,7 @@ public: virtual void init_pdescrs(cmd_context & ctx, param_descrs & d) = 0; param_descrs const & pdescrs(cmd_context & ctx) const; params_ref const & ps() const { return m_params; } + void reset_params() { m_params.reset(); } virtual char const * get_main_descr() const = 0; char const * get_descr(cmd_context & ctx) const override; unsigned get_arity() const override { return VAR_ARITY; } diff --git a/src/opt/opt_cmds.cpp b/src/opt/opt_cmds.cpp index f01df0bdd..41f7bedb3 100644 --- a/src/opt/opt_cmds.cpp +++ b/src/opt/opt_cmds.cpp @@ -105,6 +105,7 @@ public: get_opt(ctx, m_opt).add_soft_constraint(m_formula, weight, id); ctx.print_success(); reset(ctx); + reset_params(); } void finalize(cmd_context & ctx) override {