Class Analyzer

java.lang.Object
com.ibm.wala.shrike.shrikeBT.analysis.Analyzer
Direct Known Subclasses:
Verifier

public class Analyzer extends Object
Author:
roca
  • Field Details

    • thisType

      public static final String thisType
      See Also:
    • topType

      public static final String topType
      See Also:
    • isConstructor

      protected final boolean isConstructor
    • isStatic

      protected final boolean isStatic
    • classType

      protected final String classType
    • signature

      protected final String signature
    • instructions

      protected final IInstruction[] instructions
    • handlers

      protected final ExceptionHandler[][] handlers
    • hierarchy

      protected ClassHierarchyProvider hierarchy
    • maxStack

      protected int maxStack
    • maxLocals

      protected int maxLocals
    • stacks

      protected String[][] stacks
    • locals

      protected String[][] locals
    • stackSizes

      protected int[] stackSizes
    • basicBlockStarts

      protected BitSet basicBlockStarts
    • backEdges

      protected int[][] backEdges
    • instToBC

      protected int[] instToBC
    • varTypes

      protected String[][] varTypes
    • noStrings

      protected static final String[] noStrings
    • noEdges

      protected static final int[] noEdges
  • Constructor Details

  • Method Details

    • setClassHierarchy

      public final void setClassHierarchy(ClassHierarchyProvider h)
      Use class hierarchy information in 'h'. If this method is not called or h provides only partial hierarchy information, the verifier behaves optimistically.
    • getBackEdges

      public final int[][] getBackEdges()
    • isSubtypeOf

      public final boolean isSubtypeOf(String t1, String t2)
    • findCommonSupertype

      public final String findCommonSupertype(String t1, String t2)
    • getBasicBlockStarts

      public final BitSet getBasicBlockStarts()
    • getInstructions

      public final IInstruction[] getInstructions()
    • getReachableFrom

      public final BitSet getReachableFrom(int from)
    • getReachableFromUpdate

      public final void getReachableFromUpdate(int from, BitSet reachable, boolean followHandlers, BitSet mask)
    • getReachableFrom

      public final BitSet getReachableFrom(int from, boolean followHandlers, BitSet mask)
    • getReachingToUpdate

      public final void getReachingToUpdate(int to, BitSet reaching, BitSet mask)
    • stripSharp

      public static String stripSharp(String type)
    • getStackSizes

      public int[] getStackSizes() throws Analyzer.FailureException
      Throws:
      Analyzer.FailureException
    • initTypeInfo

      protected final void initTypeInfo() throws Analyzer.FailureException
      Throws:
      Analyzer.FailureException
    • computeTypes

      public final void computeTypes(Analyzer.TypeVisitor v, BitSet makeTypesAt, boolean wantPath) throws Analyzer.FailureException
      Verify the method and compute types at every program point.
      Throws:
      Analyzer.FailureException - the method contains invalid bytecode
    • getLocalTypes

      public final String[][] getLocalTypes()
      Returns:
      an array indexed by instruction index; each entry is an array of Strings giving the types of the locals at that instruction.
    • getStackTypes

      public final String[][] getStackTypes()
      Returns:
      an array indexed by instruction index; each entry is an array of Strings giving the types of the stack elements at that instruction. The top of the stack is the last element of the array.
    • createAnalyzer

      public static Analyzer createAnalyzer(MethodData info)