harpoon.Analysis.PointerAnalysis
Class ODParIntGraph

java.lang.Object
  |
  +--harpoon.Analysis.PointerAnalysis.ODParIntGraph

public class ODParIntGraph
extends Object

ODParIntGraph models a Parallel Interaction Graph data structure. Most of its fields retain the original name from the paper of Martin and John Whaley.

Version:
$Id: ODParIntGraph.java,v 1.3 2002/02/26 22:41:20 cananian Exp $
Author:
Alexandru SALCIANU <salcianu@retezat.lcs.mit.edu>

Field Summary
static boolean AGGRESSIVE_SHRINKING
          Activates the aggressive shrinking.
 ActionRepository ar
          Maintains the actions executed by the analysed code and the parallel action relation.
static boolean DEBUG
           
static boolean DEBUG_AS
          Debug for the aggressive shrinking.
static boolean DEBUG2
           
static ODParIntGraph EMPTY_GRAPH
          Default (empty) graph.
 EdgeOrdering eo
          Maintains the (conservative) ordering relations between the inside and the outside edges.
 PointsToGraph G
          Points-to escape graph that summarizes the points-to and escape information for the current thread.
 ODInformation odi
          Data structures necessary for the ODA.
 PAThreadMap tau
          The paralel thread map; it attaches to each thread node nT, an integer from the set {0,1,2} where 2 signifies the possibility that multiple instances of nT execute in parallel with the current thread.
 Set touched_threads
          The set of thread objects that are accessed after they are started.
 
Constructor Summary
ODParIntGraph()
          Creates a ODParIntGraph.
 
Method Summary
 Set allNodes()
          Returns the set of all the nodes that appear in this parallel interaction graph.
Warning: This method should be called only on graphs that are final (ie they won't be modified through something as an edge addition, etc.).
 Object clone()
          clone produces a copy of the this Parallel Interaction Graph.
 boolean equals(Object obj)
          Check the equality of two ODParIntGraphs.
 void forAllNodes(PANodeVisitor visitor)
          Visits all the nodes that appear in this graph.
static boolean identical(ODParIntGraph pig1, ODParIntGraph pig2)
          Checks whether two ODParIntGraphs are equal or not.
 boolean isCoherent()
           
 void join(ODParIntGraph pig2)
          join combines two ODParIntGraphs in \ a control-flow join point.
 ODParIntGraph keepTheEssential(PANode[] params, boolean is_main)
          Produces a ODParIntGraph containing only the nodes that could be reached from the outside.
 void remove(Set nodes)
          Removes the nodes from nodes from this graph.
 void removeEmptyLoads()
          Simplify this parallel interaction graph by removing the loads that don't escape anywhere (and hence, don't represent any object).
 void removeEmptyLoads(Set empty_loads, Set fake_outside_edges)
           
 String toString()
          Pretty-print function for debug purposes.
 void touch_thread(PANode nt)
          Records the fact that the started thread nt is accessed by its direct startee.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG

DEBUG2

public static boolean DEBUG2

DEBUG_AS

public static boolean DEBUG_AS
Debug for the aggressive shrinking.


AGGRESSIVE_SHRINKING

public static boolean AGGRESSIVE_SHRINKING
Activates the aggressive shrinking. Buggy for the moment ...


EMPTY_GRAPH

public static final ODParIntGraph EMPTY_GRAPH
Default (empty) graph. It doesn't contain any information.


G

public PointsToGraph G
Points-to escape graph that summarizes the points-to and escape information for the current thread.


tau

public PAThreadMap tau
The paralel thread map; it attaches to each thread node nT, an integer from the set {0,1,2} where 2 signifies the possibility that multiple instances of nT execute in parallel with the current thread.


touched_threads

public Set touched_threads
The set of thread objects that are accessed after they are started. This is not exactly part of the PA, but we need it for the thread specific heaps; Martin intend to allocate even the thread object in the thread heap - it is atomically collected at the end of the thread. For the moment, this info is accurate only for captured nodes (it is not carried over in the inter-procedural phase).


ar

public ActionRepository ar
Maintains the actions executed by the analysed code and the parallel action relation. alpha and pi from the original paper have been merged into this single field for efficiency reasons.


eo

public EdgeOrdering eo
Maintains the (conservative) ordering relations between the inside and the outside edges. before(ei,eo) is true if the inside edge ei might be created before the ouside edge eo was read.


odi

public ODInformation odi
Data structures necessary for the ODA.

Constructor Detail

ODParIntGraph

public ODParIntGraph()
Creates a ODParIntGraph.

Method Detail

join

public void join(ODParIntGraph pig2)
join combines two ODParIntGraphs in \ a control-flow join point.


equals

public boolean equals(Object obj)
Check the equality of two ODParIntGraphs.

Overrides:
equals in class Object

touch_thread

public final void touch_thread(PANode nt)
Records the fact that the started thread nt is accessed by its direct startee.


clone

public Object clone()
clone produces a copy of the this Parallel Interaction Graph.

Overrides:
clone in class Object

keepTheEssential

public ODParIntGraph keepTheEssential(PANode[] params,
                                      boolean is_main)
Produces a ODParIntGraph containing only the nodes that could be reached from the outside. (i.e. via parameters, class nodes, normally or exceptionally returned nodes or the started thread nodes)


forAllNodes

public void forAllNodes(PANodeVisitor visitor)
Visits all the nodes that appear in this graph.


allNodes

public Set allNodes()
Returns the set of all the nodes that appear in this parallel interaction graph.
Warning: This method should be called only on graphs that are final (ie they won't be modified through something as an edge addition, etc.).


remove

public void remove(Set nodes)
Removes the nodes from nodes from this graph.


removeEmptyLoads

public void removeEmptyLoads()
Simplify this parallel interaction graph by removing the loads that don't escape anywhere (and hence, don't represent any object). In addition, the <<n1,f>,n2> ouside (load) edges where n1 is an unescaped node are removed too.


removeEmptyLoads

public void removeEmptyLoads(Set empty_loads,
                             Set fake_outside_edges)

toString

public String toString()
Pretty-print function for debug purposes. Two equal ODParIntGraphs are guaranteed to have the same string representation.

Overrides:
toString in class Object

identical

public static boolean identical(ODParIntGraph pig1,
                                ODParIntGraph pig2)
Checks whether two ODParIntGraphs are equal or not. In addition to the equals method, this handles the comparisom of null objects.


isCoherent

public boolean isCoherent()