ScEpTIC.AST.transformations.virtual_memory.parsers package¶
Submodules¶
ScEpTIC.AST.transformations.virtual_memory.parsers.ast_parser module¶
-
class
ScEpTIC.AST.transformations.virtual_memory.parsers.ast_parser.ASTParser(functions)¶ Bases:
objectTransforms the AST into a sequence of basic blocks, where control-flow statements are represented by dedicated objects.
-
get_ast(name)¶ Returns the AST of the given function
-
get_flatten_ast(name=None)¶ Returns the flatten AST of the program
-
get_function_names()¶ Returns the names of all the functions of the program
-
normalize_ast_labels()¶ Normalizes all the labels in the AST
-
parse()¶ Parses the AST
-
parse_ast_structures(name, basic_blocks, parse_loops=True)¶ Parses the basic blocks into ConditionalBlock and LoopBlock If reparse is set to True, the lists of ConditionalBlock and LoopBlock are reset
-
print_ast(name=None, print_instructions=False)¶ Prints the parsed AST :param name: name of the function to display. If empty, it prints out the AST of all the functions
-
reparse()¶ Reparses the AST to merge basic blocks
-
syncrhonize_ast_to_functions(print_diff=False)¶ Synchronizes the AST of each function to its body
-
ScEpTIC.AST.transformations.virtual_memory.parsers.memory_tags_parser module¶
Bases:
objectA memory tag is a virtual representation of an accessed memory location, which captures also the access pattern. A memory tag is associated to each LoadOperation and StoreOperation. This class contains a collection of methods for parsing the AST and identifying the memory tag of each operation.
Populates the memory tags of the instructions in each function