case class Cfg(entryNode: Option[CfgNode] = None, edges: List[CfgEdge] = List(), fringe: List[(CfgNode, CfgEdgeType)] = List(), labeledNodes: Map[String, CfgNode] = Map(), breaks: List[(CfgNode, Int)] = List(), continues: List[(CfgNode, Int)] = List(), caseLabels: List[CfgNode] = List(), jumpsToLabel: List[(CfgNode, String)] = List()) extends Product with Serializable
A control flow graph that is under construction, consisting of:
- entryNode
the control flow graph's first node, that is, the node to which a CFG that appends this CFG should attach itself to.
- edges
control flow edges between nodes of the code property graph.
- 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.
- labeledNodes
labels contained in the abstract syntax tree from which this CPG was generated
- breaks
unresolved breaks collected along the way together with an integer value which indicates the number of loop/switch levels to break
- continues
unresolved continues collected along the way together with an integer value which indicates the number of loop/switch levels after which to continue
- caseLabels
labels beginning with "case"
- jumpsToLabel
unresolved gotos, labeled break and labeld continues collected along the way
- Alphabetic
- By Inheritance
- Cfg
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Cfg(entryNode: Option[CfgNode] = None, edges: List[CfgEdge] = List(), fringe: List[(CfgNode, CfgEdgeType)] = List(), labeledNodes: Map[String, CfgNode] = Map(), breaks: List[(CfgNode, Int)] = List(), continues: List[(CfgNode, Int)] = List(), caseLabels: List[CfgNode] = List(), jumpsToLabel: List[(CfgNode, String)] = List())
- entryNode
the control flow graph's first node, that is, the node to which a CFG that appends this CFG should attach itself to.
- edges
control flow edges between nodes of the code property graph.
- 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.
- labeledNodes
labels contained in the abstract syntax tree from which this CPG was generated
- breaks
unresolved breaks collected along the way together with an integer value which indicates the number of loop/switch levels to break
- continues
unresolved continues collected along the way together with an integer value which indicates the number of loop/switch levels after which to continue
- caseLabels
labels beginning with "case"
- jumpsToLabel
unresolved gotos, labeled break and labeld continues collected along the way
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ++(other: Cfg): Cfg
Create a new CFG in which
otheris appended to this CFG.Create a new CFG in which
otheris appended to this CFG. All nodes of the fringe are connected toother's entry node and the new fringe isother's fringe. The diffgraphs, jumps, and labels are the sum of those present inthisandother. - final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val breaks: List[(CfgNode, Int)]
- val caseLabels: List[CfgNode]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val continues: List[(CfgNode, Int)]
- val edges: List[CfgEdge]
- val entryNode: Option[CfgNode]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val fringe: List[(CfgNode, CfgEdgeType)]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val jumpsToLabel: List[(CfgNode, String)]
- val labeledNodes: Map[String, CfgNode]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withFringeEdgeType(cfgEdgeType: CfgEdgeType): Cfg
- def withResolvedJumpToLabel(): Cfg
Upon completing traversal of the abstract syntax tree, this method creates CFG edges between jumps like gotos, labeled breaks, labeled continues and respective labels.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated