@@ -431,50 +431,52 @@ exprt smt2_incremental_decision_proceduret::get(const exprt &expr) const
431
431
return {};
432
432
return smt_array_theoryt::select (*array, *index );
433
433
}
434
- return get_identifier (
435
- expr, expression_handle_identifiers, expression_identifiers);
436
- }();
437
- if (!descriptor)
438
- {
434
+ if (
435
+ auto identifier_descriptor = get_identifier (
436
+ expr, expression_handle_identifiers, expression_identifiers))
437
+ {
438
+ return identifier_descriptor;
439
+ }
439
440
if (gather_dependent_expressions (expr).empty ())
440
441
{
441
442
INVARIANT (
442
443
objects_are_already_tracked (expr, object_map),
443
444
" Objects in expressions being read should already be tracked from "
444
445
" point of being set/handled." );
445
- descriptor = ::convert_expr_to_smt (
446
+ return ::convert_expr_to_smt (
446
447
expr,
447
448
object_map,
448
449
pointer_sizes_map,
449
450
object_size_function.make_application ,
450
451
is_dynamic_object_function.make_application );
451
452
}
452
- else
453
+ return {};
454
+ }();
455
+ if (!descriptor)
456
+ {
457
+ if (const auto symbol_expr = expr_try_dynamic_cast<symbol_exprt>(expr))
453
458
{
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;
459
+ // Note this case is currently expected to be encountered during trace
460
+ // generation for -
461
+ // * Steps which were removed via --slice-formula.
462
+ // * Getting concurrency clock values.
463
+ // The below implementation which returns the given expression was chosen
464
+ // based on the implementation of `smt2_convt::get` in the non-incremental
465
+ // smt2 decision procedure.
466
+ log .warning ()
467
+ << " `get` attempted for unknown symbol, with identifier - \n "
468
+ << symbol_expr->get_identifier () << messaget::eom;
469
+ return expr;
470
+ }
471
+ exprt copy = expr;
472
+ for (auto &op : copy.operands ())
473
+ {
474
+ exprt eval_op = get (op);
475
+ if (eval_op.is_nil ())
476
+ return nil_exprt{};
477
+ op = std::move (eval_op);
477
478
}
479
+ return copy;
478
480
}
479
481
if (const auto array_type = type_try_dynamic_cast<array_typet>(expr.type ()))
480
482
{
0 commit comments