|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Program
The program object contains the symbol table for the program and the instructions to execute
Method Summary | |
---|---|
void |
addInst(Instruction ins)
Add instruction to the program |
void |
addInst(Instruction[] ins)
Add multiple instructions to the program |
Instruction |
getInst(int pos)
Get instruction at specificed location |
java.util.List<Instruction> |
getInstList()
Get all instructions as a list |
int |
getLength()
Gets total number of instructions in program |
ReferenceTable |
getReferenceTable()
Returns the references table |
SymbolTable |
getSymbolTable()
Returns the symbol table |
boolean |
isExecutable()
Returns whether this program can be executed - it is executable if all symbols have been resolved. |
void |
resolveReferences()
Resolves references in this program from the symbol table |
void |
resolveReferencesFrom(Program prog)
Resolves prog's references from the symbol table |
void |
setReferenceTable(ReferenceTable table)
Sets the references table |
void |
setSymbolTable(SymbolTable table)
Sets the symbol table |
Method Detail |
---|
void addInst(Instruction ins)
ins
- The instruction to addvoid addInst(Instruction[] ins)
ins
- An array of instructions to addInstruction getInst(int pos)
pos
- The instruction address
java.util.List<Instruction> getInstList()
int getLength()
SymbolTable getSymbolTable()
ReferenceTable getReferenceTable()
void setSymbolTable(SymbolTable table)
table
- The symbol table for this programvoid setReferenceTable(ReferenceTable table)
table
- The references table for this programboolean isExecutable()
void resolveReferences()
void resolveReferencesFrom(Program prog)
prog
- The program whose references to resolve
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |