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 collection

    OPAL's collection library is primarily designed with high performance in mind.

    Design Goals

    OPAL's collection library is primarily designed with high performance in mind. I.e., all methods provided by the collection library are reasonably optimized. However, providing a very large number of methods is a non-goal. Overall, OPAL's collection library provides:

    • collection classes that are manually specialized for primitive data-types.
    • collection classes that are optimized for particularly small collections of values.
    • collection classes that target special use cases such as using a collection as a workset/worklist.
    • collection classes that offer special methods that minimize the number of steps when compared to general purpose methods.

    Integration With Scala's Collection Library

    Hence, OPAL's collection library complements Scala's default collection library and is not intended to replace it. Integration with Scala's collection library is primarily provided by means of iterators (OPAL's Iterators inherit from Scala's Iterators). Furthermore the companion object of each of OPAL's collection classes generally provides factory methods that facilitate the conversion from Scala collection classes to OPAL collection classes.

    Status

    The collection library is growing. Nevertheless, the existing classes are production ready.

    Definition Classes
    opalj
  • package eval
    Definition Classes
    collection
  • package immutable
    Definition Classes
    collection
  • package mutable
    Definition Classes
    collection
  • ArrayMap
  • FixedSizeBitSet
  • FixedSizedHashIDMap
  • IntArrayStack
  • IntQueue
  • Locals
  • RefAccumulator

package mutable

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. class ArrayMap[T >: Null <: AnyRef] extends AnyRef

    Conceptually, a map where the (implicit) keys are positive Int values and the values are non-null; null values are not permitted! The key values always have to be larger than or equal to 0 and are ideally continues (0,1,2,3,...).

    Conceptually, a map where the (implicit) keys are positive Int values and the values are non-null; null values are not permitted! The key values always have to be larger than or equal to 0 and are ideally continues (0,1,2,3,...). The values are stored in a plain array to enable true O(1) retrieval. Furthermore, the array is only as large as it has to be to keep the value associated with the largest key.

    Note

    This data structure is not thread safe.

  2. sealed abstract class FixedSizeBitSet extends BitSet with Serializable

    A bit set with a given upper bound for the largest value that can be stored in the set.

    A bit set with a given upper bound for the largest value that can be stored in the set. The upper bound is only used to create an optimal underlying representation. It has no impact on equals and/or hashcode computations. I.e., two sets with two different upper bounds which contain the same values, are equal and have the same hashcode.

    Conceptually, the an array of long values is used to store the values.

    Note

    If values are added to the set that are larger than the specified size the behavior is undefined!

  3. class FixedSizedHashIDMap[K <: AnyRef, V] extends AnyRef

    Conceptually, a map where the keys have to have unique hash codes that are spread over a previously known range.

    Conceptually, a map where the keys have to have unique hash codes that are spread over a previously known range.

    Hence, Using this map has three requirements:

    1. The value returned by the hashcode function of the keys have to be unique w.r.t. the values stored in the map; i.e., two different key objects have to have different hashcode values.
    2. The range of hashcode values returned by the keys has to be known and should be reasonably consecutive because an array will be preallocated to hold all values. (it can nevertheless start with an arbitrary int)
    3. The number of eventually stored key/values should be > 1/4 of the range of key values to amortize the costs of the underlying data-structures.
    Note

    The null key is not permitted.

    ,

    This data structure is not thread safe.

  4. final class IntArrayStack extends IndexedSeq[Int] with IndexedSeqOps[Int, Stack, IntArrayStack] with Cloneable[IntArrayStack] with Serializable

    An array based implementation of a mutable stack of int values which has a given initial size.

    An array based implementation of a mutable stack of int values which has a given initial size. If the stack is non-empty, the index of the top value is 0 and the index of the bottom value is (length-1).

  5. final class IntQueue extends Serializable

    A lightweight, linked-list based implementation of a mutable queue of int values.

    A lightweight, linked-list based implementation of a mutable queue of int values.

    Attributes
    protected[opalj]
    Note

    This data-structure is only intended to be used by OPAL.

    ,

    This data structure is not thread safe.

  6. sealed trait Locals[T >: Null <: AnyRef] extends AnyRef

    THIS DATASTRUCTURE IS ONLY INTENDED TO BE USED BY THE AI FRAMEWORK, DON'T USE IT OTHERWISE.

    THIS DATASTRUCTURE IS ONLY INTENDED TO BE USED BY THE AI FRAMEWORK, DON'T USE IT OTHERWISE.

    Conceptually, an array that enables random access and which is heavily optimized for small(er) collections (up to 12 elements) that are frequently compared and updated and where sharing is beneficial.

    A Locals array contains null values for all elements that are not yet set. Furthermore, a Locals array is not resizable and – if used in development mode – minimizes checks whenever possible. I.e., the user is expected to correctly use this data structure.

    Usage Scenario

    For example, the median of the number of registers that are used per method is 2 (JDK and OPAL) and more then 99,5% of all methods have less than 20 elements and in particular those elements related to the parameters do not change often.

  7. final class RefAccumulator[A <: AnyRef] extends AnyRef

    A list based accumulator of values and collections of values where the collections of values are not copied to the accumulator but only an iterator of those values.

    A list based accumulator of values and collections of values where the collections of values are not copied to the accumulator but only an iterator of those values. Hence, the collections that are added to this accumulator must not be mutated after being added.

    A

    A type which is NOT a subtype of Iterator[_].

    Note

    This is not a general purpose data-structure due to the requirements on the immutability of added collections.

Value Members

  1. object ArrayMap
  2. object FixedSizeBitSet extends Serializable

    Factory to create fixed size bit arrays.

  3. object FixedSizedHashIDMap
  4. object IntArrayStack extends SpecificIterableFactory[Int, IntArrayStack] with Serializable

    Factory to create IntArrayStacks.

  5. object IntQueue extends Serializable

    Factory to create IntQueues.

  6. object Locals
  7. object RefAccumulator

    Factory to create RefAccumulators.

Ungrouped