9 #ifndef CPROVER_UTIL_CONFIG_H
10 #define CPROVER_UTIL_CONFIG_H
24 #define OPT_CONFIG_C_CPP \
25 "D:I:(include)(function)" \
26 "(c89)(c99)(c11)(cpp98)(cpp03)(cpp11)" \
28 "(round-to-even)(round-to-nearest)" \
29 "(round-to-plus-inf)(round-to-minus-inf)(round-to-zero)" \
32 #define HELP_CONFIG_C_CPP \
33 " {y-I} {upath} \t set include path (C/C++)\n" \
34 " {y--include} {ufile} \t set include file (C/C++)\n" \
35 " {y-D} {umacro} \t define preprocessor macro (C/C++)\n" \
36 " {y--c89}, {y--c99}, {y--c11} \t " \
37 "set C language standard (default: " + \
39 configt::ansi_ct::default_c_standard() == \
40 configt::ansi_ct::c_standardt::C89 \
42 : configt::ansi_ct::default_c_standard() == \
43 configt::ansi_ct::c_standardt::C99 \
45 : configt::ansi_ct::default_c_standard() == \
46 configt::ansi_ct::c_standardt::C11 \
50 " {y--cpp98}, {y--cpp03}, {y--cpp11} \t " \
51 "set C++ language standard (default: " + \
53 configt::cppt::default_cpp_standard() == \
54 configt::cppt::cpp_standardt::CPP98 \
56 : configt::cppt::default_cpp_standard() == \
57 configt::cppt::cpp_standardt::CPP03 \
59 : configt::cppt::default_cpp_standard() == \
60 configt::cppt::cpp_standardt::CPP11 \
64 " {y--unsigned-char} \t make \"char\" unsigned by default\n" \
65 " {y--round-to-nearest}, {y--round-to-even} \t " \
66 "rounding towards nearest even (default)\n" \
67 " {y--round-to-plus-inf} \t rounding towards plus infinity\n" \
68 " {y--round-to-minus-inf} \t rounding towards minus infinity\n" \
69 " {y--round-to-zero} \t rounding towards zero\n" \
70 " {y--no-library} \t disable built-in abstract C library\n"
72 #define OPT_CONFIG_LIBRARY \
73 "(malloc-fail-assert)(malloc-fail-null)(malloc-may-fail)" \
74 "(no-malloc-may-fail)" \
75 "(string-abstraction)"
77 #define HELP_CONFIG_LIBRARY \
78 " {y--malloc-may-fail} \t allow malloc calls to return a null pointer\n" \
79 " {y--no-malloc-may-fail} \t disable potential malloc failure\n" \
80 " {y--malloc-fail-assert} \t " \
81 "set malloc failure mode to assert-then-assume\n" \
82 " {y--malloc-fail-null} \t set malloc failure mode to return null\n" \
83 " {y--string-abstraction} \t track C string lengths and zero-termination\n"
85 #define OPT_CONFIG_JAVA "(classpath)(cp)(main-class)"
87 #define OPT_CONFIG_PLATFORM \
89 "(16)(32)(64)(LP64)(ILP64)(LLP64)(ILP32)(LP32)" \
90 "(little-endian)(big-endian)" \
92 "(i386-win32)(win32)(winx64)" \
93 "(i386-macos)(ppc-macos)" \
96 #define HELP_CONFIG_PLATFORM \
97 " {y--arch} {uarch_name} \t " \
98 "set architecture (default: " + \
99 id2string(configt::this_architecture()) + \
100 ") to one of: {yalpha}, {yarm}, {yarm64}, {yarmel}, {yarmhf}, {yhppa}, " \
101 "{yi386}, {yia64}, {ymips}, {ymips64}, {ymips64el}, {ymipsel}, " \
103 "{ymipsn32el}, {ypowerpc}, {yppc64}, {yppc64le}, {yriscv64}, {ys390}, " \
104 "{ys390x}, {ysh4}, {ysparc}, {ysparc64}, {yv850}, {yx32}, {yx86_64}, or " \
106 " {y--os} {uos_name} \t " \
107 "set operating system (default: " + \
108 id2string(configt::this_operating_system()) + \
109 ") to one of: {yfreebsd}, {ylinux}, {ymacos}, {ynetbsd}, {yopenbsd}, " \
110 "{ysolaris}, {yhurd}, or {ywindows}\n" \
111 " {y--i386-linux}, {y--i386-win32}, {y--i386-macos}, {y--ppc-macos}, " \
112 "{y--win32}, {y--winx64} \t " \
113 "set architecture and operating system\n" \
114 " {y--LP64}, {y--ILP64}, {y--LLP64}, {y--ILP32}, {y--LP32} \t " \
115 "set width of int, long and pointers, but don't override default " \
116 "architecture and operating system\n" \
117 " {y--16}, {y--32}, {y--64} \t " \
118 "equivalent to {y--LP32}, {y--ILP32}, {y--LP64} (on Windows: " \
120 " {y--little-endian} \t allow little-endian word-byte conversions\n" \
121 " {y--big-endian} \t allow big-endian word-byte conversions\n" \
122 " {y--gcc} \t use GCC as preprocessor\n"
124 #define OPT_CONFIG_BACKEND "(object-bits):"
126 #define HELP_CONFIG_BACKEND \
127 " {y--object-bits} {un} \t number of bits used for object addresses\n"
360 std::optional<std::string>
main;
Globally accessible architectural configuration.
void set_object_bits_from_symbol_table(const symbol_table_baset &)
Sets the number of bits used for object addresses.
void set_arch(const irep_idt &)
struct configt::bv_encodingt bv_encoding
bool set(const cmdlinet &cmdline)
struct configt::verilogt verilog
std::string object_bits_info()
void set_classpath(const std::string &cp)
mp_integer max_malloc_size() const
The maximum allocation size is determined by the number of bits that are left in the pointer of width...
void set_from_symbol_table(const symbol_table_baset &)
static irep_idt this_architecture()
std::optional< std::string > main
struct configt::javat java
static irep_idt this_operating_system()
struct configt::ansi_ct ansi_c
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
The symbol table base class interface.
std::size_t long_double_width
std::list< std::string > include_paths
enum configt::ansi_ct::c_standardt c_standard
void set_arch_spec_riscv64()
void set_arch_spec_loongarch64()
void set_ILP32()
int=32, long=32, pointer=32
bool ts_18661_3_Floatn_types
void set_arch_spec_v850()
Sets up the widths of variables for the Renesas V850.
void set_arch_spec_hppa()
static std::string os_to_string(ost)
std::size_t pointer_width
std::optional< mp_integer > max_argc
Maximum value of argc, which is operating-systems dependent: Windows limits the number of characters ...
std::list< std::string > include_files
void set_ILP64()
int=64, long=64, pointer=64
std::list< std::string > undefines
ieee_floatt::rounding_modet rounding_mode
bool __float128_is_keyword
std::list< std::string > preprocessor_options
void set_arch_spec_sparc(const irep_idt &subarch)
static ost string_to_os(const std::string &)
std::list< std::string > defines
bool single_precision_constant
void set_LLP64()
int=32, long=32, pointer=64
void set_arch_spec_arm(const irep_idt &subarch)
std::size_t wchar_t_width
preprocessort preprocessor
@ malloc_failure_mode_return_null
@ malloc_failure_mode_none
@ malloc_failure_mode_assert_then_assume
static c_standardt default_c_standard()
void set_arch_spec_alpha()
void set_arch_spec_power(const irep_idt &subarch)
void set_arch_spec_s390()
void set_LP64()
int=32, long=64, pointer=64
void set_arch_spec_x86_64()
void set_LP32()
int=16, long=32, pointer=32
std::size_t memory_operand_size
std::size_t long_long_int_width
void set_arch_spec_s390x()
std::size_t long_int_width
void set_arch_spec_mips(const irep_idt &subarch)
void set_arch_spec_i386()
std::size_t short_int_width
static const std::size_t default_object_bits
malloc_failure_modet malloc_failure_mode
void set_arch_spec_ia64()
void set_arch_spec_emscripten()
bool is_object_bits_default
enum configt::cppt::cpp_standardt cpp_standard
static const std::size_t default_object_bits
static cpp_standardt default_cpp_standard()
std::list< std::string > classpatht
static const std::size_t default_object_bits
std::list< std::string > include_paths