harpoon.Analysis.PointerAnalysis
Class AbstrPAEdgeSet

java.lang.Object
  extended by harpoon.Analysis.PointerAnalysis.AbstrPAEdgeSet
All Implemented Interfaces:
PAEdgeSet, Cloneable
Direct Known Subclasses:
LightPAEdgeSet

public abstract class AbstrPAEdgeSet
extends Object
implements PAEdgeSet, Cloneable

AbstrPAEdgeSet

Version:
$Id: AbstrPAEdgeSet.java,v 1.5 2005/08/17 23:34:00 salcianu Exp $
Author:
Alexandru SALCIANU <salcianu@retezat.lcs.mit.edu>

Constructor Summary
AbstrPAEdgeSet()
           
 
Method Summary
abstract  boolean addEdge(PANode node1, String f, PANode node2)
           
abstract  void addEdge(Temp v, PANode node)
           
 void addEdges(Collection node1s, String f, Collection node2s)
           
 void addEdges(Collection node1s, String f, PANode node2)
           
abstract  boolean addEdges(PANode node1, String f, Collection node2s)
           
abstract  void addEdges(Temp v, Collection nodes)
           
abstract  Set allFlagsForNode(PANode node)
           
abstract  Set allSourceNodes()
           
abstract  Set allVariables()
           
 Object clone()
           
static Set difference(PAEdgeSet es1, PAEdgeSet es2)
          Computes the difference between two sets of edges.
 void forAllEdges(harpoon.Analysis.PointerAnalysis.PAEdgeVisitor visitor)
           
abstract  void forAllEdges(PANode node, harpoon.Analysis.PointerAnalysis.PAEdgeVisitor visitor)
           
 void forAllEdges(Temp v, harpoon.Analysis.PointerAnalysis.PAEdgeVisitor visitor)
           
 void forAllNodes(PANodeVisitor visitor)
           
abstract  void forAllPointedNodes(PANode node, PANodeVisitor visitor)
           
 void forAllPointedNodes(PANode node, String f, PANodeVisitor visitor)
           
 void forAllPointedNodes(Temp v, PANodeVisitor visitor)
           
 Set getEdgesFrom(PANode node, String f)
           
protected abstract  PAEdgeSet getEmptyPAEdgeSet()
           
 Relation getPrecedenceRelation()
          Returns a relation that contains all the pairs <n2,n1> such that there was an edge from n1 to n2 (through some field f).
 Set pointedNodes(Collection nodes, String f)
           
abstract  Set pointedNodes(PANode node)
           
abstract  Set pointedNodes(PANode node, String f)
           
abstract  Set pointedNodes(Temp v)
           
abstract  void remove(Set set)
           
abstract  void removeEdge(PANode node1, String f, PANode node2)
           
abstract  void removeEdge(Temp v, PANode node)
           
abstract  void removeEdges(PANode node1)
           
abstract  void removeEdges(PANode node1, String f)
           
abstract  void removeEdges(Temp v)
           
static void show_evolution(PAEdgeSet es_old, PAEdgeSet es_new)
          Display the edges which were removed and the edges which were added while passing from es_old to es_new.
 PAEdgeSet specialize(Map map)
           
 String toString()
           
 void union(PAEdgeSet edges2)
          Convenient version of union, equivalent to union(edges2, null).
abstract  void union(PAEdgeSet edges2, Set ppgRoots)
          Add all the edges from edges2 to this PAEdgeSet.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface harpoon.Analysis.PointerAnalysis.PAEdgeSet
copyEdges
 

Constructor Detail

AbstrPAEdgeSet

public AbstrPAEdgeSet()
Method Detail

addEdge

public abstract void addEdge(Temp v,
                             PANode node)
Specified by:
addEdge in interface PAEdgeSet

addEdges

public abstract void addEdges(Temp v,
                              Collection nodes)
Specified by:
addEdges in interface PAEdgeSet

removeEdge

public abstract void removeEdge(Temp v,
                                PANode node)
Specified by:
removeEdge in interface PAEdgeSet

removeEdges

public abstract void removeEdges(Temp v)
Specified by:
removeEdges in interface PAEdgeSet

pointedNodes

public abstract Set pointedNodes(Temp v)
Specified by:
pointedNodes in interface PAEdgeSet

allVariables

public abstract Set allVariables()
Specified by:
allVariables in interface PAEdgeSet

addEdge

public abstract boolean addEdge(PANode node1,
                                String f,
                                PANode node2)
Specified by:
addEdge in interface PAEdgeSet

addEdges

public abstract boolean addEdges(PANode node1,
                                 String f,
                                 Collection node2s)
Specified by:
addEdges in interface PAEdgeSet

addEdges

public void addEdges(Collection node1s,
                     String f,
                     PANode node2)
Specified by:
addEdges in interface PAEdgeSet

addEdges

public void addEdges(Collection node1s,
                     String f,
                     Collection node2s)
Specified by:
addEdges in interface PAEdgeSet

removeEdge

public abstract void removeEdge(PANode node1,
                                String f,
                                PANode node2)
Specified by:
removeEdge in interface PAEdgeSet

removeEdges

public abstract void removeEdges(PANode node1,
                                 String f)
Specified by:
removeEdges in interface PAEdgeSet

removeEdges

public abstract void removeEdges(PANode node1)
Specified by:
removeEdges in interface PAEdgeSet

pointedNodes

public abstract Set pointedNodes(PANode node,
                                 String f)
Specified by:
pointedNodes in interface PAEdgeSet

pointedNodes

public Set pointedNodes(Collection nodes,
                        String f)
Specified by:
pointedNodes in interface PAEdgeSet

pointedNodes

public abstract Set pointedNodes(PANode node)
Specified by:
pointedNodes in interface PAEdgeSet

allFlagsForNode

public abstract Set allFlagsForNode(PANode node)
Specified by:
allFlagsForNode in interface PAEdgeSet

allSourceNodes

public abstract Set allSourceNodes()
Specified by:
allSourceNodes in interface PAEdgeSet

getEdgesFrom

public Set getEdgesFrom(PANode node,
                        String f)
Specified by:
getEdgesFrom in interface PAEdgeSet

forAllPointedNodes

public void forAllPointedNodes(Temp v,
                               PANodeVisitor visitor)
Specified by:
forAllPointedNodes in interface PAEdgeSet

forAllPointedNodes

public void forAllPointedNodes(PANode node,
                               String f,
                               PANodeVisitor visitor)
Specified by:
forAllPointedNodes in interface PAEdgeSet

forAllPointedNodes

public abstract void forAllPointedNodes(PANode node,
                                        PANodeVisitor visitor)
Specified by:
forAllPointedNodes in interface PAEdgeSet

forAllNodes

public void forAllNodes(PANodeVisitor visitor)
Specified by:
forAllNodes in interface PAEdgeSet

forAllEdges

public void forAllEdges(Temp v,
                        harpoon.Analysis.PointerAnalysis.PAEdgeVisitor visitor)
Specified by:
forAllEdges in interface PAEdgeSet

forAllEdges

public abstract void forAllEdges(PANode node,
                                 harpoon.Analysis.PointerAnalysis.PAEdgeVisitor visitor)
Specified by:
forAllEdges in interface PAEdgeSet

forAllEdges

public void forAllEdges(harpoon.Analysis.PointerAnalysis.PAEdgeVisitor visitor)
Specified by:
forAllEdges in interface PAEdgeSet

getEmptyPAEdgeSet

protected abstract PAEdgeSet getEmptyPAEdgeSet()

specialize

public PAEdgeSet specialize(Map map)
Specified by:
specialize in interface PAEdgeSet

remove

public abstract void remove(Set set)
Specified by:
remove in interface PAEdgeSet

union

public abstract void union(PAEdgeSet edges2,
                           Set ppgRoots)
Description copied from interface: PAEdgeSet
Add all the edges from edges2 to this PAEdgeSet.

Specified by:
union in interface PAEdgeSet
ppgRoots - If non-null, the starting points of all new edges will be added to this set (this is useful for doing efficient escape info propagation after points-to graph updates).

union

public void union(PAEdgeSet edges2)
Description copied from interface: PAEdgeSet
Convenient version of union, equivalent to union(edges2, null).

Specified by:
union in interface PAEdgeSet

getPrecedenceRelation

public Relation getPrecedenceRelation()
Description copied from interface: PAEdgeSet
Returns a relation that contains all the pairs <n2,n1> such that there was an edge from n1 to n2 (through some field f).

Specified by:
getPrecedenceRelation in interface PAEdgeSet

toString

public String toString()
Overrides:
toString in class Object

clone

public Object clone()
Specified by:
clone in interface PAEdgeSet
Overrides:
clone in class Object

difference

public static Set difference(PAEdgeSet es1,
                             PAEdgeSet es2)
Computes the difference between two sets of edges. Returns the set of edges that are present in es1 but not in es2. The returned set contains elements of type PASimpleEdge or PAComplexEdge. For debug purposes.


show_evolution

public static void show_evolution(PAEdgeSet es_old,
                                  PAEdgeSet es_new)
Display the edges which were removed and the edges which were added while passing from es_old to es_new.