File tree 3 files changed +11
-9
lines changed
3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ class goto_symext
56
56
path_storaget &path_storage)
57
57
: should_pause_symex(false ),
58
58
options (options),
59
+ max_depth(options.get_unsigned_int_option(" depth" )),
60
+ doing_path_exploration(options.is_set(" paths" )),
59
61
total_vccs(0 ),
60
62
remaining_vccs(0 ),
61
63
constant_propagation(true ),
@@ -196,6 +198,9 @@ class goto_symext
196
198
197
199
const optionst &options;
198
200
201
+ const unsigned max_depth;
202
+ const bool doing_path_exploration;
203
+
199
204
public:
200
205
// these bypass the target maps
201
206
virtual void symex_step_goto (statet &, bool taken);
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ void goto_symext::symex_goto(statet &state)
111
111
(simpl_state_guard.is_true () ||
112
112
// or there is another block, but we're doing path exploration so
113
113
// we're going to skip over it for now and return to it later.
114
- options. get_bool_option ( " paths " ) ))
114
+ doing_path_exploration ))
115
115
{
116
116
DATA_INVARIANT (
117
117
instruction.targets .size () > 0 ,
@@ -178,7 +178,7 @@ void goto_symext::symex_goto(statet &state)
178
178
log .debug () << " Resuming from next instruction '"
179
179
<< state_pc->source_location << " '" << log .eom ;
180
180
}
181
- else if (options. get_bool_option ( " paths " ) )
181
+ else if (doing_path_exploration )
182
182
{
183
183
// We should save both the instruction after this goto, and the target of
184
184
// the goto.
Original file line number Diff line number Diff line change @@ -308,16 +308,13 @@ void goto_symext::symex_step(
308
308
309
309
const goto_programt::instructiont &instruction=*state.source .pc ;
310
310
311
- if (!options. get_bool_option ( " paths " ) )
311
+ if (!doing_path_exploration )
312
312
merge_gotos (state);
313
313
314
314
// depth exceeded?
315
- {
316
- unsigned max_depth=options.get_unsigned_int_option (" depth" );
317
- if (max_depth!=0 && state.depth >max_depth)
318
- state.guard .add (false_exprt ());
319
- state.depth ++;
320
- }
315
+ if (max_depth != 0 && state.depth > max_depth)
316
+ state.guard .add (false_exprt ());
317
+ state.depth ++;
321
318
322
319
// actually do instruction
323
320
switch (instruction.type )
You can’t perform that action at this time.
0 commit comments