|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.copernicus.java.TypeSpecializerAnalysis
A transformer that modifies each class using the token types from ports. In particular, this class creates constraints in the same fashion as the Ptolemy II type system and solves those constraints. The resulting solution should correspond to valid Java types which are more specific (in the Ptolemy II sense) than the original Java types. The code is then transformed to use these more specific types.
This transformer is necessary because there are some token types that we want to make more specific, but that don't directly depend on the the types of a port. This transformation enables the token unboxing performed by the TokenToNativeTransformer
Note that this analysis assumes very little flow of control... Or at least that the types of each variable along each path are the same... as such, it works very badly if there are any instanceof checks, along with some other program constructs.
| Red (cxh) |
| Red (cxh) |
| Constructor Summary | |
TypeSpecializerAnalysis(java.util.List list,
java.util.Set unsafeLocals)
Specialize all token types that appear in the given list of class. |
|
TypeSpecializerAnalysis(soot.SootClass theClass,
java.util.Set unsafeLocals)
Specialize all token types that appear in the given class. |
|
| Method Summary | |
static InequalityTerm |
_getInequalityTerm(soot.SootMethod method,
boolean debug,
soot.Value value,
InequalitySolver solver,
java.util.Map objectToInequalityTerm,
soot.Unit unit,
soot.toolkits.scalar.LocalDefs localDefs,
soot.toolkits.scalar.LocalUses localUses)
|
Type |
_getTokenType(java.lang.Object object)
|
soot.Type |
getSpecializedSootType(soot.Local local)
|
soot.Type |
getSpecializedSootType(soot.jimple.NewArrayExpr expr)
|
soot.Type |
getSpecializedSootType(soot.SootField field)
|
Type |
getSpecializedType(soot.Local local)
|
Type |
getSpecializedType(soot.jimple.NewArrayExpr expr)
|
Type |
getSpecializedType(soot.SootField field)
|
void |
inlineTypeLatticeMethods(soot.SootMethod method,
soot.Unit unit,
soot.ValueBox box,
soot.jimple.StaticInvokeExpr expr,
soot.toolkits.scalar.LocalDefs localDefs,
soot.toolkits.scalar.LocalUses localUses)
Inline the given invocation point in the given box, unit, and method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TypeSpecializerAnalysis(soot.SootClass theClass,
java.util.Set unsafeLocals)
public TypeSpecializerAnalysis(java.util.List list,
java.util.Set unsafeLocals)
list - A list of SootClass.| Method Detail |
public soot.Type getSpecializedSootType(soot.Local local)
public soot.Type getSpecializedSootType(soot.jimple.NewArrayExpr expr)
public soot.Type getSpecializedSootType(soot.SootField field)
public Type getSpecializedType(soot.Local local)
public Type getSpecializedType(soot.jimple.NewArrayExpr expr)
public Type getSpecializedType(soot.SootField field)
public void inlineTypeLatticeMethods(soot.SootMethod method,
soot.Unit unit,
soot.ValueBox box,
soot.jimple.StaticInvokeExpr expr,
soot.toolkits.scalar.LocalDefs localDefs,
soot.toolkits.scalar.LocalUses localUses)
throws IllegalActionException
IllegalActionException
public Type _getTokenType(java.lang.Object object)
throws IllegalActionException
IllegalActionException
public static InequalityTerm _getInequalityTerm(soot.SootMethod method,
boolean debug,
soot.Value value,
InequalitySolver solver,
java.util.Map objectToInequalityTerm,
soot.Unit unit,
soot.toolkits.scalar.LocalDefs localDefs,
soot.toolkits.scalar.LocalUses localUses)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||