Public Methods | |
TransSystem (String name) | |
void | addTrans (Transformation trans) |
void | addType (Type t) |
Array | arrayType (Type baseType, ConstExpr size) |
Bool | booleanType () |
Collection | collectionType (Type baseType, ConstExpr size) |
String | createName (Object key, String proposedName) |
BirThread | createThread (String proposedName, Object key) |
void | declarePredicate (String proposedName, Expr expr) |
StateVar | declareVar (Object key, String proposedName, BirThread thread, Type type, Expr initVal) |
void | define (Object key, Definition definition) |
Enumerated | enumeratedType () |
Definition | getDefinition (Object key) |
Vector | getDefinitions () |
Object | getKeyOf (String name) |
StateVarVector | getLocalStateVars (BirThread thread) |
Location | getLocation (int id) |
String | getName () |
String | getNameOf (Object key) |
Vector | getPredicates () |
Object | getSource (Object birObject) |
StateVarVector | getStateVars () |
ThreadVector | getThreads () |
TransVector | getTransformations () |
Vector | getTypes () |
StateVar | getVarOfKey (Object key) |
Location | locationOfKey (Object key, BirThread thread) |
Lock | lockType (boolean waiting, boolean reentrant) |
void | numberLocations () |
String | predicateName (Object predicate) |
Range | rangeType () |
Range | rangeType (ConstExpr lo, ConstExpr hi) |
Record | recordType () |
Ref | refAnyType () |
Ref | refType () |
void | setSource (Object birObject, Object source) |
BirThread | threadOfKey (Object key) |
Private Methods | |
void | numberLoc (Location loc, LocVector threadLocVector) |
void | reserveNames () |
Private Attributes | |
String | name |
int | threadCount = 0 |
int | locCount = 0 |
int | stateSize = 0 |
ThreadVector | threadVector = new ThreadVector() |
StateVarVector | stateVarVector = new StateVarVector() |
TransVector | transVector = new TransVector() |
Vector | definitionVector = new Vector() |
Vector | typeVector = new Vector() |
Hashtable | definitionTable = new Hashtable() |
Hashtable | locationOfKey |
Hashtable | stateVarOfKey |
Hashtable | sourceMap |
Location[] | locationTable |
int | numberedLocs |
Hashtable | nameTable = new Hashtable() |
Hashtable | namedKeyTable = new Hashtable() |
Hashtable | threadTable = new Hashtable() |
Hashtable | predTable = new Hashtable() |
Vector | predVector = new Vector() |
StateVarVector | refTargets = new StateVarVector() |
Ref | refAnyType = new Ref(refTargets,this) |
Static Private Attributes | |
String[] | reservedNames |
This is the top-level object encapsulating a transition system. It contains:
Definition at line 57 of file TransSystem.java.
|
Create a transition system with the given name. Definition at line 198 of file TransSystem.java. |
|
Add transformation. Definition at line 205 of file TransSystem.java. |
|
Create array type Definition at line 215 of file TransSystem.java. Referenced by TypeExtractor::createArrayType().
|
|
Create boolean type Definition at line 224 of file TransSystem.java. |
|
Create collection type Definition at line 235 of file TransSystem.java. Referenced by TypeExtractor::createCollectionType().
|
|
Create a unqiue name for an external key, given a proposed name
To facilitate translation, we make the names of all declared entities (variables, threads, definitions) unique using this service. The actual name is constructed from the proposed name by replacing '$' and '.' (which appear in nested class/package names) with '_' (yielding a string we call the 'prefix') and proceding as follows:
Definition at line 263 of file TransSystem.java. Referenced by TypeExtractor::addFields(), TypeExtractor::createArrayType(), TypeExtractor::createRecordType(), and TypeExtractor::createRefType().
|
|
Create a thread.
Definition at line 284 of file TransSystem.java. |
|
Declare a predicate
Note: if the proposed name is not legal (e.g., is reserved or already taken), then the name is changed, but the front end is not informed---this should be fixed at some point. Definition at line 302 of file TransSystem.java. Referenced by Builder::declarePredicates().
|
|
Declare a new state variable.
Definition at line 319 of file TransSystem.java. Referenced by Builder::createCollections(), and Builder::declareVar().
|
|
Add definition, associate it with a key. Definition at line 336 of file TransSystem.java. Referenced by TypeExtractor::createArrayType(), TypeExtractor::createRecordType(), and TypeExtractor::createRefType().
|
|
Create enumerated type Definition at line 343 of file TransSystem.java. |
|
Get definition associated with key. Definition at line 352 of file TransSystem.java. |
|
Get the key associated with a name. Definition at line 359 of file TransSystem.java. Referenced by Ref::resolveTargets().
|
|
Get the local variables of a thread. Definition at line 366 of file TransSystem.java. Referenced by SmvTrans::translateThread().
|
|
Get the name associated with a key. Definition at line 384 of file TransSystem.java. Referenced by TypeExtractor::addFields().
|
|
Get the source of a BIR object. Definition at line 391 of file TransSystem.java. Referenced by JimpleTrace::JimpleTrace(), and JimpleStore::getThreads().
|
|
Get the set of transformations (all threads). Definition at line 399 of file TransSystem.java. |
|
Retrieve state variable associated with key. Definition at line 404 of file TransSystem.java. Referenced by TransExtractor::caseDefinitionStmt(), ExprExtractor::caseLocalExpr(), TransExtractor::getLiveVars(), Builder::initializeGlobal(), and Ref::resolveTargets().
|
|
Retrieve location associated with key, or create a new location (if none is found).
Definition at line 414 of file TransSystem.java. Referenced by Builder::buildThread(), TransExtractor::locationOfNextStmt(), TransExtractor::locationOfStmt(), and TransExtractor::makeLocation().
|
|
Create lock type Definition at line 430 of file TransSystem.java. Referenced by TypeExtractor::createRecordType().
|
|
Number the (reachable) locations depth first (chiefly so they'll print out in a nice order). Definition at line 452 of file TransSystem.java. Referenced by Builder::createTransSystem().
|
|
Retrieve the name of a predicate given its expression Definition at line 466 of file TransSystem.java. Referenced by SmvTrans::definitions(), and SpinTrans::predicates().
|
|
Create specific range type Definition at line 484 of file TransSystem.java. |
|
Create default range type Definition at line 472 of file TransSystem.java. |
|
Create record type Definition at line 493 of file TransSystem.java. Referenced by TypeExtractor::createRecordType().
|
|
Return ref any type Definition at line 503 of file TransSystem.java. Referenced by SpinTrans::refIndex(), SmvTrans::refIndex(), BirState::setActualSizesFromTrace(), and Ref::toString().
|
|
Create ref type Definition at line 509 of file TransSystem.java. Referenced by TypeExtractor::createRefType().
|
|
Set the source (an arbitrary object) of a BIR object This is used to map a BIR action back to the entity (e.g., a Jimple statement) from which it was generated. Definition at line 525 of file TransSystem.java. Referenced by TypeExtractor::addFields(), TypeExtractor::createRecordType(), and TransExtractor::makeTrans().
|
|
Retrieve thread associated with key. Definition at line 531 of file TransSystem.java. Referenced by Builder::buildThread(), JimpleStore::isActive(), TransExtractor::oldThreadOperation(), and TransExtractor::threadOperation().
|
|
Initial value: new Hashtable() Definition at line 71 of file TransSystem.java. |
|
This is the set of names that cannot be used for declared entities in a BIR transition system (because they are used by BIR or one of the translator input languages). Definition at line 98 of file TransSystem.java. |
|
Initial value: new Hashtable() Definition at line 75 of file TransSystem.java. |
|
Initial value: new Hashtable() Definition at line 73 of file TransSystem.java. |