Class LoopKillAndroidModel


public class LoopKillAndroidModel extends LoopAndroidModel
Builds an Android Model incorporating three loops.

This variant adds a nother loop to the LoopAndroidModel. This additional loop emulates the start of an Application with a savedIstanceState:

When memory on a device gets short Apps may be removed from memory. When they are needed again they get started using that savedIstanceState.

Author:
Tobias Blaschke <code@tobiasblaschke.de>
See Also:
  • Constructor Details

  • Method Details

    • enterAT_FIRST

      protected int enterAT_FIRST(int PC)
      Loop starts here.

      Gets called when Label ExecutionOrder.AT_FIRST got stepped over.

      In most cases you don't want to invoke this function directly but to use enter(ExecutionOrder.AT_FIRST, int) instead.

      Sideeffects: currentSection is updated, instructions are inserted into the body

      Overrides:
      enterAT_FIRST in class AbstractAndroidModel
      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
    • leaveAT_LAST

      protected int leaveAT_LAST(int PC)
      Loops to AT_FIRST.

      It inserts a gotoInstruction and fills the space reserved before with actual PhiInstructions

      Does not insert any special handling.

      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

      Overrides:
      leaveAT_LAST in class LoopAndroidModel
      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