25 : library(library), message_handler(message_handler),
log(message_handler)
32 std::set<irep_idt> &function_pointer_contracts)
39 function_pointer_contracts);
44 std::set<irep_idt> &function_pointer_contracts)
48 if(expr.
id() == ID_typecast)
56 "symbol expression expected");
57 function_pointer_contracts.insert(
67 std::set<irep_idt> &function_pointer_contracts)
69 for(
auto &target = first_instruction; target != last_instruction; target++)
71 if(target->is_function_call())
73 const auto &
function = target->call_function();
75 if(
function.
id() == ID_symbol)
82 target->call_arguments()[0] =
91 target->call_arguments().push_back(cfg_info.
get_write_set(target));
95 target->call_arguments()[1], function_pointer_contracts);
Operator to return the address of an object.
Computes natural loops, enforces normal form conditions, computes the nesting graph,...
const exprt & get_write_set(goto_programt::const_targett target) const
Returns the write set variable for that instruction.
Class interface to library types and functions defined in cprover_contracts.c.
std::map< dfcc_funt, symbolt > dfcc_fun_symbol
Maps enum values to the actual function symbols (dynamically loaded)
dfcc_obeys_contractt(dfcc_libraryt &library, message_handlert &message_handler)
void rewrite_calls(goto_programt &program, dfcc_cfg_infot &cfg_info, std::set< irep_idt > &function_pointer_contracts)
Rewrites calls to obeys_contract predicates into calls to the library implementation in the given pro...
void get_contract_name(const exprt &expr, std::set< irep_idt > &function_pointer_contracts)
Extracts the name from the second argument of a call to obeys_contract (modulo any intermediate typec...
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
A generic container class for the GOTO intermediate representation of one function.
instructionst instructions
The list of instructions in the goto program.
instructionst::iterator targett
const irep_idt & id() const
void set_identifier(const irep_idt &identifier)
const irep_idt & get_identifier() const
bool has_prefix(const std::string &s, const std::string &prefix)
Class that computes CFG information about the loop structure of a GOTO function for the purpose of dy...
Dynamic frame condition checking library loading.
Instruments occurrences of obeys_contract predicates in programs encoding requires and ensures clause...
const std::string & id2string(const irep_idt &d)
API to expression classes for Pointers.
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
#define PRECONDITION_WITH_DIAGNOSTICS(CONDITION,...)
#define PRECONDITION(CONDITION)
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.