Go to the documentation of this file.
26 if(expr.
type().
id()==ID_vector)
28 if(expr.
id()==ID_plus || expr.
id()==ID_minus ||
29 expr.
id()==ID_mult || expr.
id()==ID_div ||
30 expr.
id()==ID_mod || expr.
id()==ID_bitxor ||
31 expr.
id()==ID_bitand || expr.
id()==ID_bitor)
33 else if(expr.
id()==ID_unary_minus || expr.
id()==ID_bitnot)
35 else if(expr.
id()==ID_vector)
51 if(type.
id()==ID_struct || type.
id()==ID_union)
57 else if(type.
id()==ID_pointer ||
58 type.
id()==ID_complex ||
61 else if(type.
id()==ID_vector)
78 if(expr.
type().
id()==ID_vector)
80 if(expr.
id()==ID_plus || expr.
id()==ID_minus ||
81 expr.
id()==ID_mult || expr.
id()==ID_div ||
82 expr.
id()==ID_mod || expr.
id()==ID_bitxor ||
83 expr.
id()==ID_bitand || expr.
id()==ID_bitor)
101 array_expr.
operands().resize(numeric_cast_v<std::size_t>(dimension));
103 for(std::size_t i=0; i<array_expr.operands().size(); i++)
115 else if(expr.
id()==ID_unary_minus || expr.
id()==ID_bitnot)
128 array_expr.
operands().resize(numeric_cast_v<std::size_t>(dimension));
130 for(std::size_t i=0; i<array_expr.operands().size(); i++)
135 unary_expr.id(),
index_exprt(unary_expr.op(), index, subtype));
140 else if(expr.
id()==ID_vector)
144 else if(expr.
id() == ID_typecast)
148 if(op.type().id() != ID_array)
153 const auto dimension =
171 if(type.
id()==ID_struct || type.
id()==ID_union)
176 for(struct_union_typet::componentst::iterator
184 else if(type.
id()==ID_pointer ||
185 type.
id()==ID_complex ||
190 else if(type.
id()==ID_vector)
213 for(
const auto &named_symbol : symbol_table.
symbols)
222 for(
auto &i : goto_function.body.instructions)
const componentst & components() const
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.
const typet & subtype() const
#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.
Base class for all expressions.
Generic base class for unary expressions.
A base class for binary expressions.
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.
symbolt & get_writeable_ref(const irep_idt &name)
Find a symbol in the symbol table for read-write access.
#define forall_operands(it, expr)
#define PRECONDITION(CONDITION)
const source_locationt & source_location() const
const irep_idt & id() const
std::vector< exprt > operandst
source_locationt & add_source_location()
nonstd::optional< T > optionalt
const constant_exprt & size() const
Remove the 'vector' data type by compilation into arrays.
#define Forall_goto_functions(it, functions)
::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.
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.
API to expression classes.
symbol_tablet symbol_table
Symbol table.
Array constructor from list of elements.
static bool have_to_remove_vector(const typet &type)
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.