20#define ENABLE_ARRAY_FIELD_SENSITIVITY
56#ifdef ENABLE_ARRAY_FIELD_SENSITIVITY
85 tmp.set_expression(member);
109 bool was_l2 = !
tmp.get_level_2().empty();
110 tmp.remove_level_2();
119 tmp.type() =
be.type();
146#ifdef ENABLE_ARRAY_FIELD_SENSITIVITY
166 bool was_l2 = !
tmp.get_level_2().empty();
192 tmp.set_expression(index);
235 fields.reserve(components.size());
239 for(
const auto &
comp : components)
242 bool was_l2 = !
tmp.get_level_2().empty();
243 tmp.remove_level_2();
249 fields.emplace_back(state.
rename(std::move(
field), ns).get());
252 fields.emplace_back(std::move(
field));
264#ifdef ENABLE_ARRAY_FIELD_SENSITIVITY
286 bool was_l2 = !
tmp.get_level_2().empty();
287 tmp.remove_level_2();
288 tmp.set_expression(index);
292 elements.emplace_back(state.
rename(std::move(element), ns).get());
295 elements.emplace_back(std::move(element));
314 bool allow_pointer_unsoundness)
const
321 ns, state,
lhs_fs, rhs, target, allow_pointer_unsoundness);
347 const exprt &ssa_rhs,
349 bool allow_pointer_unsoundness)
const
387 components.empty() ||
388 (
lhs_fs.has_operands() &&
lhs_fs.operands().size() == components.size()));
390 exprt::operandst::const_iterator
fs_it =
lhs_fs.operands().begin();
391 for(
const auto &
comp : components)
410 allow_pointer_unsoundness);
428 components.empty() ||
429 (
lhs_fs.has_operands() &&
lhs_fs.operands().size() == components.size()));
431 exprt::operandst::const_iterator
fs_it =
lhs_fs.operands().begin();
432 for(
const auto &
comp : components)
454 allow_pointer_unsoundness);
462#ifdef ENABLE_ARRAY_FIELD_SENSITIVITY
472 exprt::operandst::const_iterator
fs_it =
lhs_fs.operands().begin();
493 allow_pointer_unsoundness);
502 else if(
lhs_fs.has_operands())
508 exprt::operandst::const_iterator
fs_it =
lhs_fs.operands().begin();
519 allow_pointer_unsoundness);
523 ns, state, *
fs_it, op, target, allow_pointer_unsoundness);
540#ifdef ENABLE_ARRAY_FIELD_SENSITIVITY
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.
Expression classes for byte-level operators.
const byte_extract_exprt & to_byte_extract_expr(const exprt &expr)
bitvector_typet c_index_type()
const union_typet & to_union_type(const typet &type)
Cast a typet to a union_typet.
const union_tag_typet & to_union_tag_type(const typet &type)
Cast a typet to a union_tag_typet.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Array constructor from list of elements.
typet index_type() const
The type of the index expressions into any instance of this type.
Base class for all expressions.
std::vector< exprt > operandst
bool has_operands() const
Return true if there is at least one operand.
bool is_constant() const
Return whether the expression is a constant.
typet & type()
Return the type of the expression.
const bool should_simplify
exprt simplify_opt(exprt e, const namespacet &ns) const
const std::size_t max_field_sensitivity_array_size
exprt get_fields(const namespacet &ns, goto_symex_statet &state, const ssa_exprt &ssa_expr, bool disjoined_fields_only) const
Compute an expression representing the individual components of a field-sensitive SSA representation ...
void field_assignments_rec(const namespacet &ns, goto_symex_statet &state, const exprt &lhs_fs, const exprt &ssa_rhs, symex_targett &target, bool allow_pointer_unsoundness) const
Assign to the individual fields lhs_fs of a non-expanded symbol lhs.
exprt apply(const namespacet &ns, goto_symex_statet &state, exprt expr, bool write) const
Turn an expression expr into a field-sensitive SSA expression.
void field_assignments(const namespacet &ns, goto_symex_statet &state, const ssa_exprt &lhs, const exprt &rhs, symex_targett &target, bool allow_pointer_unsoundness) const
Assign to the individual fields of a non-expanded symbol lhs.
bool is_divisible(const ssa_exprt &expr, bool disjoined_fields_only) const
Determine whether expr would translate to an atomic SSA expression (returns false) or a composite obj...
sharing_mapt< irep_idt, exprt > propagation
value_sett value_set
Uses level 1 names, and is used to do dereferencing.
Central data structure: state.
renamedt< ssa_exprt, L2 > assignment(ssa_exprt lhs, const exprt &rhs, const namespacet &ns, bool rhs_is_simplified, bool record_value, bool allow_pointer_unsoundness=false)
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...
symex_targett::sourcet source
const irep_idt & id() const
Extract member of struct or union.
const exprt & struct_op() const
const union_typet & follow_tag(const union_tag_typet &) const
Follow type tag of union type.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
const symbol_table_baset & get_symbol_table() const
Return first symbol table registered with the namespace.
Expression providing an SSA-renamed symbol of expressions.
const exprt & get_original_expr() const
Struct constructor from list of elements.
Structure type, corresponds to C style structs.
const componentst & components() const
std::vector< componentt > componentst
const irep_idt & get_identifier() const
The interface of the target container for symbolic execution to record its symbolic steps into.
virtual void assignment(const exprt &guard, const ssa_exprt &ssa_lhs, const exprt &ssa_full_lhs, const exprt &original_full_lhs, const exprt &ssa_rhs, const sourcet &source, assignment_typet assignment_type)=0
Write to a local variable.
void erase_symbol(const symbol_exprt &symbol_expr, const namespacet &ns)
#define Forall_operands(it, expr)
std::optional< exprt > get_subexpression_at_offset(const exprt &expr, const mp_integer &offset_bytes, const typet &target_type_raw, const namespacet &ns)
bool simplify(exprt &expr, const namespacet &ns)
exprt simplify_expr(exprt src, const namespacet &ns)
#define UNREACHABLE
This should be used to mark dead code.
#define PRECONDITION(CONDITION)
bool is_ssa_expr(const exprt &expr)
const ssa_exprt & to_ssa_expr(const exprt &expr)
Cast a generic exprt to an ssa_exprt.
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.
const member_exprt & to_member_expr(const exprt &expr)
Cast an exprt to a member_exprt.
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const struct_typet & to_struct_type(const typet &type)
Cast a typet to a struct_typet.
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.
const struct_or_union_tag_typet & to_struct_or_union_tag_type(const typet &type)
Cast a typet to a struct_or_union_tag_typet.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
Generate Equation using Symbolic Execution.
ssize_t write(int fildes, const void *buf, size_t nbyte)