|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjasm.util.dfa.ForwardFlowAnalysis<T>
public abstract class ForwardFlowAnalysis<T>
Represents a generic forward dataflow analysis. This user must implement the transfer functions for the different kinds of bytecode, and the analysis will propagate until a fixed point is reached.
Constructor Summary | |
---|---|
ForwardFlowAnalysis()
|
Method Summary | |
---|---|
T[] |
apply(ClassFile.Method method)
|
abstract T[] |
initialise(Code attribute,
ClassFile.Method method)
Generate an array of stores, one for each bytecode in the given method. |
protected void |
merge(int index,
T store,
java.util.HashSet<java.lang.Integer> worklist,
T[] stores)
|
abstract boolean |
merge(int index,
T original,
T udpate)
Merge one abstract store into another to form a store at a join point in the control-flow graph. |
protected int |
select(java.util.HashSet<java.lang.Integer> worklist)
|
abstract T |
transfer(int index,
boolean branch,
Bytecode.IfCmp code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a given bytecode to an incoming store. |
abstract T |
transfer(int index,
boolean branch,
Bytecode.If code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a given bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.ArrayLength code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a arraystore bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.ArrayLoad code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a arrayload bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.ArrayStore code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a arraystore bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.BinOp code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a binop bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.CheckCast code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a checkcast bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.Cmp code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a cmp bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.Conversion code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a convert bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.Dup code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a dup bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.DupX1 code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a dup_x1 bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.DupX2 code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a dup_x2 bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.GetField code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a getfield bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.Iinc code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of an iinc bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.InstanceOf code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a instanceof bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.Invoke code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a invoke bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.LoadConst code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a loadconst bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.Load code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a load bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.MonitorEnter code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a monitorenter bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.MonitorExit code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a monitorexit bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.Neg code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a neg bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.New code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a new bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.Nop code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a nop bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.Pop code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a pop bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.PutField code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a arraystore bytecode to an incoming store. |
abstract void |
transfer(int index,
Bytecode.Return code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a return bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.Store code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a store bytecode to an incoming store. |
abstract T |
transfer(int index,
Bytecode.Swap code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a swap bytecode to an incoming store. |
abstract void |
transfer(int index,
Bytecode.Throw code,
T store)
Generate an updated a abstract store by apply the abstract effect(s) of a throw bytecode to an incoming store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ForwardFlowAnalysis()
Method Detail |
---|
public T[] apply(ClassFile.Method method)
method
- protected int select(java.util.HashSet<java.lang.Integer> worklist)
protected void merge(int index, T store, java.util.HashSet<java.lang.Integer> worklist, T[] stores)
public abstract T[] initialise(Code attribute, ClassFile.Method method)
attribute
- --- code attribute being analysed.method
- --- enclosing method.
public abstract T transfer(int index, Bytecode.Store code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.Load code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.LoadConst code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.ArrayLoad code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.ArrayStore code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.GetField code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.PutField code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.ArrayLength code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.Invoke code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract void transfer(int index, Bytecode.Throw code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.public abstract void transfer(int index, Bytecode.Return code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.public abstract T transfer(int index, Bytecode.Iinc code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.BinOp code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.Neg code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.New code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.CheckCast code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.Conversion code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.InstanceOf code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.Pop code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.Dup code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.DupX1 code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.DupX2 code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.Swap code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.Cmp code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.Nop code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.MonitorEnter code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, Bytecode.MonitorExit code, T store)
index
- --- index in bytecode array of bytecode being analysed.bytecode
- --- bytecode to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, boolean branch, Bytecode.If code, T store)
index
- --- index in bytecode array of bytecode being analysed.branch
- --- indicates the true or false branch is to be considered.bytecode
- --- to be analysed.store
- --- incoming abstract store.
public abstract T transfer(int index, boolean branch, Bytecode.IfCmp code, T store)
index
- --- index in bytecode array of bytecode being analysed.branch
- --- indicates the true or false branch is to be considered.bytecode
- --- to be analysed.store
- --- incoming abstract store.
public abstract boolean merge(int index, T original, T udpate)
original
- --- original store to join "into". In the case of no change,
this should be returned.update
- --- new store to join "into" the original store.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |