accrue.analysis.interprocanalysis

## Class AnalysisFactory<A extends Ordered<A>>

- java.lang.Object
- - accrue.analysis.interprocanalysis.AnalysisFactory<A>

- Type Parameters:
    `A` - Analysis result. The type that is the result of the analysis of an AnalysisUnit.
  Direct Known Subclasses:
    AnalysisFactoryVarContext, CtlDepAnalysisFactory, DominationAnalysisFactory, PreciseCallGraphFactory, PreciseExAnalysisFactory, ReadWriteSetsAnalysisFactory

      public abstract class AnalysisFactory<A extends Ordered<A>>
      extends java.lang.Object

  Utility class used by an interprocedural dataflow analysis

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AccrueExtensionInfo` | `extInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnalysisFactory(AccrueExtensionInfo extInfo)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract java.lang.String` | `analysisName()` Get the name of the analysis
    `abstract java.lang.String` | `analysisReportName()` Get the name of the analysis report
    `abstract AnalysisUtil<A>` | `analysisUtil(WorkQueue<A> wq, AnalysisUnit aunit)` Get the object sensitive analysis utility class.
    `AnalysisContext` | `createAnalysisContext(AnalysisUtil<A> caller, polyglot.types.CodeInstance callee, HContext calleeObjectName, polyglot.ast.Node callSite)` Create an analysis context for a procedure
    `ExitMap<A>` | `emptyExitMap()` Get the `ExitMap`
    `java.util.Set<java.lang.String>` | `reportTopics()` Return the analysis name and `AnalysisTopics` as a set
    `abstract A` | `startItem(AnalysisUtil<A> autil, polyglot.ast.ProcedureDecl startProc)` Get the start item for the analysis
    `AnalysisContext` | `startProcAnalysisContext()` Get the initial analysis context for the start procedure (i.e.

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

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

- - ### Field Detail

    - #### extInfo

          protected final AccrueExtensionInfo extInfo

  - ### Constructor Detail

    - #### AnalysisFactory

          public AnalysisFactory(AccrueExtensionInfo extInfo)

  - ### Method Detail

    - #### analysisName

          public abstract java.lang.String analysisName()

      Get the name of the analysis

    - #### analysisReportName

          public abstract java.lang.String analysisReportName()

      Get the name of the analysis report

    - #### analysisUtil

          public abstract AnalysisUtil<A> analysisUtil(WorkQueue<A> wq,
                                     AnalysisUnit aunit)

      Get the object sensitive analysis utility class.
      Parameters:
        `wq` - Analysis work queue of `CodeInstance`
        `aunit` - Analysis unit that we are constructing the AnalysisUtil for.

    - #### startItem

          public abstract A startItem(AnalysisUtil<A> autil,
                    polyglot.ast.ProcedureDecl startProc)
                                                  throws polyglot.types.SemanticException

      Get the start item for the analysis
      Parameters:
        `autil` - Object sensitive analysis utility
        `startProc` - Entry procedure for the analysis
      Returns:
        The start analysis result item
      Throws:
        `polyglot.types.SemanticException` - thrown if the start item cannot be computed due to a semantic error

    - #### reportTopics

          public java.util.Set<java.lang.String> reportTopics()

      Return the analysis name and `AnalysisTopics` as a set

    - #### emptyExitMap

          public ExitMap<A> emptyExitMap()

      Get the `ExitMap`
      Returns:

    - #### startProcAnalysisContext

          public AnalysisContext startProcAnalysisContext()

      Get the initial analysis context for the start procedure (i.e. static void main ...)

    - #### createAnalysisContext

          public AnalysisContext createAnalysisContext(AnalysisUtil<A> caller,
                                              polyglot.types.CodeInstance callee,
                                              HContext calleeObjectName,
                                              polyglot.ast.Node callSite)

      Create an analysis context for a procedure
      Parameters:
        `caller` - Analysis utility class for the caller
        `callee` - Type information for the callee
        `calleeObjectName` - Heap context for the callee
        `callSite` - AST node for the call site
      Returns:
        A new analysis context for the called procedure