harpoon.Analysis.PA2
Class PAUtil

java.lang.Object
  extended by harpoon.Analysis.PA2.PAUtil

public abstract class PAUtil
extends Object

PAUtil

Version:
$Id: PAUtil.java,v 1.13 2005/12/01 07:54:07 salcianu Exp $
Author:
Alexandru Salcianu <salcianu@alum.mit.edu>

Constructor Summary
PAUtil()
           
 
Method Summary
static boolean escape(PANode n, Collection<PANode> F)
           
static boolean escapeAny(Collection<PANode> S, Collection<PANode> F)
           
static List<HClass> getObjParamTypes(HMethod hm)
          Returns a list of the types of the object (=non-primitive) parameters of method hm.
static List<HClass> getParamTypes(HMethod hm)
           
static Set<HMethod> interestingMethods(Collection<HMethod> roots, CallGraph cg, jpaul.Misc.Predicate<HMethod> undesirable)
          Returns all methods that are transitively reachable from roots, along call paths that do not include any "undesirable" methods.
static boolean isAbstract(HMethod hm)
           
static boolean isException(HClass hClass)
           
static boolean isNative(HMethod hm)
           
static boolean methodTooBig(HMethod hm)
          Detects certain pathological methods whose analysis takes a long time without producing something really useful.
static void timePointerAnalysis(HMethod mainM, Collection<HMethod> methodsOfInterest, PointerAnalysis pa, AnalysisPolicy ap, String prefix)
           
static boolean trivialEscape(PANode node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PAUtil

public PAUtil()
Method Detail

isNative

public static boolean isNative(HMethod hm)

isAbstract

public static boolean isAbstract(HMethod hm)

trivialEscape

public static boolean trivialEscape(PANode node)

escapeAny

public static boolean escapeAny(Collection<PANode> S,
                                Collection<PANode> F)

escape

public static boolean escape(PANode n,
                             Collection<PANode> F)

getParamTypes

public static List<HClass> getParamTypes(HMethod hm)

getObjParamTypes

public static List<HClass> getObjParamTypes(HMethod hm)
Returns a list of the types of the object (=non-primitive) parameters of method hm. This lists include the type of the receiver (for non-static methods) and respects the order in which params are declared.


isException

public static boolean isException(HClass hClass)

interestingMethods

public static Set<HMethod> interestingMethods(Collection<HMethod> roots,
                                              CallGraph cg,
                                              jpaul.Misc.Predicate<HMethod> undesirable)
Returns all methods that are transitively reachable from roots, along call paths that do not include any "undesirable" methods. The returned set does not contain any undesirable method.


methodTooBig

public static boolean methodTooBig(HMethod hm)
Detects certain pathological methods whose analysis takes a long time without producing something really useful. This is a simple method that just looks for some usual suspects.


timePointerAnalysis

public static void timePointerAnalysis(HMethod mainM,
                                       Collection<HMethod> methodsOfInterest,
                                       PointerAnalysis pa,
                                       AnalysisPolicy ap,
                                       String prefix)