@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
CompileExceptionpublic 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 InputStream in, @Nullable PrintStream out, @Nullable PrintStream err, Object... args) throws ExecutionException, InterruptedException
public Pair<Object,ExecutionContext> executeX(@Nullable VMExecutor execService, @Nullable InputStream in, @Nullable PrintStream out, @Nullable PrintStream err, 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(@Nonnull InputStream in, @Nonnull PrintStream out, @Nonnull PrintStream err, Object... args) throws ExecutionException, InterruptedException
public static Object getValue(@Nonnull Map mem, @Nonnull String name) throws CompileException, InterruptedException, ExecutionException
mem - Mapname - StringExceptionCompileExceptionInterruptedExceptionExecutionExceptionpublic static void addValue(@Nonnull Map mem, @Nonnull String name, Object value) throws CompileException, InterruptedException, ExecutionException
mem - name - Stringvalue - ObjectInterruptedExceptionCompileExceptionExecutionException@CheckReturnValue public static String dumpCore(String name, Object mem, int indent, int maxIndent)
name - mem - indent - maxIndent - public static void main(String[] args) throws IOException, InterruptedException
args - IOExceptionInterruptedExceptionpublic String toAssemblyString()
public Program.Type getType()
public boolean contains(Class<? extends Instruction> instr)
Copyright © 2016. All rights reserved.