soot.jimple.toolkits.pointer
Class InstanceKey

java.lang.Object
  extended by soot.jimple.toolkits.pointer.InstanceKey

public class InstanceKey
extends Object

An instance key is a static representative of a runtime object. An instance key, if based on a StrongLocalMustAliasAnalysis, is guaranteed to represent a single runtime object within a its declared method. If based on a (non-strong) LocalMustAliasAnalysis, it represents the value of a variable at a single location, which itself can represent multiple runtime objects, if the location is contained in a loop. See Sable TR 2007-8 for details.

Author:
Eric Bodden

Field Summary
protected  Local assignedLocal
           
protected  int hashCode
           
protected  LocalMustAliasAnalysis lmaa
           
protected  LocalMustNotAliasAnalysis lnma
           
protected  SootMethod owner
           
protected  PointsToSet pts
           
protected  Stmt stmtAfterAssignStmt
           
 
Constructor Summary
InstanceKey(Local local, Stmt stmt, SootMethod owner, LocalMustAliasAnalysis lmaa, LocalMustNotAliasAnalysis lmna)
          Creates a new instance key representing the value stored in local, just before stmt.
 
Method Summary
protected  int computeHashCode()
          (Pre)computes the hash code.
 boolean equals(Object obj)
          
 Local getLocal()
           
 SootMethod getOwner()
           
 PointsToSet getPointsToSet()
           
 Stmt getStmt()
           
 int hashCode()
          
 boolean haveLocalInformation()
           
 boolean isOfReferenceType()
           
 boolean mayNotAlias(InstanceKey otherKey)
          
 boolean mustAlias(InstanceKey otherKey)
          
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

assignedLocal

protected final Local assignedLocal

lmaa

protected final LocalMustAliasAnalysis lmaa

lnma

protected final LocalMustNotAliasAnalysis lnma

stmtAfterAssignStmt

protected final Stmt stmtAfterAssignStmt

owner

protected final SootMethod owner

hashCode

protected final int hashCode

pts

protected final PointsToSet pts
Constructor Detail

InstanceKey

public InstanceKey(Local local,
                   Stmt stmt,
                   SootMethod owner,
                   LocalMustAliasAnalysis lmaa,
                   LocalMustNotAliasAnalysis lmna)
Creates a new instance key representing the value stored in local, just before stmt. The identity of the key is defined via lmaa, and its must-not-alias relationship to other keys via lmna.

Parameters:
local - the local variable whose value this key represents
stmt - the statement at which this key represents the value
owner - the method containing local
lmaa - a LocalMustAliasAnalysis
lmna - a LocalMustNotAliasAnalysis
Method Detail

mustAlias

public boolean mustAlias(InstanceKey otherKey)


mayNotAlias

public boolean mayNotAlias(InstanceKey otherKey)


getPointsToSet

public PointsToSet getPointsToSet()

getLocal

public Local getLocal()

haveLocalInformation

public boolean haveLocalInformation()

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

computeHashCode

protected int computeHashCode()
(Pre)computes the hash code.


equals

public boolean equals(Object obj)

Overrides:
equals in class Object

isOfReferenceType

public boolean isOfReferenceType()

getOwner

public SootMethod getOwner()

getStmt

public Stmt getStmt()