Classes | |
class | AstAttributeColor |
struct | UserSpaceFilter |
class | SystemCDefinitionFinder |
This class stores all SystemC definition pointer. More... | |
Functions | |
bool | is_derived_from (SgClassDefinition *derived_class, SgClassDefinition *base_class) |
This function checks if the derived class is derived from the base class. | |
bool | is_derived_from_sc_interface (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_interface. | |
bool | is_derived_from_sc_channel (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_channel. | |
bool | is_derived_from_sc_prim_channel (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_prim_channel. | |
bool | is_derived_from_sc_module (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_module. | |
bool | is_derived_from_sc_port (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_port. | |
bool | is_derived_from_sc_port_base (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_port_base. | |
bool | is_derived_from_sc_port_base (SgVarRefExp *var_ref) |
This function checks if the class is derived from sc_port_base. | |
bool | is_sc_event (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_event or if it is sc_event itself. | |
bool | is_sc_event (SgVarRefExp *var_ref) |
This function checks if the class is derived from sc_event or if it is sc_event itself. | |
bool | is_sc_in_port (SgTemplateInstantiationDefn *template_class) |
This function checks if the template class bases on the class template sc_in_port. | |
bool | is_sc_out_port (SgTemplateInstantiationDefn *template_class) |
This function checks if the template class bases on the class template sc_out_port. | |
bool | is_sc_inout_port (SgTemplateInstantiationDefn *template_class) |
This function checks if the template class bases on the class template sc_inout_port. | |
bool | is_sc_in_clk (SgClassDefinition *definition) |
This function checks if the given defintion is qual to the definition of a sc_in_clk. | |
bool | is_sc_out_clk (SgClassDefinition *definition) |
This function checks if the given defintion is qual to the definition of a sc_out_clk. | |
bool | is_sc_inout_clk (SgClassDefinition *definition) |
This function checks if the given defintion is qual to the definition of a sc_inout_clk. | |
bool | is_sc_in_bool (SgClassDefinition *definition) |
This function checks if the given defintion is qual to the definition of a sc_in<bool>. | |
std::vector< std::string > | preparsing_commandline_arguments (int &argc, char **&argv, std::vector< std::string > &input_files) |
This function takes the parameter of the command line and creates a source file which includes all the source files. Afterwards all source files are replaced with new file in the command parameters. Example. | |
StringUtility::FileNameLibrary | get_library (int file_id) |
StringUtility::FileNameLibrary | get_library (Sg_File_Info *X) |
bool | is_data_structure (SgType *type) |
This function checks if the passed type represents a data structure. | |
bool | is_builtin_type (SgType *type) |
This function checks if the passed type represents a C++ builtin type. | |
bool | class_types_are_identical (SgClassDefinition *cd1, SgClassDefinition *cd2) |
Compares two classes. | |
bool | is_func_name (const SgFunctionDeclaration *function, const std::string &name) |
Compares the function name with the given string. | |
void | print_indented (std::string s, unsigned indent) |
Prints a string with indention. | |
SgClassDefinition * | class_definition_of_variable (SgVariableDeclaration *var_decl) |
Determines the class defintion of varialbe It is expected that the type is SgClassType. | |
bool | is_builtin_function (SgFunctionDeclaration *func_decl) |
Checks if a given function is a C++ builtin function This function is taken/inspired from the Rose builtinFilter structure. | |
bool | all_cfg_branches_end_in_break (SgNode *node, int &break_counter) |
This function determines if all cfg branches in the statement 'node' will end in a break statement. The statement in end will be excluded. Some examples:. | |
bool | all_cfg_branches_end_in_continue (SgNode *node, int &continue_counter) |
This function determines if all cfg branches in the statement 'node' will end in a continue statement. The statement in end will be excluded. Some examples:. | |
SgStatement * | get_previous_stmt_in_basic_block (SgNode *node) |
This function determines the previous statement of the statement 'node' in the next surrounding basic block. If 'node' is the first statement, the return value will be NULL. | |
bool | is_conditional_break (SgScopeStatement const *const loop_stmt, SgBreakStmt const *const break_stmt) |
This function checks if a given break statement is unconditioned. | |
SgScopeStatement * | find_break_surrounding_scope (SgBreakStmt *break_stmt) |
This function finds the surrounding scope statement of a break. The break can be surrounded by a while, do while, for loop or by a switch statement. | |
bool | break_belongs_to_loop (SgScopeStatement *loop_stmt, SgBreakStmt const *const break_stmt) |
This function checks if a given break statement belongs to a given loop statements. | |
bool | is_located_in_rose_header (SgNode *node) |
SgMemberFunctionDeclaration * | get_constructor (SgClassDefinition *class_def) |
This function returns the constructor of class. For a module, primitive channel, and a hierarchical channel we expect exactly one constructor. So, we return the first SgFunctionDefinition which es a constructor. | |
SgClassDefinition * | find_class_definition (std::string class_name, std::string qualified_namespace, SgNode *root_node) |
This function searchs for a class by name (string) in namespace (string). | |
SgTypedefDeclaration * | find_typedef_declaration (std::string class_name, std::string qualified_namespace, SgNode *root_node) |
This function searchs for a typedef's by name (string) in namespace (string). | |
bool | is_reference_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a reference. | |
bool | is_global_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a global variable. | |
bool | is_local_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a local variable. | |
bool | is_member_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a member variable. | |
bool | is_static_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a static variable. | |
bool | is_namespace_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a namespace variable. | |
bool | is_function_parameter_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a function variable. | |
bool | is_member_of (SgVariableSymbol *is, SgSymbol *of) |
This function returns true if a given variable symbol is defined 'in' another variable symobl. For instance 'class Foo { int i;}' 'i' is defined in 'Foo'. |
bool risc::tools::all_cfg_branches_end_in_break | ( | SgNode * | node, | |
int & | break_counter | |||
) |
This function determines if all cfg branches in the statement 'node' will end in a break statement. The statement in end will be excluded. Some examples:.
all_cfg_branches_end_in_break input with result: true break; <-- node int a;
input with result: false if(test) <-- node break; int a;
input with result: true if(test) <-- node break; else break; int a;
bool risc::tools::all_cfg_branches_end_in_continue | ( | SgNode * | node, | |
int & | continue_counter | |||
) |
This function determines if all cfg branches in the statement 'node' will end in a continue statement. The statement in end will be excluded. Some examples:.
all_cfg_branches_end_in_break input with result: true continue; <-- node int a;
input with result: false if(test); <-- node continue; int a;
input with result: true if(test); <-- node continue; else continue; int a;
bool risc::tools::break_belongs_to_loop | ( | SgScopeStatement * | loop_stmt, | |
SgBreakStmt const *const | break_stmt | |||
) |
This function checks if a given break statement belongs to a given loop statements.
break_belongs_to_loop
loop_stmt | Pointer to the loop statement | |
break_stmt | Pointer to the break statement |
SgClassDefinition * risc::tools::class_definition_of_variable | ( | SgVariableDeclaration * | var_decl | ) |
Determines the class defintion of varialbe It is expected that the type is SgClassType.
var_decl | The given variable declaration |
bool risc::tools::class_types_are_identical | ( | SgClassDefinition * | cd1, | |
SgClassDefinition * | cd2 | |||
) |
SgScopeStatement * risc::tools::find_break_surrounding_scope | ( | SgBreakStmt * | break_stmt | ) |
This function finds the surrounding scope statement of a break. The break can be surrounded by a while, do while, for loop or by a switch statement.
find_break_associated_loop
SgClassDefinition * risc::tools::find_class_definition | ( | std::string | class_name, | |
std::string | qualified_namespace, | |||
SgNode * | root_node | |||
) |
This function searchs for a class by name (string) in namespace (string).
class_name | Name of the class | |
qualified_namespace | The absolute qualified namespace | |
root_node | In this subtree the search will performed |
SgTypedefDeclaration * risc::tools::find_typedef_declaration | ( | std::string | class_name, | |
std::string | qualified_namespace, | |||
SgNode * | root_node | |||
) |
This function searchs for a typedef's by name (string) in namespace (string).
class_name | Name of the class | |
qualified_namespace | The absolute qualified namespace | |
root_node | In this subtree the search will performed |
SgMemberFunctionDeclaration * risc::tools::get_constructor | ( | SgClassDefinition * | class_def | ) |
This function returns the constructor of class. For a module, primitive channel, and a hierarchical channel we expect exactly one constructor. So, we return the first SgFunctionDefinition which es a constructor.
get_constructor
StringUtility::FileNameLibrary risc::tools::get_library | ( | Sg_File_Info * | X | ) |
StringUtility::FileNameLibrary risc::tools::get_library | ( | int | file_id | ) |
SgStatement * risc::tools::get_previous_stmt_in_basic_block | ( | SgNode * | node | ) |
This function determines the previous statement of the statement 'node' in the next surrounding basic block. If 'node' is the first statement, the return value will be NULL.
get_previous_stmt_in_basic_block
bool risc::tools::is_builtin_function | ( | SgFunctionDeclaration * | func_decl | ) |
Checks if a given function is a C++ builtin function This function is taken/inspired from the Rose builtinFilter structure.
func_decl | Function declaration |
bool risc::tools::is_builtin_type | ( | SgType * | type | ) |
This function checks if the passed type represents a C++ builtin type.
type | Type that will be checked |
bool risc::tools::is_conditional_break | ( | SgScopeStatement const *const | loop_stmt, | |
SgBreakStmt const *const | break_stmt | |||
) |
This function checks if a given break statement is unconditioned.
is_conditional_break
loop_stmt | Pointer to the loop statement | |
break_stmt | Pointer to the break statement |
bool risc::tools::is_data_structure | ( | SgType * | type | ) |
This function checks if the passed type represents a data structure.
type | Type that will be checked |
bool risc::tools::is_derived_from | ( | SgClassDefinition * | derived_class, | |
SgClassDefinition * | base_class | |||
) |
This function checks if the derived class is derived from the base class.
derived_class | the derived class definition | |
base_class | the base class definition |
bool risc::tools::is_derived_from_sc_channel | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_channel.
derived_class | the derived class definition |
derived_class | the derived class definition |
bool risc::tools::is_derived_from_sc_interface | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_interface.
derived_class | the derived class definition |
bool risc::tools::is_derived_from_sc_module | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_module.
derived_class | the derived class definition |
bool risc::tools::is_derived_from_sc_port | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_port.
derived_class | the derived class definition |
bool risc::tools::is_derived_from_sc_port_base | ( | SgVarRefExp * | var_ref | ) |
This function checks if the class is derived from sc_port_base.
derived_class | the derived class definition |
bool risc::tools::is_derived_from_sc_port_base | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_port_base.
derived_class | the derived class definition |
bool risc::tools::is_derived_from_sc_prim_channel | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_prim_channel.
derived_class | the derived class definition |
derived_class | the derived class definition |
bool risc::tools::is_func_name | ( | const SgFunctionDeclaration * | function, | |
const std::string & | name | |||
) |
Compares the function name with the given string.
function | The function declaration | |
name | String which will be compared |
bool risc::tools::is_function_parameter_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a function variable.
is_member_variable
bool risc::tools::is_global_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a global variable.
is_global_variable
bool risc::tools::is_local_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a local variable.
is_local_variable
bool risc::tools::is_located_in_rose_header | ( | SgNode * | node | ) |
bool risc::tools::is_member_of | ( | SgVariableSymbol * | is, | |
SgSymbol * | of | |||
) |
This function returns true if a given variable symbol is defined 'in' another variable symobl. For instance 'class Foo { int i;}' 'i' is defined in 'Foo'.
is_member_of
bool risc::tools::is_member_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a member variable.
is_member_variable
bool risc::tools::is_namespace_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a namespace variable.
is_namespace_variable
bool risc::tools::is_reference_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a reference.
is_reference_variable
bool risc::tools::is_sc_event | ( | SgVarRefExp * | var_ref | ) |
This function checks if the class is derived from sc_event or if it is sc_event itself.
derived_class | the derived class definition |
bool risc::tools::is_sc_event | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_event or if it is sc_event itself.
derived_class | the derived class definition |
bool risc::tools::is_sc_in_bool | ( | SgClassDefinition * | definition | ) |
This function checks if the given defintion is qual to the definition of a sc_in<bool>.
class | the class definition |
bool risc::tools::is_sc_in_clk | ( | SgClassDefinition * | definition | ) |
This function checks if the given defintion is qual to the definition of a sc_in_clk.
class | the class definition |
bool risc::tools::is_sc_in_port | ( | SgTemplateInstantiationDefn * | template_class | ) |
This function checks if the template class bases on the class template sc_in_port.
class | the class definition |
bool risc::tools::is_sc_inout_clk | ( | SgClassDefinition * | definition | ) |
This function checks if the given defintion is qual to the definition of a sc_inout_clk.
class | the class definition |
bool risc::tools::is_sc_inout_port | ( | SgTemplateInstantiationDefn * | template_class | ) |
This function checks if the template class bases on the class template sc_inout_port.
class | the class definition |
bool risc::tools::is_sc_out_clk | ( | SgClassDefinition * | definition | ) |
This function checks if the given defintion is qual to the definition of a sc_out_clk.
class | the class definition |
bool risc::tools::is_sc_out_port | ( | SgTemplateInstantiationDefn * | template_class | ) |
This function checks if the template class bases on the class template sc_out_port.
class | the class definition |
bool risc::tools::is_static_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a static variable.
is_static_variable
std::vector< std::string > risc::tools::preparsing_commandline_arguments | ( | int & | argc, | |
char **& | argv, | |||
std::vector< std::string > & | input_files | |||
) |
This function takes the parameter of the command line and creates a source file which includes all the source files. Afterwards all source files are replaced with new file in the command parameters. Example.
Input: ./myprogram file_a.cpp file_b.cpp file_c.cpp
Output ./myprogram __main__.cpp
New file __main__.cpp include "file_a.cpp" include "file_b.cpp" include "file_c.cpp"
void risc::tools::print_indented | ( | std::string | s, | |
unsigned | indent | |||
) |
Prints a string with indention.
s | Sting to print | |
indent | Indention level |