23
23
#include < goto-programs/goto_trace.h>
24
24
25
25
#include < goto-symex/symex_target_equation.h>
26
+ #include < goto-symex/path_storage.h>
27
+
26
28
#include < goto-programs/goto_model.h>
27
29
#include < goto-programs/safety_checker.h>
28
30
#include < goto-symex/memory_model.h>
@@ -49,32 +51,32 @@ class bmct:public safety_checkert
49
51
// / constructor is `false` (unset), an instance of this class will
50
52
// / symbolically execute the entire program, performing path merging
51
53
// / to build a formula corresponding to all executions of the program
52
- // / up to the unwinding limit. In this case, the `branch_worklist `
54
+ // / up to the unwinding limit. In this case, the `path_storage `
53
55
// / member shall not be touched; this is enforced by the assertion in
54
56
// / this class' implementation of bmct::perform_symbolic_execution().
55
57
// /
56
58
// / - If the `--paths` flag is `true`, this `bmct` object will explore a
57
59
// / single path through the codebase without doing any path merging.
58
60
// / If some paths were not taken, the state at those branch points
59
- // / will be appended to `branch_worklist `. After the single path that
61
+ // / will be appended to `path_storage `. After the single path that
60
62
// / this `bmct` object executed has been model-checked, you can resume
61
63
// / exploring further paths by popping an element from
62
- // / `branch_worklist ` and using it to construct a path_explorert
64
+ // / `path_storage ` and using it to construct a path_explorert
63
65
// / object.
64
66
bmct (
65
67
const optionst &_options,
66
68
const symbol_tablet &outer_symbol_table,
67
69
message_handlert &_message_handler,
68
70
prop_convt &_prop_conv,
69
- goto_symext::branch_worklistt &_branch_worklist ,
71
+ path_storaget &_path_storage ,
70
72
std::function<bool (void )> callback_after_symex)
71
73
: safety_checkert(ns, _message_handler),
72
74
options (_options),
73
75
outer_symbol_table(outer_symbol_table),
74
76
ns(outer_symbol_table, symex_symbol_table),
75
77
equation(),
76
- branch_worklist(_branch_worklist ),
77
- symex(_message_handler, outer_symbol_table, equation, branch_worklist ),
78
+ path_storage(_path_storage ),
79
+ symex(_message_handler, outer_symbol_table, equation, path_storage ),
78
80
prop_conv(_prop_conv),
79
81
ui(ui_message_handlert::uit::PLAIN),
80
82
driver_callback_after_symex(callback_after_symex)
@@ -115,6 +117,7 @@ class bmct:public safety_checkert
115
117
}
116
118
117
119
static int do_language_agnostic_bmc (
120
+ const path_strategy_choosert &path_strategy_chooser,
118
121
const optionst &opts,
119
122
abstract_goto_modelt &goto_model,
120
123
const ui_message_handlert::uit &ui,
@@ -128,7 +131,7 @@ class bmct:public safety_checkert
128
131
// /
129
132
// / This constructor exists as a delegate for the path_explorert class.
130
133
// / It differs from \ref bmct's public constructor in that it actually
131
- // / does something with the branch_worklistt argument, and also takes a
134
+ // / does something with the path_storaget argument, and also takes a
132
135
// / symex_target_equationt. See the documentation for path_explorert for
133
136
// / details.
134
137
bmct (
@@ -137,15 +140,15 @@ class bmct:public safety_checkert
137
140
message_handlert &_message_handler,
138
141
prop_convt &_prop_conv,
139
142
symex_target_equationt &_equation,
140
- goto_symext::branch_worklistt &_branch_worklist ,
143
+ path_storaget &_path_storage ,
141
144
std::function<bool (void )> callback_after_symex)
142
145
: safety_checkert(ns, _message_handler),
143
146
options (_options),
144
147
outer_symbol_table(outer_symbol_table),
145
148
ns(outer_symbol_table),
146
149
equation(_equation),
147
- branch_worklist(_branch_worklist ),
148
- symex(_message_handler, outer_symbol_table, equation, branch_worklist ),
150
+ path_storage(_path_storage ),
151
+ symex(_message_handler, outer_symbol_table, equation, path_storage ),
149
152
prop_conv(_prop_conv),
150
153
ui(ui_message_handlert::uit::PLAIN),
151
154
driver_callback_after_symex(callback_after_symex)
@@ -166,7 +169,7 @@ class bmct:public safety_checkert
166
169
symbol_tablet symex_symbol_table;
167
170
namespacet ns;
168
171
symex_target_equationt equation;
169
- goto_symext::branch_worklistt &branch_worklist ;
172
+ path_storaget &path_storage ;
170
173
symex_bmct symex;
171
174
prop_convt &prop_conv;
172
175
std::unique_ptr<memory_model_baset> memory_model;
@@ -257,15 +260,15 @@ class path_explorert : public bmct
257
260
prop_convt &_prop_conv,
258
261
symex_target_equationt &saved_equation,
259
262
const goto_symex_statet &saved_state,
260
- goto_symext::branch_worklistt &branch_worklist ,
263
+ path_storaget &path_storage ,
261
264
std::function<bool (void )> callback_after_symex)
262
265
: bmct(
263
266
_options,
264
267
outer_symbol_table,
265
268
_message_handler,
266
269
_prop_conv,
267
270
saved_equation,
268
- branch_worklist ,
271
+ path_storage ,
269
272
callback_after_symex),
270
273
saved_state (saved_state)
271
274
{
@@ -292,15 +295,17 @@ class path_explorert : public bmct
292
295
" (no-unwinding-assertions)" \
293
296
" (no-pretty-names)" \
294
297
" (partial-loops)" \
295
- " (paths)" \
298
+ " (paths):" \
299
+ " (show-symex-strategies)" \
296
300
" (depth):" \
297
301
" (unwind):" \
298
302
" (unwindset):" \
299
303
" (graphml-witness):" \
300
304
" (unwindset):"
301
305
302
306
#define HELP_BMC \
303
- " --paths explore paths one at a time\n " \
307
+ " --paths [strategy] explore paths one at a time\n " \
308
+ " --show-symex-strategies list strategies for use with --paths\n " \
304
309
" --program-only only show program expression\n " \
305
310
" --show-loops show the loops in the program\n " \
306
311
" --depth nr limit search depth\n " \
0 commit comments