Skip to content

Commit 18be0df

Browse files
committed
Add optionst to path_storaget context
This is in preparation for a subclass of path_storaget that acts on some of the options that are passed in.
1 parent a80431a commit 18be0df

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/cbmc/bmc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ int bmct::do_language_agnostic_bmc(
492492
INVARIANT(
493493
path_strategy_chooser.is_valid_strategy(strategy),
494494
"Front-end passed us invalid path strategy '" + strategy + "'");
495-
const path_storaget::strategy_contextt strategy_context(message);
495+
const path_storaget::strategy_contextt strategy_context(message, opts);
496496
worklist = path_strategy_chooser.get(strategy, strategy_context);
497497
try
498498
{

src/goto-instrument/accelerate/scratch_program.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ class scratch_programt:public goto_programt
4343
ns(symbol_table, symex_symbol_table),
4444
equation(),
4545
log(mh),
46-
strategy_context(log),
47-
path_storage(strategy_context),
4846
options(),
47+
strategy_context(log, options),
48+
path_storage(strategy_context),
4949
symex(mh, symbol_table, equation, options, path_storage),
5050
satcheck(util_make_unique<satcheckt>()),
5151
satchecker(ns, *satcheck),
@@ -86,9 +86,9 @@ class scratch_programt:public goto_programt
8686
namespacet ns;
8787
symex_target_equationt equation;
8888
messaget log;
89+
optionst options;
8990
const path_storaget::strategy_contextt strategy_context;
9091
degenerate_path_storaget path_storage;
91-
optionst options;
9292
goto_symext symex;
9393

9494
std::unique_ptr<propt> satcheck;

src/goto-symex/path_storage.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ class path_storaget
5656
/// history.
5757
struct strategy_contextt
5858
{
59-
explicit strategy_contextt(messaget &log)
60-
: log(log)
59+
strategy_contextt(messaget &log, const optionst &options)
60+
: log(log), options(options)
6161
{
6262
}
6363

6464
messaget &log;
65+
const optionst &options;
6566
};
6667

6768
explicit path_storaget(const strategy_contextt &ctx)

unit/path_strategies.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ void _check_with_strategy(
355355

356356
path_strategy_choosert chooser;
357357
REQUIRE(chooser.is_valid_strategy(strategy));
358-
const path_storaget::strategy_contextt strategy_context(log);
358+
const path_storaget::strategy_contextt strategy_context(log, opts);
359359
std::unique_ptr<path_storaget> worklist = chooser.get(
360360
strategy, strategy_context);
361361

0 commit comments

Comments
 (0)