22#define STL_INT_MAX_VALUE 32767LL
24#define STL_INT_MIN_VALUE -32768LL
32#define PREFIX_SEPARATOR '#'
34#define OUT_OF_RANGE_MSG "Int literal out of range"
39 if(offset == std::string::npos)
43 const std::string
literal{src.substr(offset)};
44 return std::stoll(
literal,
nullptr, base);
54 catch(std::out_of_range &)
71 catch(std::out_of_range &)
88 catch(std::out_of_range &)
105 catch(std::out_of_range &)
122 catch(std::out_of_range &)
139 catch(std::out_of_range &)
Pre-defined bitvector types.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
A constant literal expression.
constant_exprt convert_dint_bit_literal_value(const std::string &src)
Converts a string into the corresponding 'DInt' expression.
constant_exprt convert_dint_dec_literal_value(const std::string &src)
Converts a string into the corresponding 'DInt' expression.
constant_exprt convert_dint_hex_literal_value(const std::string &src)
Converts a string into the corresponding 'DInt' expression.
Statement List Language Conversion.
constant_exprt convert_int_hex_literal(const std::string &src)
Converts a string into the corresponding 'Int' or 'DInt' expression.
constant_exprt convert_int_bit_literal(const std::string &src)
Converts a string into the corresponding 'Int' or 'DInt' expression.
#define BASE_10
Base of decimal integer literals.
static long long get_literal_value(const std::string &src, unsigned int base)
constant_exprt convert_int_bit_literal_value(const std::string &src)
Converts a string into the corresponding 'Int' expression.
#define BASE_2
Base of binary integer literals.
#define BASE_16
Base of hexadecimal integer literals.
constant_exprt convert_int_dec_literal_value(const std::string &src)
Converts a string into the corresponding 'Int' expression.
constant_exprt convert_int_dec_literal(const std::string &src)
Converts a string into the corresponding 'Int' or 'DInt' expression.
#define OUT_OF_RANGE_MSG
Message for the case of a literal being out of range.
constant_exprt convert_int_hex_literal_value(const std::string &src)
Converts a string into the corresponding 'Int' expression.
#define PREFIX_SEPARATOR
Character between a prefix and another prefix or the actual literal.
Statement List Language Conversion.
signedbv_typet get_int_type()
Creates a new type that resembles the 'Int' type of the Siemens PLC languages.
Statement List Type Helper.