File tree Expand file tree Collapse file tree 2 files changed +17
-15
lines changed Expand file tree Collapse file tree 2 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -281,15 +281,15 @@ bool path_searcht::drop_state(const statet &state)
281
281
}
282
282
283
283
// depth limit
284
- if (depth_limit>= 0 && state.get_depth ()>depth_limit)
284
+ if (state.get_depth ()>= depth_limit)
285
285
return true ;
286
286
287
287
// context bound
288
- if (context_bound>= 0 && state.get_no_thread_interleavings ()>context_bound)
288
+ if (state.get_no_thread_interleavings ()>= context_bound)
289
289
return true ;
290
290
291
291
// branch bound
292
- if (branch_bound>= 0 && state.get_no_branches ()>branch_bound)
292
+ if (state.get_no_branches ()>= branch_bound)
293
293
return true ;
294
294
295
295
// unwinding limit -- loops
@@ -298,7 +298,7 @@ bool path_searcht::drop_state(const statet &state)
298
298
bool stop=false ;
299
299
300
300
for (const auto &loop_info : state.unwinding_map )
301
- if (loop_info.second >unwind_limit)
301
+ if (loop_info.second >= unwind_limit)
302
302
{
303
303
stop=true ;
304
304
break ;
@@ -324,7 +324,7 @@ bool path_searcht::drop_state(const statet &state)
324
324
bool stop=false ;
325
325
326
326
for (const auto &rec_info : state.recursion_map )
327
- if (rec_info.second >unwind_limit)
327
+ if (rec_info.second >= unwind_limit)
328
328
{
329
329
stop=true ;
330
330
break ;
Original file line number Diff line number Diff line change 19
19
20
20
#include < path-symex/path_symex_state.h>
21
21
22
+ #include < limits>
23
+
22
24
class path_searcht :public safety_checkert
23
25
{
24
26
public:
25
27
explicit path_searcht (const namespacet &_ns):
26
28
safety_checkert(_ns),
27
29
show_vcc(false ),
28
30
eager_infeasibility(false ),
29
- depth_limit(- 1 ), // no limit
30
- context_bound(- 1 ),
31
- branch_bound(- 1 ),
32
- unwind_limit(- 1 ),
33
- time_limit(- 1 ),
31
+ depth_limit(std::numeric_limits< unsigned >::max()),
32
+ context_bound(std::numeric_limits< unsigned >::max() ),
33
+ branch_bound(std::numeric_limits< unsigned >::max() ),
34
+ unwind_limit(std::numeric_limits< unsigned >::max() ),
35
+ time_limit(std::numeric_limits< unsigned >::max() ),
34
36
search_heuristic(search_heuristict::DFS)
35
37
{
36
38
}
@@ -132,11 +134,11 @@ class path_searcht:public safety_checkert
132
134
void initialize_property_map (
133
135
const goto_functionst &goto_functions);
134
136
135
- int depth_limit;
136
- int context_bound;
137
- int branch_bound;
138
- int unwind_limit;
139
- int time_limit;
137
+ unsigned depth_limit;
138
+ unsigned context_bound;
139
+ unsigned branch_bound;
140
+ unsigned unwind_limit;
141
+ unsigned time_limit;
140
142
141
143
enum class search_heuristict { DFS, BFS, LOCS } search_heuristic;
142
144
You can’t perform that action at this time.
0 commit comments