Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package opalj

    OPAL is a Scala-based framework for the static analysis, manipulation and creation of Java bytecode.

    OPAL is a Scala-based framework for the static analysis, manipulation and creation of Java bytecode. OPAL is designed with performance, scalability and adaptability in mind.

    Its main components are:

    • a library (Common) which provides generally useful data-structures and algorithms for static analyses.
    • a framework for implementing lattice based static analyses (Static Analysis Infrastructure)
    • a framework for parsing Java bytecode (Bytecode Infrastructure) that can be used to create arbitrary representations.
    • a library to create a one-to-one in-memory representation of Java bytecode (Bytecode Disassembler).
    • a library to create a representation of Java bytecode that facilitates writing simple static analyses (Bytecode Representation - org.opalj.br).
    • a scalable, easily customizable framework for the abstract interpretation of Java bytecode (Abstract Interpretation Framework - org.opalj.ai).
    • a library to extract dependencies between code elements and to facilitate checking architecture definitions.
    • a library for the lightweight manipulation and creation of Java bytecode (Bytecode Assembler).

    General Design Decisions

    Thread Safety

    Unless explicitly noted, OPAL is thread safe. I.e., the classes defined by OPAL can be considered to be thread safe unless otherwise stated. (For example, it is possible to read and process class files concurrently without explicit synchronization on the client side.)

    No null Values

    Unless explicitly noted, OPAL does not null values I.e., fields that are accessible will never contain null values and methods will never return null. If a method accepts null as a value for a parameter or returns a null value it is always explicitly documented. In general, the behavior of methods that are passed null values is undefined unless explicitly documented.

    No Typecasts for Collections

    For efficiency reasons, OPAL sometimes uses mutable data-structures internally. After construction time, these data-structures are generally represented using their generic interfaces (e.g., scala.collection.{Set,Map}). However, a downcast (e.g., to add/remove elements) is always forbidden as it would effectively prevent thread-safety.

    Assertions

    OPAL makes heavy use of Scala's Assertion Facility to facilitate writing correct code. Hence, for production builds (after thorough testing(!)) it is highly recommend to build OPAL again using -Xdisable-assertions.

    Definition Classes
    org
  • package graphs

    This package defines graph algorithms as well as factory methods to describe and compute graphs and trees.

    This package defines graph algorithms as well as factory methods to describe and compute graphs and trees.

    This package supports the following types of graphs:

    1. graphs based on explicitly connected nodes (org.opalj.graphs.Node),
    2. graphs where the relationship between the nodes are encoded externally (org.opalj.graphs.Graph).
    Definition Classes
    opalj
  • AbstractDominatorTree
  • AbstractGraph
  • ControlDependencies
  • DefaultMutableMode
  • DefaultMutableNode
  • DominanceFrontiers
  • DominatorTree
  • Graph
  • MutableNode
  • MutableNodeLike
  • Node
  • PostDominatorTree
  • UnidirectionalGraph
  • VirtualUnidirectionalGraph

object DominanceFrontiers

Factory to compute DominanceFrontiers.

Source
DominanceFrontiers.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DominanceFrontiers
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(dt: AbstractDominatorTree, isValidNode: (Int) => Boolean): DominanceFrontiers

    Computes the dominance frontiers for each node of a graph G using the (post) dominator tree.

    Computes the dominance frontiers for each node of a graph G using the (post) dominator tree.

    dt

    The dominator tree of the specified (flow) graph. We provide basic support for augmented post dominator trees: PostDominatorTree; we in particular handle common cases related to additional exit nodes as created by the implented(!) post dominator tree computation algorithm. However, the following case:

    while (true) {
         if (i < 0) {
             i += 1000;
             // Exit Piont 1
         } else {
             i -= 100;
             // Exit Point 2
         }
    }

    is not yet supported; it would require a significant transformation of the computed PDT, which we currently do not perform. Basically, in the PDT we would need to make both bodies dependent on the artifical exit node of the loop to ensure that both bodies are control-dependent on the "if" node.

    isValidNode

    A function that returns true if the given id represents a node of the underlying graph. If the underlying graph contains a single, new artificial start node then this node may or may not be reported as a valid node; this is not relevant for this algorithm.

    Example:
    1. // A graph taken from the paper:
      // Efficiently Computing Static Single Assignment Form and the Control Dependence Graph
      val g = org.opalj.graphs.Graph.empty[Int] += (0 -> 1) += (1 -> 2) += (2 -> 3) += (2 -> 7) += (3 -> 4) += (3->5) += (5->6) += (4->6) += (6->8) += (7->8)  += (8->9) += (9->10) += (9->11) += (10->11) += (11->9) += (11 -> 12) += (12 -> 13) += (12 ->2) += (0 -> 13)
      val foreachSuccessor = (n: Int) => g.successors.getOrElse(n, List.empty).foreach _
      val foreachPredecessor = (n: Int) => g.predecessors.getOrElse(n, List.empty).foreach _
      val dt = org.opalj.graphs.DominatorTree(0, false, foreachSuccessor, foreachPredecessor, 13)
      val isValidNode = (n : Int) => n>= 0 && n <= 13
      org.opalj.io.writeAndOpen(dt.toDot(),"g",".dt.gv")
      val df = org.opalj.graphs.DominanceFrontiers(dt,isValidNode)
      org.opalj.io.writeAndOpen(df.toDot(),"g",".df.gv")
      
      
      // A degenerated graph which consists of a single node that has a self-reference.
      val g = org.opalj.graphs.Graph.empty[Int] += (0 -> 0)
      val foreachSuccessor = (n: Int) => g.successors.getOrElse(n, List.empty).foreach _
      val foreachPredecessor = (n: Int) => g.predecessors.getOrElse(n, List.empty).foreach _
      val dtf = org.opalj.graphs.DominatorTreeFactory(0, true, foreachSuccessor, foreachPredecessor, 0)
      val isValidNode = (n : Int) => n == 0
      org.opalj.io.writeAndOpen(dtf.dt.toDot(),"g",".dt.gv")
      val df = org.opalj.graphs.DominanceFrontiers(dtf,isValidNode)
      org.opalj.io.writeAndOpen(df.toDot(),"g",".df.gv")
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped