A control flow graph that is under construction, consisting of:
Attributes
breaks
unresolved breaks collected along the way together with an integer value which indicates the number of loop/switch
levels to break
caseLabels
labels beginning with "case"
continues
unresolved continues collected along the way together with an integer value which indicates the number of
loop/switch levels after which to continue
edges
control flow edges between nodes of the code property graph.
entryNode
the control flow graph's first node, that is, the node to which a CFG that appends this CFG should attach itself
to.
fringe
nodes of the CFG for which an outgoing edge type is already known but the destination node is not. These nodes are
connected when another CFG is appended to this CFG.
In addition to these three core building blocks, we store labels and jump statements that have not been resolved and
may be resolvable as parent sub trees or sibblings are translated.
jumpsToLabel
unresolved gotos, labeled break and labeld continues collected along the way
labeledNodes
labels contained in the abstract syntax tree from which this CPG was generated
Create a new CFG in which other is appended to this CFG. All nodes of the fringe are connected to other's
entry node and the new fringe is other's fringe. The diffgraphs, jumps, and labels are the sum of those present
in this and other.
Create a new CFG in which other is appended to this CFG. All nodes of the fringe are connected to other's
entry node and the new fringe is other's fringe. The diffgraphs, jumps, and labels are the sum of those present
in this and other.
Upon completing traversal of the abstract syntax tree, this method creates CFG edges between jumps like gotos,
labeled breaks, labeled continues and respective labels.
Upon completing traversal of the abstract syntax tree, this method creates CFG edges between jumps like gotos,
labeled breaks, labeled continues and respective labels.