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 ),
@@ -197,6 +199,9 @@ class goto_symext
197
199
198
200
const optionst &options;
199
201
202
+ const unsigned max_depth;
203
+ const bool doing_path_exploration;
204
+
200
205
public:
201
206
// these bypass the target maps
202
207
virtual void symex_step_goto (statet &, bool taken);
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ void goto_symext::symex_goto(statet &state)
114
114
(simpl_state_guard.is_true () ||
115
115
// or there is another block, but we're doing path exploration so
116
116
// we're going to skip over it for now and return to it later.
117
- options. get_bool_option ( " paths " ) ))
117
+ doing_path_exploration ))
118
118
{
119
119
DATA_INVARIANT (
120
120
instruction.targets .size () > 0 ,
@@ -181,7 +181,7 @@ void goto_symext::symex_goto(statet &state)
181
181
log .debug () << " Resuming from next instruction '"
182
182
<< state_pc->source_location << " '" << log .eom ;
183
183
}
184
- else if (options. get_bool_option ( " paths " ) )
184
+ else if (doing_path_exploration )
185
185
{
186
186
// We should save both the instruction after this goto, and the target of
187
187
// 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