Class ReachabilityAnalysis


  • public class ReachabilityAnalysis
    extends CGAnalysis
    This is about the simplest call graph we can make (dumber than a CHA). It just matches the method signature of the callsite with all methods that have the same signature. In terms of matching method signatures, this at least makes sure the matched method is a virtual method and the method name and parameter types/count match, but simpler implementations exist that only match the name of the method (regardless if its static/dynamic or has different parameter types/count).
    Author:
    Ben Holland
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] getCallEdgeTags()
      Returns the set of tags applied to edges during call graph construction
      static ReachabilityAnalysis getInstance()  
      java.lang.String getName()  
      java.lang.String[] getPerControlFlowEdgeTags()
      Returns the set of tags applied to per control flow edges during call graph construction
      static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getReachableMethods​(com.ensoftcorp.atlas.core.db.graph.Node callsite, com.ensoftcorp.atlas.core.query.Q typesToSearch)
      Returns a set of reachable methods (methods with the matching signature of the callsite) Note: This method specifically includes abstract methods
      static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getReachableMethods_AlternateImplementation​(com.ensoftcorp.atlas.core.db.graph.Node callsite, com.ensoftcorp.atlas.core.query.Q typesToSearch)
      Returns a set of reachable methods (methods with the matching signature of the callsite) Note: This method specifically includes abstract methods Note: This implementation uses a very verbose (and expensive) implementation of signature matching in Atlas It is included here as an example of how it could be done.
      • Methods inherited from class java.lang.Object

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

      • getReachableMethods

        public static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getReachableMethods​(com.ensoftcorp.atlas.core.db.graph.Node callsite,
                                                                                                                             com.ensoftcorp.atlas.core.query.Q typesToSearch)
        Returns a set of reachable methods (methods with the matching signature of the callsite) Note: This method specifically includes abstract methods
        Parameters:
        callsite -
        Returns:
      • getReachableMethods_AlternateImplementation

        public static com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> getReachableMethods_AlternateImplementation​(com.ensoftcorp.atlas.core.db.graph.Node callsite,
                                                                                                                                                     com.ensoftcorp.atlas.core.query.Q typesToSearch)
        Returns a set of reachable methods (methods with the matching signature of the callsite) Note: This method specifically includes abstract methods Note: This implementation uses a very verbose (and expensive) implementation of signature matching in Atlas It is included here as an example of how it could be done. For this particular purpose it is better to use the Atlas signature attribute instead.
        Parameters:
        callsite -
        Returns:
      • getCallEdgeTags

        public java.lang.String[] getCallEdgeTags()
        Description copied from class: CGAnalysis
        Returns the set of tags applied to edges during call graph construction
        Specified by:
        getCallEdgeTags in class CGAnalysis
        Returns:
      • getPerControlFlowEdgeTags

        public java.lang.String[] getPerControlFlowEdgeTags()
        Description copied from class: CGAnalysis
        Returns the set of tags applied to per control flow edges during call graph construction
        Specified by:
        getPerControlFlowEdgeTags in class CGAnalysis
        Returns:
      • getName

        public java.lang.String getName()
        Specified by:
        getName in class CGAnalysis