accrue.analysis.defuse

## Class DefUseLibrarySignature

- java.lang.Object
- - accrue.analysis.interprocvarcontext.LibrarySignature<VarContext<DefUseAbsVal>,DefUseAbsVal>
  - - accrue.analysis.defuse.DefUseLibrarySignature

- Direct Known Subclasses:
    DefUseLibrarySignature.DEF_ARG, DefUseLibrarySignature.DEF_HIDDEN, DefUseLibrarySignature.Join, DefUseLibrarySignature.USE_DEF_HIDDEN, DefUseLibrarySignature.USE_DEF_USEARG_HIDDEN, DefUseLibrarySignature.USE_HIDDEN

      public class DefUseLibrarySignature
      extends LibrarySignature<VarContext<DefUseAbsVal>,DefUseAbsVal>

  Signature classes for Def/Use analysis.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DefUseLibrarySignature.DEF_ARG`
    `static class` | `DefUseLibrarySignature.DEF_HIDDEN`
    `static class` | `DefUseLibrarySignature.Join`
    `static class` | `DefUseLibrarySignature.USE_DEF_HIDDEN`
    `static class` | `DefUseLibrarySignature.USE_DEF_USEARG_HIDDEN`
    `static class` | `DefUseLibrarySignature.USE_HIDDEN`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.List<java.util.List<java.lang.String>>` | `arg_defs`
    `protected java.util.List<java.util.List<java.lang.String>>` | `arg_uses`
    `static java.lang.String` | `CLOCK` The state of the clock
    `protected java.util.List<java.lang.String>` | `global_defs`
    `protected java.util.List<java.lang.String>` | `global_uses`
    `static java.lang.String` | `HIDDEN` Generic hidden state of a native object.
    `static DefUseLibrarySignature` | `NEWALLOC`
    `static DefUseLibrarySignature` | `NOOP`
    `protected java.util.List<java.lang.String>` | `receiver_defs`
    `protected java.util.List<java.lang.String>` | `receiver_uses`
    `protected boolean` | `returns_newalloc`
    `static DefUseLibrarySignature` | `USES_CLOCK`
    `protected boolean` | `uses_defs`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefUseLibrarySignature(java.util.List<java.lang.String> receiver_defs, java.util.List<java.lang.String> receiver_uses, boolean uses_defs, boolean returns_newalloc)` A signature that defines and uses locations on the receiver
    `DefUseLibrarySignature(java.util.List<java.lang.String> receiver_defs, java.util.List<java.lang.String> receiver_uses, java.util.List<java.lang.String> global_defs, java.util.List<java.lang.String> global_uses, boolean uses_defs, boolean returns_newalloc)` A signature that defines and uses locations on the receiver and arguments
    `DefUseLibrarySignature(java.util.List<java.lang.String> receiver_defs, java.util.List<java.lang.String> receiver_uses, java.util.List<java.lang.String> global_defs, java.util.List<java.lang.String> global_uses, java.util.List<java.util.List<java.lang.String>> arg_defs, java.util.List<java.util.List<java.lang.String>> arg_uses, boolean uses_defs, boolean returns_newalloc)` A signature that defines and uses locations on the receiver and arguments

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected VarContext<DefUseAbsVal>` | `addDefs(HContext receiver, VarContext<DefUseAbsVal> input, AnalysisUtilVarContextDataFlow<VarContext<DefUseAbsVal>,DefUseAbsVal> autil, java.util.List<java.lang.String> defs, java.util.Set<AbstractLocation> locs, NodeIdentifier ni)`
    `protected FinalVarContext<DefUseAbsVal>` | `addExceptions(VarContext<DefUseAbsVal> input, AnalysisUtilVarContextDataFlow<VarContext<DefUseAbsVal>,DefUseAbsVal> autil, java.util.Set<ExitMap.Key> expectedExits)`
    `static <T> void` | `addResults(java.lang.String resultKey, AccrueExt rec, AnalysisContext ctx, java.util.Set<T> results)` Adds a set of results to the current set
    `static <T> java.util.List<T>` | `join(java.util.List<T> left, java.util.List<T> right)`
    `protected static java.util.List<java.lang.String>` | `List(java.lang.String s1)`
    `FinalVarContext<DefUseAbsVal>` | `process(polyglot.types.ProcedureInstance pi, AnalysisContext calleeContext, HContext receiver, VarContext<DefUseAbsVal> input, DefUseAbsVal receiverAbsVal, java.util.List<DefUseAbsVal> argAbsVals, AnalysisUtilVarContextDataFlow<VarContext<DefUseAbsVal>,DefUseAbsVal> autil, java.util.Set<ExitMap.Key> expectedExits, DataFlowNodeIdentifier callSite)` Takes in the caller's context input just before the call (the argument AbsVals are no longer on the stack, and neither is the receiver AbsVal) and should return the _caller's_ context after the call to the procedure instance That is, if pi is meant to return a value, process should push that value onto the stack.
    `protected VarContext<DefUseAbsVal>` | `processDefs(polyglot.types.ProcedureInstance pi, AnalysisContext calleeContext, HContext receiver, VarContext<DefUseAbsVal> input, DefUseAbsVal receiverAbsVal, java.util.List<DefUseAbsVal> argAbsVals, AnalysisUtilVarContextDataFlow<VarContext<DefUseAbsVal>,DefUseAbsVal> autil, DataFlowNodeIdentifier callSite)`
    `protected VarContext<DefUseAbsVal>` | `processUses(polyglot.types.ProcedureInstance pi, AnalysisContext calleeContext, HContext receiver, VarContext<DefUseAbsVal> input, DefUseAbsVal receiverAbsVal, java.util.List<DefUseAbsVal> argAbsVals, AnalysisUtilVarContextDataFlow<VarContext<DefUseAbsVal>,DefUseAbsVal> autil, DataFlowNodeIdentifier callSite)`
    `static AbstractLocation` | `PSEUDOLOC(HContext object, java.lang.String name)`

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

      `makeFinalVarContext, process`

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

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

- - ### Field Detail

    - #### returns_newalloc

          protected final boolean returns_newalloc

    - #### uses_defs

          protected final boolean uses_defs

    - #### receiver_defs

          protected final java.util.List<java.lang.String> receiver_defs

    - #### receiver_uses

          protected final java.util.List<java.lang.String> receiver_uses

    - #### arg_defs

          protected final java.util.List<java.util.List<java.lang.String>> arg_defs

    - #### arg_uses

          protected final java.util.List<java.util.List<java.lang.String>> arg_uses

    - #### global_defs

          protected final java.util.List<java.lang.String> global_defs

    - #### global_uses

          protected final java.util.List<java.lang.String> global_uses

    - #### HIDDEN

          public static java.lang.String HIDDEN

      Generic hidden state of a native object.

    - #### CLOCK

          public static java.lang.String CLOCK

      The state of the clock

    - #### NOOP

          public static final DefUseLibrarySignature NOOP

    - #### NEWALLOC

          public static final DefUseLibrarySignature NEWALLOC

    - #### USES_CLOCK

          public static final DefUseLibrarySignature USES_CLOCK

  - ### Constructor Detail

    - #### DefUseLibrarySignature

          public DefUseLibrarySignature(java.util.List<java.lang.String> receiver_defs,
                                java.util.List<java.lang.String> receiver_uses,
                                boolean uses_defs,
                                boolean returns_newalloc)

      A signature that defines and uses locations on the receiver
      Parameters:
        `receiver_defs` -
        `receiver_uses` -
        `uses_defs` -
        `returns_newalloc` -

    - #### DefUseLibrarySignature

          public DefUseLibrarySignature(java.util.List<java.lang.String> receiver_defs,
                                java.util.List<java.lang.String> receiver_uses,
                                java.util.List<java.lang.String> global_defs,
                                java.util.List<java.lang.String> global_uses,
                                boolean uses_defs,
                                boolean returns_newalloc)

      A signature that defines and uses locations on the receiver and arguments
      Parameters:
        `receiver_defs` -
        `receiver_uses` -
        `uses_defs` -
        `returns_newalloc` -

    - #### DefUseLibrarySignature

          public DefUseLibrarySignature(java.util.List<java.lang.String> receiver_defs,
                                java.util.List<java.lang.String> receiver_uses,
                                java.util.List<java.lang.String> global_defs,
                                java.util.List<java.lang.String> global_uses,
                                java.util.List<java.util.List<java.lang.String>> arg_defs,
                                java.util.List<java.util.List<java.lang.String>> arg_uses,
                                boolean uses_defs,
                                boolean returns_newalloc)

      A signature that defines and uses locations on the receiver and arguments
      Parameters:
        `receiver_defs` -
        `receiver_uses` -
        `uses_defs` -
        `returns_newalloc` -

  - ### Method Detail

    - #### PSEUDOLOC

          public static final AbstractLocation PSEUDOLOC(HContext object,
                                   java.lang.String name)

    - #### join

          public static <T> java.util.List<T> join(java.util.List<T> left,
                                   java.util.List<T> right)

    - #### process

          public FinalVarContext<DefUseAbsVal> process(polyglot.types.ProcedureInstance pi,
                                              AnalysisContext calleeContext,
                                              HContext receiver,
                                              VarContext<DefUseAbsVal> input,
                                              DefUseAbsVal receiverAbsVal,
                                              java.util.List<DefUseAbsVal> argAbsVals,
                                              AnalysisUtilVarContextDataFlow<VarContext<DefUseAbsVal>,DefUseAbsVal> autil,
                                              java.util.Set<ExitMap.Key> expectedExits,
                                              DataFlowNodeIdentifier callSite)

      Description copied from class: `LibrarySignature`
      Takes in the caller's context input just before the call (the argument AbsVals are no longer on the stack, and neither is the receiver AbsVal) and should return the _caller's_ context after the call to the procedure instance That is, if pi is meant to return a value, process should push that value onto the stack.
      Overrides:
        `process` in class `LibrarySignature<VarContext<DefUseAbsVal>,DefUseAbsVal>`

    - #### processUses

          protected VarContext<DefUseAbsVal> processUses(polyglot.types.ProcedureInstance pi,
                                             AnalysisContext calleeContext,
                                             HContext receiver,
                                             VarContext<DefUseAbsVal> input,
                                             DefUseAbsVal receiverAbsVal,
                                             java.util.List<DefUseAbsVal> argAbsVals,
                                             AnalysisUtilVarContextDataFlow<VarContext<DefUseAbsVal>,DefUseAbsVal> autil,
                                             DataFlowNodeIdentifier callSite)

    - #### processDefs

          protected VarContext<DefUseAbsVal> processDefs(polyglot.types.ProcedureInstance pi,
                                             AnalysisContext calleeContext,
                                             HContext receiver,
                                             VarContext<DefUseAbsVal> input,
                                             DefUseAbsVal receiverAbsVal,
                                             java.util.List<DefUseAbsVal> argAbsVals,
                                             AnalysisUtilVarContextDataFlow<VarContext<DefUseAbsVal>,DefUseAbsVal> autil,
                                             DataFlowNodeIdentifier callSite)

    - #### addDefs

          protected VarContext<DefUseAbsVal> addDefs(HContext receiver,
                                         VarContext<DefUseAbsVal> input,
                                         AnalysisUtilVarContextDataFlow<VarContext<DefUseAbsVal>,DefUseAbsVal> autil,
                                         java.util.List<java.lang.String> defs,
                                         java.util.Set<AbstractLocation> locs,
                                         NodeIdentifier ni)

    - #### addExceptions

          protected FinalVarContext<DefUseAbsVal> addExceptions(VarContext<DefUseAbsVal> input,
                                                    AnalysisUtilVarContextDataFlow<VarContext<DefUseAbsVal>,DefUseAbsVal> autil,
                                                    java.util.Set<ExitMap.Key> expectedExits)

    - #### addResults

          public static <T> void addResults(java.lang.String resultKey,
                            AccrueExt rec,
                            AnalysisContext ctx,
                            java.util.Set<T> results)

      Adds a set of results to the current set
      Parameters:
        `resultKey` - The key of the analysis result to record.
        `rec` - The extension object to record these results on.
        `ctx` - The AnalysisContext to associate these results with.
        `pk` - The PeerKey to associate these results with.
        `results` -

    - #### List

          protected static java.util.List<java.lang.String> List(java.lang.String s1)