Package

org

opalj

Permalink

package opalj

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

Its main components are:

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 the thread-safety properties. Furthermore, the concrete data-structure is always considered an implementation detail and may change at any time.

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.

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

Type Members

  1. final type AnalysisMode = opalj.AnalysisModes.Value

    Permalink

    The type of a concrete analysis mode.

  2. sealed trait Answer extends AnyRef

    Permalink

    Models a three state answer (Yes, No, Unknown).

  3. final type BinaryArithmeticOperator = opalj.BinaryArithmeticOperators.Value

    Permalink

    The type of the predefined binary arithmetic operators.

    The type of the predefined binary arithmetic operators.

    See org.opalj.BinaryArithmeticOperators for the list of all defined operators.

  4. sealed trait NoResult extends Result[Nothing]

    Permalink
  5. final type RelationalOperator = opalj.RelationalOperators.Value

    Permalink

    The type of the predefined relational operators.

    The type of the predefined relational operators.

    See org.opalj.RelationalOperators for the list of all defined operators.

  6. sealed trait Result[+T] extends Serializable

    Permalink

    Represents the result of some expression that either (a) succeeded and encapsulates some value, or (b) finished, but has no value - because it was not possible to compute a value using the given information - or (c) that failed.

    Represents the result of some expression that either (a) succeeded and encapsulates some value, or (b) finished, but has no value - because it was not possible to compute a value using the given information - or (c) that failed.

    Note

    Depending on the context, it may be useful to distinguish between a success that returns an empty collection and a success that has no further information.

  7. case class Success[+T](value: T) extends Result[T] with Product with Serializable

    Permalink

    The computation succeeded and produced a result.

    The computation succeeded and produced a result. In general

  8. final type UByte = Int

    Permalink

    A simple type alias that can be used to communicate that the respective value will/should only take values in the range of unsigned byte values.

  9. final type UShort = Int

    Permalink

    A simple type alias that can be used to communicate that the respective value will/should only take values in the range of unsigned short values.

  10. final type UnaryArithmeticOperator = opalj.UnaryArithmeticOperators.Value

    Permalink

    The type of the predefined unary arithmetic operators.

    The type of the predefined unary arithmetic operators.

    See org.opalj.UnaryArithmeticOperators for the list of all defined operators.

Value Members

  1. object AnalysisMode

    Permalink

    Common constants related to the analysis mode.

    Common constants related to the analysis mode.

    Note

    The package defines the type AnalysisMode.

  2. object AnalysisModes extends Enumeration

    Permalink

    The analysis mode specifies the type of the project/the kind of sources which will be analyzed and - in case of libraries – the underlying assumption that should be used.

    The analysis mode specifies the type of the project/the kind of sources which will be analyzed and - in case of libraries – the underlying assumption that should be used.

    Basically an enumeration of the modes that can be used by the subsequent analyses.

  3. object Answer

    Permalink

    Factory for Answers.

  4. object BinaryArithmeticOperators extends Enumeration

    Permalink

    All standard binary arithmetic operators defined in the Java Virtual Machine/Java Language Specification.

    All standard binary arithmetic operators defined in the Java Virtual Machine/Java Language Specification.

    Note

    The type of a value of this enumeration is org.opalj.BinaryArithmeticOperator.

  5. object Empty extends NoResult with Product with Serializable

    Permalink

    The computation finished, but did no produce any results or the result was filtered.

    The computation finished, but did no produce any results or the result was filtered.

    Note

    The precise semantics of succeeded without results is dependent on the semantics of the concrete computation and needs to be defined per use case.

  6. object Failure extends NoResult with Product with Serializable

    Permalink

    The computation failed because of missing/incomplete information.

    The computation failed because of missing/incomplete information.

    Note

    The precise semantics of the computation failed is dependent on the semantics of the concrete computation and needs to be defined per use case.

  7. object No extends Answer with Product with Serializable

    Permalink

    Represents the answer to a question where the answer is No.

  8. object NoResult extends Serializable

    Permalink
  9. final val NotRequired: (Any) ⇒ Nothing

    Permalink
  10. object RelationalOperators extends Enumeration

    Permalink

    The standard relational operators defined in the Java Virtual Machine Specification/ Java Language Specification.

  11. object Result extends Serializable

    Permalink

    Defines factory methods for Result objects.

  12. object UByte

    Permalink

    Properties of unsigned byte values.

  13. object UShort

    Permalink

    Properties of unsigned short values.

  14. object UnaryArithmeticOperators extends Enumeration

    Permalink

    All standard unary arithmetic operators defined in the Java Virtual Machine/Java Language Specification.

    All standard unary arithmetic operators defined in the Java Virtual Machine/Java Language Specification.

    Note

    The type of a value of this enumeration is org.opalj.UnaryArithmeticOperator.

  15. object Unknown extends Answer with Product with Serializable

    Permalink

    Represents the answer to a question where the answer is either Unknown or is actuaclly both; that is, Yes and No.

  16. final val WEBPAGE: String("http://www.opal-project.de")

    Permalink

    The URL of the webpage of the opal project.

  17. object Yes extends Answer with Product with Serializable

    Permalink

    Represents the answer to a question where the answer is Yes.

  18. package ai

    Permalink

    Implementation of an abstract interpretation (ai) framework – also referred to as OPAL.

    Implementation of an abstract interpretation (ai) framework – also referred to as OPAL.

    Please note, that OPAL/the abstract interpreter just refers to the classes and traits defined in this package (ai). The classes and traits defined in the sub-packages (in particular in domain) are not considered to be part of the core of OPAL/the abstract interpreter.

    Note

    This framework assumes that the analyzed bytecode is valid; i.e., the JVM's bytecode verifier would be able to verify the code. Furthermore, load-time errors (e.g., LinkageErrors) are – by default – completely ignored to facilitate the analysis of parts of a project. In general, if the presented bytecode is not valid, the result is undefined (i.e., OPAL may report meaningless results, crash or run indefinitely).

    See also

    org.opalj.ai.Domain - The core interface between the abstract interpretation framework and the abstract domain that is responsible for performing the abstract computations.

    org.opalj.ai.AI - Implements the abstract interpreter that processes a methods code and uses an analysis-specific domain to perform the abstract computations.

  19. package av

    Permalink
  20. package ba

    Permalink

    Implementation of an eDSL for creating Java bytecode.

    Implementation of an eDSL for creating Java bytecode. The eDSL is designed to facilitate the creation of correct class files; i.e., whenever possible it tries to fill wholes. For example, when an interface is specified the library automatically ensures that the super class type is (initially) set to java.lang.Object as required by the JVM specification.

    This package in particular provides functionality to convert org.opalj.br classes to org.opalj.da classes.

  21. package bc

    Permalink
  22. package bi

    Permalink

    Implementation of a library for parsing Java bytecode and creating arbitrary representations.

    Implementation of a library for parsing Java bytecode and creating arbitrary representations.

    OPAL's primary representation of Java byte code is the org.opalj.br representation which is defined in the respective package. A second representation that represents bytecode one-by-one is found in the org.opalj.da package.

    This Package

    Common constants and type definitions used across OPAL.

  23. package br

    Permalink

    In this representation of Java bytecode references to a Java class file's constant pool and to attributes are replaced by direct references to the corresponding constant pool entries.

    In this representation of Java bytecode references to a Java class file's constant pool and to attributes are replaced by direct references to the corresponding constant pool entries. This facilitates developing analyses and fosters comprehension.

    Based on the fact that indirect reference to constant pool entries are resolved and replaced by direct reference this representation is called the resolved representation.

    This representation of Java bytecode is considered as OPAL's standard representation for writing Scala based analyses. This representation is engineered such that it facilitates writing analyses that use pattern matching.

  24. package bugpicker

    Permalink
  25. package bytecode

    Permalink

    Defines functionality commonly useful when processing Java bytecode.

  26. package collection

    Permalink

    Defines helper methods related to Scala's and OPAL's collections APIs.

  27. package concurrent

    Permalink

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

  28. package config

    Permalink
  29. package constraints

    Permalink

    Defines helper values and methods related modeling constraints.

  30. package control

    Permalink

    Defines common control abstractions.

  31. package da

    Permalink

    Defines convenience methods related to representing certain class file elements.

  32. package de

    Permalink

    Functionality to extract dependencies between class files.

  33. package fpcf

    Permalink

    The fixpoint computations framework (fpcf) is a general framework to perform fixpoint computations on a fixed set of entities.

    The fixpoint computations framework (fpcf) is a general framework to perform fixpoint computations on a fixed set of entities. The framework in particular supports the development of static analyses. In this case, the fixpoint computations/ static analyses are generally operating on the code and need to be executed until the computation has reached its (implicit) fixpoint. The fixpoint framework explicitly supports cyclic dependencies/computations and performs all computations in parallel. A prime use case of the fixpoint framework are all those analyses that may interact with the results of other analyses.

    For example, an analysis that analyses all field write access to determine if we can refine a field's type (for the purpose of the analysis) can (reuse) the information about the return types of methods, which however may depend on the refined field types.

    The framework is generic enough to facilitate the implementation of anytime algorithms.

    The framework supports two very basic kinds of properties. Those properties that are associated with a specific entity; e.g., a field's real type, and those properties that are shared by a set of entities; e.g., the set of all methods that are entry points. In general, the latter properties can also be modeled using the first mechanism, but this would not be as effective.

    Note

    The dependency relation is as follows: “A depends on B” === “A is the depender, B is the dependee”. === “B is depended on by A”

  34. package graphs

    Permalink

    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).
  35. package hermes

    Permalink
  36. final def i2lBitMask(value: Int): Long

    Permalink

    Converts a given bit mask using an Int value into a bit mask using a Long value.

    Converts a given bit mask using an Int value into a bit mask using a Long value.

    Annotations
    @inline()
    Note

    This is not the same as a type conversion as the "sign-bit" is not treated as such. I.e., after conversion of the Int value -1, the Long value will be 4294967295 (both have the same bit mask: 11111111111111111111111111111111); in other words, the long's sign bit will still be 0.

  37. package io

    Permalink

    Various io-related helper methods and classes.

    Various io-related helper methods and classes.

    Note

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

  38. package issues

    Permalink

    Defines implicit conversions to wrap some types of analyses such that they generate results of type org.opalj.br.analyses.ReportableAnalysisResult.

  39. package log

    Permalink
  40. def notRequired(): Nothing

    Permalink
  41. package tac

    Permalink

    Common definitions related to the definition and processing of three address code.

  42. package util

    Permalink

    Utility methods.

Inherited from AnyRef

Inherited from Any

Ungrouped