Skip to content

Commit

Permalink
fix issue with set-logic for eval_smtlib2_string
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Jul 13, 2022
1 parent 1378e71 commit dec87fe
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/cmd_context/cmd_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -824,15 +824,16 @@ bool cmd_context::set_logic(symbol const & s) {
TRACE("cmd_context", tout << s << "\n";);
if (has_logic())
throw cmd_exception("the logic has already been set");
if (has_manager() && m_main_ctx)
if (has_assertions() && m_main_ctx)
throw cmd_exception("logic must be set before initialization");
if (!smt_logics::supported_logic(s)) {
if (!smt_logics::supported_logic(s))
return false;
}

m_logic = s;
if (smt_logics::logic_has_reals_only(s)) {
if (m_solver)
mk_solver();
if (smt_logics::logic_has_reals_only(s))
m_numeral_as_real = true;
}
return true;
}

Expand Down

0 comments on commit dec87fe

Please sign in to comment.