Class SingleStartAndroidModel
- java.lang.Object
-
- com.ibm.wala.dalvik.ipa.callgraph.androidModel.structure.AbstractAndroidModel
-
- com.ibm.wala.dalvik.ipa.callgraph.androidModel.structure.SingleStartAndroidModel
-
- Direct Known Subclasses:
LoopAndroidModel
public class SingleStartAndroidModel extends AbstractAndroidModel
Builds an Android Model incorporating a single loop. This class models a single run of an Andoird-Component: E.g. The view of an Activity gets shown only once. The incorporated loop is wrapped around user-interaction methods. These are in the section MULTIPLE_TIMES_IN_LOOP. Aids in handling code to be inserted at given points into the model. Overload this class to change the structure of the model. When the model is being built the enterLABEL-functions are called when ever a label gets stepped over.You can then add instructions to the body using the insts-Instruction factory. Instructions don't have to be in ascending order. Instead they will be sorted by their IIndex once the model gets finished. If you want to add loops to the model you might want to have a look at AndroidModelParameterManager which aids in keeping track of SSA-Variables and adding Phi-Functions.
- See Also:
LoopAndroidModel
,LoopKillAndroidModel
-
-
Field Summary
-
Fields inherited from class com.ibm.wala.dalvik.ipa.callgraph.androidModel.structure.AbstractAndroidModel
body, entryPoints, insts, paramManager
-
-
Constructor Summary
Constructors Constructor Description SingleStartAndroidModel(VolatileMethodSummary body, TypeSafeInstructionFactory insts, SSAValueManager paramManager, Iterable<? extends Entrypoint> entryPoints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
enterEND_OF_LOOP(int PC)
Loops to MULTIPLE_TIMES_IN_LOOP.protected int
enterMULTIPLE_TIMES_IN_LOOP(int PC)
Prepares the PC to get looped to.-
Methods inherited from class com.ibm.wala.dalvik.ipa.callgraph.androidModel.structure.AbstractAndroidModel
enter, enterAFTER_LOOP, enterAT_FIRST, enterAT_LAST, enterBEFORE_LOOP, enterMIDDLE_OF_LOOP, enterSTART_OF_LOOP, finish, hadSectionSwitch, leaveAT_LAST, returnTypesBetween
-
-
-
-
Constructor Detail
-
SingleStartAndroidModel
public SingleStartAndroidModel(VolatileMethodSummary body, TypeSafeInstructionFactory insts, SSAValueManager paramManager, Iterable<? extends Entrypoint> entryPoints)
- Parameters:
body
- The MethodSummary to add instructions toinsts
- Will be used to generate the instructions
-
-
Method Detail
-
enterMULTIPLE_TIMES_IN_LOOP
protected int enterMULTIPLE_TIMES_IN_LOOP(int PC)
Prepares the PC to get looped to. 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.MULTIPLE_TIMES_IN_LOOP got stepped over. In most cases you don't want to invoke this function directly but to use#enter(ExecutionOrder.MULTIPLE_TIMES_IN_LOOP, int)
instead Sideeffects: currentSection is updated, instructions are inserted into the body- Overrides:
enterMULTIPLE_TIMES_IN_LOOP
in classAbstractAndroidModel
- Parameters:
PC
- Program Counter instructions shall be placed at. In most cases you'll simply pass body.getNextProgramCounter()- Returns:
- Program Counter after insertion of the code
-
enterEND_OF_LOOP
protected int enterEND_OF_LOOP(int PC)
Loops to MULTIPLE_TIMES_IN_LOOP. It inserts a gotoInstruction and fills the space reserved before with actual PhiInstructions Gets called when Label ExecutionOrder.END_OF_LOOP got stepped over. In most cases you don't want to invoke this function directly but to use#enter(ExecutionOrder.END_OF_LOOP, int)
instead Sideeffects: currentSection is updated, instructions are inserted into the body- Overrides:
enterEND_OF_LOOP
in classAbstractAndroidModel
- Parameters:
PC
- Program Counter instructions shall be placed at. In most cases you'll simply pass body.getNextProgramCounter()- Returns:
- Program Counter after insertion of the code
-
-