@@ -451,20 +451,29 @@ exprt smt2_incremental_decision_proceduret::get(const exprt &expr) const
451451 }
452452 else
453453 {
454- const auto symbol_expr = expr_try_dynamic_cast<symbol_exprt>(expr);
455- INVARIANT (
456- symbol_expr, " Unhandled expressions are expected to be symbols" );
457- // Note this case is currently expected to be encountered during trace
458- // generation for -
459- // * Steps which were removed via --slice-formula.
460- // * Getting concurrency clock values.
461- // The below implementation which returns the given expression was chosen
462- // based on the implementation of `smt2_convt::get` in the non-incremental
463- // smt2 decision procedure.
464- log.warning ()
465- << " `get` attempted for unknown symbol, with identifier - \n "
466- << symbol_expr->get_identifier () << messaget::eom;
467- return expr;
454+ if (const auto symbol_expr = expr_try_dynamic_cast<symbol_exprt>(expr))
455+ {
456+ // Note this case is currently expected to be encountered during trace
457+ // generation for -
458+ // * Steps which were removed via --slice-formula.
459+ // * Getting concurrency clock values.
460+ // The below implementation which returns the given expression was chosen
461+ // based on the implementation of `smt2_convt::get` in the non-incremental
462+ // smt2 decision procedure.
463+ log.warning ()
464+ << " `get` attempted for unknown symbol, with identifier - \n "
465+ << symbol_expr->get_identifier () << messaget::eom;
466+ return expr;
467+ }
468+ exprt copy = expr;
469+ for (auto &op : copy.operands ())
470+ {
471+ exprt eval_op = get (op);
472+ if (eval_op.is_nil ())
473+ return nil_exprt{};
474+ op = std::move (eval_op);
475+ }
476+ return copy;
468477 }
469478 }
470479 if (const auto array_type = type_try_dynamic_cast<array_typet>(expr.type ()))
0 commit comments