accrue.analysis.notnulldataflow

## Class NotNullAnalysisUtil

- java.lang.Object
- - accrue.analysis.interprocanalysis.AnalysisUtil<A>
  - - accrue.analysis.interprocvarcontext.AnalysisUtilVarContext<A,T>
    - - accrue.analysis.interprocvarcontext.AnalysisUtilVarContextDataFlow<VarContext<NotNullAbsVal>,NotNullAbsVal>
      - - accrue.analysis.notnulldataflow.NotNullAnalysisUtil

-     public class NotNullAnalysisUtil
      extends AnalysisUtilVarContextDataFlow<VarContext<NotNullAbsVal>,NotNullAbsVal>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static LibrarySignature<VarContext<NotNullAbsVal>,NotNullAbsVal>` | `NOOP_MAYBENULL_RESULT_SIG`
    `static LibrarySignature<VarContext<NotNullAbsVal>,NotNullAbsVal>` | `NOOP_NONNULL_RESULT_SIG`
    `static LibrarySignature<VarContext<NotNullAbsVal>,NotNullAbsVal>` | `NOOP_SIG`

    - ### Fields inherited from class accrue.analysis.interprocvarcontext.AnalysisUtilVarContext

      `trackErrors`

    - ### Fields inherited from class accrue.analysis.interprocanalysis.AnalysisUtil

      `extInfo, instanceInitializersChecked, workQueue`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NotNullAnalysisUtil(WorkQueue<VarContext<NotNullAbsVal>> workQueue, AnalysisUnit currentProcCall, AccrueExtensionInfo extInfo)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `FinalVarContext<NotNullAbsVal>` | `analyze(polyglot.ast.CodeNode n, VarContext<NotNullAbsVal> before)` Analyze the given code with the given current analysis results
    `FinalVarContext<NotNullAbsVal>` | `analyzeInitializersForDataFlow(VarContext<NotNullAbsVal> before)` Analyze the initializers for the current analysis unit given the current analysis results
    `NotNullAbsVal` | `bottomAbstractValue()`
    `protected FinalVarContext<NotNullAbsVal>` | `getAnalysisResultsFromWorkQueue(AnalysisUnit callee, VarContext<NotNullAbsVal> beforeCall, DataFlowNodeIdentifier callSite)` Get the analysis results for the given callee and variable context.
    `protected FinalVarContext<NotNullAbsVal>` | `guessAnalysisForMissingCode(polyglot.types.ProcedureInstance pi, AnalysisContext calleeContext, HContext receiver, VarContext<NotNullAbsVal> input, NotNullAbsVal receiverAbsVal, java.util.List<NotNullAbsVal> argAbsVals, java.util.Set<ExitMap.Key> expectedExits, polyglot.ast.Node node)` Subclasses can override as a stop gap measure before they have signature.
    `protected FinalVarContext<NotNullAbsVal>` | `guessAnalysisForMissingReceiver(polyglot.types.ProcedureInstance pi, VarContext<NotNullAbsVal> input, NotNullAbsVal receiverAbsVal, java.util.List<NotNullAbsVal> argAbsVals, java.util.Set<ExitMap.Key> expectedExits, DataFlowNodeIdentifier callSiteNode)` Subclasses should override as a stop gap measure if the receiver is missing, i.e., if the points to set of the receiver expression is empty.

    - ### Methods inherited from class accrue.analysis.interprocvarcontext.AnalysisUtilVarContextDataFlow

      `call, call, call, callFromNew, callNonVirtual, constructorCall, constructorCallFromConstructor, getAnalysisResultsFromWorkQueue, guessAnalysisForMissingCode, makeFinalVarContext, mergeCallResults, prepareCalleeContext`

    - ### Methods inherited from class accrue.analysis.interprocvarcontext.AnalysisUtilVarContext

      `addLocations, analysisName, computeExpectedExits, createFinalVarContext, createInitContext, emptyFinalVarContext, getAnalysisForMissingReceiver, getLocationAbsVal, getSignatureForMissingCode, handleRecursiveCall, preCallNonVirtual, recordRead, recordReads, recordWrite, recordWrites, signatureAnalysisNames`

    - ### Methods inherited from class accrue.analysis.interprocanalysis.AnalysisUtil

      `abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocationsForArray, abstractLocationsForArray, abstractLocationsForArray, abstractLocationsImplicitTarget, analyzeInitializers, analyzeStaticInitializers, createExitMap, currentAnalysisUnit, currentClass, currentContext, extensionInfo, instanceInitializers, leq, maybeRecursiveCall, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsToGraph, pointsToThis, process, recordMissingCode, typeSystem, upperBound, workQueue`

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

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

- - ### Field Detail

    - #### NOOP_SIG

          public static final LibrarySignature<VarContext<NotNullAbsVal>,NotNullAbsVal> NOOP_SIG

    - #### NOOP_NONNULL_RESULT_SIG

          public static final LibrarySignature<VarContext<NotNullAbsVal>,NotNullAbsVal> NOOP_NONNULL_RESULT_SIG

    - #### NOOP_MAYBENULL_RESULT_SIG

          public static final LibrarySignature<VarContext<NotNullAbsVal>,NotNullAbsVal> NOOP_MAYBENULL_RESULT_SIG

  - ### Constructor Detail

    - #### NotNullAnalysisUtil

          public NotNullAnalysisUtil(WorkQueue<VarContext<NotNullAbsVal>> workQueue,
                             AnalysisUnit currentProcCall,
                             AccrueExtensionInfo extInfo)

  - ### Method Detail

    - #### analyze

          public FinalVarContext<NotNullAbsVal> analyze(polyglot.ast.CodeNode n,
                                               VarContext<NotNullAbsVal> before)
                                                 throws polyglot.types.SemanticException

      Description copied from class: `AnalysisUtil`
      Analyze the given code with the given current analysis results
      Specified by:
        `analyze` in class `AnalysisUtil<VarContext<NotNullAbsVal>>`
      Parameters:
        `n` - Code to analyze
        `before` - analysis result before analyzing the given code
      Returns:
        Map from exit condition to analysis result
      Throws:
        `polyglot.types.SemanticException` - thrown if the analysis fails

    - #### analyzeInitializersForDataFlow

          public FinalVarContext<NotNullAbsVal> analyzeInitializersForDataFlow(VarContext<NotNullAbsVal> before)
                                                                        throws polyglot.types.SemanticException

      Description copied from class: `AnalysisUtilVarContextDataFlow`
      Analyze the initializers for the current analysis unit given the current analysis results
      Specified by:
        `analyzeInitializersForDataFlow` in class `AnalysisUtilVarContextDataFlow<VarContext<NotNullAbsVal>,NotNullAbsVal>`
      Returns:
        Map from exit condition to analysis result
      Throws:
        `polyglot.types.SemanticException` - thrown if the analysis fails

    - #### getAnalysisResultsFromWorkQueue

          protected FinalVarContext<NotNullAbsVal> getAnalysisResultsFromWorkQueue(AnalysisUnit callee,
                                                                       VarContext<NotNullAbsVal> beforeCall,
                                                                       DataFlowNodeIdentifier callSite)
                                                                            throws polyglot.types.SemanticException

      Description copied from class: `AnalysisUtilVarContextDataFlow`
      Get the analysis results for the given callee and variable context.
      Specified by:
        `getAnalysisResultsFromWorkQueue` in class `AnalysisUtilVarContextDataFlow<VarContext<NotNullAbsVal>,NotNullAbsVal>`
      Parameters:
        `callee` - Code for a callee that is to be analyzed
        `beforeCall` - variable context before the call to the callee
      Returns:
        new variable context after performing the analysis
      Throws:
        `polyglot.types.SemanticException` - thrown for an analysis error

    - #### bottomAbstractValue

          public NotNullAbsVal bottomAbstractValue()

      Specified by:
        `bottomAbstractValue` in class `AnalysisUtilVarContext<VarContext<NotNullAbsVal>,NotNullAbsVal>`
      Returns:
        The bottom value in the abstract value lattice

    - #### guessAnalysisForMissingCode

          protected FinalVarContext<NotNullAbsVal> guessAnalysisForMissingCode(polyglot.types.ProcedureInstance pi,
                                                                   AnalysisContext calleeContext,
                                                                   HContext receiver,
                                                                   VarContext<NotNullAbsVal> input,
                                                                   NotNullAbsVal receiverAbsVal,
                                                                   java.util.List<NotNullAbsVal> argAbsVals,
                                                                   java.util.Set<ExitMap.Key> expectedExits,
                                                                   polyglot.ast.Node node)

      Description copied from class: `AnalysisUtilVarContext`
      Subclasses can override as a stop gap measure before they have signature.
      Overrides:
        `guessAnalysisForMissingCode` in class `AnalysisUtilVarContext<VarContext<NotNullAbsVal>,NotNullAbsVal>`
      Parameters:
        `pi` - missing procedure
        `calleeContext` - procedure context
        `receiver` - receiver heap object
        `input` - variable context before analysis
        `receiverAbsVal` - value for the receiver
        `argAbsVals` - list of values for the procedure arguments
        `expectedExits` - set of expected exit keys
        `node` - calling node
      Returns:
        New variable context updated from the input during analysis

    - #### guessAnalysisForMissingReceiver

          protected FinalVarContext<NotNullAbsVal> guessAnalysisForMissingReceiver(polyglot.types.ProcedureInstance pi,
                                                                       VarContext<NotNullAbsVal> input,
                                                                       NotNullAbsVal receiverAbsVal,
                                                                       java.util.List<NotNullAbsVal> argAbsVals,
                                                                       java.util.Set<ExitMap.Key> expectedExits,
                                                                       DataFlowNodeIdentifier callSiteNode)

      Description copied from class: `AnalysisUtilVarContext`
      Subclasses should override as a stop gap measure if the receiver is missing, i.e., if the points to set of the receiver expression is empty.
      Specified by:
        `guessAnalysisForMissingReceiver` in class `AnalysisUtilVarContext<VarContext<NotNullAbsVal>,NotNullAbsVal>`
      Parameters:
        `pi` - missing procedure
        `input` - variable context before analysis
        `receiverAbsVal` - abstract value for the receiver
        `argAbsVals` - list of abstract values for the procedure arguments
        `expectedExits` - set of expected exit keys
      Returns:
        New variable context updated from the input during analysis