public class LoopAndroidModel extends SingleStartAndroidModel
Functions are inserted in sequence until ExecutionOrder.START_OF_LOOP is reached. This loop is closed later when AFTER_LOOP gets stepped over.
Functions in MULTIPLE_TIMES_IN_LOOP are in a single inner loop.
This structure may be used to model an Application where no state is kept over the restart of the Application (instance-state) or when the potential restart of the App shall be ignored.
body, entryPoints, insts, paramManager| Constructor and Description |
|---|
LoopAndroidModel(com.ibm.wala.ipa.summaries.VolatileMethodSummary body,
com.ibm.wala.util.ssa.TypeSafeInstructionFactory insts,
com.ibm.wala.util.ssa.SSAValueManager paramManager,
java.lang.Iterable<? extends com.ibm.wala.ipa.callgraph.Entrypoint> entryPoints) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
enterAFTER_LOOP(int PC)
Loops to START_OF_LOOP.
|
protected int |
enterSTART_OF_LOOP(int PC)
Prepares the PC to get looped to.
|
protected int |
leaveAT_LAST(int PC)
Does not insert any special handling.
|
enterEND_OF_LOOP, enterMULTIPLE_TIMES_IN_LOOPenter, enterAT_FIRST, enterAT_LAST, enterBEFORE_LOOP, enterMIDDLE_OF_LOOP, finish, hadSectionSwitch, returnTypesBetweenpublic LoopAndroidModel(com.ibm.wala.ipa.summaries.VolatileMethodSummary body,
com.ibm.wala.util.ssa.TypeSafeInstructionFactory insts,
com.ibm.wala.util.ssa.SSAValueManager paramManager,
java.lang.Iterable<? extends com.ibm.wala.ipa.callgraph.Entrypoint> entryPoints)
body - The MethodSummary to add instructions toinsts - Will be used to generate the instructionsprotected int enterSTART_OF_LOOP(int PC)
Thus it tries to assure a new basic block starts here. Additionally it reserves some space for the insertion of Phi-Functions.
Gets called when Label ExecutionOrder.START_OF_LOOP got stepped over.
In most cases you don't want to invoke this function directly but to use enter(ExecutionOrder.START_OF_LOOP, int) instead
Sideeffects: currentSection is updated, instructions are inserted into the body
enterSTART_OF_LOOP in class AbstractAndroidModelPC - Program Counter instructions shall be placed at. In most cases you'll simply pass
body.getNextProgramCounter()protected int enterAFTER_LOOP(int PC)
It inserts a gotoInstruction and fills the space reserved before with actual PhiInstructions
Gets called when Label ExecutionOrder.AFTER_LOOP got stepped over.
In most cases you don't want to invoke this function directly but to use enter(ExecutionOrder.AFTER_LOOP, int) instead
Sideeffects: currentSection is updated, instructions are inserted into the body
enterAFTER_LOOP in class AbstractAndroidModelPC - Program Counter instructions shall be placed at. In most cases you'll simply pass
body.getNextProgramCounter()protected int leaveAT_LAST(int PC)
Gets called when the model gets finished.
In most cases you don't want to invoke this function directly but to use AbstractAndroidModel.finish(int) instead
Sideeffects: instructions are inserted into the body
leaveAT_LAST in class AbstractAndroidModelPC - Program Counter instructions shall be placed at. In most cases you'll simply pass
body.getNextProgramCounter()