Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## avrora.stack.isea
Class ISEInterpreter

    java.lang.Object
      avrora.stack.isea.ISEInterpreter

All Implemented Interfaces:
  InstrVisitor

public class ISEInterpreter
extends java.lang.Object
implements InstrVisitor

The `ISEInterpreter` class implements an abstract interpreter for intraprocedural side effect analysis. This abstract interpreter simply keeps tracks of which register values have been written, read, or overwritten, as well as the values on the stack.

Nested Class Summary
`static interface` | `ISEInterpreter.SummaryCache`

Field Summary
`protected ISEInterpreter.SummaryCache` | `cache`
`protected int` | `nextPC`
`protected int` | `pc`
`protected Verbose.Printer` | `printer`
`protected Program` | `program`
`protected ISEState` | `returnState`
`protected ISEState` | `state`
`protected java.util.HashMap` | `states`

Constructor Summary
`ISEInterpreter(Program p, ISEInterpreter.SummaryCache cs)`

Method Summary
`protected int` | `absolute(int offset)`
`protected void` | `addToWorkList(java.lang.String str, int pc, ISEState s)`
`ISEState` | `analyze(int begin_addr)`
`protected void` | `branch(int addr)`
`protected byte` | `getRegister(Register r)`
`protected byte` | `getSREG()`
`protected void` | `jump(int addr)`
`protected byte` | `popByte()`
`protected void` | `postReturn(ISEState state)`
`protected void` | `postReturnFromInterrupt(ISEState state)`
`protected ISEState` | `processReturnState(ISEState caller, ISEState ret)`
`protected byte` | `readIORegister(int ioreg)`
`protected byte` | `readRegister(Register r)`
`protected int` | `relative(int offset)`
`protected void` | `run()`
`protected void` | `skip()`
`void` | `visit(Instr.ADC i)`
`void` | `visit(Instr.ADD i)`
`void` | `visit(Instr.ADIW i)`
`void` | `visit(Instr.AND i)`
`void` | `visit(Instr.ANDI i)`
`void` | `visit(Instr.ASR i)`
`void` | `visit(Instr.BCLR i)`
`void` | `visit(Instr.BLD i)`
`void` | `visit(Instr.BRBC i)`
`void` | `visit(Instr.BRBS i)`
`void` | `visit(Instr.BRCC i)`
`void` | `visit(Instr.BRCS i)`
`void` | `visit(Instr.BREAK i)`
`void` | `visit(Instr.BREQ i)`
`void` | `visit(Instr.BRGE i)`
`void` | `visit(Instr.BRHC i)`
`void` | `visit(Instr.BRHS i)`
`void` | `visit(Instr.BRID i)`
`void` | `visit(Instr.BRIE i)`
`void` | `visit(Instr.BRLO i)`
`void` | `visit(Instr.BRLT i)`
`void` | `visit(Instr.BRMI i)`
`void` | `visit(Instr.BRNE i)`
`void` | `visit(Instr.BRPL i)`
`void` | `visit(Instr.BRSH i)`
`void` | `visit(Instr.BRTC i)`
`void` | `visit(Instr.BRTS i)`
`void` | `visit(Instr.BRVC i)`
`void` | `visit(Instr.BRVS i)`
`void` | `visit(Instr.BSET i)`
`void` | `visit(Instr.BST i)`
`void` | `visit(Instr.CALL i)`
`void` | `visit(Instr.CBI i)`
`void` | `visit(Instr.CBR i)`
`void` | `visit(Instr.CLC i)`
`void` | `visit(Instr.CLH i)`
`void` | `visit(Instr.CLI i)`
`void` | `visit(Instr.CLN i)`
`void` | `visit(Instr.CLR i)`
`void` | `visit(Instr.CLS i)`
`void` | `visit(Instr.CLT i)`
`void` | `visit(Instr.CLV i)`
`void` | `visit(Instr.CLZ i)`
`void` | `visit(Instr.COM i)`
`void` | `visit(Instr.CP i)`
`void` | `visit(Instr.CPC i)`
`void` | `visit(Instr.CPI i)`
`void` | `visit(Instr.CPSE i)`
`void` | `visit(Instr.DEC i)`
`void` | `visit(Instr.EICALL i)`
`void` | `visit(Instr.EIJMP i)`
`void` | `visit(Instr.ELPM i)`
`void` | `visit(Instr.ELPMD i)`
`void` | `visit(Instr.ELPMPI i)`
`void` | `visit(Instr.EOR i)`
`void` | `visit(Instr.FMUL i)`
`void` | `visit(Instr.FMULS i)`
`void` | `visit(Instr.FMULSU i)`
`void` | `visit(Instr.ICALL i)`
`void` | `visit(Instr.IJMP i)`
`void` | `visit(Instr.IN i)`
`void` | `visit(Instr.INC i)`
`void` | `visit(Instr.JMP i)`
`void` | `visit(Instr.LD i)`
`void` | `visit(Instr.LDD i)`
`void` | `visit(Instr.LDI i)`
`void` | `visit(Instr.LDPD i)`
`void` | `visit(Instr.LDPI i)`
`void` | `visit(Instr.LDS i)`
`void` | `visit(Instr.LPM i)`
`void` | `visit(Instr.LPMD i)`
`void` | `visit(Instr.LPMPI i)`
`void` | `visit(Instr.LSL i)`
`void` | `visit(Instr.LSR i)`
`void` | `visit(Instr.MOV i)`
`void` | `visit(Instr.MOVW i)`
`void` | `visit(Instr.MUL i)`
`void` | `visit(Instr.MULS i)`
`void` | `visit(Instr.MULSU i)`
`void` | `visit(Instr.NEG i)`
`void` | `visit(Instr.NOP i)`
`void` | `visit(Instr.OR i)`
`void` | `visit(Instr.ORI i)`
`void` | `visit(Instr.OUT i)`
`void` | `visit(Instr.POP i)`
`void` | `visit(Instr.PUSH i)`
`void` | `visit(Instr.RCALL i)`
`void` | `visit(Instr.RET i)`
`void` | `visit(Instr.RETI i)`
`void` | `visit(Instr.RJMP i)`
`void` | `visit(Instr.ROL i)`
`void` | `visit(Instr.ROR i)`
`void` | `visit(Instr.SBC i)`
`void` | `visit(Instr.SBCI i)`
`void` | `visit(Instr.SBI i)`
`void` | `visit(Instr.SBIC i)`
`void` | `visit(Instr.SBIS i)`
`void` | `visit(Instr.SBIW i)`
`void` | `visit(Instr.SBR i)`
`void` | `visit(Instr.SBRC i)`
`void` | `visit(Instr.SBRS i)`
`void` | `visit(Instr.SEC i)`
`void` | `visit(Instr.SEH i)`
`void` | `visit(Instr.SEI i)`
`void` | `visit(Instr.SEN i)`
`void` | `visit(Instr.SER i)`
`void` | `visit(Instr.SES i)`
`void` | `visit(Instr.SET i)`
`void` | `visit(Instr.SEV i)`
`void` | `visit(Instr.SEZ i)`
`void` | `visit(Instr.SLEEP i)`
`void` | `visit(Instr.SPM i)`
`void` | `visit(Instr.ST i)`
`void` | `visit(Instr.STD i)`
`void` | `visit(Instr.STPD i)`
`void` | `visit(Instr.STPI i)`
`void` | `visit(Instr.STS i)`
`void` | `visit(Instr.SUB i)`
`void` | `visit(Instr.SUBI i)`
`void` | `visit(Instr.SWAP i)`
`void` | `visit(Instr.TST i)`
`void` | `visit(Instr.WDR i)`
`protected void` | `writeIORegister(int ioreg, byte val)`
`protected void` | `writeRegister(Register r, byte val)`
`protected void` | `writeSREG(byte val)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### printer

    protected final Verbose.Printer printer

### program

    protected final Program program

### pc

    protected int pc

### nextPC

    protected int nextPC

### state

    protected ISEState state

### returnState

    protected ISEState returnState

### states

    protected java.util.HashMap states

### cache

    protected final ISEInterpreter.SummaryCache cache

Constructor Detail

### ISEInterpreter

    public ISEInterpreter(Program p,
                          ISEInterpreter.SummaryCache cs)

Method Detail

### readRegister

    protected byte readRegister(Register r)

### getRegister

    protected byte getRegister(Register r)

### writeRegister

    protected void writeRegister(Register r,
                                 byte val)

### getSREG

    protected byte getSREG()

### writeSREG

    protected void writeSREG(byte val)

### readIORegister

    protected byte readIORegister(int ioreg)

### writeIORegister

    protected void writeIORegister(int ioreg,
                                   byte val)

### relative

    protected int relative(int offset)

### absolute

    protected int absolute(int offset)

### branch

    protected void branch(int addr)

### jump

    protected void jump(int addr)

### processReturnState

    protected ISEState processReturnState(ISEState caller,
                                          ISEState ret)

### postReturn

    protected void postReturn(ISEState state)

### postReturnFromInterrupt

    protected void postReturnFromInterrupt(ISEState state)

### skip

    protected void skip()

### popByte

    protected byte popByte()

### addToWorkList

    protected void addToWorkList(java.lang.String str,
                                 int pc,
                                 ISEState s)

### analyze

    public ISEState analyze(int begin_addr)

### run

    protected void run()

### visit

    public void visit(Instr.ADC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.ADD i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.ADIW i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.AND i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.ANDI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.ASR i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BCLR i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BLD i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRBC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRBS i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRCC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRCS i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BREAK i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BREQ i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRGE i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRHC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRHS i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRID i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRIE i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRLO i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRLT i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRMI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRNE i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRPL i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRSH i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRTC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRTS i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRVC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BRVS i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BSET i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.BST i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CALL i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CBI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CBR i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CLC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CLH i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CLI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CLN i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CLR i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CLS i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CLT i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CLV i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CLZ i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.COM i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CP i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CPC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CPI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.CPSE i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.DEC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.EICALL i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.EIJMP i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.ELPM i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.ELPMD i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.ELPMPI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.EOR i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.FMUL i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.FMULS i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.FMULSU i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.ICALL i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.IJMP i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.IN i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.INC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.JMP i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.LD i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.LDD i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.LDI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.LDPD i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.LDPI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.LDS i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.LPM i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.LPMD i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.LPMPI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.LSL i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.LSR i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.MOV i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.MOVW i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.MUL i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.MULS i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.MULSU i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.NEG i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.NOP i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.OR i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.ORI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.OUT i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.POP i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.PUSH i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.RCALL i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.RET i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.RETI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.RJMP i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.ROL i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.ROR i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SBC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SBCI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SBI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SBIC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SBIS i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SBIW i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SBR i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SBRC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SBRS i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SEC i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SEH i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SEI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SEN i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SER i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SES i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SET i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SEV i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SEZ i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SLEEP i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SPM i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.ST i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.STD i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.STPD i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.STPI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.STS i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SUB i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SUBI i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.SWAP i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.TST i)

  Specified by:
    `visit` in interface `InstrVisitor`

### visit

    public void visit(Instr.WDR i)

  Specified by:
    `visit` in interface `InstrVisitor`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD