@@ -320,10 +320,9 @@ void goto_symext::symex_threaded_step(
320320 }
321321}
322322
323- void goto_symext::symex_with_state (
323+ symbol_tablet goto_symext::symex_with_state (
324324 statet &state,
325- const get_goto_functiont &get_goto_function,
326- symbol_tablet &new_symbol_table)
325+ const get_goto_functiont &get_goto_function)
327326{
328327 // resets the namespace to only wrap a single symbol table, and does so upon
329328 // destruction of an object of this type; instantiating the type is thus all
@@ -360,28 +359,27 @@ void goto_symext::symex_with_state(
360359
361360 symex_threaded_step (state, get_goto_function);
362361 if (should_pause_symex)
363- return ;
362+ return state.symbol_table ;
363+
364364 while (!state.call_stack ().empty ())
365365 {
366366 state.has_saved_jump_target = false ;
367367 state.has_saved_next_instruction = false ;
368368 symex_threaded_step (state, get_goto_function);
369369 if (should_pause_symex)
370- return ;
370+ return state. symbol_table ;
371371 }
372372
373373 // Clients may need to construct a namespace with both the names in
374374 // the original goto-program and the names generated during symbolic
375375 // 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 ;
378377}
379378
380- void goto_symext::resume_symex_from_saved_state (
379+ symbol_tablet goto_symext::resume_symex_from_saved_state (
381380 const get_goto_functiont &get_goto_function,
382381 const statet &saved_state,
383- symex_target_equationt *const saved_equation,
384- symbol_tablet &new_symbol_table)
382+ symex_target_equationt *const saved_equation)
385383{
386384 // saved_state contains a pointer to a symex_target_equationt that is
387385 // almost certainly stale. This is because equations are owned by bmcts,
@@ -393,10 +391,7 @@ void goto_symext::resume_symex_from_saved_state(
393391
394392 // Do NOT do the same initialization that `symex_with_state` does for a
395393 // 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);
400395}
401396
402397std::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(
466461 return state;
467462}
468463
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)
472466{
473467 auto state = initialize_entry_point_state (get_goto_function);
474468
475- symex_with_state (*state, get_goto_function, new_symbol_table );
469+ return symex_with_state (*state, get_goto_function);
476470}
477471
478472void goto_symext::initialize_path_storage_from_entry_point_of (
0 commit comments