35 const std::string &program)
36 : parse_result(cmdline.parse(
40 ui_message_handler(cmdline, program),
41 log(ui_message_handler)
114 catch(
const std::string &e)
130 catch(
const std::bad_alloc &)
135 catch(
const std::exception &e)
156 <<
sizeof(
void *) *
CHAR_BIT <<
"-bit "
164 auto const border = std::string{
"* *"};
177 std::to_string(
sizeof(
void *) *
CHAR_BIT) +
184 const std::string &option,
185 const std::string &description,
187 const std::size_t width)
204 result =
" " + option +
"\n";
211 result =
" " + option +
padding;
215 return result + description +
"\n";
218 auto it = description.cbegin() + (width -
left_margin);
219 auto rit = std::reverse_iterator<decltype(it)>(it) - 1;
221 auto rit_space = std::find(
rit, description.crend(),
' ');
225 result.append(description.cbegin(),
it_space);
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
virtual bool isset(char option) const
std::vector< std::string > get_argument_suggestions(const std::string &unknown_argument)
static irep_idt this_architecture()
static irep_idt this_operating_system()
Base class for exceptions thrown in the cprover project.
Thrown when users pass incorrect command line arguments, for example passing no files to analysis or ...
std::string what() const override
A human readable description of what went wrong.
A logic error, augmented with a distinguished field to hold a backtrace.
mstreamt & status() const
virtual void usage_error()
parse_options_baset(const std::string &optstring, int argc, const char **argv, const std::string &program)
void unknown_option_msg()
Print an error message mentioning the option that was not recognized when parsing the command line.
void log_version_and_architecture(const std::string &front_end)
Write version and system architecture to log.status().
Document and give macros for the exit codes of CPROVER binaries.
#define CPROVER_EXIT_INTERNAL_OUT_OF_MEMORY
Memory allocation has failed and this has been detected within the program.
#define CPROVER_EXIT_USAGE_ERROR
A usage error is returned when the command line is invalid or conflicting.
#define CPROVER_EXIT_EXCEPTION
An (unanticipated) exception was thrown during computation.
std::string help_entry(const std::string &option, const std::string &description, const std::size_t left_margin, const std::size_t width)
std::string align_center_with_border(const std::string &text)
Utility for displaying help centered messages borderered by "* *".
std::string banner_string(const std::string &front_end, const std::string &version)
void install_signal_catcher()
#define CHECK_RETURN(CONDITION)
#define PRECONDITION(CONDITION)
std::string wrap_line(const std::string &line, const std::size_t left_margin, const std::size_t width)
Wrap line at spaces to not extend past the right margin, and include given padding with spaces to the...
Stream & join_strings(Stream &&os, const It b, const It e, const Delimiter &delimiter, TransformFunc &&transform_func)
Prints items to an stream, separated by a constant delimiter.
const char * CBMC_VERSION