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 concurrent

    Common constants, factory methods and objects used throughout OPAL when performing concurrent computations.

    Common constants, factory methods and objects used throughout OPAL when performing concurrent computations.

    Definition Classes
    opalj
  • ConcurrentExceptions
  • ConcurrentTasks
  • Locking
  • OPALThreadPoolExecutor
  • SequentialTasks
  • Tasks
  • package constraints

    Defines helper values and methods related to modeling constraints.

    Defines helper values and methods related to modeling constraints.

    Definition Classes
    opalj
  • package control

    Defines common control abstractions.

    Defines common control abstractions.

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

    Various io-related helper methods and classes.

    Various io-related helper methods and classes.

    Definition Classes
    opalj
    Note

    The implementations of the methods rely on Java NIO(2).

  • package log
    Definition Classes
    opalj
  • package util

    Utility methods.

    Utility methods.

    Definition Classes
    opalj
p

org.opalj

concurrent

package concurrent

Common constants, factory methods and objects used throughout OPAL when performing concurrent computations.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. concurrent
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class ConcurrentExceptions extends Exception
  2. final class ConcurrentTasks[T] extends Tasks[T]

    Executes the given function process for each submitted value of type T.

    Executes the given function process for each submitted value of type T. The process function can add further values that should be processed.

    Example:
    1. val tasks = new Tasks[T] { (tasks : Tasks[T], t : T) ⇒
               // do something with t
               if (<some condition>) { tasks.submit(nextT) }
           }
      val exceptions = tasks.join()
  3. trait Locking extends AnyRef

    A basic facility to model shared and exclusive access to some functionality/data structure.

    A basic facility to model shared and exclusive access to some functionality/data structure.

    Usage

    To use this generic locking facility you should mix in this trait.

  4. class OPALThreadPoolExecutor extends ThreadPoolExecutor

    A ThreadPool that knows the ThreadGroup associated with its threads and that catches exceptions if a thread crashes and reports them using the OPALLogger facility.

  5. final class SequentialTasks[T] extends Tasks[T]

    T

    Type of the processed data.

  6. sealed trait Tasks[T] extends AnyRef

Value Members

  1. def ExecutionContextN(n: Int): ExecutionContext
  2. final val NumberOfThreadsForCPUBoundTasks: Int

    The number of threads that should be used by parallelized computations that are CPU bound (which do not use IO).

    The number of threads that should be used by parallelized computations that are CPU bound (which do not use IO). This number is always larger than 0. This number is intended to reflect the number of physical cores (not hyperthreaded ones).

  3. final val NumberOfThreadsForIOBoundTasks: Int

    The size of the thread pool used by OPAL for IO bound tasks.

    The size of the thread pool used by OPAL for IO bound tasks. The size should be at least as large as the number of physical cores and is ideally between 1 and 3 times larger than the number of (hyperthreaded) cores. This enables the efficient execution of IO bound tasks.

  4. implicit final val OPALExecutionContext: ExecutionContext

    The ExecutionContext used by OPAL.

    The ExecutionContext used by OPAL.

    This ExecutionContext must not be shutdown.

  5. final val OPALExecutionContextTaskSupport: ExecutionContextTaskSupport
  6. final val ThreadPool: OPALThreadPoolExecutor

    Returns the singleton instance of the global ThreadPool used throughout OPAL.

  7. def ThreadPoolN(n: Int): OPALThreadPoolExecutor
  8. final val defaultIsInterrupted: () ⇒ Boolean
  9. final def handleUncaughtException(t: Thread, e: Throwable): Unit
  10. final def handleUncaughtException(t: Throwable): Unit
  11. def parForeachArrayElement[T, U](data: Array[T], parallelizationLevel: Int = NumberOfThreadsForCPUBoundTasks, isInterrupted: () ⇒ Boolean = ...)(f: Function[T, U]): Unit

    Execute the given function f in parallel for each element of the given array.

    Execute the given function f in parallel for each element of the given array. After processing an element it is checked whether the computation should be aborted.

    In general – but also at most – parallelizationLevel many threads will be used to process the elements. The core idea is that each thread processes an element and after that grabs the next element from the array. Hence, this handles situations gracefully where the effort necessary to analyze a specific element varies widely.

    Annotations
    @throws( ... )
    Exceptions thrown

    ConcurrentExceptions if any exception occurs; the thrown exception stores all other exceptions (getSuppressed)

    Note

    The given function f must not make use of non-local returns; such returns will be caught and reported later.

    ,

    The OPALExecutionContext is used for getting the necessary threads.

  12. object Locking

    Defines several convenience methods related to using (Reentrant(ReadWrite))Locks.

  13. object Tasks

    Factory to create Tasks objects to process value oriented tasks.

Inherited from AnyRef

Inherited from Any

Ungrouped