Package soot.jimple.spark.pag
Class PagToDotDumper
- java.lang.Object
-
- soot.jimple.spark.pag.PagToDotDumper
-
-
Field Summary
Fields Modifier and Type Field Description static intTRACE_MAX_LVL
-
Constructor Summary
Constructors Constructor Description PagToDotDumper(PAG pag)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddumpP2SetsForLocals(String fName, String mName)dumps the points-to sets for all locals in a method in a dot representation.voiddumpPAGForMethod(String fName, String cName, String mName)Dump the PAG for some method in the program in dot formatstatic StringmakeDotNodeLabel(Node n, Predicate<Node> p)Generate a node declaration for a dot file.static StringmakeLabel(AllocNode n)static StringmakeLabel(FieldRefNode node)static StringmakeLabel(LocalVarNode n)static StringmakeLabel(VarNode base)static StringmakeNodeName(Node n)voidtraceLocalVarNode(String fName, String cName, String mName, String varName)voidtraceNode(int id)voidtraceNode(String cName, String mName, String varName)
-
-
-
Field Detail
-
TRACE_MAX_LVL
public static final int TRACE_MAX_LVL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PagToDotDumper
public PagToDotDumper(PAG pag)
-
-
Method Detail
-
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
Stringfor 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 allAllocNodes 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)
-
traceLocalVarNode
public void traceLocalVarNode(String fName, String cName, String mName, String varName)
-
makeLabel
public static String makeLabel(LocalVarNode n)
-
makeLabel
public static String makeLabel(FieldRefNode node)
- Parameters:
node-- Returns:
-
-