accrue.analysis.pointer.analyses

## Class CrossProductAnalysis

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

-     public class CrossProductAnalysis
      extends HeapAbstractionFactory

  Create an analysis context that is the cross product of two context representations. The procedure analysis context and the heap context are both represented as pairs of contexts from the initial analyses.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CrossProductAnalysis(HeapAbstractionFactory f1, HeapAbstractionFactory f2)` Create an analysis as the cross product of two other analyses

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CContext` | `fixContextForReferenceVariable(CContext context, ReferenceVariable r)` Fix the code context for a reference variable, if needed, when creating a reference variable replica for reference variable `r`.
    `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, init, initialContext, memoize, memoize, merge, record`

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

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

- - ### Constructor Detail

    - #### CrossProductAnalysis

          public CrossProductAnalysis(HeapAbstractionFactory f1,
                              HeapAbstractionFactory f2)

      Create an analysis as the cross product of two other analyses
      Parameters:
        `f1` - first analysis
        `f2` - second analysis

  - ### Method Detail

    - #### 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`

    - #### fixContextForReferenceVariable

          public CContext fixContextForReferenceVariable(CContext context,
                                                ReferenceVariable r)

      Description copied from class: `HeapAbstractionFactory`
      Fix the code context for a reference variable, if needed, when creating a reference variable replica for reference variable `r`. The need for this method is motivated by an object sensitive analysis where static fields should only have a single replica, i.e., if f is a static field of C, and o is an object of class C, then an expression o.f should be represented by a reference variable replica that has the ObjectField for C.f in the unique static context, not the context for o.
      Overrides:
        `fixContextForReferenceVariable` 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`

    - #### 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`

    - #### toString

          public java.lang.String toString()

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