Go to the documentation of this file.
27 if(expr.
type().
id()==ID_vector)
30 expr.
id() == ID_plus || expr.
id() == ID_minus || expr.
id() == ID_mult ||
31 expr.
id() == ID_div || expr.
id() == ID_mod || expr.
id() == ID_bitxor ||
32 expr.
id() == ID_bitand || expr.
id() == ID_bitor || expr.
id() == ID_shl ||
33 expr.
id() == ID_lshr || expr.
id() == ID_ashr ||
34 expr.
id() == ID_saturating_minus || expr.
id() == ID_saturating_plus)
38 else if(expr.
id()==ID_unary_minus || expr.
id()==ID_bitnot)
41 expr.
id() == ID_vector_equal || expr.
id() == ID_vector_notequal ||
42 expr.
id() == ID_vector_lt || expr.
id() == ID_vector_le ||
43 expr.
id() == ID_vector_gt || expr.
id() == ID_vector_ge)
47 else if(expr.
id() == ID_shuffle_vector)
49 else if(expr.
id()==ID_vector)
65 if(type.
id()==ID_struct || type.
id()==ID_union)
71 else if(type.
id() == ID_code)
83 else if(type.
id()==ID_pointer ||
84 type.
id()==ID_complex ||
87 else if(type.
id()==ID_vector)
101 if(expr.
id() == ID_shuffle_vector)
112 if(expr.
type().
id()==ID_vector)
115 expr.
id() == ID_plus || expr.
id() == ID_minus || expr.
id() == ID_mult ||
116 expr.
id() == ID_div || expr.
id() == ID_mod || expr.
id() == ID_bitxor ||
117 expr.
id() == ID_bitand || expr.
id() == ID_bitor || expr.
id() == ID_shl ||
118 expr.
id() == ID_lshr || expr.
id() == ID_ashr ||
119 expr.
id() == ID_saturating_minus || expr.
id() == ID_saturating_plus)
137 array_expr.
operands().resize(numeric_cast_v<std::size_t>(dimension));
140 for(std::size_t i=0; i<array_expr.operands().size(); i++)
152 else if(expr.
id()==ID_unary_minus || expr.
id()==ID_bitnot)
165 array_expr.
operands().resize(numeric_cast_v<std::size_t>(dimension));
168 for(std::size_t i=0; i<array_expr.operands().size(); i++)
173 unary_expr.id(),
index_exprt(unary_expr.op(), index, subtype));
179 expr.
id() == ID_vector_equal || expr.
id() == ID_vector_notequal ||
180 expr.
id() == ID_vector_lt || expr.
id() == ID_vector_le ||
181 expr.
id() == ID_vector_gt || expr.
id() == ID_vector_ge)
188 const auto dimension = numeric_cast_v<std::size_t>(vector_type.
size());
196 operands.reserve(dimension);
198 const bool is_float =
202 if(binary_expr.id() == ID_vector_notequal)
205 new_id = ID_ieee_float_notequal;
207 new_id = ID_notequal;
209 else if(binary_expr.id() == ID_vector_equal)
212 new_id = ID_ieee_float_equal;
219 new_id =
id2string(binary_expr.id()).substr(7);
222 for(std::size_t i = 0; i < dimension; ++i)
239 else if(expr.
id()==ID_vector)
243 else if(expr.
id() == ID_typecast)
247 if(op.type().id() != ID_array)
252 const auto dimension =
261 expr.
type().
id() == ID_vector &&
268 const std::size_t dimension =
273 elements.reserve(dimension);
275 for(std::size_t i = 0; i < dimension; i++)
282 array_exprt array_expr(std::move(elements), array_type);
284 expr.
swap(array_expr);
298 if(type.
id()==ID_struct || type.
id()==ID_union)
303 for(struct_union_typet::componentst::iterator
311 else if(type.
id() == ID_code)
319 else if(type.
id()==ID_pointer ||
320 type.
id()==ID_complex ||
325 else if(type.
id()==ID_vector)
348 for(
const auto &named_symbol : symbol_table.
symbols)
355 for(
auto &i : goto_function.body.instructions)
const componentst & components() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
static exprt conditional_cast(const exprt &expr, const typet &type)
const unary_exprt & to_unary_expr(const exprt &expr)
Cast an exprt to a unary_exprt.
#define Forall_operands(it, expr)
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
The type of an expression, extends irept.
Base type for structs and unions.
typet type
Type of symbol.
const constant_exprt & size() const
The trinary if-then-else operator.
const type_with_subtypet & to_type_with_subtype(const typet &type)
Base class for all expressions.
Generic base class for unary expressions.
A base class for binary expressions.
function_mapt function_map
const binary_exprt & to_binary_expr(const exprt &expr)
Cast an exprt to a binary_exprt.
static void remove_vector(typet &)
removes vector data type
const exprt & size() const
typet & type()
Return the type of the expression.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const typet & element_type() const
The type of the elements of the vector.
symbolt & get_writeable_ref(const irep_idt &name)
Find a symbol in the symbol table for read-write access.
const std::string & id2string(const irep_idt &d)
#define forall_operands(it, expr)
#define PRECONDITION(CONDITION)
const source_locationt & source_location() const
const shuffle_vector_exprt & to_shuffle_vector_expr(const exprt &expr)
Cast an exprt to a shuffle_vector_exprt.
const irep_idt & id() const
std::vector< exprt > operandst
const parameterst & parameters() const
source_locationt & add_source_location()
nonstd::optional< T > optionalt
vector_exprt lower() const
::goto_functiont goto_functiont
A collection of goto functions.
exprt value
Initial value of symbol.
goto_functionst goto_functions
GOTO functions.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
const symbolst & symbols
Read-only field, used to look up symbols given their names.
A base class for relations, i.e., binary predicates whose two operands have the same type.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
const vector_typet & to_vector_type(const typet &type)
Cast a typet to a vector_typet.
const typet & return_type() const
source_locationt & add_source_location()
Semantic type conversion.
const source_locationt & source_location() const
symbol_tablet symbol_table
Symbol table.
Array constructor from list of elements.
static bool have_to_remove_vector(const typet &type)
const typet & element_type() const
The type of the elements of the array.
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.