25 if(expr.
id()==ID_floatbv_plus ||
26 expr.
id()==ID_floatbv_minus ||
27 expr.
id()==ID_floatbv_mult ||
28 expr.
id()==ID_floatbv_div ||
29 expr.
id()==ID_floatbv_div ||
30 expr.
id()==ID_floatbv_rem ||
31 expr.
id()==ID_floatbv_typecast)
37 type.
id() == ID_floatbv ||
38 (type.
id() == ID_complex && type.
subtype().
id() == ID_floatbv))
40 if(expr.
id()==ID_plus || expr.
id()==ID_minus ||
41 expr.
id()==ID_mult || expr.
id()==ID_div ||
46 if(expr.
id()==ID_typecast)
51 const typet &dest_type=typecast_expr.
type();
53 if(dest_type.
id()==ID_floatbv &&
54 src_type.
id()==ID_floatbv)
56 else if(dest_type.
id()==ID_floatbv &&
57 (src_type.
id()==ID_c_bool ||
58 src_type.
id()==ID_signedbv ||
59 src_type.
id()==ID_unsignedbv ||
60 src_type.
id()==ID_c_enum_tag))
62 else if((dest_type.
id()==ID_signedbv ||
63 dest_type.
id()==ID_unsignedbv ||
64 dest_type.
id()==ID_c_enum_tag) &&
65 src_type.
id()==ID_floatbv)
90 type.
id() == ID_floatbv ||
91 (type.
id() == ID_complex && type.
subtype().
id() == ID_floatbv))
93 if(expr.
id()==ID_plus || expr.
id()==ID_minus ||
94 expr.
id()==ID_mult || expr.
id()==ID_div ||
104 expr.
id(expr.
id()==ID_plus?ID_floatbv_plus:
105 expr.
id()==ID_minus?ID_floatbv_minus:
106 expr.
id()==ID_mult?ID_floatbv_mult:
107 expr.
id()==ID_div?ID_floatbv_div:
108 expr.
id()==ID_rem?ID_floatbv_rem:
112 expr.
op2()=rounding_mode;
116 if(expr.
id()==ID_typecast)
121 const typet &dest_type=typecast_expr.
type();
123 if(dest_type.
id()==ID_floatbv &&
124 src_type.
id()==ID_floatbv)
130 expr.
id(ID_floatbv_typecast);
132 expr.
op1()=rounding_mode;
134 else if(dest_type.
id()==ID_floatbv &&
135 (src_type.
id()==ID_c_bool ||
136 src_type.
id()==ID_signedbv ||
137 src_type.
id()==ID_unsignedbv ||
138 src_type.
id()==ID_c_enum_tag))
141 expr.
id(ID_floatbv_typecast);
143 expr.
op1()=rounding_mode;
145 else if((dest_type.
id()==ID_signedbv ||
146 dest_type.
id()==ID_unsignedbv ||
147 dest_type.
id()==ID_c_enum_tag) &&
148 src_type.
id()==ID_floatbv)
161 expr.
id(ID_floatbv_typecast);
The type of an expression.
static bool have_to_adjust_float_expressions(const exprt &expr)
Deprecated expression utility functions.
symbol_tablet symbol_table
Symbol table.
void adjust_float_expressions(exprt &expr, const exprt &rounding_mode)
This adds the rounding mode to floating-point operations, including those in vectors and complex numb...
const irep_idt & id() const
API to expression classes.
::goto_functiont goto_functiont
#define forall_operands(it, expr)
Base class for all expressions.
#define Forall_goto_functions(it, functions)
const source_locationt & source_location() const
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast a generic exprt to a typecast_exprt.
source_locationt & add_source_location()
#define Forall_goto_program_instructions(it, program)
Expression to hold a symbol (variable)
const typet & subtype() const
exprt make_binary(const exprt &expr)
splits an expression with >=3 operands into nested binary expressions
goto_functionst goto_functions
GOTO functions.
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See namespace_baset::lookup().