Class PointsToAnalysis
- java.lang.Object
-
- com.ensoftcorp.open.pointsto.common.PointsToAnalysis
-
public class PointsToAnalysis extends java.lang.Object
Some defined attributes and tags exposed by the analysis- Author:
- Ben Holland
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALIAS_PREFIX
The tag prefix of points-to addresses.static java.lang.String
ARRAY_MEMORY_MODEL_PREFIX
This tag is placed on array instantiations to hold a serialized form of the addresses used to model an array's memory.static java.lang.String
INFERRED_DATA_FLOW
Applied to edges to indicate that the edge's runtime data flow possibility was verified by the points-to analysisstatic java.lang.String
INFERRED_TYPE_OF
Applied to edges to indicate that the edge's runtime type of possibility was verified by the points-to analysisstatic java.lang.String
NULL_ALIAS
An alias to null This is reserved to replace "address"static java.lang.String
NULL_ARRAY_MEMORY_MODEL
An uninitialized array model This is reserved to replace "address"
-
Constructor Summary
Constructors Constructor Description PointsToAnalysis()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.ensoftcorp.atlas.core.query.Q
getAliases(com.ensoftcorp.atlas.core.db.graph.Node node)
Returns nodes with the same points-to address tags as the given nodestatic java.lang.String[]
getAliasTags(com.ensoftcorp.atlas.core.db.graph.Node node)
Returns an array of points-to tags applied to the given nodestatic com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node>
getArrayMemoryModelAliases(com.ensoftcorp.atlas.core.db.graph.Node arrayInstantiation)
Returns aliases to the array memory modelstatic java.lang.String[]
getArrayMemoryModelAliasTags(com.ensoftcorp.atlas.core.db.graph.Node arrayInstantiation)
Returns tags of aliases to the array memory modelstatic java.lang.String[]
getArrayMemoryModelTags(com.ensoftcorp.atlas.core.db.graph.Node arrayInstantiation)
Returns tags denoting the array memory models represented by the given array instantiationstatic boolean
isArrayMemoryModelAlias(java.lang.String aliasTag)
Returns true if the alias is an array memory model Does not consider null aliasesstatic boolean
mayAlias(com.ensoftcorp.atlas.core.db.graph.Node ref1, com.ensoftcorp.atlas.core.db.graph.Node ref2)
Checks if the two given references may be aliases of each otherstatic boolean
mustAlias(com.ensoftcorp.atlas.core.db.graph.Node ref1, com.ensoftcorp.atlas.core.db.graph.Node ref2)
Checks if the two given references must be aliases of each otherstatic boolean
notAliases(com.ensoftcorp.atlas.core.db.graph.Node ref1, com.ensoftcorp.atlas.core.db.graph.Node ref2)
-
-
-
Field Detail
-
ALIAS_PREFIX
public static final java.lang.String ALIAS_PREFIX
The tag prefix of points-to addresses. An "address" is an abstract concept the corresponds to a unique allocation. References with overlapping points-to addresses may be aliases of each other. References with only the same alias must be aliases of each other. References without any commons points-to address must not be aliases of each other. For convenience this tag is also applied to array components to indicate the array address. An array component will contain a single address corresponding to a unique array instantiation.- See Also:
- Constant Field Values
-
NULL_ALIAS
public static final java.lang.String NULL_ALIAS
An alias to null This is reserved to replace "address"- See Also:
- Constant Field Values
-
ARRAY_MEMORY_MODEL_PREFIX
public static final java.lang.String ARRAY_MEMORY_MODEL_PREFIX
This tag is placed on array instantiations to hold a serialized form of the addresses used to model an array's memory. An array is assigned an address for each of its dimensions.- See Also:
- Constant Field Values
-
NULL_ARRAY_MEMORY_MODEL
public static final java.lang.String NULL_ARRAY_MEMORY_MODEL
An uninitialized array model This is reserved to replace "address"- See Also:
- Constant Field Values
-
INFERRED_DATA_FLOW
public static final java.lang.String INFERRED_DATA_FLOW
Applied to edges to indicate that the edge's runtime data flow possibility was verified by the points-to analysis- See Also:
- Constant Field Values
-
INFERRED_TYPE_OF
public static final java.lang.String INFERRED_TYPE_OF
Applied to edges to indicate that the edge's runtime type of possibility was verified by the points-to analysis- See Also:
- Constant Field Values
-
-
Method Detail
-
isArrayMemoryModelAlias
public static boolean isArrayMemoryModelAlias(java.lang.String aliasTag)
Returns true if the alias is an array memory model Does not consider null aliases- Parameters:
address
-- Returns:
-
notAliases
public static boolean notAliases(com.ensoftcorp.atlas.core.db.graph.Node ref1, com.ensoftcorp.atlas.core.db.graph.Node ref2)
-
mayAlias
public static boolean mayAlias(com.ensoftcorp.atlas.core.db.graph.Node ref1, com.ensoftcorp.atlas.core.db.graph.Node ref2)
Checks if the two given references may be aliases of each other- Parameters:
ref1
-ref2
-- Returns:
-
mustAlias
public static boolean mustAlias(com.ensoftcorp.atlas.core.db.graph.Node ref1, com.ensoftcorp.atlas.core.db.graph.Node ref2)
Checks if the two given references must be aliases of each other- Parameters:
ref1
-ref2
-- Returns:
-
getArrayMemoryModelAliases
public static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getArrayMemoryModelAliases(com.ensoftcorp.atlas.core.db.graph.Node arrayInstantiation)
Returns aliases to the array memory model- Parameters:
arrayInstantiation
-- Returns:
-
getArrayMemoryModelAliasTags
public static java.lang.String[] getArrayMemoryModelAliasTags(com.ensoftcorp.atlas.core.db.graph.Node arrayInstantiation)
Returns tags of aliases to the array memory model- Parameters:
arrayInstantiation
-- Returns:
-
getArrayMemoryModelTags
public static java.lang.String[] getArrayMemoryModelTags(com.ensoftcorp.atlas.core.db.graph.Node arrayInstantiation)
Returns tags denoting the array memory models represented by the given array instantiation
-
getAliases
public static com.ensoftcorp.atlas.core.query.Q getAliases(com.ensoftcorp.atlas.core.db.graph.Node node)
Returns nodes with the same points-to address tags as the given node- Parameters:
node
-- Returns:
-
getAliasTags
public static java.lang.String[] getAliasTags(com.ensoftcorp.atlas.core.db.graph.Node node)
Returns an array of points-to tags applied to the given node- Parameters:
node
-- Returns:
-
-