debug package¶
This package stores different program information (call graphs and struct representations)
as graphs and saves them as .dot files.
Such functionality only occurs when the -d
or --debug
options are passed from the command line.
Submodules¶
debug.graph module¶
A graph representing the struct structures created in memory”
-
class
debug.graph.
Graph
(graph_dict=None)[source]¶ Bases:
object
A general-purpose graph class
-
add_edge
(edge)[source]¶ assumes that edge is of type set, tuple or list; between two vertices can be multiple edges!
-
add_vertex
(vertex)[source]¶ If the vertex “vertex” is not in self.__graph_dict, a key “vertex” with an empty list as a value is added to the dictionary. Otherwise nothing has to be done.
-
static
erdoes_gallai
(dsequence)[source]¶ Checks if the condition of the Erdoes-Gallai inequality is fullfilled
-
find_all_paths
(start_vertex, end_vertex, path=[])[source]¶ find all paths from start_vertex to end_vertex in graph
-
find_path
(start_vertex, end_vertex, path=[])[source]¶ find a path from start_vertex to end_vertex in graph
-
is_connected
(vertices_encountered=None, start_vertex=None)[source]¶ determines if the graph is connected
-
static
is_degree_sequence
(sequence)[source]¶ Method returns True, if the sequence “sequence” is a degree sequence, i.e. a non-increasing sequence. Otherwise False is returned.
-
debug.call_inspector module¶
A visitor implementation that stores a representation of the calling graph into a text stream. Its use is for debugging purposes, to check the structure of the generated program.
-
debug.call_inspector.
callinsp_visit
(node, nodes, edges, *args, **kwargs)[source]¶ -
debug.call_inspector.
callinsp_visit
(program: core.ast.Program, nodes, edges) -
debug.call_inspector.
callinsp_visit
(function: core.ast.Function, nodes, edges) -
debug.call_inspector.
callinsp_visit
(invocation: core.ast.Invocation, nodes, edges, func_name, parent) -
debug.call_inspector.
callinsp_visit
(node: core.ast.TernaryExpression, nodes, edges, func_name, parent) -
debug.call_inspector.
callinsp_visit
(node: core.ast.TernaryExpression, nodes, edges, func_name, parent) -
debug.call_inspector.
callinsp_visit
(node: core.ast.TernaryExpression, nodes, edges, func_name, parent) -
debug.call_inspector.
callinsp_visit
(node: core.ast.TernaryExpression, nodes, edges, func_name, parent) -
debug.call_inspector.
callinsp_visit
(node: core.ast.TernaryExpression, nodes, edges, func_name, parent) -
debug.call_inspector.
callinsp_visit
(node: core.ast.TernaryExpression, nodes, edges, func_name, parent) -
debug.call_inspector.
callinsp_visit
(node: core.ast.TernaryExpression, nodes, edges, func_name, parent) -
debug.call_inspector.
callinsp_visit
(node: core.ast.Label, nodes, edges, func_name, parent) -
debug.call_inspector.
callinsp_visit
(node: core.ast.Label, nodes, edges, func_name, parent) -
debug.call_inspector.
callinsp_visit
(node: core.ast.Label, nodes, edges, func_name, parent)
debug.structure_inspector module¶
Stores in a text stream the representation of the struct data types in the generated program. Its use is for debugging purposes, to check the structure of the struct types in the generated program.