envgen.analysis.stat.locs
Class SymLocPath

java.lang.Object
  |
  +--envgen.analysis.stat.locs.SymLocValue
        |
        +--envgen.analysis.stat.locs.SymLoc
              |
              +--envgen.analysis.stat.locs.SymLocPath
All Implemented Interfaces:
soot.EquivTo, java.io.Serializable, soot.util.Switchable, soot.Value

public class SymLocPath
extends SymLoc

Implementation of symbolic location that represents a memory location. There are four different symbolic locations that can be identified by the analysis: unit locations, locations reachable from the unit through a chain of references, locations in the environment, and locations that the analysis can't identify (unknown locations).

See Also:
Serialized Form

Field Summary
(package private)  java.util.List accessors
          Represents the chain of the fields that need to be followed to reach the modified field.
static int CONCRETE_LOC
          Used to identify unit locations.
(package private)  int debug
           
(package private)  int length
           
static int REACHABLE_LOC
          Used to identify locations reachable from a unit location through a chain of references through the unit.
(package private)  Root root
          Represents the very first base (b) of the symbolic location.
 
Fields inherited from class envgen.analysis.stat.locs.SymLoc
kind, modifiedAccessor, modifiedType, singular, type
 
Constructor Summary
SymLocPath(int kind, soot.Type type)
          Used to create an environment or unknown location.
SymLocPath(Root root, soot.Type type)
           
SymLocPath(SymLocPath loc)
          Copy constructor.
 
Method Summary
 void addAccessor(Accessor a)
          Appends sf to the end of the list of fields.
 void addAccessors(java.util.List a)
          Appends a list of fields to fields.
 boolean equals(SymLocPath second)
           
 java.util.List getAccessors()
          Returns a list of reachable fields for a location.
 java.lang.String getAccessorsCode(java.lang.String rootStr)
           
 int getChainLength()
          Returns the length of the fields chain.
 java.lang.String getCode()
          Generates code representation of symbolic location appropriate for code generation.
 Root getRoot()
          Returns top level location: either it's a static fields of the unit or a parameter.
 boolean isConcreteLoc()
          Returns true if this is a concrete unit location.
 boolean isReachableLoc()
          Returns true if this location is reachable from unit.
 void removeLastAccessor()
           
 void setCastType(soot.Type t)
           
 void setChainLength(int i)
           
 void setRoot(Root root)
           
 java.lang.String toString()
           
 
Methods inherited from class envgen.analysis.stat.locs.SymLoc
apply, clone, equals, equivHashCode, equivTo, getKind, getModifiedAccessor, getModifiedType, getSingular, getType, getUseBoxes, isSingular, setKind, setModifiedAccessor, setModifiedType, setSingular, setType, toString
 
Methods inherited from class envgen.analysis.stat.locs.SymLocValue
equals
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONCRETE_LOC

public static final int CONCRETE_LOC
Used to identify unit locations.

See Also:
Constant Field Values

REACHABLE_LOC

public static final int REACHABLE_LOC
Used to identify locations reachable from a unit location through a chain of references through the unit.

See Also:
Constant Field Values

root

Root root
Represents the very first base (b) of the symbolic location. For example the first base of an expression b.f1...fn is b.


accessors

java.util.List accessors
Represents the chain of the fields that need to be followed to reach the modified field.


length

int length

debug

int debug
Constructor Detail

SymLocPath

public SymLocPath(int kind,
                  soot.Type type)
Used to create an environment or unknown location.


SymLocPath

public SymLocPath(Root root,
                  soot.Type type)

SymLocPath

public SymLocPath(SymLocPath loc)
Copy constructor.

Method Detail

isConcreteLoc

public boolean isConcreteLoc()
Returns true if this is a concrete unit location.


isReachableLoc

public boolean isReachableLoc()
Returns true if this location is reachable from unit.


addAccessor

public void addAccessor(Accessor a)
Appends sf to the end of the list of fields.


addAccessors

public void addAccessors(java.util.List a)
Appends a list of fields to fields. Used when mapping called method summary into a summary of a callee.


removeLastAccessor

public void removeLastAccessor()

getRoot

public Root getRoot()
Returns top level location: either it's a static fields of the unit or a parameter.


setRoot

public void setRoot(Root root)

setCastType

public void setCastType(soot.Type t)
Specified by:
setCastType in class SymLoc

getAccessors

public java.util.List getAccessors()
Returns a list of reachable fields for a location.


getChainLength

public int getChainLength()
Returns the length of the fields chain.


setChainLength

public void setChainLength(int i)

equals

public boolean equals(SymLocPath second)

getCode

public java.lang.String getCode()
Generates code representation of symbolic location appropriate for code generation.

Specified by:
getCode in class SymLoc

toString

public java.lang.String toString()
Specified by:
toString in class SymLoc

getAccessorsCode

public java.lang.String getAccessorsCode(java.lang.String rootStr)