27 if(expr.
id()==ID_floatbv_plus ||
28 expr.
id()==ID_floatbv_minus ||
29 expr.
id()==ID_floatbv_mult ||
30 expr.
id()==ID_floatbv_div ||
31 expr.
id()==ID_floatbv_div ||
32 expr.
id()==ID_floatbv_rem ||
33 expr.
id()==ID_floatbv_typecast)
38 if(type.
id()==ID_floatbv ||
39 (type.
id()==ID_complex &&
42 if(expr.
id()==ID_plus || expr.
id()==ID_minus ||
43 expr.
id()==ID_mult || expr.
id()==ID_div ||
48 if(expr.
id()==ID_typecast)
53 const typet &dest_type=typecast_expr.
type();
55 if(dest_type.
id()==ID_floatbv &&
56 src_type.
id()==ID_floatbv)
58 else if(dest_type.
id()==ID_floatbv &&
59 (src_type.
id()==ID_c_bool ||
60 src_type.
id()==ID_signedbv ||
61 src_type.
id()==ID_unsignedbv ||
62 src_type.
id()==ID_c_enum_tag))
64 else if((dest_type.
id()==ID_signedbv ||
65 dest_type.
id()==ID_unsignedbv ||
66 dest_type.
id()==ID_c_enum_tag) &&
67 src_type.
id()==ID_floatbv)
92 if(type.
id()==ID_floatbv ||
93 (type.
id()==ID_complex &&
101 if(expr.
id()==ID_plus || expr.
id()==ID_minus ||
102 expr.
id()==ID_mult || expr.
id()==ID_div ||
112 expr.
id(expr.
id()==ID_plus?ID_floatbv_plus:
113 expr.
id()==ID_minus?ID_floatbv_minus:
114 expr.
id()==ID_mult?ID_floatbv_mult:
115 expr.
id()==ID_div?ID_floatbv_div:
116 expr.
id()==ID_rem?ID_floatbv_rem:
120 expr.
op2()=rounding_mode;
124 if(expr.
id()==ID_typecast)
129 const typet &dest_type=typecast_expr.
type();
136 if(dest_type.
id()==ID_floatbv &&
137 src_type.
id()==ID_floatbv)
143 expr.
id(ID_floatbv_typecast);
145 expr.
op1()=rounding_mode;
147 else if(dest_type.
id()==ID_floatbv &&
148 (src_type.
id()==ID_c_bool ||
149 src_type.
id()==ID_signedbv ||
150 src_type.
id()==ID_unsignedbv ||
151 src_type.
id()==ID_c_enum_tag))
154 expr.
id(ID_floatbv_typecast);
156 expr.
op1()=rounding_mode;
158 else if((dest_type.
id()==ID_signedbv ||
159 dest_type.
id()==ID_unsignedbv ||
160 dest_type.
id()==ID_c_enum_tag) &&
161 src_type.
id()==ID_floatbv)
174 expr.
id(ID_floatbv_typecast);
The type of an expression.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast a generic exprt to a typecast_exprt.
const typet & follow(const typet &src) const
virtual bool lookup(const irep_idt &name, const symbolt *&symbol) const
Deprecated expression utility functions.
symbol_tablet symbol_table
const irep_idt & id() const
API to expression classes.
#define forall_operands(it, expr)
void adjust_float_expressions(exprt &expr, const namespacet &ns)
This adds the rounding mode to floating-point operations, including those in vectors and complex numb...
goto_function_templatet< goto_programt > goto_functiont
Base class for all expressions.
#define Forall_goto_functions(it, functions)
const source_locationt & source_location() const
#define Forall_operands(it, expr)
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
static bool have_to_adjust_float_expressions(const exprt &expr, const namespacet &ns)