25 if(dest.
id()==ID_symbol)
40 else if(dest.
id()==ID_byte_extract_little_endian ||
41 dest.
id()==ID_byte_extract_big_endian)
45 else if(dest.
id()==ID_if)
57 else if(dest.
id()==ID_typecast)
61 else if(dest.
id()==ID_index)
65 else if(dest.
id()==ID_member)
73 "Attempted to symex havoc applied to unsupported expression",
88 if(statement==ID_expression)
92 else if(statement==ID_cpp_delete ||
93 statement==
"cpp_delete[]")
98 else if(statement==ID_printf)
113 else if(statement==ID_decl)
117 else if(statement==ID_nondet)
121 else if(statement==ID_asm)
125 else if(statement==ID_array_copy ||
126 statement==ID_array_replace)
137 "expected array_copy/array_replace statement to have two operands");
148 if(dest_array.
type() != src_array.
type())
150 if(statement==ID_array_copy)
167 else if(statement==ID_array_set)
178 "expected array_set statement to have two operands");
188 if(array_expr.
type().
id() == ID_empty)
196 if(array_expr.
type().
id() != ID_array)
214 else if(statement==ID_array_equal)
226 "expected array_equal statement to have three operands");
246 else if(statement==ID_user_specified_predicate ||
247 statement==ID_user_specified_parameter_predicates ||
248 statement==ID_user_specified_return_predicates)
252 else if(statement==ID_fence)
256 else if(statement==ID_havoc_object)
260 "expected havoc_object statement to have one operand");
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)
static exprt guard(const exprt::operandst &guards, exprt cond)
bitvector_typet char_type()
bitvector_typet c_index_type()
Array constructor from single element.
const typet & element_type() const
The type of the elements of the array.
Data structure for representing an arbitrary statement in a program.
const irep_idt & get_statement() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
bool is_true() const
Return whether the expression is a constant representing true.
typet & type()
Return the type of the expression.
The Boolean constant false.
This class represents an instruction in the GOTO intermediate representation.
const goto_instruction_codet & get_other() const
Get the statement for OTHER.
Central data structure: state.
symex_targett::sourcet source
virtual void symex_input(statet &state, const codet &code)
Symbolically execute an OTHER instruction that does a CPP input.
void havoc_rec(statet &state, const guardt &guard, const exprt &dest)
symex_target_equationt & target
The equation that this execution is building up.
virtual void symex_cpp_delete(statet &state, const codet &code)
Symbolically execute an OTHER instruction that does a CPP delete
guard_managert & guard_manager
Used to create guards.
exprt clean_expr(exprt expr, statet &state, bool write)
Clean up an expression.
namespacet ns
Initialized just before symbolic execution begins, to point to both outer_symbol_table and the symbol...
void symex_assign(statet &state, const exprt &lhs, const exprt &rhs)
Symbolically execute an ASSIGN instruction or simulate such an execution for a synthetic assignment.
virtual void symex_printf(statet &state, const exprt &rhs)
Symbolically execute an OTHER instruction that does a CPP printf
virtual void symex_output(statet &state, const codet &code)
Symbolically execute an OTHER instruction that does a CPP output.
virtual void do_simplify(exprt &expr)
virtual void symex_other(statet &state)
Symbolically execute an OTHER instruction.
void process_array_expr(statet &, exprt &)
Given an expression, find the root object and the offset into it.
void add(const exprt &expr)
The trinary if-then-else operator.
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
const irep_idt & id() const
A side_effect_exprt that returns a non-deterministically chosen value.
virtual void memory_barrier(const exprt &guard, const sourcet &source)
Record creating a memory barrier.
The Boolean constant true.
Semantic type conversion.
bool can_cast_expr< code_inputt >(const exprt &base)
bool can_cast_expr< code_outputt >(const exprt &base)
std::optional< exprt > size_of_expr(const typet &type, const namespacet &ns)
#define CHECK_RETURN(CONDITION)
#define UNREACHABLE
This should be used to mark dead code.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
#define INVARIANT_WITH_DIAGNOSTICS(CONDITION, REASON,...)
Same as invariant, with one or more diagnostics attached Diagnostics can be of any type that has a sp...
const codet & to_code(const exprt &expr)
const if_exprt & to_if_expr(const exprt &expr)
Cast an exprt to an if_exprt.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
const member_exprt & to_member_expr(const exprt &expr)
Cast an exprt to a member_exprt.
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
goto_programt::const_targett pc