|
cprover
|
Wrapper for functions removing dereferences in expressions contained in a goto program. More...
#include <goto_program_dereference.h>
Inheritance diagram for goto_program_dereferencet:
Collaboration diagram for goto_program_dereferencet:Public Member Functions | |
| goto_program_dereferencet (const namespacet &_ns, symbol_tablet &_new_symbol_table, const optionst &_options, value_setst &_value_sets) | |
| void | dereference_program (goto_programt &goto_program, bool checks_only=false) |
| void | dereference_program (goto_functionst &goto_functions, bool checks_only=false) |
| void | pointer_checks (goto_programt &goto_program) |
| Throw an exception in case removing dereferences from the program would throw an exception. More... | |
| void | pointer_checks (goto_functionst &goto_functions) |
| Throw an exception in case removing dereferences from the program would throw an exception. More... | |
| void | dereference_expression (goto_programt::const_targett target, exprt &expr) |
Set the current target to target and remove derefence from expr. More... | |
| virtual | ~goto_program_dereferencet () |
Protected Member Functions | |
| virtual bool | is_valid_object (const irep_idt &identifier) |
| bool | has_failed_symbol (const exprt &expr, const symbolt *&symbol) override |
| virtual void | dereference_failure (const std::string &property, const std::string &msg, const guardt &guard) |
| void | get_value_set (const exprt &expr, value_setst::valuest &dest) override |
Gets the value set corresponding to the current target and expression expr. More... | |
| void | dereference_instruction (goto_programt::targett target, bool checks_only=false) |
Remove dereference from expressions contained in the instruction at target. More... | |
| void | dereference_rec (exprt &expr, guardt &guard, const value_set_dereferencet::modet mode) |
Turn subexpression of expr of the form &*p or reference_to(*p) to p and use dereference on subexpressions of the form *p More... | |
| void | dereference_expr (exprt &expr, const bool checks_only, const value_set_dereferencet::modet mode) |
Remove dereference expressions contained in expr. More... | |
Protected Member Functions inherited from dereference_callbackt | |
| virtual | ~dereference_callbackt ()=default |
Protected Attributes | |
| const optionst & | options |
| const namespacet & | ns |
| value_setst & | value_sets |
| value_set_dereferencet | dereference |
| goto_programt::const_targett | current_target |
| source_locationt | dereference_location |
| Unused. More... | |
| std::set< exprt > | assertions |
| Unused. More... | |
| goto_programt | new_code |
| Unused. More... | |
Wrapper for functions removing dereferences in expressions contained in a goto program.
Definition at line 24 of file goto_program_dereference.h.
|
inline |
Definition at line 31 of file goto_program_dereference.h.
|
inlinevirtual |
Definition at line 58 of file goto_program_dereference.h.
|
protected |
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. |
| mode | unused |
Definition at line 250 of file goto_program_dereference.cpp.
| void goto_program_dereferencet::dereference_expression | ( | goto_programt::const_targett | target, |
| exprt & | expr | ||
| ) |
Set the current target to target and remove derefence from expr.
Definition at line 371 of file goto_program_dereference.cpp.
|
protectedvirtual |
Definition at line 70 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 305 of file goto_program_dereference.cpp.
| void goto_program_dereferencet::dereference_program | ( | goto_programt & | goto_program, |
| bool | checks_only = false |
||
| ) |
Definition at line 266 of file goto_program_dereference.cpp.
| void goto_program_dereferencet::dereference_program | ( | goto_functionst & | goto_functions, |
| bool | checks_only = false |
||
| ) |
Definition at line 290 of file goto_program_dereference.cpp.
|
protected |
Turn subexpression of expr of the form &*p or reference_to(*p) to p and use dereference on subexpressions of the form *p
| expr | expression in which to remove dereferences |
| guard | boolean expression assumed to hold when dereferencing |
| mode | unused |
Definition at line 104 of file goto_program_dereference.cpp.
|
overrideprotectedvirtual |
Gets the value set corresponding to the current target and expression expr.
| expr | an expression | |
| [out] | dest | gets the value set |
Implements dereference_callbackt.
Definition at line 237 of file goto_program_dereference.cpp.
|
overrideprotectedvirtual |
| expr | expression to check | |
| [out] | symbol | symbol which gets assigned the value from the failed_symbol comment |
expr is a symbol, whose type contains a failed_symbol comment which exists in the namespace. Implements dereference_callbackt.
Definition at line 27 of file goto_program_dereference.cpp.
|
protectedvirtual |
Definition at line 50 of file goto_program_dereference.cpp.
| void goto_program_dereferencet::pointer_checks | ( | goto_programt & | goto_program | ) |
Throw an exception in case removing dereferences from the program would throw an exception.
Definition at line 385 of file goto_program_dereference.cpp.
| void goto_program_dereferencet::pointer_checks | ( | goto_functionst & | goto_functions | ) |
Throw an exception in case removing dereferences from the program would throw an exception.
Definition at line 393 of file goto_program_dereference.cpp.
|
protected |
Unused.
Definition at line 102 of file goto_program_dereference.h.
|
protected |
Definition at line 96 of file goto_program_dereference.h.
|
protected |
Definition at line 66 of file goto_program_dereference.h.
|
protected |
Unused.
Definition at line 99 of file goto_program_dereference.h.
|
protected |
Unused.
Definition at line 105 of file goto_program_dereference.h.
|
protected |
Definition at line 64 of file goto_program_dereference.h.
|
protected |
Definition at line 63 of file goto_program_dereference.h.
|
protected |
Definition at line 65 of file goto_program_dereference.h.