public class Program
extends java.lang.Object
Constructor and Description |
---|
Program(java.lang.String fileName,
InstructionList instructionList)
Construct a program from the given list of instructions
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFileName()
Get the name of the file storing the program
|
static boolean |
isComputationOn()
Test if computation instructions are to be interpreted.
|
static boolean |
isMemoryAccessOn()
Test if memory access instructions are to be interpreted.
|
InstructionList.InstructionListIterator |
iterator()
Iterator over the program's list of instructions
|
static void |
setComputation(boolean flag)
Set if the computation instructions are to be interpreted or not.
|
static void |
setMemoryAccess(boolean flag)
Set if the memory access instructions are to be interpreted or not.
|
int |
size()
Size of the program in number of instructions
|
public Program(java.lang.String fileName, InstructionList instructionList)
instructionList
- The list of instructionspublic static void setComputation(boolean flag)
flag
- If true, computation instructions will be interpretedpublic static boolean isComputationOn()
public static void setMemoryAccess(boolean flag)
flag
- If true, memory access instructions will be interpretedpublic static boolean isMemoryAccessOn()
public InstructionList.InstructionListIterator iterator()
public int size()
public java.lang.String getFileName()