|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.PointerAnalysis.PointerAnalysis
public class PointerAnalysis
PointerAnalysis
is the main class of the Pointer Analysis
package. It is designed to act as a query-object: after being
initialized, it can be asked to provide the Parallel Interaction Graph
valid at the end of a specific method.
Field Summary | |
---|---|
static boolean |
AGGRESSIVE_COMPRESS_LOST_NODES
Same as COMPRESS_LOST_NODES , but done at the end
of the analysis of each method. |
static String |
ARRAY_CONTENT
Array elements are modeled as fields of the array object, all of them with the same name since the analysis is not able to make the distinction between the fields. |
static boolean |
CALL_CONTEXT_SENSITIVE
Activates the calling context sensitivity. |
static boolean |
COMPRESS_LOST_NODES
If true , compress all load nodes that escape into
an unanalyzed method and/or a static field into the single
summar node NodeRepository.LOST_SUMMARY (currently,
this is done only at the end of a method, when producing the
external version of the ParIntGraph ). |
static boolean |
CONDENSED_ESCAPE_INFO
If false , do not keep track of all un-analyzed
methods where a node escapes. |
static boolean |
CONSIDER_TYPES
If true , then we do not introduce edges about
which we can infer that they violate the type declarations:
e.g., an edge on the field "foo" from an inside node
for new Integer . |
static boolean |
DEBUG
|
static boolean |
DEBUG_INTRA
|
static boolean |
DEBUG_SCC
|
static boolean |
DEBUG2
|
static boolean |
DETAILS2
|
static boolean |
DETERMINISTIC
Makes the pointer analysis deterministic to make the debug easier. |
static boolean |
DO_INTRA_PROC_TRIMMING
|
static boolean |
FINE_TIMING
|
static boolean |
IGNORE_EO
Hack to speed it up: it appears to me that the edge ordering relation is not extremely important: in recursive methods or in methods with loops, it tends to be just a cartesian product between I and O. |
static boolean |
IGNORE_LOADS_FROM_NATIVES
Ignore what is load from a RETURN/EXCEPT node. |
Linker |
linker
|
static boolean |
LOOP_SENSITIVE
Activates the loop sensitivity. |
static int |
MAX_SPEC_DEPTH
The specialization limit. |
static boolean |
MEGA_DEBUG
crazy, isn't it? |
static boolean |
MEGA_DEBUG2
|
static boolean |
RECORD_ACTIONS
Turns on the recording of the actions done by the program. |
static boolean |
REUSE_LOAD_NODES
If true , then each time we try to load something
from an escaped node that already has a few load nodes (for
the field we load), we reuse the smallest existent node,
instead of generating a node for that LOAD instruction. |
static boolean |
SAVE_MEMORY
Turns on the save memory mode. |
static boolean |
SHOW_NODES
|
static boolean |
STATS
|
static boolean |
THREAD_SENSITIVE
Activates the full thread sensitivity. |
static boolean |
TIMING
Turns on the printing of some timing info. |
static boolean |
TOPLAS_PAPER
|
static boolean |
TREAT_CONST
Controls whether the analysis models references to constant Strings by edges to the special node CONST , or
simply ignores them. |
static boolean |
TREAT_NULL
Controls whether the analysis models the null
references by edges to the special node NULL , or
simply ignores them. |
static boolean |
WEAKLY_THREAD_SENSITIVE
Activates the weak thread sensitivity. |
Constructor Summary | |
---|---|
PointerAnalysis(MetaCallGraph mcg,
CachingSCCLBBFactory caching_scc_lbb_factory,
Linker linker,
ClassHierarchy ch)
Creates a PointerAnalysis object. |
Method Summary | |
---|---|
static boolean |
analyzable(HMethod hm)
Check if hm can be analyzed by the pointer analysis. |
CachingSCCLBBFactory |
getCachingSCCLBBFactory()
Returns the SCC LBB factory used by this
PointerAnalysis object. |
ParIntGraph |
getExtParIntGraph(HMethod hm)
|
ParIntGraph |
getExtParIntGraph(MetaMethod mm)
Returns the simplified (external) ParIntGraph attached to
the method hm i.e. the graph at the end of the method. |
ParIntGraph |
getExtThreadInteraction(MetaMethod mm)
|
ParIntGraph |
getIntParIntGraph(HMethod hm)
That's what you probably want: equivalent to getIntParIntGraph(new MetaMethod(hm, true)) . |
ParIntGraph |
getIntParIntGraph(MetaMethod mm)
Equivalent to getIntParIntGraph (mm ,true ). |
ParIntGraph |
getIntParIntGraph(MetaMethod mm,
boolean analyze)
Returns the full (internal) ParIntGraph attached
to the method hm i.e. the graph at the end of the
method. |
ParIntGraph |
getIntThreadInteraction(MetaMethod mm)
|
Linker |
getLinker()
|
Set |
getLostNodes(MetaMethod mm)
|
MetaAllCallers |
getMetaAllCallers()
Returns the all callers graph used by this
PointerAnalysis object. |
MetaCallGraph |
getMetaCallGraph()
Returns the call graph graph used by this
PointerAnalysis object. |
NodeRepository |
getNodeRepository()
|
PANode[] |
getParamNodes(MetaMethod mm)
Returns the parameter nodes of the method hm . |
ParIntGraph |
getPigAfterQuad(MetaMethod mm,
Quad q)
Returns the parallel interaction graph attached to the program point right after q in the body of meta-method
mm . |
ParIntGraph |
getPIGAtQuad(HMethod hm,
Quad q)
|
ParIntGraph |
getPIGAtQuad(MetaMethod mm,
Quad q)
Returns the parallel interaction graph attached to the program point right after q in the body of meta-method
mm . |
ParIntGraph |
getPigBeforeQuad(MetaMethod mm,
Quad q)
Returns the parallel interaction graph attached to the program point right before q in the body of meta-method
mm . |
ParIntGraph |
getPigForQuad(MetaMethod mm,
Quad q,
int moment)
|
Set |
pointedNodes(MetaMethod mm,
Quad q,
Temp l)
Returns the set of the nodes pointed by the temporary t
at the point right before executing instruction q
from the body of meta-method mm . |
Set |
pointedNodes(Quad q,
Temp l)
|
void |
print_stats()
Prints some statistics. |
ParIntGraph |
threadInteraction(MetaMethod mm)
Returns the parallel interaction graph for the end of the method hm . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUG
public static final boolean DEBUG2
public static final boolean DEBUG_SCC
public static final boolean DEBUG_INTRA
public static boolean MEGA_DEBUG
public static boolean MEGA_DEBUG2
public static boolean RECORD_ACTIONS
public static final boolean IGNORE_EO
public static boolean IGNORE_LOADS_FROM_NATIVES
public static boolean CONDENSED_ESCAPE_INFO
false
, do not keep track of all un-analyzed
methods where a node escapes. Instead, just record the fact
whether a node escapes (or not) in some un-analyzed method.
public static boolean COMPRESS_LOST_NODES
true
, compress all load nodes that escape into
an unanalyzed method and/or a static field into the single
summar node NodeRepository.LOST_SUMMARY (currently,
this is done only at the end of a method, when producing the
external version of the ParIntGraph
). This
compression is applied to the external versions of the
parallel interaction graphs, after the end of the fixed point
computation for a SCC of methods.
public static boolean TOPLAS_PAPER
public static boolean AGGRESSIVE_COMPRESS_LOST_NODES
COMPRESS_LOST_NODES
, but done at the end
of the analysis of each method. BREAKS MONOTONICITY!
public static boolean REUSE_LOAD_NODES
true
, then each time we try to load something
from an escaped node that already has a few load nodes (for
the field we load), we reuse the smallest existent node,
instead of generating a node for that LOAD instruction.
BREAKS MONOTONICITY!
public static boolean TREAT_NULL
null
references by edges to the special node NULL
, or
simply ignores them.
public static boolean TREAT_CONST
CONST
, or
simply ignores them.
public static boolean CONSIDER_TYPES
true
, then we do not introduce edges about
which we can infer that they violate the type declarations:
e.g., an edge on the field "foo" from an inside node
for new Integer
.
public static final boolean SAVE_MEMORY
public static final boolean DETERMINISTIC
Set
s which doesn't offer any guarantee about the order
in which they iterate over their elements.
public static boolean TIMING
public static boolean FINE_TIMING
public static final boolean STATS
public static boolean SHOW_NODES
public static final boolean DETAILS2
public static boolean CALL_CONTEXT_SENSITIVE
MAX_SPEC_DEPTH
times). This increases
the precision of the analysis but requires more time and memory.
public static int MAX_SPEC_DEPTH
public static boolean THREAD_SENSITIVE
public static boolean WEAKLY_THREAD_SENSITIVE
public static boolean LOOP_SENSITIVE
public static final String ARRAY_CONTENT
public static final boolean DO_INTRA_PROC_TRIMMING
public Linker linker
Constructor Detail |
---|
public PointerAnalysis(MetaCallGraph mcg, CachingSCCLBBFactory caching_scc_lbb_factory, Linker linker, ClassHierarchy ch)
PointerAnalysis
object.
mcg
- The (meta) Call Graph that models the caller-callee
relation between methods.lbbconv
- The producer of the (Light) Basic Block representation
of a method body.
Method Detail |
---|
public final MetaCallGraph getMetaCallGraph()
this
PointerAnalysis
object.
public final MetaAllCallers getMetaAllCallers()
this
PointerAnalysis
object.
public final CachingSCCLBBFactory getCachingSCCLBBFactory()
this
PointerAnalysis
object.
public final Linker getLinker()
public ParIntGraph getIntParIntGraph(MetaMethod mm, boolean analyze)
ParIntGraph
attached
to the method hm
i.e. the graph at the end of the
method. If mm
was not analyzed yet and
analyze
is true, analyze mm
(and
store the result of the analysis in the internal cache). May
return null
if mm
is unanalyzable,
or if it has not been analyzed yet and analyze
is
false.
public ParIntGraph getIntParIntGraph(MetaMethod mm)
getIntParIntGraph
(mm
,true
).
public ParIntGraph getIntParIntGraph(HMethod hm)
getIntParIntGraph(new MetaMethod(hm, true))
.
public ParIntGraph getExtParIntGraph(MetaMethod mm)
ParIntGraph
attached to
the method hm
i.e. the graph at the end of the method.
of which only the parts reachable from the exterior (via parameters,
returned objects or static classes) have been preserved. The escape
function do not consider the parameters of the function (anyway, this
graph is supposed to be inlined into the graph of the caller, so the
parameters will disappear anyway).
Returns null
if no such graph is available.
public ParIntGraph getExtParIntGraph(HMethod hm)
public PANode[] getParamNodes(MetaMethod mm)
hm
. This is
useful for the understanding of the ParIntGraph
attached
to hm
public ParIntGraph threadInteraction(MetaMethod mm)
hm
. The interactions between hm
and the
threads it (transitively) starts are analyzed in order to
"recover" some of the escaped nodes.
public ParIntGraph getExtThreadInteraction(MetaMethod mm)
public ParIntGraph getIntThreadInteraction(MetaMethod mm)
public final NodeRepository getNodeRepository()
public Set getLostNodes(MetaMethod mm)
mm
. These are nodes that do not
appear in the pig for the method, but clearly escape.public static final boolean analyzable(HMethod hm)
hm
can be analyzed by the pointer analysis.
public final void print_stats()
public final ParIntGraph getPIGAtQuad(MetaMethod mm, Quad q)
q
in the body of meta-method
mm
.
public final ParIntGraph getPIGAtQuad(HMethod hm, Quad q)
public final ParIntGraph getPigAfterQuad(MetaMethod mm, Quad q)
q
in the body of meta-method
mm
.
public final ParIntGraph getPigBeforeQuad(MetaMethod mm, Quad q)
q
in the body of meta-method
mm
.
public final ParIntGraph getPigForQuad(MetaMethod mm, Quad q, int moment)
public final Set pointedNodes(MetaMethod mm, Quad q, Temp l)
t
at the point right before executing instruction q
from the body of meta-method mm
.
public final Set pointedNodes(Quad q, Temp l)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |