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 common
    Definition Classes
    ai
  • 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
  • package l1

    Commonly useful methods.

  • package l2
  • package tracing
  • 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
  • package fpcf
    Definition Classes
    ai
  • package project
    Definition Classes
    ai
  • package util

    Common utility functionality.

    Common utility functionality.

    Definition Classes
    ai
p

org.opalj.ai

domain

package domain

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).

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

Package Members

  1. package l0
  2. package l1

    Commonly useful methods.

  3. package l2
  4. package tracing

Type Members

  1. trait AsDomainValue extends AnyRef

    Mixed in by domains that support the conversation of a Java Object into a DomainValue.

    Mixed in by domains that support the conversation of a Java Object into a DomainValue.

    See also

    AsJavaObject for further information on limitations.

  2. trait AsJavaObject extends AnyRef

    Mixed in by domains that support the conversation of a DomainValue into a respective Java object.

    Mixed in by domains that support the conversation of a DomainValue into a respective Java object. This Java object can then be used to perform method invocations.

    Limitation

    Using AsJavaObject will only work reasonably iff the respective class is either in the classpath of the JVM or a class loader (initialized with the project's classpath) is used. The latter, however, does not work for classes on the bootclasspath (e.g., java.lang.String). In that case it is necessary to check that the code of the analyzed application is compatible with the one on the class path. To avoid accidental imprecision in the analysis you should use this features only for stable classes belonging to the core JDK (java.lang....)

  3. trait ConcreteIntegerValues extends AnyRef

    Provides information about an integer value's precise value, if this information is available.

    Provides information about an integer value's precise value, if this information is available.

    Note

    The information about an integer value's range that is required by the abstract interpreter is defined by the Domain trait.

    ,

    This functionality is not required by the OPAL core.

  4. trait ConcreteLongValues extends AnyRef

    Provides information about a long value's precise value, if this information is available.

    Provides information about a long value's precise value, if this information is available.

    Note

    This abstract interpreter never requires knowledge about the precise value of a value with computational type long.

  5. trait ConstantFieldValuesResolution extends Domain

    Resolves references to final static fields that have simple constant values.

    Resolves references to final static fields that have simple constant values.

    Note

    A typical Java compiler automatically resolves all simple references and, hence, this trait has for Java projects in general no effect. If we analyze other languages that compile to the JVM platform, the effect might be different.

  6. trait CurrentCode extends TheCode with CustomInitialization

    Provides information about the code block that is currently analyzed.

    Provides information about the code block that is currently analyzed.

    Core Properties

    • "Automatically reset" when the domain is used to analyze another method.
    • "Concurrent Usage": "No"
  7. trait DefaultExceptionsFactory extends ExceptionsFactory

    Default implementation of the ExceptionsFactory trait that relies on the ReferenceValuesFactory.

  8. trait DefaultHandlingForReturnInstructions extends ReturnInstructionsDomain

    Provides default implementations for a Domain's return methods that always throw an IllegalMonitorStateExceptoin.

    Provides default implementations for a Domain's return methods that always throw an IllegalMonitorStateExceptoin.

    You can mix in this trait if you are not interested in a method's return values or if you need some default implementations.

  9. trait DefaultHandlingForThrownExceptions extends ReturnInstructionsDomain

    Basic implementation of a Domain's abruptMethodExecution method that does nothing.

    Basic implementation of a Domain's abruptMethodExecution method that does nothing.

    Note

    Mix-in this trait if the analysis does not need to do anything special in case of an exception or if you have multiple stackable traits and you need a base implementation. Example:

    MySpecialDomain
        extends ...
        with DefaultHandlingForThrownExceptions
        with RecordThrownExceptions
        with ...
  10. trait DefaultHandlingOfMethodResults extends DefaultHandlingForThrownExceptions with DefaultHandlingOfVoidReturns with DefaultHandlingForReturnInstructions

    A Domain that does nothing if a method returns ab-/normally.

    A Domain that does nothing if a method returns ab-/normally.

    Note

    This trait's methods are generally not intended to be overridden. If you need to do some special processing just directly implement the respective method and mixin the traits that ignore the rest.

  11. trait DefaultHandlingOfVoidReturns extends ReturnInstructionsDomain

    Basic implementation of a Domains returnVoid method that does nothing.

  12. trait DefaultRecordMethodCallResults extends RecordMethodCallResults with RecordLastReturnedValues with RecordAllThrownExceptions

    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.

  13. trait DefaultSpecialDomainValuesBinding extends ValuesDomain

    Final binding of a Domain's type DomainValue as well as all subtypes of it that are also defined by Domain.

    Final binding of a Domain's type DomainValue as well as all subtypes of it that are also defined by Domain.

    The type DomainValue is set to the type org.opalj.ai.Domain.Value.

  14. trait DomainId extends AnyRef

    Common super trait of all domains have an id to identify them.

  15. sealed abstract class DomainValues extends AnyRef

    Encapsulates a domain and some values created by the respective domain.

    Encapsulates a domain and some values created by the respective domain.

    Using the class DomainValues enables type-safety when we need to store and pass on a Domain object and some of its values.

  16. trait GeneralizedArrayHandling extends ReferenceValuesDomain

    This (partial-)domain abstracts over the concrete methods for performing array operations and provides an interface at a higher abstraction level.

  17. trait IgnoreSynchronization extends MonitorInstructionsDomain

    Provides a default implementation for the instructions related to synchronization.

  18. case class ImpossibleRefinement(value: AnyRef, refinementGoal: String) extends AIException with Product with Serializable

    Thrown to indicate that a refinement of some value was not possible.

  19. trait MethodCallResults extends AnyRef

    Trait that can be mixed in if information is needed about all returned values and the thrown exceptions.

    Trait that can be mixed in if information is needed about all returned values and the thrown exceptions. This information is, however, only available after the evaluation of a method has completed.

  20. trait MethodCallsHandling extends MethodCallsDomain

    Provides support for handling method invocations, but does not handle any invocations directly.

  21. trait MonitorInstructionsTracker extends MonitorInstructionsDomain with CustomInitialization

    Tracks if a monitor(enter|exit) instruction was executed.

    Tracks if a monitor(enter|exit) instruction was executed.

    This knowledge is of interest to decide, e.g., whether a return instruction may throw an IllegalMonitorStateException or not.

  22. trait Origin extends AnyRef

    Provides information about the origin (that is, def-site) of a value iff the underlying domain provides the respective information; that is, this trait only defines the public API it does not provide origin information on its own.

    Provides information about the origin (that is, def-site) of a value iff the underlying domain provides the respective information; that is, this trait only defines the public API it does not provide origin information on its own.

    However, a domain that provides origin information has to do so for ALL values of the respective computational type category and the information has to be complete.

    Usage

    To get origin information this trait needs be implemented by a domain. I.e., just mixing in this trait will not provide origin information about values.

    Implementation

    This trait should be inherited from by all domains that make information about the origin of a value available (see org.opalj.ai.domain.l1.ReferenceValues as an example); the respective domains have to override providesOriginInformationFor

    Note

    A org.opalj.br.instructions.CHECKCAST must not modify origin information; i.e., the origin of the value on the stack before and after the checkast (unless we have an exception) must be the same!

  23. trait PerInstructionPostProcessing extends CoreDomainFunctionality

    Provides the generic infrastructure to register a function that updates the operands and locals associated with an instruction that will be evaluated "next".

    Provides the generic infrastructure to register a function that updates the operands and locals associated with an instruction that will be evaluated "next". For example, let's assume that we are currently processing instruction X and that instruction Y is the successor instruction. In this case, the framework will first determine the effect of function X on the stack/locals. After that, all registered updaters will be called. All registered updaters will be discarded as soon the evaluation of instruction X has completed.

  24. trait PostEvaluationMemoryManagement extends CoreDomainFunctionality

    Provides the possibility to further update the memory layout (registers and operands) after the execution of an instruction, but before any potential join is performed.

    Provides the possibility to further update the memory layout (registers and operands) after the execution of an instruction, but before any potential join is performed.

    Using this domain is only safe if the (partial-)domains that use this functionality never interfere with each other.

    Note

    If this domain is mixed in then the domain cannot be used to simultaneously analyze multiple different methods at the same time.

  25. trait PredefinedClassHierarchy extends AnyRef

    This class uses OPAL's PreInitializedClassHierarchy (see ClassHierarchy for details) for class hierarchy related queries.

    This class uses OPAL's PreInitializedClassHierarchy (see ClassHierarchy for details) for class hierarchy related queries.

    Use this trait ONLY if you just want to do some testing.

  26. trait RecordAllThrownExceptions extends RecordThrownExceptions

    Records all exceptions thrown by a method.

    Records all exceptions thrown by a method. I.e., for each instruction that throws an exception (or multiple exceptions) all exceptions are recorded.

    Note

    This domain requires that DomainValues that represent thrown exceptions have meaningful equals and hashCode methods. (Depending on the purpose of the abstract interpretation, reference equality may be sufficient.)

    ,

    This domain is only effective if the calculation of joins is fast. Otherwise it can significantly hamper overall performance!

  27. trait RecordCFG extends CoreDomainFunctionality with CustomInitialization with ai.ReturnInstructionsDomain

    Records the abstract interpretation time control-flow graph (CFG).

    Records the abstract interpretation time control-flow graph (CFG). This CFG is always (still) a sound approximation of the generally incomputable real(runtime) CFG.

    Usage (Mixin-Composition Order)

    This domain primarily overrides the flow method and requires that it is mixed in before every other domain that overrides the flow method and which may manipulate the worklist. E.g., the mixin order should be:

    class MyDomain extends Domain with RecordCFG with FlowManipulatingDomain

    If the mixin order is not correct, the computed CFG may not be complete/concrete.

    Core Properties

    • Thread-safe: No; i.e., the composed domain can only be used by one abstract interpreter at a time. However, using the collected results is thread-safe!
    • Reusable: Yes; all state directly associated with the analyzed code block is reset by the method initProperties.
    • No Partial Results: If the abstract interpretation was aborted the results have no meaning and must not be used; however, if the abstract interpretation is later continued and successfully completed the results are correct.
  28. trait RecordConstraints extends ReifiedConstraints

    Mixin this trait if you want to reify the constraints that are stated by the abstract interpretation framework.

    Mixin this trait if you want to reify the constraints that are stated by the abstract interpretation framework. This is particularly useful for testing and debugging purposes.

  29. trait RecordDefUse extends RecordCFG

    Collects the definition/use information based on the abstract interpretation time cfg.

    Collects the definition/use information based on the abstract interpretation time cfg. I.e., makes the information available which value is accessed where/where a used value is defined. In general, all local variables are identified using Ints where the Int identifies the expression (by means of it's pc) which evaluated to the respective value. In case of a parameter the Int value is -parametersIndex corrected by computational type category (see below for details).

    In case of exception values the Int value identifies the instruction which ex-/implicitly raised the exception.

    Note

    A checkcast is considered a use-site, but not a def-site, even if the shape changes/ the assumed type is narrowed. Otherwise, if the cast is useless, we could not replace it by a NOP.

    General Usage

    This trait collects the def/use information after the abstract interpretation has successfully completed and the control-flow graph is available. The information is automatically made available, when this plug-in is mixed in.

    Special Values

    Parameters

    The ex-/implicit parameters given to a method have negative int values (the first parameter has the value -1, the second -2 if the first one is a value of computational type category one and -3 if the first value is of computational type category two and so forth). I.e., in case of a method def (d : Double, i : Int), the second parameter will have the index -3.

    Core Properties

    Reusability

    An instance of this domain can be reused to successively perform abstract interpretations of different methods. The domain's inherited initProperties method – which is always called by the AI framework – resets the entire state related to the method.

  30. trait RecordJoinedThrownExceptions extends RecordThrownExceptions

    Records the exception that is thrown by an instruction.

    Records the exception that is thrown by an instruction. If an instruction throws multiple exceptions. The exceptions are joined using the Domain#DomainValue's join method.

    This trait can be used to record the thrown exceptions independently of the precision of the domain.

  31. trait RecordLastReturnedValues extends RecordReturnedValues

    Records the last value that is returned by a specific return instruction.

    Records the last value that is returned by a specific return instruction.

    Recording just the last value that is returned by an (a|i|l|f|d)return instruction is often sufficient (e.g., in case of a domain that performs all computations at the type level). The "last" value encodes all necessary information.

  32. 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.

    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.

  33. trait RecordReturnFromMethodInstructions extends ai.ReturnInstructionsDomain

    Records the program counters of all instructions that lead to a (ab)normal return from the method.

    Records the program counters of all instructions that lead to a (ab)normal return from the method. I.e., every instruction that may throw an exception or causes a normal return from method may be recorded. Examples of instructions that may be recorded: (X)return, throw, invoke(XXX), get|put(static|field), checkcast, (a)new(array),... . Instructions such as swap or dup(XXX), however, never directly lead to a method return (they will never result in an exception) and will not be recorded.

    If you are interested in recording the values use: RecordReturnedValues, RecordThrownExceptions.

    Usage

    This domain can be stacked on top of other traits that handle return instructions and abrupt method executions.

  34. trait RecordReturnedValue extends RecordReturnedValuesInfrastructure

    Record the value returned by a method across all return instructions.

    Record the value returned by a method across all return instructions.

    Usage

    This domain can be stacked on top of other traits that handle return instructions that return some value.

    Usage

    A domain that mixes in this trait should only be used to analyze a single method.

  35. trait RecordReturnedValueInfrastructure extends RecordReturnedValuesInfrastructure

    Generic infrastructure to record the value returned by the method (calculated across all return instructions)

    Generic infrastructure to record the value returned by the method (calculated across all return instructions)

    Usage

    This domain can be stacked on top of other traits that handle return instructions that return some value.

    Usage

    A domain that mixes in this trait should only be used to analyze a single method.

  36. trait RecordReturnedValues extends RecordReturnedValuesInfrastructure with CustomInitialization

    Generic infrastructure to record the values returned by the method.

    Generic infrastructure to record the values returned by the method. (Note that the computational type of the value(s) is not recorded. It is directly determined by the signature of the method that is analyzed or can be extracted using the respective method.)

    Usage

    This domain can be stacked on top of other traits that handle return instructions that return some value.

    Usage

    A domain that mixes in this trait should only be used to analyze a single method.

  37. trait RecordReturnedValuesInfrastructure extends ai.ReturnInstructionsDomain

    Infrastructure to record returned values.

  38. trait RecordThrownExceptions extends ai.ReturnInstructionsDomain

    Generic infrastructure to record the exceptions thrown by a method.

    Generic infrastructure to record the exceptions thrown by a method. This trait can be used to record the thrown exceptions independently of the precision of the domain.

    Usage

    This domain can be stacked on top of other traits that handle abruptMethodExecutions.

  39. trait RecordVoidReturns extends ReturnInstructionsDomain

    Records the program counters of all return (void) instructions that are reached.

    Records the program counters of all return (void) instructions that are reached.

    Usage

    Typical usage:

    class MyDomain extends ...DefaultHandlingOfVoidReturns with RecordVoidReturns

    This domain forwards all instruction evaluation calls to the super trait.

    Core Properties

    • Needs to be stacked upon a base implementation of the domain ReturnInstructionsDomain.
    • Collects information directly associated with the analyzed code block.
    • Not thread-safe.
    • Not reusable.
  40. trait RefineDefUseUsingOrigins extends RecordDefUse

    Collects/refines the abstract interpretation time definition/use information using the domain values' origin information if available.

    Collects/refines the abstract interpretation time definition/use information using the domain values' origin information if available.

    Note

    ReturnAddressValues are ignored by this domain; however, the parent domain RecordDefUse has appropriate handling.

  41. trait ReifiedConstraints extends IntegerValuesDomain with ReferenceValuesDomain

    Mixin this trait to reify the stated constraints.

    Mixin this trait to reify the stated constraints. This trait need to be mixed in after all traits that actually handle constraints.

    This is particularly useful for testing and debugging purposes.

    Core Properties

    • Needs to be stacked upon a base implementation of the domains: IntegerValuesDomain and ReferenceValuesDomain].
    • Collects state directly associated with the analyzed code block.
    • Not thread-safe.
    • Not reusable (I.e., a new instance needs to be created per method.)
  42. trait ReturnInstructionsDomain extends ai.ReturnInstructionsDomain

    Adds support for handling return instructions in a generic manner.

  43. trait SpecialMethodsHandling extends MethodCallsHandling

    Hard-codes some part of the semantics of some very high-profile (native) methods of the JDK (for example, System.arraycopy).

    Hard-codes some part of the semantics of some very high-profile (native) methods of the JDK (for example, System.arraycopy).

    Mixin Order

    This method should be mixed in (lexically) after those domains that provide the basic handling of unresolved methods (e.g., using "just" type information) but before those that actually invoke a method!

  44. trait TheCode extends AnyRef

    Provides information about the code block that is currently analyzed.

    Provides information about the code block that is currently analyzed.

    Core Properties

    • Defines the public interface.
  45. trait TheMethod extends TheCode

    Provides information about the method that is currently analyzed.

    Provides information about the method that is currently analyzed.

    Usage

    A domain that implements this trait usually defines a parameter that is set at construction time.

    E.g.,

    class MyDomain{val method : Method} extends Domain with TheMethod

    Core Properties

  46. trait TheProject extends ThePropertyStore with LogContextProvider

    Provides information about the underlying project.

    Provides information about the underlying project.

    Usage

    If a (partial-) domain needs information about the project declare a corresponding self-type dependency.

    trait MyIntegerValuesDomain extends IntegerValues { this : TheProject =>

    Providing Information about a Project

    A domain that provides information about the currently analyzed project should inherit from this trait and implement the respective method.

    Core Properties

    Note

    It is recommended that the domain that provides the project information does not use the override access flag. This way the compiler will issue a warning if two implementations are used to create a final domain.

  47. trait ThePropertyStore extends AnyRef

    This trait is mixed in by those (partial) domains that require access to the project's property store.

  48. trait ThrowAllPotentialExceptionsConfiguration extends Configuration

    A configuration that forces abstract interpretation to always create an exception if it is not possible to deduce that a specific exception will not be thrown.

    A configuration that forces abstract interpretation to always create an exception if it is not possible to deduce that a specific exception will not be thrown.

    Usage

    If you need to adapt a setting just override the respective method in your domain or create a class that inherits from Configuration.

    Core Properties

    • Concrete base implementation of the Configuration trait that can be used to create a final domain.
    • Thread safe.
  49. trait ThrowNoPotentialExceptionsConfiguration extends Configuration

    A configuration that forces the abstract interpretor to never create an exception if it is not possible to deduce that the specific exception is guaranteed to be thrown.

    A configuration that forces the abstract interpretor to never create an exception if it is not possible to deduce that the specific exception is guaranteed to be thrown.

    Usage

    If you need to adapt a setting just override the respective method in your domain or create a class that inherits from Configuration.

    Core Properties

    • Concrete base implementation of the Configuration trait that can be used to create a final domain.
    • Thread safe.
  50. trait ValuesCoordinatingDomain extends CorrelationalDomain with Configuration

    Can be mixed in to create a Domain that is intended to be used to coordinate the exchange of values between different domains.

    Can be mixed in to create a Domain that is intended to be used to coordinate the exchange of values between different domains.

    This domain does not prescribe the semantics of any values, but instead implements methods that perform computations.

    This domain directly inherits from Domain and can, thus, directly be used to create a final domain.

    Core Properties

Value Members

  1. final val EmptyUpperTypeBound: UIDSet[ReferenceType]
  2. def analyzedEntity(domain: Domain): String

    Tries to determine the name of the method/class that is analyzed; the result depends on the mixed-in domain(s).

  3. object DomainValues

    Factory for creating DomainValues objects.

  4. object Origin
  5. object Origins
  6. object OriginsIterator
  7. object PerformAI extends BaseAI

    A base abstract interpreter that can be used with any domain that has no special requirements on the abstract interpreter and which provides some convenience factory methods to run the abstract interpretation if the domain provide the necessary information.

    A base abstract interpreter that can be used with any domain that has no special requirements on the abstract interpreter and which provides some convenience factory methods to run the abstract interpretation if the domain provide the necessary information.

    The base interpreter can be interrupted by calling the interrupt method of the AI's thread.

    See also

    BoundedInterruptableAI for an abstract interpreter that can easily be interrupted and which also interrupts itself if a certain threshold is exceeded.

  8. object PredefinedClassHierarchy
  9. object SpecialMethodsHandling

Inherited from AnyRef

Inherited from Any

Ungrouped