envgen.analysis.stat.locs
Class SymLoc

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

public abstract class SymLoc
extends SymLocValue
implements soot.Value

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)  int debug
           
(package private)  int kind
          One of the different locations: unit, reachable from unit, environment, unknown, and dummy.
(package private)  Accessor modifiedAccessor
          Represents the modified field/element of the object/array.
(package private)  soot.Type modifiedType
           
(package private)  boolean singular
           
(package private)  soot.Type type
          Type of the object whose field is being modified.
 
Constructor Summary
SymLoc()
           
SymLoc(int kind)
          Used to create a dummy location.
SymLoc(int kind, soot.Type type)
          Used to create an environment or unknown location.
SymLoc(SymLoc loc)
          Copy constructor.
 
Method Summary
 void apply(soot.util.Switch sw)
           
 java.lang.Object clone()
           
 boolean equals(SymLoc second)
           
 int equivHashCode()
           
 boolean equivTo(java.lang.Object obj)
           
abstract  java.lang.String getCode()
          Generates code representation of symbolic location appropriate for code generation.
 int getKind()
           
 Accessor getModifiedAccessor()
           
 soot.Type getModifiedType()
           
 boolean getSingular()
           
 soot.Type getType()
          Returns the type of the object whose field is being modified,
 java.util.List getUseBoxes()
           
 boolean isSingular()
           
abstract  void setCastType(soot.Type t)
           
 void setKind(int k)
          Sets the kind of the location.
 void setModifiedAccessor(Accessor a)
          Sets modifiedField to sf, used in side-effects analysis, where modified fields are identified.
 void setModifiedType(soot.Type t)
           
 void setSingular(boolean s)
           
 void setType(soot.Type t)
          Setd typeOfFieldBase to t, needed for reachable locations and unknown locations, where the type of the base of the field reference is needed.
abstract  java.lang.String toString()
           
 void toString(soot.UnitPrinter up)
           
 
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

kind

int kind
One of the different locations: unit, reachable from unit, environment, unknown, and dummy.


type

soot.Type type
Type of the object whose field is being modified. Used in chooseReachable("type", unit object).field or chooseClass("type").field.


modifiedAccessor

Accessor modifiedAccessor
Represents the modified field/element of the object/array.


modifiedType

soot.Type modifiedType

singular

boolean singular

debug

int debug
Constructor Detail

SymLoc

public SymLoc()

SymLoc

public SymLoc(int kind)
Used to create a dummy location.


SymLoc

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


SymLoc

public SymLoc(SymLoc loc)
Copy constructor.

Method Detail

isSingular

public boolean isSingular()

getKind

public int getKind()

setKind

public void setKind(int k)
Sets the kind of the location.


getSingular

public boolean getSingular()

setSingular

public void setSingular(boolean s)

setCastType

public abstract void setCastType(soot.Type t)

getModifiedAccessor

public Accessor getModifiedAccessor()

setModifiedAccessor

public void setModifiedAccessor(Accessor a)
Sets modifiedField to sf, used in side-effects analysis, where modified fields are identified.


getModifiedType

public soot.Type getModifiedType()

setModifiedType

public void setModifiedType(soot.Type t)

getType

public soot.Type getType()
Returns the type of the object whose field is being modified,

Specified by:
getType in interface soot.Value

setType

public void setType(soot.Type t)
Setd typeOfFieldBase to t, needed for reachable locations and unknown locations, where the type of the base of the field reference is needed.


equals

public boolean equals(SymLoc second)

getCode

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

Overrides:
getCode in class SymLocValue

toString

public abstract java.lang.String toString()
Overrides:
toString in class SymLocValue

getUseBoxes

public java.util.List getUseBoxes()
Specified by:
getUseBoxes in interface soot.Value

equivTo

public boolean equivTo(java.lang.Object obj)
Specified by:
equivTo in interface soot.EquivTo

apply

public void apply(soot.util.Switch sw)
Specified by:
apply in interface soot.util.Switchable

equivHashCode

public int equivHashCode()
Specified by:
equivHashCode in interface soot.EquivTo

clone

public java.lang.Object clone()
Specified by:
clone in interface soot.Value
Overrides:
clone in class java.lang.Object

toString

public void toString(soot.UnitPrinter up)
Specified by:
toString in interface soot.Value