File tree 3 files changed +37
-2
lines changed
3 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 9
9
#include < limits>
10
10
11
11
#include < util/source_location.h>
12
+ #include < util/simplify_expr.h>
12
13
13
14
#include " symex_bmc.h"
14
15
@@ -65,6 +66,21 @@ void symex_bmct::symex_step(
65
66
66
67
const goto_programt::const_targett cur_pc=state.source .pc ;
67
68
69
+ if (!state.guard .is_false () &&
70
+ state.source .pc ->is_assume () &&
71
+ simplify_expr (state.source .pc ->guard , ns).is_false ())
72
+ {
73
+ statistics () << " aborting path on assume(false) at "
74
+ << state.source .pc ->source_location
75
+ << " thread " << state.source .thread_nr ;
76
+
77
+ const irep_idt &c=state.source .pc ->source_location .get_comment ();
78
+ if (!c.empty ())
79
+ statistics () << " : " << c;
80
+
81
+ statistics () << eom;
82
+ }
83
+
68
84
goto_symext::symex_step (goto_functions, state);
69
85
70
86
if (record_coverage &&
Original file line number Diff line number Diff line change 6
6
7
7
\*******************************************************************/
8
8
9
+ #include < util/simplify_expr.h>
9
10
#include < util/time_stopping.h>
10
11
11
12
#include < solvers/flattening/bv_pointers.h>
@@ -315,8 +316,10 @@ Function: path_searcht::drop_state
315
316
316
317
\*******************************************************************/
317
318
318
- bool path_searcht::drop_state (const statet &state) const
319
+ bool path_searcht::drop_state (const statet &state)
319
320
{
321
+ goto_programt::const_targett pc=state.get_instruction ();
322
+
320
323
// depth limit
321
324
if (depth_limit_set && state.get_depth ()>depth_limit)
322
325
return true ;
@@ -345,6 +348,22 @@ bool path_searcht::drop_state(const statet &state) const
345
348
return true ;
346
349
}
347
350
351
+ if (pc->is_assume () &&
352
+ simplify_expr (pc->guard , ns).is_false ())
353
+ {
354
+ debug () << " aborting path on assume(false) at "
355
+ << pc->source_location
356
+ << " thread " << state.get_current_thread ();
357
+
358
+ const irep_idt &c=pc->source_location .get_comment ();
359
+ if (!c.empty ())
360
+ debug () << " : " << c;
361
+
362
+ debug () << eom;
363
+
364
+ return true ;
365
+ }
366
+
348
367
return false ;
349
368
}
350
369
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ class path_searcht:public safety_checkert
120
120
bool is_feasible (statet &state);
121
121
void do_show_vcc (statet &state);
122
122
123
- bool drop_state (const statet &state) const ;
123
+ bool drop_state (const statet &state);
124
124
125
125
void report_statistics ();
126
126
You can’t perform that action at this time.
0 commit comments