object DominatorTree
Factory to compute DominatorTrees.
- Alphabetic
- By Inheritance
- DominatorTree
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[D <: AbstractDominatorTree](startNode: Int, startNodeHasPredecessors: Boolean, foreachSuccessorOf: (Int) ⇒ ((Int) ⇒ Unit) ⇒ Unit, foreachPredecessorOf: (Int) ⇒ ((Int) ⇒ Unit) ⇒ Unit, maxNode: Int, dominatorTreeFactory: (Int, Boolean, (Int) ⇒ ((Int) ⇒ Unit) ⇒ Unit, Array[Int]) ⇒ D): D
Computes the immediate dominators for each node of a given graph.
Computes the immediate dominators for each node of a given graph. Each node of the graph is identified using a unique int value (e.g. the pc of an instruction) in the range [0..maxNode], although not all ids need to be used.
- startNode
The id of the root node of the graph. (Often pc="0" for the CFG computed for some method; sometimes the id of an artificial start node that was created when computing the dominator tree).
- startNodeHasPredecessors
If
truean artificial start node with the idmaxNode+1will be created and added to the graph.- foreachSuccessorOf
A function that given a node subsequently executes the given function for each direct successor of the given node.
- foreachPredecessorOf
A function that - given a node - executes the given function for each direct predecessor. The signature of a function that can directly be passed as a parameter is:
def foreachPredecessorOf(pc: PC)(f: PC ⇒ Unit): Unit
- maxNode
The largest unique int id that identifies a node. (E.g., in case of the analysis of some code it is typically equivalent to the length of the code-1.)
- returns
The computed dominator tree.
- Note
This is an implementation of the "fast dominators" algorithm presented by
T. Lengauaer and R. Tarjan in A Fast Algorithm for Finding Dominators in a Flowgraph ACM Transactions on Programming Languages and Systems (TOPLAS) 1.1 (1979): 121-141This implementation does not use non-tailrecursive methods and hence also handles very large degenerated graphs (e.g., a graph which consists of a a very, very long single path.).
-
def
apply(startNode: Int, startNodeHasPredecessors: Boolean, foreachSuccessorOf: (Int) ⇒ ((Int) ⇒ Unit) ⇒ Unit, foreachPredecessorOf: (Int) ⇒ ((Int) ⇒ Unit) ⇒ Unit, maxNode: Int): DominatorTree
Convenience factory method for dominator trees; see org.opalj.graphs.DominatorTree$.apply[D<:org\.opalj\.graphs\.AbstractDominatorTree]* for details.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- final val fornone: ((Int) ⇒ Unit) ⇒ Unit
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )