File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ class goto_symext
5656 path_storaget &path_storage)
5757 : should_pause_symex(false ),
5858 options (options),
59+ max_depth(options.get_unsigned_int_option(" depth" )),
60+ doing_path_exploration(options.is_set(" paths" )),
5961 total_vccs(0 ),
6062 remaining_vccs(0 ),
6163 constant_propagation(true ),
@@ -196,6 +198,9 @@ class goto_symext
196198
197199 const optionst &options;
198200
201+ const unsigned max_depth;
202+ const bool doing_path_exploration;
203+
199204public:
200205 // these bypass the target maps
201206 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)
111111 (simpl_state_guard.is_true () ||
112112 // or there is another block, but we're doing path exploration so
113113 // we're going to skip over it for now and return to it later.
114- options. get_bool_option ( " paths " ) ))
114+ doing_path_exploration ))
115115 {
116116 DATA_INVARIANT (
117117 instruction.targets .size () > 0 ,
@@ -178,7 +178,7 @@ void goto_symext::symex_goto(statet &state)
178178 log.debug () << " Resuming from next instruction '"
179179 << state_pc->source_location << " '" << log.eom ;
180180 }
181- else if (options. get_bool_option ( " paths " ) )
181+ else if (doing_path_exploration )
182182 {
183183 // We should save both the instruction after this goto, and the target of
184184 // the goto.
Original file line number Diff line number Diff line change @@ -308,16 +308,13 @@ void goto_symext::symex_step(
308308
309309 const goto_programt::instructiont &instruction=*state.source .pc ;
310310
311- if (!options. get_bool_option ( " paths " ) )
311+ if (!doing_path_exploration )
312312 merge_gotos (state);
313313
314314 // 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 ++;
321318
322319 // actually do instruction
323320 switch (instruction.type )
You can’t perform that action at this time.
0 commit comments