soot.jimple.spark.pag
Class PagToDotDumper
java.lang.Object
soot.jimple.spark.pag.PagToDotDumper
public class PagToDotDumper
- extends Object
Utilities for dumping dot representations of parts of a PAG
.
- Author:
- msridhar
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TRACE_MAX_LVL
public static final int TRACE_MAX_LVL
- See Also:
- Constant Field Values
PagToDotDumper
public PagToDotDumper(PAG pag)
makeDotNodeLabel
public static String makeDotNodeLabel(Node n,
Predicate<Node> p)
- Generate a node declaration for a dot file.
- Parameters:
node
- the nodep
- a predicate over nodes, which, if true, will
cause the node to appear red
- Returns:
- the appropriate
String
for the dot file
dumpP2SetsForLocals
public void dumpP2SetsForLocals(String fName,
String mName)
throws FileNotFoundException
- dumps the points-to sets for all locals in a method in a
dot representation. The graph has edges from each local to
all
AllocNode
s in its points-to set
- Parameters:
fName
- a name for the output filemName
- the name of the method whose locals should
be dumped
- Throws:
FileNotFoundException
- if unable to output to specified
file
dumpPAGForMethod
public void dumpPAGForMethod(String fName,
String cName,
String mName)
throws FileNotFoundException
- Dump the PAG for some method in the program in
dot format
- Parameters:
fName
- The filename for the outputcName
- The name of the declaring class for the methodmName
- The name of the method
- Throws:
FileNotFoundException
- if output file cannot be written
traceNode
public void traceNode(int id)
traceNode
public void traceNode(String cName,
String mName,
String varName)
traceLocalVarNode
public void traceLocalVarNode(String fName,
String cName,
String mName,
String varName)
makeNodeName
public static String makeNodeName(Node n)
makeLabel
public static String makeLabel(AllocNode n)
makeLabel
public static String makeLabel(LocalVarNode n)
makeLabel
public static String makeLabel(FieldRefNode node)
- Parameters:
node
-
- Returns:
makeLabel
public static String makeLabel(VarNode base)
- Parameters:
base
-
- Returns: