public final class Executor
extends java.lang.Object
Executor
class is to execute (simulate) sequences of instruction calls
(concrete calls). It executes instruction by instruction, perform control transfers by labels
(if needed) and prints information about important events to the simulator log (currently,
the console).Modifier and Type | Class and Description |
---|---|
static interface |
Executor.Listener
The
Executor.Listener interface is to be implemented by classes that monitor
execution of instruction calls. |
Constructor and Description |
---|
Executor(EngineContext context)
Constructs an Executor object.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(ExecutorCode executorCode,
int startIndex,
int endIndex)
Executes the specified sequence of instruction calls (concrete calls) and prints information
about important events to the simulator log.
|
void |
setListener(Executor.Listener listener) |
public Executor(EngineContext context)
context
- Generation engine context.java.lang.IllegalArgumentException
- if the argument is null
.public void setListener(Executor.Listener listener)
public void execute(ExecutorCode executorCode, int startIndex, int endIndex)
java.lang.IllegalArgumentException
- if the parameter is null
.GenerationAbortedException
- if during the interaction with the microprocessor model
an error caused by an invalid format of the request has occurred (typically, it
happens when evaluating an Output
object causes an invalid request to the
model state observer).