Class 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 analysis
      static 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
      static 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"
    • 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 node
      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
      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
      static java.lang.String[] getArrayMemoryModelAliasTags​(com.ensoftcorp.atlas.core.db.graph.Node arrayInstantiation)
      Returns tags of aliases to the array memory model
      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
      static boolean isArrayMemoryModelAlias​(java.lang.String aliasTag)
      Returns true if the alias is an array memory model Does not consider null aliases
      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
      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
      static boolean notAliases​(com.ensoftcorp.atlas.core.db.graph.Node ref1, com.ensoftcorp.atlas.core.db.graph.Node ref2)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • PointsToAnalysis

        public PointsToAnalysis()
    • 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: