File tree 3 files changed +4
-34
lines changed
unit/solvers/smt2_incremental
3 files changed +4
-34
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,7 @@ void build_goto_trace(
220
220
time_mapt time_map;
221
221
222
222
mp_integer current_time=0 ;
223
+ bool has_threads = target.has_threads ();
223
224
224
225
ssa_step_iteratort last_step_to_keep = target.SSA_steps .end ();
225
226
bool last_step_was_kept = false ;
@@ -258,6 +259,9 @@ void build_goto_trace(
258
259
else if (it->is_shared_read () || it->is_shared_write () ||
259
260
it->is_atomic_end ())
260
261
{
262
+ if (!has_threads)
263
+ continue ;
264
+
261
265
mp_integer time_before=current_time;
262
266
263
267
if (it->is_shared_read () || it->is_shared_write ())
Original file line number Diff line number Diff line change @@ -477,20 +477,6 @@ exprt smt2_incremental_decision_proceduret::get(const exprt &expr) const
477
477
}();
478
478
if (!descriptor)
479
479
{
480
- if (const auto symbol_expr = expr_try_dynamic_cast<symbol_exprt>(expr))
481
- {
482
- // Note this case is currently expected to be encountered during trace
483
- // generation for -
484
- // * Steps which were removed via --slice-formula.
485
- // * Getting concurrency clock values.
486
- // The below implementation which returns the given expression was chosen
487
- // based on the implementation of `smt2_convt::get` in the non-incremental
488
- // smt2 decision procedure.
489
- log .warning ()
490
- << " `get` attempted for unknown symbol, with identifier - \n "
491
- << symbol_expr->get_identifier () << messaget::eom;
492
- return expr;
493
- }
494
480
return build_expr_based_on_getting_operands (expr, *this );
495
481
}
496
482
if (const auto array_type = type_try_dynamic_cast<array_typet>(expr.type ()))
Original file line number Diff line number Diff line change @@ -505,26 +505,6 @@ TEST_CASE(
505
505
test.sent_commands ==
506
506
std::vector<smt_commandt>{smt_get_value_commandt{foo_term}});
507
507
}
508
- SECTION (" Get value of non-set symbol" )
509
- {
510
- // smt2_incremental_decision_proceduret is used this way when cbmc is
511
- // invoked with the combination of `--trace` and `--slice-formula`.
512
- test.sent_commands .clear ();
513
- const exprt bar =
514
- make_test_symbol (" bar" , signedbv_typet{16 }).symbol_expr ();
515
- REQUIRE (test.procedure .get (bar) == bar);
516
- REQUIRE (test.sent_commands .empty ());
517
- }
518
- SECTION (" Get value of type less symbol back" )
519
- {
520
- // smt2_incremental_decision_proceduret is used this way as part of
521
- // building the goto trace, to get the partial order concurrency clock
522
- // values.
523
- test.sent_commands .clear ();
524
- const symbol_exprt baz = symbol_exprt::typeless (" baz" );
525
- REQUIRE (test.procedure .get (baz) == baz);
526
- REQUIRE (test.sent_commands .empty ());
527
- }
528
508
SECTION (" Get value of trivially solved expression" )
529
509
{
530
510
test.sent_commands .clear ();
You can’t perform that action at this time.
0 commit comments