|
CBMC
|
Rewrites calls to obeys_contract predicates into calls to the library implementation. More...
#include <dfcc_obeys_contract.h>
Collaboration diagram for dfcc_obeys_contractt:Public Member Functions | |
| 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 program, passing the given write_set expression as parameter to the library function. | |
| void | rewrite_calls (goto_programt &program, goto_programt::targett first_instruction, const goto_programt::targett &last_instruction, 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 program between first_instruction (included) and last_instruction (excluded), passing the given write_set expression as parameter to the library function. | |
Protected Member Functions | |
| 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 typecast expressions). | |
Protected Attributes | |
| dfcc_libraryt & | library |
| message_handlert & | message_handler |
| messaget | log |
Rewrites calls to obeys_contract predicates into calls to the library implementation.
Definition at line 29 of file dfcc_obeys_contract.h.
| dfcc_obeys_contractt::dfcc_obeys_contractt | ( | dfcc_libraryt & | library, |
| message_handlert & | message_handler | ||
| ) |
| library | The contracts instrumentation library |
| message_handler | Used for messages |
Definition at line 23 of file dfcc_obeys_contract.cpp.
|
protected |
Extracts the name from the second argument of a call to obeys_contract (modulo any intermediate typecast expressions).
and adds it to function_pointer_contracts
Definition at line 43 of file dfcc_obeys_contract.cpp.
| void dfcc_obeys_contractt::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 program, passing the given write_set expression as parameter to the library function.
Definition at line 30 of file dfcc_obeys_contract.cpp.
| void dfcc_obeys_contractt::rewrite_calls | ( | goto_programt & | program, |
| goto_programt::targett | first_instruction, | ||
| const goto_programt::targett & | last_instruction, | ||
| 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 program between first_instruction (included) and last_instruction (excluded), passing the given write_set expression as parameter to the library function.
Definition at line 63 of file dfcc_obeys_contract.cpp.
|
protected |
Definition at line 58 of file dfcc_obeys_contract.h.
|
protected |
Definition at line 60 of file dfcc_obeys_contract.h.
|
protected |
Definition at line 59 of file dfcc_obeys_contract.h.