accrue.analysis.pointer.analyses

## Class StaticCallSiteContextSensitiveAnalysis

- java.lang.Object
- - accrue.analysis.pointer.analyses.HeapAbstractionFactory
  - - accrue.analysis.pointer.analyses.StaticCallSiteContextSensitiveAnalysis

-     public class StaticCallSiteContextSensitiveAnalysis
      extends HeapAbstractionFactory

  Similar to CallSiteContextSensitiveAnalysis, this is a call-site sensitive analysis. However, it only records call sites to static methods. This is intended to be used in conjunction with object sensitive analyses that analyze all static methods in the same analysis context.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `CContext` | `EMPTY_CONTEXT` Empty context represents methods with no invoking objects (including static methods).

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StaticCallSiteContextSensitiveAnalysis()` Create an analysis with the default sensitivity
    `StaticCallSiteContextSensitiveAnalysis(int sensitivity)` Create an analysis with the given context-call-stack depth

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `init()` Initialize the factory.
    `CContext` | `initialContextImpl()` Return the initial CContext, i.e., to analyze the main method.
    `CContext` | `mergeImpl(CallSiteNode callSite, HContext receiver, CContext callerContext)` Produce a code context (i.e., CContext) to analysis code called from call site `callSite` in code context `callerContext`, where `receiver` is the abstract object for the recevier of the method invocation.
    `HContext` | `recordImpl(CContext context, AllocSiteNode alloc)` Produce an abstract object (i.e., HContext) to represent an object created at allocation site `alloc` in code context `context`.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class accrue.analysis.pointer.analyses.HeapAbstractionFactory

      `clearMemoization, fixContextForReferenceVariable, initialContext, memoize, memoize, merge, record`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### EMPTY_CONTEXT

          public CContext EMPTY_CONTEXT

      Empty context represents methods with no invoking objects (including static methods).

  - ### Constructor Detail

    - #### StaticCallSiteContextSensitiveAnalysis

          public StaticCallSiteContextSensitiveAnalysis()

      Create an analysis with the default sensitivity

    - #### StaticCallSiteContextSensitiveAnalysis

          public StaticCallSiteContextSensitiveAnalysis(int sensitivity)

      Create an analysis with the given context-call-stack depth
      Parameters:
        `sensitivity` - depth of the call stack to keep track of

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### recordImpl

          public HContext recordImpl(CContext context,
                            AllocSiteNode alloc)

      Description copied from class: `HeapAbstractionFactory`
      Produce an abstract object (i.e., HContext) to represent an object created at allocation site `alloc` in code context `context`.
      Specified by:
        `recordImpl` in class `HeapAbstractionFactory`

    - #### mergeImpl

          public CContext mergeImpl(CallSiteNode callSite,
                           HContext receiver,
                           CContext callerContext)

      Description copied from class: `HeapAbstractionFactory`
      Produce a code context (i.e., CContext) to analysis code called from call site `callSite` in code context `callerContext`, where `receiver` is the abstract object for the recevier of the method invocation. If the method being called does not have a receiver (i.e., it is a static method), then `receiver` will be null.
      Specified by:
        `mergeImpl` in class `HeapAbstractionFactory`

    - #### init

          public void init()

      Description copied from class: `HeapAbstractionFactory`
      Initialize the factory.
      Overrides:
        `init` in class `HeapAbstractionFactory`

    - #### initialContextImpl

          public CContext initialContextImpl()

      Description copied from class: `HeapAbstractionFactory`
      Return the initial CContext, i.e., to analyze the main method.
      Specified by:
        `initialContextImpl` in class `HeapAbstractionFactory`