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 - org.opalj.bi) that can be used to create arbitrary representations.
    • a library to create a one-to-one in-memory representation of Java bytecode (Bytecode Disassembler - org.opalj.da).
    • a library to convert this representation to Java class files (Bytecode Creator - org.opalj.bc).
    • a library to create a representation of Java bytecode that facilitates writing simple static analyses (Bytecode Representation - org.opalj.br).
    • a library to create a stackless, three-address code representation of Java bytecode that facilitates writing complex static analyses (Three Address Code - org.opalj.tac).
    • 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 (Dependencies Extraction - org.opalj.de) and to facilitate checking architecture definitions (Architecture Validation - org.opalj.av).
    • a library for the lightweight manipulation and creation of Java bytecode (Bytecode Assembler - org.opalj.ba).
    • a library for parsing Android packages (APK - org.opalj.apk).
    • libraries for writing static analyses using the interprocedural finite distributive subset (IFDS - org.opalj.ifds) and interprocedural distributive environment (IDE - org.opal.ide) algorithms.

    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 si
    Definition Classes
    opalj
  • package flowanalysis

    Definition Classes
    si
  • AcyclicRegionType
  • Block
  • Case
  • CyclicRegionType
  • DataFlowAnalysis
  • DataFlowEnvironment
  • FlowGraphNode
  • GlobalEntry
  • GlobalExit
  • IfThen
  • IfThenElse
  • Improper
  • NaturalLoop
  • Proper
  • Region
  • RegionType
  • SelfLoop
  • Statement
  • StructuralAnalysis
  • WhileLoop
p

org.opalj.si

flowanalysis

package flowanalysis

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

Type Members

  1. sealed trait AcyclicRegionType extends RegionType
  2. type ControlTree = Graph[FlowGraphNode, DiEdge[FlowGraphNode]]

    Region control tree representing nesting of control structures; obtained from structural analysis.

  3. sealed trait CyclicRegionType extends RegionType
  4. class DataFlowAnalysis[Data, Environment <: DataFlowEnvironment[Data, Environment]] extends AnyRef

    Performs structural data flow analysis based on the results of a StructuralAnalysis.

    Performs structural data flow analysis based on the results of a StructuralAnalysis. In more detail, this means that the control tree produced by the StructuralAnalysis is traversed recursively in a depth-first manner. Individual regions are processed by piping an Environment through their nodes and joining the environments where paths meet up. Thus, the individual flow functions defined at the statement PCs of a method are combined using region-type-specific patterns to effectively act as a flow function of the entire region, which is then processed itself due to the recursive nature of the algorithm.

    See also

    StructuralAnalysis, Environment

  5. trait DataFlowEnvironment[Data, T <: DataFlowEnvironment[Data, T]] extends AnyRef

    A mapping from PDUWeb to Data, used to identify the state of variables during a given fixed point of the org.opalj.si.flowanalysis.DataFlowAnalysis.

  6. type FlowGraph = Graph[FlowGraphNode, DiEdge[FlowGraphNode]]

    CFG-like basis for data-flow analysis and super flow graph.

  7. sealed trait FlowGraphNode extends Ordered[FlowGraphNode]

    A node in a flow graph and control tree produced by the StructuralAnalysis.

  8. case class Region(regionType: RegionType, nodeIds: Set[Int], entry: FlowGraphNode) extends FlowGraphNode with Product with Serializable

    Represents a region of nodes in a FlowGraph, consisting of multiple sub-nodes.

    Represents a region of nodes in a FlowGraph, consisting of multiple sub-nodes. Can identify general acyclic and cyclic structures or more specialised instances of such structures such as IfThenElse or WhileLoop.

    regionType

    The type of the region.

    nodeIds

    The union of all ids the leafs that are contained in this region.

    entry

    The direct child of this region that contains the first leaf to be executed when entering the region.

  9. sealed trait RegionType extends Product
  10. case class Statement(pc: Int) extends FlowGraphNode with Product with Serializable

    Represents a single statement in a methods FlowGraph and is one of the leaf nodes to be grouped by a Region.

    Represents a single statement in a methods FlowGraph and is one of the leaf nodes to be grouped by a Region.

    pc

    The PC that the statement is given at.

  11. type SuperFlowGraph = Graph[FlowGraphNode, Edge[FlowGraphNode]]

    Flow graph with including region control tree information from structural analysis.

Value Members

  1. case object Block extends AcyclicRegionType with Product with Serializable
  2. case object Case extends AcyclicRegionType with Product with Serializable
  3. object GlobalEntry extends FlowGraphNode

    An additional global entry node to a methods FlowGraph to ensure only one entry node exists.

  4. object GlobalExit extends FlowGraphNode

    An additional global exit node to a methods FlowGraph to ensure only one exit node exists.

  5. case object IfThen extends AcyclicRegionType with Product with Serializable
  6. case object IfThenElse extends AcyclicRegionType with Product with Serializable
  7. case object Improper extends CyclicRegionType with Product with Serializable
  8. case object NaturalLoop extends CyclicRegionType with Product with Serializable
  9. case object Proper extends AcyclicRegionType with Product with Serializable
  10. case object SelfLoop extends CyclicRegionType with Product with Serializable
  11. object StructuralAnalysis

    An algorithm that identifies several different types of flow regions in a given flow graph and reduces them to a single node iteratively.

    An algorithm that identifies several different types of flow regions in a given flow graph and reduces them to a single node iteratively. The algorithm terminates either when a single node is left in the flow graph or such a state could not be reached after maxIterations.

    On termination, the analyze function returns:

    - The reduced flow graph, a single node equal to the root node of the control tree.

    - A super flow graph as a combination of the given source flow graph and the control tree. For each node contained in the control tree, the super flow graph contains the node itself and edges to its children as referenced the control tree. However, its children are still connected with edges as contained in the source flow graph.
    This representation eases traversal for data flow analysis such as by DataFlowAnalysis.

    - The control tree, as a hierarchic representation of the control flow regions identified by the algorithm.

    This algorithm is adapted from Muchnick, S.S. (1997). Advanced Compiler Design and Implementation and optimized for performance.

    See also

    FlowGraphNode, DataFlowAnalysis

  12. case object WhileLoop extends CyclicRegionType with Product with Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped