harpoon.Analysis.PointerAnalysis
Class PASync

java.lang.Object
  extended by harpoon.Analysis.PointerAnalysis.PASync
All Implemented Interfaces:
Serializable

public class PASync
extends Object
implements Serializable

PASync models a sync action.

Version:
$Id: PASync.java,v 1.4 2005/08/17 23:34:01 salcianu Exp $
Author:
Alexandru SALCIANU <salcianu@retezat.lcs.mit.edu>
See Also:
Serialized Form

Field Summary
 ListCell call_path
          The call chain that specializes this action.
 int depth
          The depth of the call-path specialization chain; if 0, the sync took place in the current method.
 HCodeElement hce
          The instruction which performs the sync.
 PANode n
          The node on which the sync is performed on.
 PANode nt
          The thread which performs the sync.
 MetaMethod wtspec_run
          If this action is the thread specialization of another action, this is the run method of the thread which does this action.
 
Constructor Summary
PASync(PANode n, PANode nt, HCodeElement hce)
          Creates a PASync.
 
Method Summary
 PASync csSpecialize(Map map, CALL call)
          Specializes this action for a specific call site.
 boolean equals(Object obj)
          Checks the equality of this object with another one.
 int hashCode()
           
 boolean isCSSpec()
          Checks whether this action is a calling context specialization of some other one.
 boolean isTSpec()
          Checks whether this action is a thread specialization of some other one.
 Set project(Relation mu)
          Returns the image of this sync action projected through the relation mu.
 String toString()
          String representation for debug purposes.
 PASync tSpecialize(Map map, MetaMethod run)
          Does the thread-specialization of this action.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

n

public PANode n
The node on which the sync is performed on.


nt

public PANode nt
The thread which performs the sync.


hce

public HCodeElement hce
The instruction which performs the sync.


depth

public int depth
The depth of the call-path specialization chain; if 0, the sync took place in the current method.


call_path

public ListCell call_path
The call chain that specializes this action. Its size is equal to depth. To cope with the recursive methods, this is just the last part of the call-path, containing up to PointerAnalysis.MAX_SPEC_DEPTH elements: every chain shorter than that limit is exact, the rest are just approximations.


wtspec_run

public MetaMethod wtspec_run
If this action is the thread specialization of another action, this is the run method of the thread which does this action.

Constructor Detail

PASync

public PASync(PANode n,
              PANode nt,
              HCodeElement hce)
Creates a PASync.

Method Detail

csSpecialize

public PASync csSpecialize(Map map,
                           CALL call)
Specializes this action for a specific call site. The argument is supposed to be a CALL. It is added at the end of the call chain. The new, specialized action is returned.
Note: If the depth of this action is too big, no specialization takes place; instead, this object is returned.


project

public Set project(Relation mu)
Returns the image of this sync action projected through the relation mu.


isCSSpec

public boolean isCSSpec()
Checks whether this action is a calling context specialization of some other one.


tSpecialize

public PASync tSpecialize(Map map,
                          MetaMethod run)
Does the thread-specialization of this action.


isTSpec

public boolean isTSpec()
Checks whether this action is a thread specialization of some other one.


equals

public boolean equals(Object obj)
Checks the equality of this object with another one.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
String representation for debug purposes.

Overrides:
toString in class Object