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 |
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.
|
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. |
|
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().
|
|
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. |
|
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().
|
|
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().
|
|
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().
|
|
Get the interfaces implemented by the classes in the map.
Definition at line 191 of file src/edu/ksu/cis/bandera/birc/DynamicMap.java. Referenced by Builder::createRefTypes().
|
|
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().
|
|
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. |
|
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. |
|
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. |