|
cprover
|
#include <goto_inline_class.h>
Classes | |
| class | goto_inline_logt |
Public Types | |
| typedef goto_functionst::goto_functiont | goto_functiont |
| typedef std::pair< goto_programt::targett, bool > | callt |
| typedef std::list< callt > | call_listt |
| typedef std::map< irep_idt, call_listt > | inline_mapt |
Public Member Functions | |
| goto_inlinet (goto_functionst &goto_functions, const namespacet &ns, message_handlert &message_handler, bool adjust_function, bool caching=true) | |
| Sets up the class with the program to operate on. | |
| void | goto_inline (const irep_idt identifier, goto_functiont &goto_function, const inline_mapt &inline_map, const bool force_full=false) |
| Inline all of the chosen calls in a given function. | |
| void | goto_inline (const goto_inlinet::call_listt &call_list, goto_programt &goto_program, const bool force_full=false) |
| Inline specified calls in a given program. | |
| void | goto_inline (const inline_mapt &inline_map, const bool force_full=false) |
| Inline all of the given call locations. | |
| void | output_inline_map (std::ostream &out, const inline_mapt &inline_map) |
| void | output_cache (std::ostream &out) const |
| jsont | output_inline_log_json () |
Static Public Member Functions | |
| static void | get_call (goto_programt::const_targett target, exprt &lhs, exprt &function, exprt::operandst &arguments) |
Protected Types | |
| typedef goto_functionst::function_mapt | cachet |
| typedef std::unordered_set< irep_idt > | finished_sett |
| typedef std::unordered_set< irep_idt > | recursion_sett |
| typedef std::unordered_set< irep_idt > | no_body_sett |
Protected Member Functions | |
| void | goto_inline_nontransitive (const irep_idt identifier, goto_functiont &goto_function, const inline_mapt &inline_map, const bool force_full) |
| const goto_functiont & | goto_inline_transitive (const irep_idt identifier, const goto_functiont &goto_function, const bool force_full) |
| bool | check_inline_map (const inline_mapt &inline_map) const |
| bool | check_inline_map (const irep_idt identifier, const inline_mapt &inline_map) const |
| bool | is_ignored (const irep_idt id) const |
| void | clear () |
| void | expand_function_call (goto_programt &dest, const inline_mapt &inline_map, const bool transitive, const bool force_full, goto_programt::targett target) |
| Inlines a single function call Calls out to goto_inline_transitive or goto_inline_nontransitive. | |
| void | insert_function_body (const goto_functiont &f, goto_programt &dest, goto_programt::targett target, const exprt &lhs, const symbol_exprt &function, const exprt::operandst &arguments) |
| void | replace_return (goto_programt &body, const exprt &lhs) |
| void | parameter_assignments (const goto_programt::targett target, const irep_idt &function_name, const goto_functiont::parameter_identifierst ¶meter_identifiers, const exprt::operandst &arguments, goto_programt &dest) |
| void | parameter_destruction (const goto_programt::targett target, const goto_functiont::parameter_identifierst ¶meter_identifiers, goto_programt &dest) |
Protected Attributes | |
| messaget | log |
| goto_functionst & | goto_functions |
| const namespacet & | ns |
| const bool | adjust_function |
| const bool | caching |
| goto_inline_logt | inline_log |
| cachet | cache |
| finished_sett | finished_set |
| recursion_sett | recursion_set |
| no_body_sett | no_body_set |
Definition at line 25 of file goto_inline_class.h.
|
protected |
Definition at line 216 of file goto_inline_class.h.
| typedef std::list<callt> goto_inlinet::call_listt |
Definition at line 57 of file goto_inline_class.h.
| typedef std::pair<goto_programt::targett, bool> goto_inlinet::callt |
Definition at line 54 of file goto_inline_class.h.
|
protected |
Definition at line 219 of file goto_inline_class.h.
Definition at line 49 of file goto_inline_class.h.
| typedef std::map<irep_idt, call_listt> goto_inlinet::inline_mapt |
Definition at line 60 of file goto_inline_class.h.
|
protected |
Definition at line 225 of file goto_inline_class.h.
|
protected |
Definition at line 222 of file goto_inline_class.h.
|
inline |
Sets up the class with the program to operate on.
| goto_functions | : The map of functions to work on |
| ns | : The corresponding namespace |
| message_handler | : Used to log what is being inlined |
| adjust_function | Replace location in caller location. |
| caching | : cache functions when in transitive mode |
Definition at line 35 of file goto_inline_class.h.
|
protected |
Definition at line 675 of file goto_inline_class.cpp.
|
protected |
Definition at line 627 of file goto_inline_class.cpp.
|
inlineprotected |
Definition at line 176 of file goto_inline_class.h.
|
protected |
Inlines a single function call Calls out to goto_inline_transitive or goto_inline_nontransitive.
Definition at line 302 of file goto_inline_class.cpp.
|
static |
Definition at line 432 of file goto_inline_class.cpp.
| void goto_inlinet::goto_inline | ( | const goto_inlinet::call_listt & | call_list, |
| goto_programt & | goto_program, | ||
| const bool | force_full = false ) |
Inline specified calls in a given program.
| call_list | : calls to inline in the goto_program. |
| goto_program | : goto program to inline calls_list in. |
| force_full | : true to break recursion with a SKIP, false means detecting recursion is an error. |
Definition at line 491 of file goto_inline_class.cpp.
| void goto_inlinet::goto_inline | ( | const inline_mapt & | inline_map, |
| const bool | force_full = false ) |
Inline all of the given call locations.
This is the highest-level interface and calls the other goto_inline
| inline_map | : which call locations to inline. |
| force_full | : true to break recursion with a SKIP, false means detecting recursion is an error. |
Definition at line 450 of file goto_inline_class.cpp.
| void goto_inlinet::goto_inline | ( | const irep_idt | identifier, |
| goto_functiont & | goto_function, | ||
| const inline_mapt & | inline_map, | ||
| const bool | force_full = false ) |
Inline all of the chosen calls in a given function.
This is main entry point for the functionality
| identifier | : the name of the caller function. |
| goto_function | : the caller function itself. |
| inline_map | : which call locations to inline. |
| force_full | : true to break recursion with a SKIP, false means detecting recursion is an error. |
Definition at line 476 of file goto_inline_class.cpp.
|
protected |
Definition at line 506 of file goto_inline_class.cpp.
|
protected |
Definition at line 558 of file goto_inline_class.cpp.
|
protected |
Definition at line 214 of file goto_inline_class.cpp.
|
protected |
Definition at line 620 of file goto_inline_class.cpp.
| void goto_inlinet::output_cache | ( | std::ostream & | out | ) | const |
Definition at line 727 of file goto_inline_class.cpp.
|
inline |
Definition at line 94 of file goto_inline_class.h.
| void goto_inlinet::output_inline_map | ( | std::ostream & | out, |
| const inline_mapt & | inline_map ) |
Definition at line 686 of file goto_inline_class.cpp.
|
protected |
Definition at line 24 of file goto_inline_class.cpp.
|
protected |
Definition at line 125 of file goto_inline_class.cpp.
|
protected |
Definition at line 151 of file goto_inline_class.cpp.
|
protected |
Definition at line 153 of file goto_inline_class.h.
|
protected |
Definition at line 217 of file goto_inline_class.h.
|
protected |
Definition at line 154 of file goto_inline_class.h.
|
protected |
Definition at line 220 of file goto_inline_class.h.
|
protected |
Definition at line 150 of file goto_inline_class.h.
|
protected |
Definition at line 156 of file goto_inline_class.h.
|
protected |
Definition at line 149 of file goto_inline_class.h.
|
protected |
Definition at line 226 of file goto_inline_class.h.
|
protected |
Definition at line 151 of file goto_inline_class.h.
|
protected |
Definition at line 223 of file goto_inline_class.h.