|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object joeq.Compiler.Analysis.FlowInsensitive.MethodSummary
public class MethodSummary
MethodSummary
Nested Class Summary | |
---|---|
static class |
MethodSummary.AccessPath
Encodes an access path. |
static class |
MethodSummary.BuildMethodSummary
Visitor class to build an intramethod summary. |
static class |
MethodSummary.CallSite
Represents a particular call site in a method. |
static class |
MethodSummary.CheckCastNode
A CheckCastNode refers to the result of a CheckCast instruction |
static class |
MethodSummary.ConcreteObjectNode
A ConcreteObjectNode refers to an object that we discovered through reflection. |
static class |
MethodSummary.ConcreteTypeNode
A ConcreteTypeNode refers to an object with a concrete type. |
static class |
MethodSummary.FakeParamNode
|
static class |
MethodSummary.FieldNode
A FieldNode represents the result of a 'load' instruction. |
static class |
MethodSummary.GlobalNode
A GlobalNode stores references to the static variables. |
static interface |
MethodSummary.HeapObject
|
static class |
MethodSummary.InsideEdgeNavigator
Represents a field edge between two nodes. |
static class |
MethodSummary.MethodSummaryBuilder
Helper class to output method summary in dot graph format. |
static class |
MethodSummary.Node
|
static class |
MethodSummary.NodeSet
|
static class |
MethodSummary.OperandToNodeMap
|
static class |
MethodSummary.OutsideNode
An outside node is some node that can be mapped to other nodes. |
static class |
MethodSummary.ParamNode
A ParamNode represents an incoming parameter. |
static class |
MethodSummary.PassedParameter
Represents a particular parameter passed to a particular method call. |
static class |
MethodSummary.PlaceholderNode
A PlaceholderNode is used to signify an object that is out-of-scope. |
static class |
MethodSummary.ReturnedNode
A ReturnedNode represents a return value or thrown exception from a method call. |
static class |
MethodSummary.ReturnValueNode
A ReturnValueNode represents the return value of a method call. |
static class |
MethodSummary.State
Records the state of the intramethod analysis at some point in the method. |
static class |
MethodSummary.ThrownExceptionNode
A ThrownExceptionNode represents the thrown exception of a method call. |
static class |
MethodSummary.UnknownTypeNode
A UnknownTypeNode refers to an object with an unknown type. |
static interface |
MethodSummary.Variable
|
Field Summary | |
---|---|
static boolean |
CACHE_BUILDER
|
static HashMap |
clone_cache
Cache of cloned method summaries. |
static boolean |
DETERMINISTIC
|
static boolean |
DUMP_DOTGRAPH
|
static String |
fakeCloneName
fake a method summary that simulates the effect of the inherited default clone(). |
static boolean |
IGNORE_INSTANCE_FIELDS
|
static boolean |
IGNORE_STATIC_FIELDS
|
static PrintStream |
out
|
static boolean |
SPLIT_THREADS
|
static boolean |
SSA
|
static Set |
ssaEntered
|
static Map |
stringNodes2Values
|
static HashMap |
summary_cache
Holds the cache of method summary graphs. |
static boolean |
TRACE_DOT
|
static boolean |
TRACE_INST
|
static boolean |
TRACE_INTER
|
static boolean |
TRACE_INTRA
|
static boolean |
UNIFY_ACCESS_PATHS
|
static boolean |
USE_IDENTITY_HASHCODE
|
static boolean |
USE_PARAMETER_MAP
|
static boolean |
VERIFY_ASSERTIONS
|
Constructor Summary | |
---|---|
MethodSummary(MethodSummary.BuildMethodSummary builder,
jq_Method method,
MethodSummary.ParamNode[] param_nodes,
MethodSummary.GlobalNode my_global,
Set methodCalls,
Map callToRVN,
Map callToTEN,
Map castMap,
Set castPredecessors,
Set returned,
Set thrown,
Set passedAsParameters,
Map sync_ops)
|
|
MethodSummary(MethodSummary.ParamNode[] param_nodes)
|
Method Summary | |
---|---|
static boolean |
addToMultiMap(HashMap mm,
Object from,
Object to)
Utility function to add to a multi map. |
static boolean |
addToMultiMap(HashMap mm,
Object from,
Set to)
Utility function to add to a multi map. |
static void |
clearSummaryCache()
Clear the method summary graph. |
MethodSummary |
copy()
Return a deep copy of this analysis summary. |
void |
dotGraph(BufferedWriter out)
Dumps this method summary as a dot graph. |
static MethodSummary |
fakeCloneMethodSummary(jq_FakeInstanceMethod method)
|
static MethodSummary |
fakeMethodSummary(jq_Method method)
|
Set |
getCalls()
Get the set of method calls made by this method. |
Map |
getCastMap()
Get the map of casts. |
MethodSummary.GlobalNode |
getGlobal()
Get the global node for this method. |
jq_Method |
getMethod()
|
Set |
getNodesThatCall(MethodSummary.PassedParameter pp)
Return the set of nodes that are passed as the given parameter. |
void |
getNodesThatCall(MethodSummary.PassedParameter pp,
Set result)
Add all nodes that are passed as the given passed parameter to the given result set. |
Set |
getNodesThatCall(ProgramLocation mc,
int k)
|
int |
getNumOfParams()
Get the number of parameters passed into this method. |
MethodSummary.ParamNode |
getParamNode(int i)
Get the ith parameter node. |
Collection |
getRegisterAtLocation(BasicBlock bb,
Quad q,
RegisterFactory.Register r)
|
Set |
getReturned()
Get the set of returned nodes. |
MethodSummary.ReturnValueNode |
getRVN(ProgramLocation mc)
Get the return value node corresponding to the given method call. |
static MethodSummary |
getSummary(ControlFlowGraph cfg)
Get the method summary for the given CFG. |
static MethodSummary |
getSummary(ControlFlowGraph cfg,
MethodSummary.CallSite cs)
Get the (context-sensitive) method summary for the given control flow graph when called from the given call site. |
static MethodSummary |
getSummary(jq_Method m)
Get the method summary for the given method. |
Collection |
getSyncedVars()
|
MethodSummary.ThrownExceptionNode |
getTEN(ProgramLocation mc)
Get the thrown exception node corresponding to the given method call. |
Set |
getThrown()
Get the set of thrown nodes. |
int |
hashCode()
|
static void |
instantiate(MethodSummary caller,
ProgramLocation mc,
MethodSummary callee,
boolean removeCall)
Instantiate a copy of the callee summary into the caller. |
static boolean |
isNullConstant(MethodSummary.Node node)
|
static void |
main(String[] args)
|
void |
mergeGlobal()
Merge the global node for this method summary with the main global node. |
Iterator |
nodeIterator()
Returns an iteration of all nodes in this summary. |
String |
toString()
Return a string representation of this summary. |
void |
unifyAccessPathEdges(MethodSummary.Node n)
Unify similar access path edges from the given node. |
void |
unifyAccessPaths(Set roots)
Unify similar access paths from the given roots. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static PrintStream out
public static boolean TRACE_INTRA
public static boolean TRACE_INTER
public static boolean TRACE_INST
public static boolean TRACE_DOT
public static final boolean IGNORE_INSTANCE_FIELDS
public static final boolean IGNORE_STATIC_FIELDS
public static final boolean VERIFY_ASSERTIONS
public static boolean SSA
public static final boolean USE_IDENTITY_HASHCODE
public static final boolean DETERMINISTIC
public static final boolean SPLIT_THREADS
public static Set ssaEntered
public static Map stringNodes2Values
public static HashMap summary_cache
public static HashMap clone_cache
public static final boolean USE_PARAMETER_MAP
public static boolean CACHE_BUILDER
public static final boolean UNIFY_ACCESS_PATHS
public static final boolean DUMP_DOTGRAPH
public static String fakeCloneName
Constructor Detail |
---|
public MethodSummary(MethodSummary.ParamNode[] param_nodes)
public MethodSummary(MethodSummary.BuildMethodSummary builder, jq_Method method, MethodSummary.ParamNode[] param_nodes, MethodSummary.GlobalNode my_global, Set methodCalls, Map callToRVN, Map callToTEN, Map castMap, Set castPredecessors, Set returned, Set thrown, Set passedAsParameters, Map sync_ops)
Method Detail |
---|
public static MethodSummary getSummary(ControlFlowGraph cfg)
cfg
-
public static MethodSummary getSummary(jq_Method m)
public static void clearSummaryCache()
public static MethodSummary getSummary(ControlFlowGraph cfg, MethodSummary.CallSite cs)
cfg
- cs
-
public MethodSummary.GlobalNode getGlobal()
public MethodSummary.ParamNode getParamNode(int i)
public int getNumOfParams()
public Set getCalls()
public void getNodesThatCall(MethodSummary.PassedParameter pp, Set result)
public Set getNodesThatCall(ProgramLocation mc, int k)
public Set getNodesThatCall(MethodSummary.PassedParameter pp)
public void mergeGlobal()
public static boolean addToMultiMap(HashMap mm, Object from, Object to)
public static boolean addToMultiMap(HashMap mm, Object from, Set to)
public MethodSummary copy()
public void unifyAccessPaths(Set roots)
public void unifyAccessPathEdges(MethodSummary.Node n)
public static void instantiate(MethodSummary caller, ProgramLocation mc, MethodSummary callee, boolean removeCall)
public jq_Method getMethod()
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public Iterator nodeIterator()
public Set getReturned()
public Set getThrown()
public Map getCastMap()
public MethodSummary.ReturnValueNode getRVN(ProgramLocation mc)
public MethodSummary.ThrownExceptionNode getTEN(ProgramLocation mc)
public Collection getSyncedVars()
public void dotGraph(BufferedWriter out) throws IOException
IOException
public static void main(String[] args) throws IOException
IOException
public Collection getRegisterAtLocation(BasicBlock bb, Quad q, RegisterFactory.Register r)
public static MethodSummary fakeMethodSummary(jq_Method method)
public static MethodSummary fakeCloneMethodSummary(jq_FakeInstanceMethod method)
public static boolean isNullConstant(MethodSummary.Node node)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |