Go to the documentation of this file.
11 #ifndef CPROVER_GOTO_INSTRUMENT_CONTRACTS_UTILS_H
12 #define CPROVER_GOTO_INSTRUMENT_CONTRACTS_UTILS_H
98 const std::vector<symbol_exprt> &lhs,
99 const std::vector<symbol_exprt> &rhs);
132 std::string suffix =
"tmp_cc",
133 bool is_auxiliary =
true);
183 #endif // CPROVER_GOTO_INSTRUMENT_CONTRACTS_UTILS_H
Class that provides messages with a built-in verbosity 'level'.
void do_havoc_slice(const exprt &lhs, const symbol_exprt &function, const exprt::operandst &arguments, goto_programt &dest, const irep_idt &mode)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
havoc_if_validt(const assignst &mod, const namespacet &ns)
The type of an expression, extends irept.
void clean_expr(exprt &expr, goto_programt &dest, const irep_idt &mode, bool result_is_used=true)
cleanert(symbol_table_baset &_symbol_table, message_handlert &_message_handler)
bool is_loop_free(const goto_programt &goto_program, namespacet &ns, messaget &log)
Returns true iff the given program is loop-free, i.e.
Base class for all expressions.
Expression to hold a symbol (variable)
const symbolt & new_tmp_symbol(const typet &type, const source_locationt &location, const irep_idt &mode, symbol_table_baset &symtab, std::string suffix="tmp_cc", bool is_auxiliary=true)
Adds a fresh and uniquely named symbol to the symbol table.
void clean(exprt &guard, goto_programt &dest, const irep_idt &mode)
Allows to clean expressions of side effects.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Expression classes for byte-level operators.
exprt all_dereferences_are_valid(const exprt &expr, const namespacet &ns)
Generate a validity check over all dereferences in an expression.
void insert_before_swap_and_advance(goto_programt &destination, goto_programt::targett &target, goto_programt &payload)
Insert a goto program before a target instruction iterator and advance the iterator.
void append_object_havoc_code_for_expr(const source_locationt location, const exprt &expr, goto_programt &dest) const override
Append goto instructions to havoc the underlying object of expr
A class that further overrides the "safe" havoc utilities, and adds support for havocing pointer_obje...
The symbol table base class interface.
exprt generate_lexicographic_less_than_check(const std::vector< symbol_exprt > &lhs, const std::vector< symbol_exprt > &rhs)
Generate a lexicographic less-than comparison over ordered tuples.
std::vector< exprt > operandst
std::set< exprt > assignst
irep_idt make_assigns_clause_replacement_tracking_comment(const exprt &target, const irep_idt &function_id, const namespacet &ns)
Returns an irep_idt that essentially says that target was assigned by the contract of function_id.
havoc_assigns_targetst(const assignst &mod, const namespacet &ns)
void append_scalar_havoc_code_for_expr(const source_locationt location, const exprt &expr, goto_programt &dest) const override
Append goto instructions to havoc the value of expr
void simplify_gotos(goto_programt &goto_program, namespacet &ns)
Turns goto instructions IF cond GOTO label where the condition statically simplifies to false into SK...
void do_havoc_slice(const symbol_exprt &function, const exprt::operandst &arguments, goto_programt &dest, const irep_idt &mode)
bool is_assigns_clause_replacement_tracking_comment(const irep_idt &comment)
Returns true if the given comment matches the type of comments created by make_assigns_clause_replace...
Templated functions to cast to specific exprt-derived classes.
A generic container class for the GOTO intermediate representation of one function.
void append_havoc_code_for_expr(const source_locationt location, const exprt &expr, goto_programt &dest) const override
Append goto instructions to havoc a single expression expr
A class that overrides the low-level havocing functions in the base utility class,...
static std::string comment(const rw_set_baset::entryt &entry, bool write)
instructionst::iterator targett