Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Fields Class Reference

Inheritance diagram for Fields:
[legend]
Collaboration diagram for Fields:
[legend]
List of all members.

Public Methods

 Fields (ClassInfo c, int nfields)
Object clone ()
boolean equals (Object obj)
ClassInfo getClassInfo ()
LockStatus getLockStatus ()
LockStatus getLockStatus (String fieldname)
long getValue (int index)
long getValue (String fieldname)
long[] getVariables ()
void hash (HashData hd)
int hashCode ()
boolean isRef (String fieldname)
void log (int ref, boolean object)
void mark (DynamicArea da)
void setValue (int index, long value)
void setValue (String fieldname, long value)
void setValueRef (int idx)
int size ()
 Fields ()
void merge (Fields fields, CallSite site, MethodInfo methodInfo, MethodInfo calledMdInfo)
boolean noFieldsInMethod ()
boolean noInstanceFieldsInMethod ()
boolean noParaFields ()
boolean noStaticFieldsInMethod ()
String toString ()
 Fields (String t, ClassInfo c, int size, int nf, boolean ic, BSet v)
Object clone ()
int countFields ()
boolean equals (Object o)
int findex (String fname)
ClassInfo getClassInfo ()
int getField (int index)
int getField (String fname)
String getFieldName (int index)
String getFieldType (int findex)
String getFieldType (String fname)
long getLongField (int index)
long getLongField (String fname)
String getType ()
void hash (HashData hd)
int hashCode ()
boolean isArray ()
boolean isClass ()
boolean isRef (int index)
boolean isRef (String fname)
void log (int ref)
void mark (DynamicArea da)
void setField (int index, int value)
void setField (String fname, int value)
void setLongField (int index, long value)
void setLongField (String fname, long value)
int size ()
String toString ()

Private Methods

void ANALYZE_addEntry ()
void ANALYZE_Fields (int numFields)
 Fields ()
void initFields ()

Static Private Methods

int getParaIndex (InstanceFieldRef insFieldRef, Local[] paraLocals, SimpleLocalCopies simpleLocalCopiesInCalledMd, Stmt interStmt)
boolean isThisRef (SootMethod enclosingMethod, Value base, Stmt thisRefStmt)
Set parametersLocalize (MethodInfo calledMdInfo, Fields fields, InvokeExpr invokeExpr)

Private Attributes

ClassInfo ci
long[] variables
BitSet variablerefs = new BitSet()
List locks
LockStatus arrayLock
Set staticFields
Set instanceFields
Set paraFields
Set otherInsFds
String type
int[] values
int nFields
boolean isClass
BSet vRefs

Detailed Description

This class is for grouping use and definition of field references in one method.

Definition at line 16 of file lib/jpf/gov/nasa/arc/ase/jpf/jvm/Fields.java.


Constructor & Destructor Documentation

Fields::Fields   [inline]
 

Initialize staticFields, instanceFields, and paraFields to null.

Definition at line 74 of file src/edu/ksu/cis/bandera/pdgslicer/Fields.java.

Referenced by clone().

Fields::Fields   [inline, private]
 

Creates a new empty fields object. Used by clone.

Definition at line 57 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

Fields::Fields String   t,
ClassInfo   c,
int   size,
int   nf,
boolean   ic,
BSet   v
[inline]
 

Creates a new field object.

Definition at line 62 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.


Member Function Documentation

Object Fields::clone   [inline]
 

Creates a clone.

Definition at line 84 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

int Fields::countFields   [inline]
 

Number of fields.

Definition at line 102 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

boolean Fields::equals Object   o [inline]
 

Checks for equality.

Definition at line 108 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

ClassInfo Fields::getClassInfo   [inline]
 

Returns a reference to the class information.

Definition at line 144 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

int Fields::getField String   fname [inline]
 

Gets the value of a field.

Definition at line 156 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

int Fields::getField int   index [inline]
 

Gets the value of a field.

Definition at line 150 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

Referenced by getField(), and log().

String Fields::getFieldName int   index [inline]
 

Returns the name of the field.

Definition at line 164 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

int Fields::getParaIndex InstanceFieldRef   insFieldRef,
Local   paraLocals[],
SimpleLocalCopies   simpleLocalCopiesInCalledMd,
Stmt   interStmt
[inline, static, private]
 

Get the index of parameter, if the base value of given instance field reference insFieldRef is a parameter or a local copy of a parameter.

Parameters:
insFieldRef   query instance field reference.
paraLocals   local variables for all parameters.
simpleLocalCopiesInCalledMd   simple local copies graph for the method where insFieldRef is used or defined.
interStmt   the statement which use or define insFieldRef.
Returns:
the index of the parameter which is base value of insFieldRef.
Exceptions:
BaseValueNonLocalException   if the base value of insFieldRef is not a local variable.
NoParaFieldFoundException   if can not find a parameter corresponding to the base value of insFieldRef.

Definition at line 97 of file src/edu/ksu/cis/bandera/pdgslicer/Fields.java.

Referenced by parametersLocalize().

String Fields::getType   [inline]
 

Returns the type of the object or class associated with the fields.

Definition at line 194 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

void Fields::hash HashData   hd [inline]
 

Adds some data to the computation of an hashcode.

Definition at line 200 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

Referenced by hashCode().

int Fields::hashCode   [inline]
 

Computes an hash code.

Definition at line 207 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

boolean Fields::isArray   [inline]
 

Returns true if the fields belong to an array.

Definition at line 244 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

Referenced by getFieldName().

boolean Fields::isClass   [inline]
 

Returns true if the fields belong to a class.

Definition at line 250 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

Referenced by log().

boolean Fields::isRef String   fname [inline]
 

Returns true if a field contains a reference.

Definition at line 279 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

boolean Fields::isRef int   index [inline]
 

Returns true if a field contains a reference.

Definition at line 256 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

Referenced by isRef().

boolean Fields::isThisRef SootMethod   enclosingMethod,
Value   base,
Stmt   thisRefStmt
[inline, static, private]
 

Insert the method's description here. Creation date: (6/18/2001 11:36:41 AM)

Returns:
boolean
Parameters:
value   ca.mcgill.sable.soot.jimple.Value

Definition at line 126 of file src/edu/ksu/cis/bandera/pdgslicer/Fields.java.

void Fields::log int   ref [inline]
 

Logs the content of the fields object.

Definition at line 285 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

void Fields::mark DynamicArea   da [inline]
 

Marks all the references contained in the fields of an object.

Definition at line 338 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

void Fields::merge Fields   fields,
CallSite   site,
MethodInfo   methodInfo,
MethodInfo   calledMdInfo
[inline]
 

Merge fields information of called method into current fields information of current method in terms of one method call.

Parameters:
fields   all fields information for called method.
site   one call site in current method body.
methodInfo   method information of current method.
calledMdInfo   method information of called method.

Definition at line 142 of file src/edu/ksu/cis/bandera/pdgslicer/Fields.java.

Referenced by MethodCallAnalysis::mergeFields().

Set Fields::parametersLocalize MethodInfo   calledMdInfo,
Fields   fields,
InvokeExpr   invokeExpr
[inline, static, private]
 

Implement binding function of parameters.
For example, given an invoke expression like obj.calledMethod(actualArg1, acutalArg2);, and the method calledMethod(formalArg1, formalArg2){...}, there are some parameter fields in the body of calledMethod such like formalArg1.fd1, formalArg2.fd2 etc. To count (merge) those fields into those of current method, it is necessary to change those formalArg base value into actualArg value.

Parameters:
calledMdInfo   method information of called method.
fields   fields information of called method
invokeExpr   invoke (called method) expression in current method.
Returns:
a Set of InstanceFieldRef which is changed base value from formalArg to actualArg.

Definition at line 267 of file src/edu/ksu/cis/bandera/pdgslicer/Fields.java.

Referenced by merge().

void Fields::setField String   fname,
int   value
[inline]
 

Sets the value of a field.

Definition at line 367 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

void Fields::setField int   index,
int   value
[inline]
 

Sets the value of a field.

Definition at line 346 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

Referenced by ClassInfo::createClassFields(), ClassInfo::createObjectFields(), and setField().

int Fields::size   [inline]
 

Size of the fields.

Definition at line 380 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.


Member Data Documentation

ClassInfo Fields::ci [private]
 

Reference to the class information.

Definition at line 27 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

Set Fields::instanceFields [private]
 

A set of DataBox for instance field references which are declared in current class.

Definition at line 56 of file src/edu/ksu/cis/bandera/pdgslicer/Fields.java.

boolean Fields::isClass [private]
 

Set to true if the fields belong to a class.

Definition at line 42 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

int Fields::nFields [private]
 

The number of fields.

Definition at line 37 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

Set Fields::otherInsFds [private]
 

A set of DataBox for other instance field references which are declared in other class rather than current class.

Definition at line 67 of file src/edu/ksu/cis/bandera/pdgslicer/Fields.java.

Set Fields::paraFields [private]
 

A set of DataBox for parameter field references.

See also:
IndexMaps::isParaField(InstanceFieldRef,Stmt).

Definition at line 62 of file src/edu/ksu/cis/bandera/pdgslicer/Fields.java.

Set Fields::staticFields [private]
 

A set of DataBox for static field reference. One DataBox means a set of static field references used or defined by a statement.

Definition at line 51 of file src/edu/ksu/cis/bandera/pdgslicer/Fields.java.

String Fields::type [private]
 

Type of the object or class.

Definition at line 22 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

BSet Fields::vRefs [private]
 

Keeps track of which values are references.

Definition at line 50 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.

int [] Fields::values [private]
 

Set of values.

Definition at line 32 of file src/gov/nasa/arc/ase/jpf/jvm/Fields.java.


The documentation for this class was generated from the following files:
Generated at Thu Feb 7 07:11:33 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001