36 paths.push_back(path);
66 paths.push_back(path);
87 static const std::map<
91 const std::function<std::unique_ptr<path_storaget>()>>>
94 {
" lifo next instruction is pushed before\n"
95 " goto target; paths are popped in\n"
96 " last-in, first-out order. Explores\n"
97 " the program tree depth-first.\n",
99 return std::make_unique<path_lifot>();
102 {
" fifo next instruction is pushed before\n"
103 " goto target; paths are popped in\n"
104 " first-in, first-out order. Explores\n"
105 " the program tree breadth-first.\n",
107 return std::make_unique<path_fifot>();
112 std::stringstream ss;
114 ss << pair.second.first;
132 found !=
path_strategies.end(),
"Unknown strategy '" + strategy +
"'.");
133 return found->second.second();
142 if(cmdline.
isset(
"paths"))
145 std::string strategy = cmdline.
get_value(
"paths");
148 log.error() <<
"Unknown strategy '" << strategy
149 <<
"'. Pass the --show-symex-strategies flag to list "
150 "available strategies."
154 options.
set_option(
"exploration-strategy", strategy);
std::string get_value(char option) const
virtual bool isset(char option) const
Class that provides messages with a built-in verbosity 'level'.
Expression to hold a nondeterministic choice.
void set_option(const std::string &option, const bool value)
void clear() override
Clear all saved paths.
void private_pop() override
patht & private_peek() override
void push(const patht &) override
Add a path to resume to the storage.
std::size_t size() const override
How many paths does this storage contain?
void private_pop() override
std::list< path_storaget::patht >::iterator last_peeked
void push(const patht &) override
Add a path to resume to the storage.
patht & private_peek() override
std::size_t size() const override
How many paths does this storage contain?
void clear() override
Clear all saved paths.
nondet_symbol_exprt operator()(typet type, source_locationt location)
The type of an expression, extends irept.
Document and give macros for the exit codes of CPROVER binaries.
#define CPROVER_EXIT_USAGE_ERROR
A usage error is returned when the command line is invalid or conflicting.
std::string default_path_strategy()
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 ...
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.
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 std::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 std::make_unique< path_fifot >();}}}})
std::string show_path_strategies()
suitable for displaying as a front-end help message
Storage of symbolic execution paths to resume.
#define PRECONDITION(CONDITION)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
Information saved at a conditional goto to resume execution.