Package com.ibm.wala.dalvik.ssa
Class AbstractIntRegisterMachine
- java.lang.Object
-
- com.ibm.wala.dalvik.ssa.AbstractIntRegisterMachine
-
- All Implemented Interfaces:
FixedPointConstants
- Direct Known Subclasses:
DexSSABuilder
public abstract class AbstractIntRegisterMachine extends Object implements FixedPointConstants
Skeleton of functionality to propagate information through the Java bytecode stack machine using ShrikeBT.This class computes properties the Java operand stack and of the local variables at the beginning of each basic block.
In this implementation, each dataflow variable value is an integer, and the "meeter" object provides the meets
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractIntRegisterMachine.BasicRegisterFlowProvider
This gives some basic facilities for shoving things around on the stack.static interface
AbstractIntRegisterMachine.FlowProvider
Interface which defines a flow function for a basic blockclass
AbstractIntRegisterMachine.MachineState
Representation of the state of the JVM stack machine at some program point.protected static interface
AbstractIntRegisterMachine.Meeter
A Meeter object provides the dataflow logic needed to meet the abstract machine state for a dataflow meet.
-
Field Summary
Fields Modifier and Type Field Description static int
BOTTOM
static int
IGNORE
protected int
maxLocals
the max number of locals in playstatic boolean
OPTIMISTIC
Should uninitialized variables be considered TOP (optimistic) or BOTTOM (pessimistic);static int
TOP
static int
UNANALYZED
-
Fields inherited from interface com.ibm.wala.fixpoint.FixedPointConstants
CHANGED, CHANGED_AND_FIXED, CHANGED_MASK, FIXED_MASK, NOT_CHANGED, NOT_CHANGED_AND_FIXED, SIDE_EFFECT_MASK
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractIntRegisterMachine(DexCFG G)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
allocateNewLocalsArray()
AbstractIntRegisterMachine.MachineState
getEntryState()
AbstractIntRegisterMachine.MachineState
getIn(DexCFG.BasicBlock bb)
protected void
init(AbstractIntRegisterMachine.Meeter meeter, AbstractIntRegisterMachine.FlowProvider flow)
protected void
initializeVariables()
Convenience method ...boolean
solve()
-
-
-
Field Detail
-
TOP
public static final int TOP
- See Also:
- Constant Field Values
-
BOTTOM
public static final int BOTTOM
- See Also:
- Constant Field Values
-
UNANALYZED
public static final int UNANALYZED
- See Also:
- Constant Field Values
-
IGNORE
public static final int IGNORE
- See Also:
- Constant Field Values
-
maxLocals
protected final int maxLocals
the max number of locals in play
-
OPTIMISTIC
public static final boolean OPTIMISTIC
Should uninitialized variables be considered TOP (optimistic) or BOTTOM (pessimistic);- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractIntRegisterMachine
protected AbstractIntRegisterMachine(DexCFG G)
-
-
Method Detail
-
init
protected void init(AbstractIntRegisterMachine.Meeter meeter, AbstractIntRegisterMachine.FlowProvider flow)
-
solve
public boolean solve()
-
initializeVariables
protected void initializeVariables()
Convenience method ... a little ugly .. perhaps delete later.
-
getEntryState
public AbstractIntRegisterMachine.MachineState getEntryState()
-
getIn
public AbstractIntRegisterMachine.MachineState getIn(DexCFG.BasicBlock bb)
- Returns:
- the state at the entry to a given block
-
allocateNewLocalsArray
public int[] allocateNewLocalsArray()
-
-