1/*******************************************************************\
5Author: Daniel Kroening, kroening@kroening.com
7\*******************************************************************/
54 long_long_int_width=8*8;
58 long_double_width=16*8;
59 char_is_unsigned=
false;
60 wchar_t_is_unsigned=
false;
63 memory_operand_size=int_width/8;
67// TODO: find the alignment restrictions (per type) of the different
68// architectures (currently: sizeof=alignedof)
69// TODO: implement the __attribute__((__aligned__(val)))
78 long_long_int_width=8*8;
82 long_double_width=8*8;
83 char_is_unsigned=
false;
84 wchar_t_is_unsigned=
false;
87 memory_operand_size=int_width/8;
98 long_long_int_width=8*8;
102 long_double_width=8*8;
103 char_is_unsigned=
false;
104 wchar_t_is_unsigned=
false;
107 memory_operand_size=int_width/8;
118 long_long_int_width=8*8;
122 long_double_width=12*8;
// really 96 bits on GCC
123 char_is_unsigned=
false;
124 wchar_t_is_unsigned=
false;
127 memory_operand_size=int_width/8;
138 long_long_int_width=8*8;
142 long_double_width=8*8;
143 char_is_unsigned=
false;
144 wchar_t_is_unsigned=
false;
147 memory_operand_size=int_width/8;
153 endianness=endiannesst::IS_LITTLE_ENDIAN;
154 char_is_unsigned=
false;
160 case flavourt::CLANG:
161 defines.push_back(
"i386");
162 defines.push_back(
"__i386");
163 defines.push_back(
"__i386__");
164 if(mode == flavourt::CLANG)
165 defines.push_back(
"__LITTLE_ENDIAN__");
168 case flavourt::VISUAL_STUDIO:
169 defines.push_back(
"_M_IX86");
172 case flavourt::CODEWARRIOR:
185 endianness=endiannesst::IS_LITTLE_ENDIAN;
186 long_double_width=16*8;
187 char_is_unsigned=
false;
193 case flavourt::CLANG:
194 defines.push_back(
"__LP64__");
195 defines.push_back(
"__x86_64");
196 defines.push_back(
"__x86_64__");
197 defines.push_back(
"_LP64");
198 defines.push_back(
"__amd64__");
199 defines.push_back(
"__amd64");
201 if(os == ost::OS_MACOS)
202 defines.push_back(
"__LITTLE_ENDIAN__");
205 case flavourt::VISUAL_STUDIO:
206 defines.push_back(
"_M_X64");
207 defines.push_back(
"_M_AMD64");
210 case flavourt::CODEWARRIOR:
224 else // ppc64 or ppc64le
228 endianness=endiannesst::IS_LITTLE_ENDIAN;
230 endianness=endiannesst::IS_BIG_ENDIAN;
232 long_double_width=16*8;
233 char_is_unsigned=
true;
239 case flavourt::CLANG:
240 defines.push_back(
"__powerpc");
241 defines.push_back(
"__powerpc__");
242 defines.push_back(
"__POWERPC__");
243 defines.push_back(
"__ppc__");
245 if(os == ost::OS_MACOS)
246 defines.push_back(
"__BIG_ENDIAN__");
250 defines.push_back(
"__powerpc64");
251 defines.push_back(
"__powerpc64__");
252 defines.push_back(
"__PPC64__");
253 defines.push_back(
"__ppc64__");
256 defines.push_back(
"_CALL_ELF=2");
257 defines.push_back(
"__LITTLE_ENDIAN__");
261 defines.push_back(
"_CALL_ELF=1");
262 defines.push_back(
"__BIG_ENDIAN__");
267 case flavourt::VISUAL_STUDIO:
268 defines.push_back(
"_M_PPC");
271 case flavourt::CODEWARRIOR:
286 long_double_width=16*8;
291 long_double_width=8*8;
294 endianness=endiannesst::IS_LITTLE_ENDIAN;
295 char_is_unsigned=
true;
301 case flavourt::CLANG:
303 defines.push_back(
"__aarch64__");
305 defines.push_back(
"__arm__");
307 defines.push_back(
"__ARM_PCS_VFP");
310 case flavourt::VISUAL_STUDIO:
312 defines.push_back(
"_M_ARM64");
314 defines.push_back(
"_M_ARM");
317 case flavourt::CODEWARRIOR:
330 endianness=endiannesst::IS_LITTLE_ENDIAN;
331 long_double_width=16*8;
332 char_is_unsigned=
false;
338 defines.push_back(
"__alpha__");
341 case flavourt::VISUAL_STUDIO:
342 defines.push_back(
"_M_ALPHA");
345 case flavourt::CLANG:
346 case flavourt::CODEWARRIOR:
364 long_double_width=8*8;
369 long_double_width=16*8;
375 endianness=endiannesst::IS_LITTLE_ENDIAN;
377 endianness=endiannesst::IS_BIG_ENDIAN;
379 char_is_unsigned=
false;
385 defines.push_back(
"__mips__");
386 defines.push_back(
"mips");
388 "_MIPS_SZPTR="+std::to_string(
config.
ansi_c.pointer_width));
391 case flavourt::VISUAL_STUDIO:
395 case flavourt::CLANG:
396 case flavourt::CODEWARRIOR:
409 endianness = endiannesst::IS_LITTLE_ENDIAN;
410 long_double_width = 16 * 8;
411 char_is_unsigned =
true;
417 defines.push_back(
"__riscv");
420 case flavourt::VISUAL_STUDIO:
421 case flavourt::CLANG:
422 case flavourt::CODEWARRIOR:
435 endianness=endiannesst::IS_BIG_ENDIAN;
436 long_double_width=16*8;
437 char_is_unsigned=
true;
443 defines.push_back(
"__s390__");
446 case flavourt::VISUAL_STUDIO:
450 case flavourt::CLANG:
451 case flavourt::CODEWARRIOR:
464 endianness=endiannesst::IS_BIG_ENDIAN;
465 char_is_unsigned=
true;
471 defines.push_back(
"__s390x__");
474 case flavourt::VISUAL_STUDIO:
478 case flavourt::CLANG:
479 case flavourt::CODEWARRIOR:
494 long_double_width=16*8;
499 long_double_width=16*8;
502 endianness=endiannesst::IS_BIG_ENDIAN;
503 char_is_unsigned=
false;
509 defines.push_back(
"__sparc__");
511 defines.push_back(
"__arch64__");
514 case flavourt::VISUAL_STUDIO:
518 case flavourt::CLANG:
519 case flavourt::CODEWARRIOR:
532 long_double_width=16*8;
533 endianness=endiannesst::IS_LITTLE_ENDIAN;
534 char_is_unsigned=
false;
540 defines.push_back(
"__ia64__");
541 defines.push_back(
"_IA64");
542 defines.push_back(
"__IA64__");
545 case flavourt::VISUAL_STUDIO:
546 defines.push_back(
"_M_IA64");
549 case flavourt::CLANG:
550 case flavourt::CODEWARRIOR:
562 // This is a variant of x86_64 that has
563 // 32-bit long int and 32-bit pointers.
565 long_double_width=16*8;
// different from i386
566 endianness=endiannesst::IS_LITTLE_ENDIAN;
567 char_is_unsigned=
false;
573 defines.push_back(
"__ILP32__");
574 defines.push_back(
"__x86_64");
575 defines.push_back(
"__x86_64__");
576 defines.push_back(
"__amd64__");
577 defines.push_back(
"__amd64");
580 case flavourt::VISUAL_STUDIO:
584 case flavourt::CLANG:
585 case flavourt::CODEWARRIOR:
598 // The Renesas V850 is a 32-bit microprocessor used in
599 // many automotive applications. This spec is written from the
600 // architecture manual rather than having access to a running
601 // system. Thus some assumptions have been made.
605 // Technically, the V850's don't have floating-point at all.
606 // However, the RH850, aimed at automotive has both 32-bit and
607 // 64-bit IEEE-754 float.
609 long_double_width=8*8;
610 endianness=endiannesst::IS_LITTLE_ENDIAN;
612 // Without information about the compiler and RTOS, these are guesses
613 char_is_unsigned=
false;
616 // No preprocessor definitions due to lack of information
622 long_double_width=8*8;
// different from i386
623 endianness=endiannesst::IS_BIG_ENDIAN;
624 char_is_unsigned=
false;
630 defines.push_back(
"__hppa__");
633 case flavourt::VISUAL_STUDIO:
637 case flavourt::CLANG:
638 case flavourt::CODEWARRIOR:
651 long_double_width=8*8;
// different from i386
652 endianness=endiannesst::IS_LITTLE_ENDIAN;
653 char_is_unsigned=
false;
659 defines.push_back(
"__sh__");
660 defines.push_back(
"__SH4__");
663 case flavourt::VISUAL_STUDIO:
667 case flavourt::CLANG:
668 case flavourt::CODEWARRIOR:
681 endianness = endiannesst::IS_LITTLE_ENDIAN;
682 long_double_width = 16 * 8;
683 char_is_unsigned =
false;
689 defines.push_back(
"__loongarch__");
692 case flavourt::VISUAL_STUDIO:
696 case flavourt::CODEWARRIOR:
697 case flavourt::CLANG:
710 endianness = endiannesst::IS_LITTLE_ENDIAN;
711 long_double_width = 16 * 8;
712 char_is_unsigned =
false;
717 case flavourt::CLANG:
718 defines.push_back(
"__EMSCRIPTEN__");
721 case flavourt::VISUAL_STUDIO:
726 case flavourt::CODEWARRIOR:
738#if defined(__APPLE__)
739 // By default, clang on the Mac builds C code in GNU C11
740 return c_standardt::C11;
741#elif defined(__FreeBSD__) || defined(__OpenBSD__)
742 // By default, clang on FreeBSD builds C code in GNU C99
743 // By default, clang on OpenBSD builds C code in C99
744 return c_standardt::C99;
746 // By default, gcc 5.4 or higher use gnu11; older versions use gnu89
747 return c_standardt::C11;
753 // g++ 6.3 uses gnu++14
754 // g++ 5.4 uses gnu++98
755 // clang 6.0 uses c++14
757 return cpp_standardt::CPP14;
759 return cpp_standardt::CPP98;
769 // the architecture for people who can't commit
772 ansi_c.NULL_is_zero=
false;
774 if(
sizeof(
long int)==8)
779 else if(arch==
"alpha")
780 ansi_c.set_arch_spec_alpha();
781 else if(arch==
"arm64" ||
785 ansi_c.set_arch_spec_arm(arch);
786 else if(arch==
"mips64el" ||
792 ansi_c.set_arch_spec_mips(arch);
793 else if(arch==
"powerpc" ||
796 ansi_c.set_arch_spec_power(arch);
797 else if(arch ==
"riscv64")
798 ansi_c.set_arch_spec_riscv64();
799 else if(arch==
"sparc" ||
801 ansi_c.set_arch_spec_sparc(arch);
802 else if(arch==
"ia64")
803 ansi_c.set_arch_spec_ia64();
804 else if(arch==
"s390x")
805 ansi_c.set_arch_spec_s390x();
806 else if(arch==
"s390")
807 ansi_c.set_arch_spec_s390();
809 ansi_c.set_arch_spec_x32();
810 else if(arch==
"v850")
811 ansi_c.set_arch_spec_v850();
812 else if(arch==
"hppa")
813 ansi_c.set_arch_spec_hppa();
815 ansi_c.set_arch_spec_sh4();
816 else if(arch==
"x86_64")
817 ansi_c.set_arch_spec_x86_64();
818 else if(arch==
"i386")
819 ansi_c.set_arch_spec_i386();
820 else if(arch ==
"loongarch64")
821 ansi_c.set_arch_spec_loongarch64();
822 else if(arch ==
"emscripten")
823 ansi_c.set_arch_spec_emscripten();
826 // We run on something new and unknown.
827 // We verify for i386 instead.
828 ansi_c.set_arch_spec_i386();
842 const std::size_t pointer_width)
846 "Value of \"" +
argument +
"\" given for object-bits is " + reason +
847 ". object-bits must be positive and less than the pointer width (" +
848 std::to_string(pointer_width) +
") ",
854 if(*object_bits == 0 || *object_bits >= pointer_width)
865 // defaults -- we match the architecture we have ourselves
869 ansi_c.single_precision_constant=
false;
870 ansi_c.allow_anonymous_struct_embedding =
false;
871 ansi_c.for_has_scope=
true;
// C99 or later
872 ansi_c.ts_18661_3_Floatn_types=
false;
873 ansi_c.__float128_is_keyword =
false;
874 ansi_c.float16_type =
false;
882 // NOLINTNEXTLINE(readability/casting)
883 ansi_c.NULL_is_zero=
reinterpret_cast<size_t>(
nullptr)==0;
885 // Default is ROUND_TO_EVEN, justified by C99:
886 // 1 At program startup the floating-point environment is initialized as
887 // prescribed by IEC 60559:
888 // - All floating-point exception status flags are cleared.
889 // - The rounding direction mode is rounding to nearest.
892 if(cmdline.
isset(
"function"))
895 if(cmdline.
isset(
'D'))
898 if(cmdline.
isset(
'I'))
901 if(cmdline.
isset(
"classpath"))
903 // Specifying -classpath or -cp overrides any setting of the
904 // CLASSPATH environment variable.
907 else if(cmdline.
isset(
"cp"))
909 // Specifying -classpath or -cp overrides any setting of the
910 // CLASSPATH environment variable.
915 // environment variable set?
923 if(cmdline.
isset(
"main-class"))
926 if(cmdline.
isset(
"include"))
929 // the default architecture is the one we run on
933 // let's pick an OS now
934 // the default is the one we run on
938 if(cmdline.
isset(
"i386-linux"))
943 else if(cmdline.
isset(
"i386-win32") ||
944 cmdline.
isset(
"win32"))
949 else if(cmdline.
isset(
"winx64"))
954 else if(cmdline.
isset(
"i386-macos"))
959 else if(cmdline.
isset(
"ppc-macos"))
965 if(cmdline.
isset(
"arch"))
970 if(cmdline.
isset(
"os"))
977 // Cygwin uses GCC throughout, use i386-linux
978 // MinGW needs --win32 --gcc
982 if(cmdline.
isset(
"gcc"))
984 // There are gcc versions that target Windows (MinGW for example),
985 // and we support that.
991 ansi_c.defines.push_back(
"__CYGWIN__");
994 // MinGW has extra defines
995 ansi_c.defines.push_back(
"__int64=long long");
999 // On Windows, our default is Visual Studio.
1000 // On FreeBSD, it's clang.
1001 // On anything else, it's GCC as the preprocessor,
1002 // but we recognize the Visual Studio language,
1003 // which is somewhat inconsistent.
1007#elif defined(__FreeBSD__) || defined(__OpenBSD__)
1018 else if(os==
"macos")
1024 // configure_gcc sets these with additional version-of-clang level of
1025 // detail, but the below are reasonable defaults for modern clang
1027 ansi_c.__float128_is_keyword =
true;
1028 ansi_c.float16_type =
true;
1032 else if(os ==
"linux" || os ==
"solaris" || os ==
"netbsd" || os ==
"hurd")
1039 else if(os ==
"freebsd" || os ==
"openbsd")
1045 // configure_gcc sets these with additional version-of-clang level of
1046 // detail, but the below are reasonable defaults for modern clang
1048 ansi_c.__float128_is_keyword =
true;
1049 ansi_c.float16_type =
true;
1055 // give up, but use reasonable defaults
1063 ansi_c.gcc__float128_type =
true;
1069 // note that sizeof(void *)==8, but sizeof(long)==4!
1073 // On Windows, wchar_t is unsigned 16 bit, regardless
1074 // of the compiler used.
1075 ansi_c.wchar_t_width=2*8;
1076 ansi_c.wchar_t_is_unsigned=
true;
1078 // long double is the same as double in Visual Studio,
1079 // but it's 16 bytes with GCC with the 64-bit target.
1080 if(arch ==
"x86_64" && cmdline.
isset(
"gcc"))
1081 ansi_c.long_double_width=16*8;
1083 ansi_c.long_double_width=8*8;
1085 else if(os ==
"macos" && arch ==
"arm64")
1087 // https://developer.apple.com/documentation/xcode/
1088 // writing_arm64_code_for_apple_platforms#//apple_ref/doc/uid/TP40013702-SW1
1089 ansi_c.char_is_unsigned =
false;
1090 ansi_c.long_double_width = 8 * 8;
1093 // Let's check some of the type widths in case we run
1094 // the same architecture and OS that we are verifying for.
1099 "int width shall be equal to the system int width");
1102 "long int width shall be equal to the system long int width");
1105 "bool width shall be equal to the system bool width");
1108 "char width shall be equal to the system char width");
1111 "short int width shall be equal to the system short int width");
1114 "long long int width shall be equal to the system long long int width");
1117 "pointer width shall be equal to the system pointer width");
1120 "float width shall be equal to the system float width");
1123 "double width shall be equal to the system double width");
1125 ansi_c.char_is_unsigned ==
1127 "char_is_unsigned flag shall indicate system char unsignedness");
1130 // On Windows, long double width varies by compiler
1133 "long double width shall be equal to the system long double width");
1137 // the following allows overriding the defaults
1139 if(cmdline.
isset(
"16"))
1142 if(cmdline.
isset(
"32"))
1145 if(cmdline.
isset(
"64"))
1148 if(cmdline.
isset(
"LP64"))
1149 ansi_c.set_LP64();
// int=32, long=64, pointer=64
1151 if(cmdline.
isset(
"ILP64"))
1152 ansi_c.set_ILP64();
// int=64, long=64, pointer=64
1154 if(cmdline.
isset(
"LLP64"))
1155 ansi_c.set_LLP64();
// int=32, long=32, pointer=64
1157 if(cmdline.
isset(
"ILP32"))
1158 ansi_c.set_ILP32();
// int=32, long=32, pointer=32
1160 if(cmdline.
isset(
"LP32"))
1161 ansi_c.set_LP32();
// int=16, long=32, pointer=32
1163 if(cmdline.
isset(
"string-abstraction"))
1164 ansi_c.string_abstraction=
true;
1166 ansi_c.string_abstraction=
false;
1168 if(cmdline.
isset(
"dfcc-debug-lib"))
1169 ansi_c.dfcc_debug_lib =
true;
1171 ansi_c.dfcc_debug_lib =
false;
1173 if(cmdline.
isset(
"dfcc-simple-invalid-pointer-model"))
1174 ansi_c.simple_invalid_pointer_model =
true;
1176 ansi_c.simple_invalid_pointer_model =
false;
1178 if(cmdline.
isset(
"no-library"))
1181 if(cmdline.
isset(
"little-endian"))
1184 if(cmdline.
isset(
"big-endian"))
1187 if(cmdline.
isset(
"little-endian") &&
1188 cmdline.
isset(
"big-endian"))
1191 if(cmdline.
isset(
"unsigned-char"))
1192 ansi_c.char_is_unsigned=
true;
1194 if(cmdline.
isset(
"round-to-even") ||
1195 cmdline.
isset(
"round-to-nearest"))
1198 if(cmdline.
isset(
"round-to-plus-inf"))
1201 if(cmdline.
isset(
"round-to-minus-inf"))
1204 if(cmdline.
isset(
"round-to-zero"))
1207 if(cmdline.
isset(
"object-bits"))
1213 if(cmdline.
isset(
"malloc-fail-assert") && cmdline.
isset(
"malloc-fail-null"))
1216 "at most one malloc failure mode is acceptable",
"--malloc-fail-null"};
1218 if(cmdline.
isset(
"malloc-fail-null"))
1219 ansi_c.malloc_failure_mode =
ansi_c.malloc_failure_mode_return_null;
1220 if(cmdline.
isset(
"malloc-fail-assert"))
1221 ansi_c.malloc_failure_mode =
ansi_c.malloc_failure_mode_assert_then_assume;
1223 if(cmdline.
isset(
"malloc-may-fail"))
1225 ansi_c.malloc_may_fail =
true;
1227 if(cmdline.
isset(
"no-malloc-may-fail"))
1229 ansi_c.malloc_may_fail =
false;
1233 if(cmdline.
isset(
"c89"))
1236 if(cmdline.
isset(
"c99"))
1239 if(cmdline.
isset(
"c11"))
1242 if(cmdline.
isset(
"c17"))
1245 if(cmdline.
isset(
"c23"))
1248 if(cmdline.
isset(
"cpp98"))
1251 if(cmdline.
isset(
"cpp03"))
1254 if(cmdline.
isset(
"cpp11"))
1257 // set the upper bound for argc
1260 // On Windows, CreateProcess accepts no more than 32767 characters, so make
1261 // that a hard limit.
1266 // For other systems assume argc is no larger than the what would make argv
1267 // the largest representable array (when using signed integers to represent
1269 // 2^(pointer_width - 1) / (pointer_width / char_width) is the maximum
1270 // number of argv elements sysconf(ARG_MAX) is likely much lower than this,
1271 // but we don't know that value for the verification target platform.
1279 // otherwise we leave argc unconstrained
1290 case ost::OS_LINUX:
return "linux";
1291 case ost::OS_MACOS:
return "macos";
1292 case ost::OS_WIN:
return "win";
1293 case ost::NO_OS:
return "none";
1303 return ost::OS_LINUX;
1304 else if(os==
"macos")
1305 return ost::OS_MACOS;
1314 const std::string &what)
1329 "symbol table configuration entry '" +
id2string(
id) +
1330 "' must be a string constant");
1337 const std::string &what)
1350 "symbol table configuration entry '" +
id2string(
id) +
1351 "' must be a constant");
1358 "symbol table configuration entry '" +
id2string(
id) +
1359 "' must be convertible to mp_integer");
1366 // maybe not compiled from C/C++
1376 // first set architecture to get some defaults
1397 // for_has_scope, single_precision_constant, rounding_mode,
1398 // ts_18661_3_Floatn_types, __float128_is_keyword, float16_type, bf16_type,
1399 // fp16_type are not architectural features, and thus not stored in namespace
1415 // mode, preprocessor (and all preprocessor command line options),
1416 // lib, string_abstraction not stored in namespace
1426 // has been overridden by command line option,
1427 // thus do not apply language defaults
1431 // set object_bits according to entry point language
1444 "object_bits should fit into pointer width");
1450 return "Running with "+std::to_string(
bv_encoding.object_bits)+
1454 (
bv_encoding.is_object_bits_default ?
"default" :
"user-specified")+
1463 // following http://wiki.debian.org/ArchitectureSpecificsMemo
1467 #elif defined(__armel__)
1469 #elif defined(__aarch64__)
1471 #elif defined(__arm__)
1472 #ifdef __ARM_PCS_VFP
1473 this_arch =
"armhf";
// variant of arm with hard float
1477 #elif defined(_MIPSEL)
1478 #if _MIPS_SIM==_ABIO32
1480 #elif _MIPS_SIM==_ABIN32
1485 #elif defined(__mips__)
1486 #if _MIPS_SIM==_ABIO32
1488 #elif _MIPS_SIM==_ABIN32
1493 #elif defined(__powerpc__)
1494 #if defined(__ppc64__) || defined(__PPC64__) || \
1495 defined(__powerpc64__) || defined(__POWERPC64__)
1496 #ifdef __LITTLE_ENDIAN__
1504 #elif defined(__riscv)
1506 #elif defined(__sparc__)
1512 #elif defined(__ia64__)
1514 #elif defined(__s390x__)
1516 #elif defined(__s390__)
1518 #elif defined(__x86_64__)
1520 this_arch =
"x32";
// variant of x86_64 with 32-bit pointers
1524 #elif defined(__i386__)
1526 #elif defined(_WIN64)
1528 #elif defined(_WIN32)
1530 #elif defined(__hppa__)
1532 #elif defined(__sh__)
1534 #elif defined(__loongarch__)
1536 #elif defined(__EMSCRIPTEN__)
1539 // something new and unknown!
1549// These are separated by colons on Unix, and semicolons on
1559 java.classpath.insert(
1610 // We require the offset to be able to express upto allocation_size - 1,
1611 // but also down to -allocation_size, therefore the size is allowable
1612 // is number of bits, less the signed bit.
virtual void clear()
Reset the abstract state.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
std::string get_value(char option) const
virtual bool isset(char option) const
const std::list< std::string > & get_values(const std::string &option) const
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)
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.
Base class for all expressions.
Thrown when users pass incorrect command line arguments, for example passing no files to analysis or ...
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
The symbol table base class interface.
const symbolt * lookup(const irep_idt &name) const
Find a symbol in the symbol table for read-only access.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
exprt value
Initial value of symbol.
configt::bv_encodingt parse_object_bits_encoding(const std::string &argument, const std::size_t pointer_width)
Parses the object_bits argument from the command line arguments.
static unsigned unsigned_from_ns(const namespacet &ns, const std::string &what)
static irep_idt string_from_ns(const namespacet &ns, const std::string &what)
const std::string & id2string(const irep_idt &d)
mp_integer alignment(const typet &type, const namespacet &ns)
API to expression classes for Pointers.
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
bool simplify(exprt &expr, const namespacet &ns)
#define UNREACHABLE
This should be used to mark dead code.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
#define PRECONDITION(CONDITION)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.
char * getenv(const char *name)
void split_string(std::string_view s, char delim, std::vector< std::string > &result, bool strip, bool remove_empty)
void set_arch_spec_riscv64()
void set_arch_spec_loongarch64()
void set_ILP32()
int=32, long=32, pointer=32
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)
void set_ILP64()
int=64, long=64, pointer=64
void set_arch_spec_sparc(const irep_idt &subarch)
static ost string_to_os(const std::string &)
void set_LLP64()
int=32, long=32, pointer=64
void set_arch_spec_arm(const irep_idt &subarch)
@ malloc_failure_mode_none
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
void set_arch_spec_s390x()
void set_arch_spec_mips(const irep_idt &subarch)
void set_arch_spec_i386()
void set_arch_spec_ia64()
void set_arch_spec_emscripten()
static cpp_standardt default_cpp_standard()