20 const std::vector<std::string> &names);
26 config.value_abstract_type =
42 config.context_tracking.last_write_context =
true;
43 config.context_tracking.data_dependency_context =
60 config.context_tracking.last_write_context =
true;
65 config.maximum_array_index = std::numeric_limits<size_t>::max();
76 config.maximum_array_index = std::numeric_limits<size_t>::max();
83 config.context_tracking.last_write_context =
true;
88 config.maximum_array_index = std::numeric_limits<size_t>::max();
116 {
"up-to-n-elements", 10},
117 {
"every-element", std::numeric_limits<size_t>::max()}};
122 template <
class mappingt>
124 const std::string &option_name,
125 const std::string &bad_argument,
126 const mappingt &mapping)
128 auto option =
"--vsd-" + option_name;
129 auto choices = std::string(
"");
130 for(
auto &kv : mapping)
132 choices += (!choices.empty() ?
"|" :
"");
137 "Unknown argument '" + bad_argument +
"'", option, option +
" " + choices};
142 const std::string &option_name,
146 const auto argument = options.
get_option(option_name);
151 auto selected = mapping.find(argument);
152 if(selected == mapping.end())
156 return selected->second;
161 if(options.
get_option(
"arrays") ==
"up-to-n-elements")
164 if(max_elements != 0)
165 return max_elements - 1;
172 const std::string &option_name,
175 const size_t def = std::numeric_limits<size_t>::max();
176 const auto argument = options.
get_option(option_name);
181 auto selected = mapping.find(argument);
182 if(selected == mapping.end())
186 return selected->second;
191 const std::vector<std::string> &names)
194 for(
auto &name : names)
200 auto choices = std::string(
"");
201 for(
auto &name : names)
203 choices += (!choices.empty() ?
"|" :
"");
204 auto option =
"--vsd-" + name;
209 "Can only use of " + choices};
Thrown when users pass incorrect command line arguments, for example passing no files to analysis or ...
unsigned int get_unsigned_int_option(const std::string &option) const
bool get_bool_option(const std::string &option) const
const std::string get_option(const std::string &option) const
std::map< std::string, ABSTRACT_OBJECT_TYPET > option_mappingt
static vsd_configt value_set()
static const option_mappingt array_option_mappings
static ABSTRACT_OBJECT_TYPET option_to_abstract_type(const optionst &options, const std::string &option_name, const option_mappingt &mapping, ABSTRACT_OBJECT_TYPET default_type)
static const option_mappingt struct_option_mappings
static const option_mappingt value_option_mappings
static const option_mappingt pointer_option_mappings
static const option_size_mappingt array_option_size_mappings
static size_t configure_max_array_size(const optionst &options)
static const option_mappingt union_option_mappings
static vsd_configt intervals()
static vsd_configt from_options(const optionst &options)
static vsd_configt constant_domain()
std::map< std::string, size_t > option_size_mappingt
static size_t option_to_size(const optionst &options, const std::string &option_name, const option_size_mappingt &mapping)
static void check_one_of_options(const optionst &options, const std::vector< std::string > &names)
invalid_command_line_argument_exceptiont invalid_argument(const std::string &option_name, const std::string &bad_argument, const mappingt &mapping)
Captures the user-supplied configuration for VSD, determining which domain abstractions are used,...