10#ifndef CPROVER_JAVA_BYTECODE_EXPR2JAVA_H
11#define CPROVER_JAVA_BYTECODE_EXPR2JAVA_H
46 const std::string &declarator)
override;
59template <
typename float_type>
62 const bool is_float = std::is_same<float_type, float>::value;
63 const std::string class_name = is_float ?
"Float" :
"Double";
65 return class_name +
".NaN";
66 if(std::isinf(value) && value >= 0.)
67 return class_name +
".POSITIVE_INFINITY";
68 if(std::isinf(value) && value <= 0.)
69 return class_name +
".NEGATIVE_INFINITY";
70 const std::string
decimal = [&]() -> std::string {
88 return std::stod(
decimal) == value;
90 catch(std::out_of_range &)
95 const std::string
lossless = [&]() -> std::string {
99 stream << std::hexfloat << value;
floatbv_typet float_type()
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
goto_instruction_codet representation of a function call statement.
Data structure for representing an arbitrary statement in a program.
A constant literal expression.
std::string convert_code_java_new(const exprt &src, unsigned precedence)
std::string convert_java_new(const exprt &src)
virtual std::string convert_struct(const exprt &src, unsigned &precedence) override
virtual std::string convert_with_precedence(const exprt &src, unsigned &precedence) override
std::string convert_code_java_delete(const exprt &src, unsigned precedence)
virtual std::string convert_rec(const typet &src, const c_qualifierst &qualifiers, const std::string &declarator) override
std::string convert_code_function_call(const code_function_callt &src, unsigned indent)
const std::size_t char_representation_length
virtual std::string convert_code(const codet &src, unsigned indent) override
std::string convert_java_instanceof(const exprt &src)
virtual std::string convert(const typet &src) override
std::string convert_java_this()
expr2javat(const namespacet &_ns)
virtual std::string convert_constant(const constant_exprt &src, unsigned &precedence) override
Base class for all expressions.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
The type of an expression, extends irept.
std::string type2java(const typet &type, const namespacet &ns)
std::string floating_point_to_java_string(float_type value)
Convert floating point number to a string without printing unnecessary zeros.
std::string expr2java(const exprt &expr, const namespacet &ns)