Class SSABuilder
java.lang.Object
com.ibm.wala.analysis.stackMachine.AbstractIntStackMachine
com.ibm.wala.ssa.SSABuilder
- All Implemented Interfaces:
FixedPointConstants
This class constructs an SSA
IR from a backing ShrikeBT instruction stream.
The basic algorithm here is an abstract interpretation over the Java bytecode to determine types of stack locations and local variables. As a side effect, the flow functions of the abstract interpretation emit instructions, eliminating the stack abstraction and moving to a register-transfer language in SSA form.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractIntStackMachine
AbstractIntStackMachine.BasicStackFlowProvider, AbstractIntStackMachine.FlowProvider, AbstractIntStackMachine.MachineState, AbstractIntStackMachine.MeeterModifier and TypeClassDescriptionprotected static classThis gives some basic facilities for shoving things around on the stack.static interfaceInterface which defines a flow function for a basic blockclassRepresentation of the state of the JVM stack machine at some program point.protected static interfaceA Meeter object provides the dataflow logic needed to meet the abstract machine state for a dataflow meet. -
Field Summary
Fields inherited from class AbstractIntStackMachine
BOTTOM, IGNORE, OPTIMISTIC, TOP, UNANALYZEDModifier and TypeFieldDescriptionstatic final intstatic final intstatic final booleanShould uninitialized variables be considered TOP (optimistic) or BOTTOM (pessimistic);static final intstatic final intFields inherited from interface FixedPointConstants
CHANGED, CHANGED_AND_FIXED, CHANGED_MASK, FIXED_MASK, NOT_CHANGED, NOT_CHANGED_AND_FIXED, SIDE_EFFECT_MASKModifier and TypeFieldDescriptionstatic final byteA return value which indicates that a lhs has changed, and the statement might need to be evaluated again.static final byteA return value which indicates that lhs has changed, and the statement need not be evaluated again.static final intThe bit-mask which defines the "CHANGED" flagstatic final intThe bit-mask which defines the "FIXED" flagstatic final byteA return value which indicates that lhs has not changed, and the statement might need to be evaluated again.static final byteA return value which indicates that lhs has not changed, and the statement need not be evaluated again.static final intThe bit-mask which defines the "SIDE EFFECT" flag -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild()Build the IRcom.ibm.wala.ssa.SSABuilder.SSA2LocalMapprotected voidConvenience method ...static SSABuildermake(IBytecodeMethod<?> method, SSACFG cfg, ShrikeCFG scfg, SSAInstruction[] instructions, SymbolTable symbolTable, boolean buildLocalMap, SSAPiNodePolicy piNodePolicy) Methods inherited from class AbstractIntStackMachine
getEntryState, getIn, init, solve
-
Method Details
-
make
public static SSABuilder make(IBytecodeMethod<?> method, SSACFG cfg, ShrikeCFG scfg, SSAInstruction[] instructions, SymbolTable symbolTable, boolean buildLocalMap, SSAPiNodePolicy piNodePolicy) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
initializeVariables
protected void initializeVariables()Description copied from class:AbstractIntStackMachineConvenience method ... a little ugly .. perhaps delete later.- Overrides:
initializeVariablesin classAbstractIntStackMachine
-
build
public void build()Build the IR -
getLocalMap
public com.ibm.wala.ssa.SSABuilder.SSA2LocalMap getLocalMap() -
getIndirectionData
-