The aggressive slicer removes the body of all the functions except those on the shortest path, those within the call-depth of the shortest path, those given by name as command line argument, and those that contain a given irep_idt snippet If no properties are set by the user, we preserve all functions on the shortest paths to each property.
More...
#include <aggressive_slicer.h>
|
| aggressive_slicert (goto_modelt &_goto_model, message_handlert &_msg) |
|
void | doit () |
| Removes the body of all functions except those on the shortest path or functions that are reachable from functions on the shortest path within N calls, where N is given by the parameter "distance". More...
|
|
void | preserve_functions (const std::list< std::string > &function_list) |
| Adds a list of functions to the set of functions for the aggressive slicer to preserve. More...
|
|
The aggressive slicer removes the body of all the functions except those on the shortest path, those within the call-depth of the shortest path, those given by name as command line argument, and those that contain a given irep_idt snippet If no properties are set by the user, we preserve all functions on the shortest paths to each property.
Definition at line 34 of file aggressive_slicer.h.
◆ aggressive_slicert()
◆ doit()
void aggressive_slicert::doit |
( |
| ) |
|
Removes the body of all functions except those on the shortest path or functions that are reachable from functions on the shortest path within N calls, where N is given by the parameter "distance".
Definition at line 76 of file aggressive_slicer.cpp.
◆ find_functions_that_contain_name_snippet()
void aggressive_slicert::find_functions_that_contain_name_snippet |
( |
| ) |
|
|
private |
Finds all functions whose name contains a name snippet and adds them to the std::unordered_set of irep_idts of functions for the aggressive slicer to preserve.
Definition at line 64 of file aggressive_slicer.cpp.
◆ get_all_functions_containing_properties()
void aggressive_slicert::get_all_functions_containing_properties |
( |
| ) |
|
|
private |
Finds all functions that contain a property, and adds them to the list of functions to keep.
This function is only called if no properties are given by the user. This behaviour mirrors the behaviour of the other program slicers (reachability, global, full)
Definition at line 46 of file aggressive_slicer.cpp.
◆ note_functions_to_keep()
void aggressive_slicert::note_functions_to_keep |
( |
const irep_idt & |
destination_function | ) |
|
|
private |
notes functions to keep in the slice based on the program start function and the given destination function.
Functions are noted according to the configuration parameters set in the aggressive slicer, i.e., shortest path between two functions, or all direct paths. Inserts functions to preserve into the functions_to_keep set
- Parameters
-
destination_function | name of destination function for slice |
Note that we have previously disconnected all nodes unreachable from the start function, which means that any reaching functions are also reachable from the start function.
Definition at line 25 of file aggressive_slicer.cpp.
◆ preserve_functions()
void aggressive_slicert::preserve_functions |
( |
const std::list< std::string > & |
function_list | ) |
|
|
inline |
Adds a list of functions to the set of functions for the aggressive slicer to preserve.
- Parameters
-
function_list | a list of functions in form std::list<std::string>, as returned by get_cmdline_option. |
Definition at line 59 of file aggressive_slicer.h.
◆ call_depth
std::size_t aggressive_slicert::call_depth |
◆ call_graph
◆ functions_to_keep
std::set<irep_idt> aggressive_slicert::functions_to_keep |
|
private |
◆ goto_model
◆ message_handler
◆ name_snippets
std::list<std::string> aggressive_slicert::name_snippets |
◆ preserve_all_direct_paths
bool aggressive_slicert::preserve_all_direct_paths |
◆ start_function
const irep_idt aggressive_slicert::start_function |
|
private |
◆ user_specified_properties
std::list<std::string> aggressive_slicert::user_specified_properties |
The documentation for this class was generated from the following files: