CBMC
|
Wrapper for functions removing dereferences in expressions contained in a goto program. More...
#include <goto_program_dereference.h>
Public Member Functions | |
goto_program_dereferencet (const namespacet &_ns, symbol_table_baset &_new_symbol_table, const optionst &_options, value_setst &_value_sets, message_handlert &message_handler) | |
void | dereference_program (goto_programt &goto_program, bool checks_only=false) |
void | dereference_program (goto_functionst &goto_functions, bool checks_only=false) |
void | dereference_expression (const irep_idt &function_id, goto_programt::const_targett target, exprt &expr) |
Set the current target to target and remove derefence from expr. | |
virtual | ~goto_program_dereferencet () |
Protected Member Functions | |
const symbolt * | get_or_create_failed_symbol (const exprt &expr) override |
std::vector< exprt > | get_value_set (const exprt &expr) const override |
Gets the value set corresponding to the current target and expression expr . | |
void | dereference_instruction (goto_programt::targett target, bool checks_only=false) |
Remove dereference from expressions contained in the instruction at target . | |
void | dereference_rec (exprt &expr) |
Turn subexpression of expr of the form &*p into p and use dereference on subexpressions of the form *p | |
void | dereference_expr (exprt &expr, const bool checks_only) |
Remove dereference expressions contained in expr . | |
![]() | |
virtual | ~dereference_callbackt ()=default |
Wrapper for functions removing dereferences in expressions contained in a goto program.
Definition at line 29 of file goto_program_dereference.h.
|
inline |
Definition at line 43 of file goto_program_dereference.h.
|
inlinevirtual |
Definition at line 69 of file goto_program_dereference.h.
Remove dereference expressions contained in expr
.
expr | an expression |
checks_only | when true, execute the substitution on a copy of expr so that expr stays unchanged. In that case the only observable effect is whether an exception would be thrown. |
Definition at line 145 of file goto_program_dereference.cpp.
void goto_program_dereferencet::dereference_expression | ( | const irep_idt & | function_id, |
goto_programt::const_targett | target, | ||
exprt & | expr | ||
) |
Set the current target to target
and remove derefence from expr.
Definition at line 247 of file goto_program_dereference.cpp.
|
protected |
Remove dereference from expressions contained in the instruction at target
.
If check_only
is true, the dereferencing is performed on copies of the expressions, in that case the only observable effect is whether an exception would be thrown.
Definition at line 195 of file goto_program_dereference.cpp.
void goto_program_dereferencet::dereference_program | ( | goto_functionst & | goto_functions, |
bool | checks_only = false |
||
) |
Definition at line 180 of file goto_program_dereference.cpp.
void goto_program_dereferencet::dereference_program | ( | goto_programt & | goto_program, |
bool | checks_only = false |
||
) |
Definition at line 158 of file goto_program_dereference.cpp.
Turn subexpression of expr
of the form &*p
into p and use dereference
on subexpressions of the form *p
expr | expression in which to remove dereferences |
Definition at line 50 of file goto_program_dereference.cpp.
|
overrideprotectedvirtual |
expr | expression to check |
expr
, or nullptr if none Implements dereference_callbackt.
Definition at line 25 of file goto_program_dereference.cpp.
|
overrideprotectedvirtual |
Gets the value set corresponding to the current target and expression expr
.
expr | an expression |
Implements dereference_callbackt.
Definition at line 135 of file goto_program_dereference.cpp.
|
protected |
Definition at line 91 of file goto_program_dereference.h.
|
protected |
Definition at line 92 of file goto_program_dereference.h.
|
protected |
Definition at line 77 of file goto_program_dereference.h.
|
protected |
Definition at line 93 of file goto_program_dereference.h.
|
protected |
Definition at line 75 of file goto_program_dereference.h.
Definition at line 74 of file goto_program_dereference.h.
|
protected |
Definition at line 76 of file goto_program_dereference.h.