|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.PointerAnalysis.PAEscapeFunc
public class PAEscapeFunc
PAEscapeFunc
models the escape information.
For each PANode
node
, it maintains all the nodes
node
escapes through (e.g. parameter nodes).
Also, it records whether node
escapes into a method hole or not.
Constructor Summary | |
---|---|
PAEscapeFunc()
Creates a EscapeFunc . |
Method Summary | |
---|---|
boolean |
addMethodHole(PANode node,
HMethod hm)
Records the fact that node escaped into a method hole. |
boolean |
addMethodHoles(PANode node,
Set mholes)
Records the fact that node escaped into a set of
method holes. |
boolean |
addNodeHole(PANode node,
PANode n_hole)
Records the fact that node can escape through
the node n_hole . |
boolean |
addNodeHoles(PANode node,
Set n_holes)
Records the fact that node can escape through
the node n_holes . |
Object |
clone()
clone does a deep copy of this object. |
boolean |
equals(Object obj)
Checks the equality of two PAEscapeFunc objects. |
Set |
escapedNodes()
Returns the set of escaped nodes. |
boolean |
escapesOnlyInCaller(PANode node)
Checks whether node escapes at most in the caller. |
Set |
getEscapedIntoMH()
Returns the set of nodes which escape into a method hole. |
boolean |
hasEscaped(PANode node)
Checks if node has escaped in some hole, ie if
node could be accessed by unanalyzed code. |
boolean |
hasEscapedIntoAMethod(PANode node)
Checks whether node escapes into a method hole or not. |
boolean |
hasEscapedIntoANode(PANode node)
Checks whether node escapes through a node or not. |
void |
insert(PAEscapeFunc e2,
Relation mu,
Set noholes,
Set ppgRoots)
Inserts the image of e2 through the mu
mapping into this PAEscapeFunc . |
Set |
methodHolesSet(PANode node)
Returns the set of methods that node escapes into. |
Set |
nodeHolesSet(PANode node)
Returns the set of all the node "holes" node
escapes through. |
void |
remove(Set set)
Remove all the PANode s that appear in set
from this object. |
void |
removeMethodHole(PANode node,
HMethod hm)
The dual of addMethodHole |
void |
removeMethodHoles(Set good_holes)
The methods from the set good_holes are unharmful
to the specific application that uses the pointer analysis. |
void |
removeNodeHole(PANode node,
PANode n_hole)
The dual of addNodeHole |
void |
removeNodeHoleFromAll(PANode n_hole)
Removes a node hole from all the nodes: esc(n) = esc(n) - {n_hole} for all n . |
PAEscapeFunc |
select(Set remaining_nodes)
Returns a PAEscapeFunc containing escape information
only about the nodes from the set remaining_nodes . |
PAEscapeFunc |
specialize(Map map)
|
String |
toString()
Pretty-print debug function. |
void |
union(PAEscapeFunc e2)
|
void |
union(PAEscapeFunc e2,
Set ppgRoots)
Computes the union of this PAEscapeFunc
with e2 . |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PAEscapeFunc()
EscapeFunc
.
Method Detail |
---|
public final boolean addNodeHole(PANode node, PANode n_hole)
node
can escape through
the node n_hole
. Returns true
if new information has been gained
public final boolean addNodeHoles(PANode node, Set n_holes)
node
can escape through
the node n_holes
. Returns true
if new information has been gained
public final void removeNodeHole(PANode node, PANode n_hole)
addNodeHole
public void removeNodeHoleFromAll(PANode n_hole)
esc(n) = esc(n) - {n_hole}
for all n
.
public Set nodeHolesSet(PANode node)
node
escapes through.
public boolean hasEscapedIntoANode(PANode node)
node
escapes through a node or not.
public boolean addMethodHole(PANode node, HMethod hm)
node
escaped into a method hole.
Returns true
if this was a new information.
public boolean addMethodHoles(PANode node, Set mholes)
node
escaped into a set of
method holes.
Returns true
if this was a new information.
public final void removeMethodHole(PANode node, HMethod hm)
addMethodHole
public void removeMethodHoles(Set good_holes)
good_holes
are unharmful
to the specific application that uses the pointer analysis. So, they
can be erased from the set of method holes into which a specific node
escapes.
public Set methodHolesSet(PANode node)
node
escapes into.
public Set getEscapedIntoMH()
public boolean hasEscapedIntoAMethod(PANode node)
node
escapes into a method hole or not.
public boolean hasEscaped(PANode node)
node
has escaped in some hole, ie if
node
could be accessed by unanalyzed code.
public boolean escapesOnlyInCaller(PANode node)
node
escapes at most in the caller.
ie it doesn't escape in an unanalyzed method, a thread or a static
field.
public void remove(Set set)
PANode
s that appear in set
from this
object.
public void union(PAEscapeFunc e2)
public void union(PAEscapeFunc e2, Set ppgRoots)
this
PAEscapeFunc
with e2
. This function is called in the control flow
join points.
public void insert(PAEscapeFunc e2, Relation mu, Set noholes, Set ppgRoots)
e2
through the mu
mapping into this
PAEscapeFunc
.
public PAEscapeFunc specialize(Map map)
public boolean equals(Object obj)
PAEscapeFunc
objects.
equals
in class Object
public Set escapedNodes()
public PAEscapeFunc select(Set remaining_nodes)
PAEscapeFunc
containing escape information
only about the nodes from the set remaining_nodes
.
public Object clone()
clone
does a deep copy of this
object.
clone
in class Object
public String toString()
PAEscapeFunc
s are guaranteed to have the same
string representation.
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |