@@ -219,8 +219,8 @@ class goto_symext
219
219
220
220
// / \brief Called for each step in the symbolic execution
221
221
// / This calls \ref print_symex_step to print symex's current instruction if
222
- // / required, then \ref execute_instruction to execute the actual instruction
223
- // / body.
222
+ // / required, then \ref execute_next_instruction to execute the actual
223
+ // / instruction body.
224
224
// / \param get_goto_function: The delegate to retrieve function bodies (see
225
225
// / \ref get_goto_functiont)
226
226
// / \param state: Symbolic execution state for current instruction
@@ -239,6 +239,11 @@ class goto_symext
239
239
const get_goto_functiont &get_goto_function,
240
240
statet &state);
241
241
242
+ // / Kills any variables in \ref instruction_local_symbols (these are currently
243
+ // / always let-bound variables defined in the course of executing the current
244
+ // / instruction), then clears \ref instruction_local_symbols.
245
+ void kill_instruction_local_symbols (statet &state);
246
+
242
247
// / Prints the route of symex as it walks through the code. Used for
243
248
// / debugging.
244
249
void print_symex_step (statet &state);
@@ -281,6 +286,11 @@ class goto_symext
281
286
// / instruction
282
287
unsigned atomic_section_counter;
283
288
289
+ // / Variables that should be killed at the end of the current symex_step
290
+ // / invocation. Currently this is used for let-bound variables executed during
291
+ // / symex, whose lifetime is at most one instruction long.
292
+ std::vector<symbol_exprt> instruction_local_symbols;
293
+
284
294
// / The messaget to write log messages to
285
295
mutable messaget log;
286
296
@@ -531,8 +541,8 @@ class goto_symext
531
541
532
542
// / Execute a single let expression, which should not have any nested let
533
543
// / expressions (use \ref lift_lets instead if there might be).
534
- // / The caller is responsible for killing the newly-defined variable when
535
- // / appropriate .
544
+ // / Records the newly-defined variable in \ref instruction_local_symbols,
545
+ // / meaning it will be killed when \ref symex_step concludes .
536
546
void lift_let (statet &state, const let_exprt &let_expr);
537
547
538
548
void symex_assign_rec (
0 commit comments