Go to the documentation of this file.
37 paths.push_back(path);
67 paths.push_back(path);
88 static const std::map<
92 const std::function<std::unique_ptr<path_storaget>()>>>
95 {
" lifo next instruction is pushed before\n"
96 " goto target; paths are popped in\n"
97 " last-in, first-out order. Explores\n"
98 " the program tree depth-first.\n",
100 return util_make_unique<path_lifot>();
103 {
" fifo next instruction is pushed before\n"
104 " goto target; paths are popped in\n"
105 " first-in, first-out order. Explores\n"
106 " the program tree breadth-first.\n",
108 return util_make_unique<path_fifot>();
113 std::stringstream ss;
115 ss << pair.second.first;
133 found !=
path_strategies.end(),
"Unknown strategy '" + strategy +
"'.");
134 return found->second.second();
143 if(cmdline.
isset(
"paths"))
146 std::string strategy = cmdline.
get_value(
"paths");
149 log.
error() <<
"Unknown strategy '" << strategy
150 <<
"'. Pass the --show-symex-strategies flag to list "
151 "available strategies."
155 options.
set_option(
"exploration-strategy", strategy);
Class that provides messages with a built-in verbosity 'level'.
patht & private_peek() override
Expression to hold a nondeterministic choice.
virtual bool isset(char option) const
void push(const patht &) override
Add a path to resume to the storage.
The type of an expression, extends irept.
void set_option(const std::string &option, const bool value)
void clear() override
Clear all saved paths.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
void clear() override
Clear all saved paths.
Storage of symbolic execution paths to resume.
void parse_path_strategy_options(const cmdlinet &cmdline, optionst &options, message_handlert &message_handler)
add paths and exploration-strategy option, suitable to be invoked from front-ends.
std::string default_path_strategy()
patht & private_peek() override
std::size_t size() const override
How many paths does this storage contain?
nondet_symbol_exprt operator()(typet type, source_locationt location)
#define PRECONDITION(CONDITION)
std::string get_value(char option) const
void private_pop() override
Information saved at a conditional goto to resume execution.
std::list< path_storaget::patht >::iterator last_peeked
void private_pop() override
#define CPROVER_EXIT_USAGE_ERROR
A usage error is returned when the command line is invalid or conflicting.
void push(const patht &) override
Add a path to resume to the storage.
std::string show_path_strategies()
suitable for displaying as a front-end help message
std::size_t size() const override
How many paths does this storage contain?
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
bool is_valid_path_strategy(const std::string strategy)
is there a factory constructor for the named strategy?
static const std::map< const std::string, std::pair< const std::string, const std::function< std::unique_ptr< path_storaget >)> > > path_strategies({{"lifo", {" lifo next instruction is pushed before\n" " goto target; paths are popped in\n" " last-in, first-out order. Explores\n" " the program tree depth-first.\n", []() { return util_make_unique< path_lifot >();}}}, {"fifo", {" fifo next instruction is pushed before\n" " goto target; paths are popped in\n" " first-in, first-out order. Explores\n" " the program tree breadth-first.\n", []() { return util_make_unique< path_fifot >();}}}})
std::unique_ptr< path_storaget > get_path_strategy(const std::string strategy)
Ensure that is_valid_strategy() returns true for a particular string before calling this function on ...