Class AnalysisUtilities
- java.lang.Object
-
- com.ensoftcorp.open.pointsto.utilities.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.
-
-
Constructor Summary
Constructors Constructor Description AnalysisUtilities()
-
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 accessesstatic 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 referencesstatic 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 dimensionstatic 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 accessesstatic 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 dispatchesstatic 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 contextstatic 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.
-
-
-
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
-
-
-