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

DynamicMap Class Reference

List of all members.

Static Public Methods

int addEntry (DynamicMapIndex index)
int getEntry (DynamicMapIndex index)
boolean hasEntry (DynamicMapIndex index)
int addEntry (DynamicMapIndex dmi)
int getEntry (DynamicMapIndex dmi)
boolean hasEntry (DynamicMapIndex dmi)
synchronized void reset ()

Private Methods

 DynamicMap (SootClassManager classManager)
void addEntry (NewArrayExpr alloc, Object key, int size, int arrayLen)
void addEntry (NewExpr alloc, Object key, int size)
Vector getAllocsOfArray (Type arrayType)
Vector getAllocsOfClass (SootClass sootClass)
Vector getAllocsOfCollection (Object key)
Vector getArrays ()
Vector getClasses ()
ArrayType getCollectionArray (Object key)
SootClass getCollectionClass (Object key)
Vector getCollections ()
int getCollectionSize (Object key)
Vector getInterfaces ()
void print ()
void storeByArray (DynamicMapEntry entry, Type arrayType)
void storeByClass (DynamicMapEntry entry, SootClass sootClass)
void storeByCollection (DynamicMapEntry entry, Object key)

Private Attributes

SootClassManager classManager
Vector classVector = new Vector()
Hashtable classTable = new Hashtable()
Vector arrayVector = new Vector()
Hashtable arrayTable = new Hashtable()
Hashtable collectTable = new Hashtable()
Vector collectVector = new Vector()

Static Private Attributes

Hashtable Map = new Hashtable()
int numEntries = 0
Hashtable mapping = new Hashtable()
int counter = 0

Detailed Description

A dynamic map, defining the collection associated with each allocator site.

A dynamic map contains some number of DynamicMapEntry objects, each of which binds an allocator site (NewExpr or NewArrayExpr) to a collection. We don't create collections here, rather we assign each collection a unique key---to store objects from different allocator sites in the same collection, we would provide the same key when adding the entries for those sites (e.g., to store all members of a given class in the same collection, the SootClass object of the allocator could be used as the collection key).

The guts of this class maintains several data structures for accessing the dynamic map entries in various ways (e.g., by collection, by class).

Classes are identified with their SootClass object, while arrays are identified with their (Jimple) ArrayType object.

Definition at line 5 of file lib/jpf/gov/nasa/arc/ase/jpf/jvm/DynamicMap.java.


Member Function Documentation

void DynamicMap::addEntry NewExpr   alloc,
Object   key,
int   size
[inline, private]
 

Add a map entry for a class allocator, given the allocator, the collection key, and the number of instances that must be supported.

Note that we do not model classes in any subpackage of java.*

Definition at line 123 of file src/edu/ksu/cis/bandera/birc/DynamicMap.java.

void DynamicMap::addEntry NewArrayExpr   alloc,
Object   key,
int   size,
int   arrayLen
[inline, private]
 

Add a map entry for an array allocator, given the allocator, the collection key, the number of arrays that must be stored, and the maximum length of the arrays.

Definition at line 106 of file src/edu/ksu/cis/bandera/birc/DynamicMap.java.

Referenced by Builder::identifyAllocatorsLocks().

Vector DynamicMap::getAllocsOfClass SootClass   sootClass [inline, private]
 

These methods return vectors of map entries for a given class/array/collection.

Definition at line 141 of file src/edu/ksu/cis/bandera/birc/DynamicMap.java.

ArrayType DynamicMap::getCollectionArray Object   key [inline, private]
 

Get the array type of objects stored in a given collection.

Note: all objects stored in a given collection should be of the same array type.

Definition at line 156 of file src/edu/ksu/cis/bandera/birc/DynamicMap.java.

Referenced by Builder::createCollections().

SootClass DynamicMap::getCollectionClass Object   key [inline, private]
 

Get the class of objects stored in a given collection.

Note: all objects stored in a given collection should be of the same class.

Definition at line 168 of file src/edu/ksu/cis/bandera/birc/DynamicMap.java.

Referenced by Builder::createCollections().

int DynamicMap::getCollectionSize Object   key [inline, private]
 

Compute the size of a collection by summing the size of the map entries associated with that collection.

Definition at line 179 of file src/edu/ksu/cis/bandera/birc/DynamicMap.java.

Referenced by Builder::createCollections().

Vector DynamicMap::getInterfaces   [inline, private]
 

Get the interfaces implemented by the classes in the map.

Returns:
a vector of SootClass objects representing interfaces.

Definition at line 191 of file src/edu/ksu/cis/bandera/birc/DynamicMap.java.

Referenced by Builder::createRefTypes().

void DynamicMap::storeByClass DynamicMapEntry   entry,
SootClass   sootClass
[inline, private]
 

These methods store an entry by class/array/collection in the vectors and hashtables.

Definition at line 252 of file src/edu/ksu/cis/bandera/birc/DynamicMap.java.

Referenced by addEntry().


Member Data Documentation

Vector DynamicMap::arrayVector = new Vector() [private]
 

A vector of arrays (Jimple ArrayType objects) in the map and a hashtable mapping each array type to a vector of the map entries for that class.

Definition at line 85 of file src/edu/ksu/cis/bandera/birc/DynamicMap.java.

Vector DynamicMap::classVector = new Vector() [private]
 

A vector of classes (SootClass objects) in the map and a hashtable mapping each class to a vector of the map entries for that class.

Definition at line 76 of file src/edu/ksu/cis/bandera/birc/DynamicMap.java.

Hashtable DynamicMap::collectTable = new Hashtable() [private]
 

A vector of the collection keys in the map and a hashtable mapping each collection key to a vector of the map entries for that collection key.

Definition at line 94 of file src/edu/ksu/cis/bandera/birc/DynamicMap.java.


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