Class AnalysisUtilities


  • public class AnalysisUtilities
    extends java.lang.Object
    Utilities for assisting in the computation of points-to sets.
    Author:
    Ben Holland, Tom Deering - Large credit for developing the conservative data flow graph and utilities for resolving dynamic dispatches.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getArrayReadAccessesForArrayReference​(com.ensoftcorp.atlas.core.db.graph.Node arrayReference)
      Given an array reference, returns a set of corresponding array accesses
      static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getArrayReferencesForArrayAccess​(com.ensoftcorp.atlas.core.db.graph.Node arrayAccess)
      Given an array access, returns a set of corresponding array references
      static com.ensoftcorp.atlas.core.db.graph.Node getArrayTypeForDimension​(com.ensoftcorp.atlas.core.db.graph.Node arrayElementType, int dimension)
      Given an array element type, return the array type for the given dimension
      static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getArrayWriteAccessesForArrayReference​(com.ensoftcorp.atlas.core.db.graph.Node arrayReference)
      Given an array reference, returns a set of corresponding array accesses
      static com.ensoftcorp.atlas.core.query.Q getConservativeDataFlow​(org.eclipse.core.runtime.IProgressMonitor monitor)
      Returns a data flow graph containing all data flow edges minus those involved in dynamic dispatches with multiple targets resulting in a conservative data flow graph with only statically resolvable data flow edges.
      static com.ensoftcorp.atlas.core.db.set.AtlasHashSet<com.ensoftcorp.atlas.core.db.graph.Node> getDynamicCallsiteThisSet​(org.eclipse.core.runtime.IProgressMonitor monitor)
      Returns a set of callsite this nodes involved in dynamic dispatches
      static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getSignatureSet​(com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> methods)
      Given a set of methods, returns the given set with their method signature elements (param, return, this).
      static com.ensoftcorp.atlas.core.query.Q roots​(com.ensoftcorp.atlas.core.query.Q edgeContext, com.ensoftcorp.atlas.core.query.Q nodes)
      Returns the subset of the given nodes that are roots in the given edge context
      static com.ensoftcorp.atlas.core.db.graph.Node statedType​(com.ensoftcorp.atlas.core.db.graph.Node node)
      Given an object reference, return the stated type of that reference.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AnalysisUtilities

        public AnalysisUtilities()
    • Method Detail

      • statedType

        public static com.ensoftcorp.atlas.core.db.graph.Node statedType​(com.ensoftcorp.atlas.core.db.graph.Node node)
        Given an object reference, return the stated type of that reference.
        Parameters:
        ge -
        Returns:
      • getArrayReadAccessesForArrayReference

        public static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getArrayReadAccessesForArrayReference​(com.ensoftcorp.atlas.core.db.graph.Node arrayReference)
        Given an array reference, returns a set of corresponding array accesses
        Parameters:
        arrayReference -
        Returns:
      • getArrayWriteAccessesForArrayReference

        public static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getArrayWriteAccessesForArrayReference​(com.ensoftcorp.atlas.core.db.graph.Node arrayReference)
        Given an array reference, returns a set of corresponding array accesses
        Parameters:
        arrayReference -
        Returns:
      • getArrayReferencesForArrayAccess

        public static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getArrayReferencesForArrayAccess​(com.ensoftcorp.atlas.core.db.graph.Node arrayAccess)
        Given an array access, returns a set of corresponding array references
        Parameters:
        arrayAccess -
        Returns:
      • getArrayTypeForDimension

        public static com.ensoftcorp.atlas.core.db.graph.Node getArrayTypeForDimension​(com.ensoftcorp.atlas.core.db.graph.Node arrayElementType,
                                                                                       int dimension)
        Given an array element type, return the array type for the given dimension
        Parameters:
        arrayElementType -
        dimension -
        Returns:
      • getConservativeDataFlow

        public static com.ensoftcorp.atlas.core.query.Q getConservativeDataFlow​(org.eclipse.core.runtime.IProgressMonitor monitor)
        Returns a data flow graph containing all data flow edges minus those involved in dynamic dispatches with multiple targets resulting in a conservative data flow graph with only statically resolvable data flow edges.
        Parameters:
        monitor -
        Returns:
      • roots

        public static com.ensoftcorp.atlas.core.query.Q roots​(com.ensoftcorp.atlas.core.query.Q edgeContext,
                                                              com.ensoftcorp.atlas.core.query.Q nodes)
        Returns the subset of the given nodes that are roots in the given edge context
        Parameters:
        edgeContext -
        nodes -
        Returns:
      • getDynamicCallsiteThisSet

        public static com.ensoftcorp.atlas.core.db.set.AtlasHashSet<com.ensoftcorp.atlas.core.db.graph.Node> getDynamicCallsiteThisSet​(org.eclipse.core.runtime.IProgressMonitor monitor)
        Returns a set of callsite this nodes involved in dynamic dispatches
        Parameters:
        m -
        Returns:
      • getSignatureSet

        public static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getSignatureSet​(com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> methods)
        Given a set of methods, returns the given set with their method signature elements (param, return, this).
        Parameters:
        methods -
        signatureSet -