soot.jimple.spark.ondemand.pautil
Class SootUtil

java.lang.Object
  extended by soot.jimple.spark.ondemand.pautil.SootUtil

public class SootUtil
extends Object

Utility methods for dealing with Soot.

Author:
manu_s

Nested Class Summary
static class SootUtil.CallSiteAndContext
           
static class SootUtil.FieldAccessMap
           
static class SootUtil.FieldToEdgesMap
           
 
Constructor Summary
SootUtil()
           
 
Method Summary
static SootUtil.FieldAccessMap buildStoreMap(PAG pag)
           
static PointsToSetInternal constructIntersection(PointsToSetInternal set1, PointsToSetInternal set2, PAG pag)
           
static String createDirIfNotExist(String dirName)
           
static void dumpVarNodeInfo(PAG pag)
           
static String fakeSignature(String qualifiedName)
          This method should be removed soon.
static SootMethod getAmbiguousMethodByName(String methodName)
           
static Collection<? extends SootMethod> getCallTargets(Type type, SootMethod invokedMethod)
           
static String getClassName(String qualifiedName)
           
static long getFreeLiveMemory()
           
static SootMethod getMainMethod()
           
static String getMethodName(String qualifiedName)
           
static boolean hasRecursiveField(SootClass sootClass)
           
static boolean inLibrary(RefType type)
           
static boolean inLibrary(String className)
           
static boolean isExceptionNode(VarNode node)
           
static boolean isNewInstanceMethod(SootMethod method)
           
static boolean isParamNode(VarNode node)
           
static boolean isResolvableCall(SootMethod invokedMethod)
           
static boolean isRetNode(VarNode node)
           
static boolean isStringNode(VarNode node)
           
static boolean isThisNode(VarNode node)
           
static boolean isThreadGlobal(VarNode node)
           
static boolean isThreadStartMethod(SootMethod method)
           
static SootUtil.FieldToEdgesMap loadsOnField(PAG pag)
           
static boolean noRefTypeParameters(SootMethod method)
           
static void printNodeNumberMapping(String fileName, PAG pag)
           
static SootUtil.FieldToEdgesMap storesOnField(PAG pag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SootUtil

public SootUtil()
Method Detail

buildStoreMap

public static SootUtil.FieldAccessMap buildStoreMap(PAG pag)

isRetNode

public static boolean isRetNode(VarNode node)
Parameters:
node -
Returns:
true if node represents the return value of a method; false otherwise

isParamNode

public static boolean isParamNode(VarNode node)

isThisNode

public static boolean isThisNode(VarNode node)
Parameters:
node -
Returns:
true if node represents the this parameter of a method; false otherwise

inLibrary

public static boolean inLibrary(String className)
Parameters:
outerType -
Returns:

inLibrary

public static boolean inLibrary(RefType type)

isStringNode

public static boolean isStringNode(VarNode node)

isExceptionNode

public static boolean isExceptionNode(VarNode node)
Parameters:
node -
Returns:

storesOnField

public static SootUtil.FieldToEdgesMap storesOnField(PAG pag)

loadsOnField

public static SootUtil.FieldToEdgesMap loadsOnField(PAG pag)

constructIntersection

public static PointsToSetInternal constructIntersection(PointsToSetInternal set1,
                                                        PointsToSetInternal set2,
                                                        PAG pag)

isThreadGlobal

public static boolean isThreadGlobal(VarNode node)

isThreadStartMethod

public static boolean isThreadStartMethod(SootMethod method)

hasRecursiveField

public static boolean hasRecursiveField(SootClass sootClass)

dumpVarNodeInfo

public static void dumpVarNodeInfo(PAG pag)

noRefTypeParameters

public static boolean noRefTypeParameters(SootMethod method)

getMainMethod

public static SootMethod getMainMethod()

isResolvableCall

public static boolean isResolvableCall(SootMethod invokedMethod)

getCallTargets

public static Collection<? extends SootMethod> getCallTargets(Type type,
                                                              SootMethod invokedMethod)

createDirIfNotExist

public static String createDirIfNotExist(String dirName)

getFreeLiveMemory

public static long getFreeLiveMemory()

printNodeNumberMapping

public static void printNodeNumberMapping(String fileName,
                                          PAG pag)

getAmbiguousMethodByName

public static SootMethod getAmbiguousMethodByName(String methodName)

fakeSignature

public static String fakeSignature(String qualifiedName)
This method should be removed soon.

Parameters:
qualifiedName -
Returns:

getClassName

public static String getClassName(String qualifiedName)

getMethodName

public static String getMethodName(String qualifiedName)

isNewInstanceMethod

public static boolean isNewInstanceMethod(SootMethod method)