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 ai

    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.

    Definition Classes
    opalj
    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.AI - Implements the abstract interpreter that processes a methods code and uses an analysis-specific domain to perform the abstract computations.

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

  • package domain

    This package contains definitions of common domains that can be used for the implementation of analyses.

    This package contains definitions of common domains that can be used for the implementation of analyses.

    Types of Domains

    In general, we distinguish two types of domains. First, domains that define a general interface (on top of the one defined by Domain), but do not directly provide an implementation. Hence, whenever you develop a new Domain you should consider implementing/using these domains to maximize reusability. Second, Domains that implement a specific interface (trait). In this case, we further distinguish between domains that provide a default implementation (per interface only one of these Domains can be used to create a final Domain) and those that can be stacked and basically refine the overall functionality.

    Examples

    • Domains That Define a General Interface
      • Origin defines two types which domains that provide information abou the origin of a value should consider to implement.
      • TheProject defines a standard mechanism how a domain can access the current project.
      • ...
    • Domains That Provide a Default Implementation
    • Domains That Implement Stackable Functionality
      • org.opalj.ai.domain.RecordThrownExceptions records information about all uncaught exceptions by intercepting a Domain's respective methods. However, it does provide a default implementation. Hence, a typical pattern is:
    class MyDomain extends Domain with ...
        with DefaultHandlingOfMethodResults with RecordThrownExceptions

    Thread Safety

    Unless explicitly documented, a domain is never thread-safe. The general programming model is to use one Domain object per code block/method and therefore, thread-safety is not required for Domains that are used for the evaluation of methods. However domains that are used to adapt/transfer values should be thread safe (see org.opalj.ai.domain.ValuesCoordinatingDomain for further details).

    Definition Classes
    ai
  • package l0
    Definition Classes
    domain
  • package l1

    Commonly useful methods.

    Commonly useful methods.

    Definition Classes
    domain
  • package l2
    Definition Classes
    domain
  • package tracing
    Definition Classes
    domain
  • AsDomainValue
  • AsJavaObject
  • ConcreteIntegerValues
  • ConcreteLongValues
  • ConstantFieldValuesResolution
  • CurrentCode
  • DefaultExceptionsFactory
  • DefaultHandlingForReturnInstructions
  • DefaultHandlingForThrownExceptions
  • DefaultHandlingOfMethodResults
  • DefaultHandlingOfVoidReturns
  • DefaultRecordMethodCallResults
  • DefaultSpecialDomainValuesBinding
  • DomainId
  • DomainValues
  • GeneralizedArrayHandling
  • IgnoreSynchronization
  • ImpossibleRefinement
  • MethodCallResults
  • MethodCallsHandling
  • MonitorInstructionsTracker
  • Origin
  • Origins
  • OriginsIterator
  • PerInstructionPostProcessing
  • PerformAI
  • PostEvaluationMemoryManagement
  • PredefinedClassHierarchy
  • RecordAllThrownExceptions
  • RecordCFG
  • RecordConstraints
  • RecordDefUse
  • RecordJoinedThrownExceptions
  • RecordLastReturnedValues
  • RecordMethodCallResults
  • RecordReturnFromMethodInstructions
  • RecordReturnedValue
  • RecordReturnedValueInfrastructure
  • RecordReturnedValues
  • RecordReturnedValuesInfrastructure
  • RecordThrownExceptions
  • RecordVoidReturns
  • RefineDefUseUsingOrigins
  • ReifiedConstraints
  • ReturnInstructionsDomain
  • SpecialMethodsHandling
  • TheCode
  • TheMethod
  • TheProject
  • ThePropertyStore
  • ThrowAllPotentialExceptionsConfiguration
  • ThrowNoPotentialExceptionsConfiguration
  • ValuesCoordinatingDomain
t

org.opalj.ai.domain

RecordMethodCallResults

trait RecordMethodCallResults extends MethodCallResults with RecordReturnedValues with RecordThrownExceptions

Records the results of the evaluation of the current method such that the results can directly be adapted to the calling context and can be used by the caller to continue the abstract interpretation of the calling method.

The returned value will only be a given parameter, if the given parameter is not mutated. For example, if an array is passed to a method where the content is reified, the returned value will only be mapped back to the parameter value if the array is not changed at all. In other words, the returned value, which may get the pc of the method caller, may refer to any parameter given to the method. Only, if the returned value is a parameter, we know that this specific parameter was not mutated at all.

Self Type
RecordMethodCallResults with Domain
Source
RecordMethodCallResults.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RecordMethodCallResults
  2. RecordThrownExceptions
  3. RecordReturnedValues
  4. CustomInitialization
  5. RecordReturnedValuesInfrastructure
  6. ReturnInstructionsDomain
  7. MethodCallResults
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract type ReturnedValue <: (RecordMethodCallResults.this)#DomainValue

    This type determines in which way the returned values are recorded.

    This type determines in which way the returned values are recorded.

    For example, if it is sufficient to just record the last value that was returned by a specific return instruction, then the type could be DomainValue and the implementation of joinReturnedValues(...) would just return the last given value. Furthermore, returnedValue would be the identity function.

    However, if you have a (more) precise domain you may want to collect all returned values. In this case the type of ReturnedValue could be Set[DomainValue].

    Definition Classes
    RecordMethodCallResultsRecordReturnedValuesInfrastructure
  2. abstract type ThrownException <: Set[(RecordMethodCallResults.this)#ExceptionValue]

    This type determines in which way thrown exceptions are recorded.

    This type determines in which way thrown exceptions are recorded.

    For example, if you want to collect all thrown exceptions, then the type of ThrownException could be Set[ThrownException].

    Definition Classes
    RecordMethodCallResultsRecordThrownExceptions
    See also

    The implementation of org.opalj.ai.domain.RecordAllThrownExceptions.

    The implementation of org.opalj.ai.domain.RecordLastReturnedValues. It follows the same pattern.

Abstract Value Members

  1. abstract def joinReturnedValues(pc: Int, previouslyReturnedValue: (RecordMethodCallResults.this)#ReturnedValue, value: (RecordMethodCallResults.this)#DomainValue): (RecordMethodCallResults.this)#ReturnedValue

    Joins the previously returned value and the newly given value.

    Joins the previously returned value and the newly given value. Both values are returned by the same return instruction (same pc).

    pc

    The program counter of the return instruction. The returned values are automatically associated with the pc of the instruction. Hence, it is not strictly required to store it in the ReturnedValue.

    Attributes
    protected[this]
    Definition Classes
    RecordReturnedValues
    See also

    For details study the documentation of the abstract type ReturnedValue and study the subclass(es) of RecordReturnedValues.

  2. abstract def joinThrownExceptions(pc: Int, previouslyThrownException: (RecordMethodCallResults.this)#ThrownException, value: (RecordMethodCallResults.this)#ExceptionValue): (RecordMethodCallResults.this)#ThrownException

    Joins the previously thrown exception(s) and the newly thrown exception.

    Joins the previously thrown exception(s) and the newly thrown exception. Both exceptions are thrown by the same instruction (same pc).

    Attributes
    protected[this]
    Definition Classes
    RecordThrownExceptions
    Note

    The instruction might be an athrow instruction or some other instruction that throws an exception.

    See also

    For details study the documentation of the abstract type ThrownException and study the subclass(es) of RecordThrownExceptions.

  3. abstract def recordReturnedValue(pc: Int, value: (RecordMethodCallResults.this)#DomainValue): (RecordMethodCallResults.this)#ReturnedValue

    Wraps the given value into a ReturnedValue.

    Wraps the given value into a ReturnedValue.

    pc

    The program counter of the return instruction. The returned values are automatically associated with the pc of the instruction. Hence, it is not strictly required to store it in the ReturnedValue.

    Attributes
    protected[this]
    Definition Classes
    RecordReturnedValues
    See also

    For details study the documentation of the abstract type ReturnedValue and study the subclass(es) of RecordReturnedValues.

  4. abstract def recordThrownException(pc: Int, value: (RecordMethodCallResults.this)#ExceptionValue): (RecordMethodCallResults.this)#ThrownException

    Wraps the given value into a ThrownException.

    Wraps the given value into a ThrownException.

    pc

    The program counter of the instruction that throws the exception. It is automatically stored in the map that associates instructions with the exceptions that are thrown.

    Attributes
    protected[this]
    Definition Classes
    RecordThrownExceptions
    See also

    For details study the documentation of the abstract type ThrownException and study the subclass(es) of RecordThrownExceptions.

Concrete 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 abruptMethodExecution(pc: Int, exception: (RecordMethodCallResults.this)#ExceptionValue): Unit

    Called by the abstract interpreter when an exception is thrown that is not (guaranteed to be) handled within the same method.

    Called by the abstract interpreter when an exception is thrown that is not (guaranteed to be) handled within the same method.

    Definition Classes
    RecordThrownExceptionsReturnInstructionsDomain
    Note

    If the original exception value is null (/*E.g.*/throw null;), then the exception that is actually thrown is a new NullPointerException. This situation is, however, completely handled by OPAL and the exception value is hence never null.

  5. def allReturnedValues: IntMap[(RecordMethodCallResults.this)#ReturnedValue]

    Returns the set of all returned values.

    Returns the set of all returned values.

    Definition Classes
    RecordReturnedValues
  6. def allThrownExceptions: LongMap[(RecordMethodCallResults.this)#ThrownException]

    Returns all thrown exceptions.

    Returns all thrown exceptions. The key of the returned map is the pc of the instruction which threw the exception.

    Definition Classes
    RecordThrownExceptions
  7. def areturn(pc: Int, value: (RecordMethodCallResults.this)#DomainValue): Computation[Nothing, (RecordMethodCallResults.this)#ExceptionValue]

    The given value, which is a value with computational type reference, is returned by the return instruction with the given pc.

    The given value, which is a value with computational type reference, is returned by the return instruction with the given pc.

    Definition Classes
    RecordReturnedValuesInfrastructureReturnInstructionsDomain
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  10. def doRecordReturnedValue(pc: Int, value: (RecordMethodCallResults.this)#DomainValue): Boolean

    Records the returned value.

    Records the returned value.

    returns

    true if the information about the returned value was updated.

    Attributes
    protected[this]
    Definition Classes
    RecordReturnedValuesRecordReturnedValuesInfrastructure
  11. def dreturn(pc: Int, value: (RecordMethodCallResults.this)#DomainValue): Computation[Nothing, (RecordMethodCallResults.this)#ExceptionValue]

    The given value, which is a value with computational type double, is returned by the return instruction with the given pc.

    The given value, which is a value with computational type double, is returned by the return instruction with the given pc.

    Definition Classes
    RecordReturnedValuesInfrastructureReturnInstructionsDomain
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. def freturn(pc: Int, value: (RecordMethodCallResults.this)#DomainValue): Computation[Nothing, (RecordMethodCallResults.this)#ExceptionValue]

    The given value, which is a value with computational type float, is returned by the return instruction with the given pc.

    The given value, which is a value with computational type float, is returned by the return instruction with the given pc.

    Definition Classes
    RecordReturnedValuesInfrastructureReturnInstructionsDomain
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  17. def initProperties(code: Code, cfJoins: IntTrieSet, initialLocals: (RecordMethodCallResults.this)#Locals): Unit

    Override this method to perform custom initialization steps.

    Override this method to perform custom initialization steps.

    Always use abstract override and call the super method; it is recommended to complete the initialization of this domain before calling the super method.

    Definition Classes
    RecordReturnedValuesCustomInitialization
  18. def ireturn(pc: Int, value: (RecordMethodCallResults.this)#DomainValue): Computation[Nothing, (RecordMethodCallResults.this)#ExceptionValue]

    The given value, which is a value with computational type integer, is returned by the return instruction with the given pc.

    The given value, which is a value with computational type integer, is returned by the return instruction with the given pc.

    Definition Classes
    RecordReturnedValuesInfrastructureReturnInstructionsDomain
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. def lreturn(pc: Int, value: (RecordMethodCallResults.this)#DomainValue): Computation[Nothing, (RecordMethodCallResults.this)#ExceptionValue]

    The given value, which is a value with computational type long, is returned by the return instruction with the given pc.

    The given value, which is a value with computational type long, is returned by the return instruction with the given pc.

    Definition Classes
    RecordReturnedValuesInfrastructureReturnInstructionsDomain
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  24. def returnVoid(pc: Int): Computation[Nothing, (RecordMethodCallResults.this)#ExceptionValue]

    Called when a return instruction with the given pc is reached.

    Called when a return instruction with the given pc is reached. In other words, when the method returns normally.

    Definition Classes
    RecordMethodCallResultsReturnInstructionsDomain
  25. def returnedNormally: Boolean

    true if the method returned due to a ("void"|a|i|l|f|d)return instruction.

    true if the method returned due to a ("void"|a|i|l|f|d)return instruction.

    Definition Classes
    RecordMethodCallResultsMethodCallResults
    Note

    This method may only be called after the abstract interpretation of a method has completed.

  26. def returnedValue(target: TargetDomain, callerPC: Int): Option[(target)#DomainValue]

    Adapts and returns the returned value.

    Adapts and returns the returned value.

    Definition Classes
    RecordMethodCallResultsMethodCallResults
    Note

    This method is only defined if the method returned normally. In this case None is returned if the method's return type is void; Some(DomainValue) is returned otherwise.

    ,

    This method may only be called after the abstract interpretation of a method has completed.

  27. def returnedValueRemapped(callerDomain: TargetDomain, callerPC: Int)(originalOperands: (callerDomain)#Operands, passedParameters: (RecordMethodCallResults.this)#Locals): Option[(callerDomain)#DomainValue]

    Remaps the returned value to the domain value used by the calling domain.

    Remaps the returned value to the domain value used by the calling domain.

    Definition Classes
    RecordMethodCallResultsMethodCallResults
    Note

    Even if the current domain provides origin information then the returned value is not refined by this default implementation. For example, imagine the following code:

    def isString(o : Object) : Object = {
       if(o.isInstanceOf[String])
           o // here, we know that o is actually a String.
       else
           null
    }

    Here, the value that is returned is the original "object" value; the information that it is a String is not available in the calling method's context. Furthermore, "MultipleReferenceValues" are also not supported. Support of these features requires that the "current" domain is at least the l1.DefaultReferenceValuesDomain which we do not assume here.

  28. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  29. def thrownExceptions(target: TargetDomain, callerPC: Int): (target)#ExceptionValues

    Adapts and returns the exceptions that are thrown by the called method.

    Adapts and returns the exceptions that are thrown by the called method.

    In general, for each type of exception there should be at most one ExceptionValue.

    Definition Classes
    RecordMethodCallResultsMethodCallResults
    Note

    This method may only be called after the abstract interpretation of a method has completed.

  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. 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 RecordThrownExceptions

Inherited from RecordReturnedValues

Inherited from CustomInitialization

Inherited from MethodCallResults

Inherited from AnyRef

Inherited from Any

Ungrouped