@Immutable public final class Program extends Object implements Serializable
A ZEL program (function)
This is a Turing machine a Program will always be pretty much an array of operations (instructions).Modifier and Type | Class and Description |
---|---|
static class |
Program.ExecutionType |
static class |
Program.HasClass |
static class |
Program.Type |
public String getSource()
public String getName()
public int getLocalMemSize()
@CheckReturnValue public boolean equals(Object obj)
@CheckReturnValue public int hashCode()
public boolean hasDeterministicFunctions()
@CheckReturnValue public Instruction get(int i)
i
- - inst address.@CheckReturnValue public Instruction[] getCode()
@CheckReturnValue public ParsingContext.Location[] getDebugInfo()
@CheckReturnValue public int size()
public Program.ExecutionType getExecType()
@Nonnull public static Program compile(@Nonnull String zExpr, @Nonnull String... varNames) throws CompileException
CompileException
public Object execute() throws ExecutionException, InterruptedException
public Object execute(Object... args) throws ExecutionException, InterruptedException
public Object execute(@Nonnull ExecutorService execService, Object... args) throws ExecutionException, InterruptedException
public Object executeSingleThreaded(Object... args) throws ExecutionException, InterruptedException
public Object execute(@Nullable VMExecutor execService, @Nullable ProcessIO io, Object... args) throws ExecutionException, InterruptedException
public Pair<Object,ExecutionContext> execute(@Nullable VMExecutor execService, @Nullable ProcessIO io, ResultCache resultCache, Object... args) throws ExecutionException, InterruptedException
public static Object executeSync(@Nonnull ExecutionContext ectx) throws ExecutionException, InterruptedException
public static Object execute(@Nonnull ExecutionContext ectx) throws ExecutionException, InterruptedException
public Object execute(ProcessIO io, Object... args) throws ExecutionException, InterruptedException
public static void main(String[] args) throws IOException, InterruptedException
args
- IOException
InterruptedException
public String toAssemblyString()
public Program.Type getType()
public boolean contains(Class<? extends Instruction> instr)
Copyright © 2018 SPF4J. All rights reserved.