@@ -320,10 +320,9 @@ void goto_symext::symex_threaded_step(
320
320
}
321
321
}
322
322
323
- void goto_symext::symex_with_state (
323
+ symbol_tablet goto_symext::symex_with_state (
324
324
statet &state,
325
- const get_goto_functiont &get_goto_function,
326
- symbol_tablet &new_symbol_table)
325
+ const get_goto_functiont &get_goto_function)
327
326
{
328
327
// resets the namespace to only wrap a single symbol table, and does so upon
329
328
// destruction of an object of this type; instantiating the type is thus all
@@ -360,28 +359,27 @@ void goto_symext::symex_with_state(
360
359
361
360
symex_threaded_step (state, get_goto_function);
362
361
if (should_pause_symex)
363
- return ;
362
+ return state.symbol_table ;
363
+
364
364
while (!state.call_stack ().empty ())
365
365
{
366
366
state.has_saved_jump_target = false ;
367
367
state.has_saved_next_instruction = false ;
368
368
symex_threaded_step (state, get_goto_function);
369
369
if (should_pause_symex)
370
- return ;
370
+ return state. symbol_table ;
371
371
}
372
372
373
373
// Clients may need to construct a namespace with both the names in
374
374
// the original goto-program and the names generated during symbolic
375
375
// execution, so return the names generated through symbolic execution
376
- // through `new_symbol_table`.
377
- new_symbol_table = state.symbol_table ;
376
+ return state.symbol_table ;
378
377
}
379
378
380
- void goto_symext::resume_symex_from_saved_state (
379
+ symbol_tablet goto_symext::resume_symex_from_saved_state (
381
380
const get_goto_functiont &get_goto_function,
382
381
const statet &saved_state,
383
- symex_target_equationt *const saved_equation,
384
- symbol_tablet &new_symbol_table)
382
+ symex_target_equationt *const saved_equation)
385
383
{
386
384
// saved_state contains a pointer to a symex_target_equationt that is
387
385
// almost certainly stale. This is because equations are owned by bmcts,
@@ -393,10 +391,7 @@ void goto_symext::resume_symex_from_saved_state(
393
391
394
392
// Do NOT do the same initialization that `symex_with_state` does for a
395
393
// fresh state, as that would clobber the saved state's program counter
396
- symex_with_state (
397
- state,
398
- get_goto_function,
399
- new_symbol_table);
394
+ return symex_with_state (state, get_goto_function);
400
395
}
401
396
402
397
std::unique_ptr<goto_symext::statet> goto_symext::initialize_entry_point_state (
@@ -466,13 +461,12 @@ std::unique_ptr<goto_symext::statet> goto_symext::initialize_entry_point_state(
466
461
return state;
467
462
}
468
463
469
- void goto_symext::symex_from_entry_point_of (
470
- const get_goto_functiont &get_goto_function,
471
- symbol_tablet &new_symbol_table)
464
+ symbol_tablet goto_symext::symex_from_entry_point_of (
465
+ const get_goto_functiont &get_goto_function)
472
466
{
473
467
auto state = initialize_entry_point_state (get_goto_function);
474
468
475
- symex_with_state (*state, get_goto_function, new_symbol_table );
469
+ return symex_with_state (*state, get_goto_function);
476
470
}
477
471
478
472
void goto_symext::initialize_path_storage_from_entry_point_of (
0 commit comments