Go to the documentation of this file.
56 else if(expr.
id()==ID_address_of)
73 else if(expr.
id() != ID_symbol)
83 if(expr.
type().
id() == ID_empty)
88 if(expr.
type().
id() != ID_array)
104 const typet &array_size_type = prev_array_type.
size().
type();
112 subtype_size_opt.value(), array_size_type);
113 new_offset =
div_exprt(new_offset, subtype_size);
117 subtraction, ID_ge,
from_integer(0, subtraction.type())},
149 if(expr.
id()==ID_byte_extract_big_endian ||
150 expr.
id()==ID_byte_extract_little_endian)
153 if(be.
op().
id()==ID_symbol &&
168 if(expr.
id() == ID_side_effect && expr.
get(ID_statement) == ID_nondet)
182 let_value = state.
rename(std::move(let_value),
ns).get();
192 value_assignment_guard);
202 if(it->id() == ID_let)
205 exprt &replaced_expr = it.mutate();
211 replaced_expr = replaced_let.
where();
213 it.next_sibling_or_parent();
215 else if(it->id() == ID_exists || it->id() == ID_forall)
219 it.next_sibling_or_parent();
exprt clean_expr(exprt expr, statet &state, bool write)
Clean up an expression.
Functor generating fresh nondet symbols.
byte_extract_exprt make_byte_extract(const exprt &_op, const exprt &_offset, const typet &_type)
Construct a byte_extract_exprt with endianness and byte width matching the current configuration.
static exprt conditional_cast(const exprt &expr, const typet &type)
std::vector< symbol_exprt > instruction_local_symbols
Variables that should be killed at the end of the current symex_step invocation.
depth_iteratort depth_end()
#define Forall_operands(it, expr)
symex_nondet_generatort build_symex_nondet
Counter for nondet objects, which require unique names.
void build(const exprt &expr, const namespacet &ns)
Given an expression expr, attempt to find the underlying object it represents by skipping over type c...
static void replace_nondet(exprt &expr, symex_nondet_generatort &build_symex_nondet)
#define CHECK_RETURN(CONDITION)
The type of an expression, extends irept.
const byte_extract_exprt & to_byte_extract_expr(const exprt &expr)
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.
const if_exprt & to_if_expr(const exprt &expr)
Cast an exprt to an if_exprt.
symex_target_equationt & target
The equation that this execution is building up.
path_storaget & path_storage
Symbolic execution paths to be resumed later.
Central data structure: state.
The trinary if-then-else operator.
Split an expression into a base object and a (byte) offset.
symbol_exprt & symbol()
convenience accessor for the symbol of a single binding
Base class for all expressions.
void lift_let(statet &state, const let_exprt &let_expr)
Execute a single let expression, which should not have any nested let expressions (use lift_lets inst...
Functor for symex assignment.
const exprt & get_original_expr() const
Storage of symbolic execution paths to resume.
static const exprt & root_object(const exprt &expr)
const irep_idt & get(const irep_idt &name) const
messaget log
The messaget to write log messages to.
Expression providing an SSA-renamed symbol of expressions.
const exprt & size() const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
typet & type()
Return the type of the expression.
exprt & value()
convenience accessor for the value of a single binding
Expression classes for byte-level operators.
bool is_ssa_expr(const exprt &expr)
void process_array_expr(statet &, exprt &)
Given an expression, find the root object and the offset into it.
const ssa_exprt & to_ssa_expr(const exprt &expr)
Cast a generic exprt to an ssa_exprt.
virtual void dereference(exprt &, statet &, bool write)
Replace all dereference operations within expr with explicit references to the objects they may refer...
symbol_tablet symbol_table
contains symbols that are minted during symbolic execution, such as dynamically created objects etc.
A base class for expressions that are predicates, i.e., Boolean-typed, and that take exactly two argu...
renamedt< exprt, level > rename(exprt expr, const namespacet &ns)
Rewrites symbol expressions in exprt, applying a suffix to each symbol reflecting its most recent ver...
const let_exprt & to_let_expr(const exprt &expr)
Cast an exprt to a let_exprt.
static void adjust_byte_extract_rec(exprt &expr, const namespacet &ns)
Rewrite index/member expressions in byte_extract to offset.
Callback object that goto_symext::dereference_rec provides to value_set_dereferencet to provide value...
bool simplify(exprt &expr, const namespacet &ns)
const irep_idt & id() const
std::vector< exprt > operandst
virtual void do_simplify(exprt &expr)
bitvector_typet char_type()
Wrapper for a function dereferencing pointer expressions using a value set.
bool is_zero() const
Return whether the expression is a constant representing 0.
namespacet ns
Initialized just before symbolic execution begins, to point to both outer_symbol_table and the symbol...
irep_idt language_mode
language_mode: ID_java, ID_C or another language identifier if we know the source language in use,...
depth_iteratort depth_begin()
void lift_lets(statet &, exprt &)
Execute any let expressions in expr using symex_assignt::assign_symbol.
const symex_configt symex_config
The configuration to use for this symbolic execution.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
optionalt< exprt > size_of_expr(const typet &type, const namespacet &ns)
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
bitvector_typet c_index_type()
exprt & where()
convenience accessor for binding().where()
const source_locationt & source_location() const
bool get_bool(const irep_idt &name) const
Expression in which some part is missing and can be substituted for another expression.
static void process_array_expr(exprt &expr, bool do_simplify, const namespacet &ns)
Given an expression, find the root object and the offset into it.
const typet & element_type() const
The type of the elements of the array.