public class Self4Decompiler extends SelfDecompiler
Modifier and Type | Field and Description |
---|---|
static java.util.Map<Primitive,java.lang.String> |
BINARY_OPERATORS |
TIMEOUT
Constructor and Description |
---|
Self4Decompiler() |
Modifier and Type | Method and Description |
---|---|
Vertex |
decompileExpression(Vertex expression,
Network network)
Check if the expression is bytecode and decompile.
|
Vertex |
decompileFunction(Vertex function,
Network network)
Check if the function is bytecode and decompile.
|
Vertex |
decompileState(Vertex state,
Network network)
Check if the state is bytecode and decompile.
|
void |
parseArgumentByteCode(java.lang.Object[] result,
java.io.DataInputStream dataStream,
Vertex pop,
Network network)
Parse the operation argument.
|
void |
parseArgumentsByteCode(Vertex expression,
java.io.DataInputStream dataStream,
Vertex type,
Network network)
Parse the operation arguments.
|
void |
parseArgumentsByteCode(Vertex expression,
java.io.DataInputStream dataStream,
Vertex type,
Vertex pop,
Network network)
Parse the operation arguments.
|
Vertex |
parseCaseByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the CASE bytecode.
|
Vertex |
parseDoByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the DO bytecode.
|
Vertex |
parseEquationByteCode(Vertex equation,
BinaryData data,
Network network)
Parse the Self2 equation from bytecode.
|
Vertex |
parseExpressionByteCode(Vertex expression,
BinaryData data,
Network network)
Parse the expression from bytecode.
|
Vertex |
parseFunctionByteCode(Vertex function,
BinaryData data,
Network network)
Parse the function from bytecode.
|
Vertex |
parseGotoByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the GOTO bytecode.
|
Vertex |
parseOperatorByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the operator and its arguments from bytecode.
|
Vertex |
parseOperatorByteCode(java.io.DataInputStream dataStream,
Vertex pop,
Network network)
Parse the operator and its arguments from bytecode.
|
Vertex |
parsePushByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the PUSH bytecode.
|
void |
parseQuotientByteCode(Vertex state,
java.io.DataInputStream dataStream,
Network network)
Parse the GOTO bytecode.
|
Vertex |
parseReturnByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the RETURN bytecode.
|
Vertex |
parseStateByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the state and its cases from bytecode.
|
Vertex |
parseStateByteCode(Vertex state,
BinaryData data,
Network network)
Parse the state from bytecode.
|
void |
printArguments(Vertex expression,
Primitive type,
int start,
java.lang.String[] tokens,
boolean reverse,
boolean newLine,
boolean unravel,
boolean brackets,
java.io.Writer writer,
java.lang.String indent,
java.util.List<Vertex> variables,
java.util.List<Vertex> functions,
java.util.Set<Vertex> elements,
boolean space,
Network network)
Print the operation arguments.
|
void |
printCase(Vertex expression,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
java.util.List<Vertex> newVariables,
java.util.List<Vertex> newFunctions,
java.util.List<Vertex> newStates,
Network network)
Print the IF condition and any variables and states that it references.
|
void |
printData(Vertex vertex,
java.io.Writer writer)
Print the vertex, either a state, variable, expression, or data.
|
void |
printDo(Vertex expression,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
java.util.List<Vertex> newVariables,
java.util.List<Vertex> newFunctions,
java.util.List<Vertex> newStates,
Network network)
Print the DO operation.
|
void |
printElement(Vertex vertex,
java.io.Writer writer,
java.lang.String indent,
java.util.List<Vertex> functions,
java.util.List<Vertex> variables,
java.util.Set<Vertex> elements,
Network network)
Print the vertex, either a state, variable, expression, or data.
|
void |
printFunction(Vertex function,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
Network network)
Print the function and any functions it references that have not been printed.
|
void |
printGoto(Vertex expression,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
java.util.List<Vertex> newVariables,
java.util.List<Vertex> newFunctions,
java.util.List<Vertex> newStates,
Network network)
Print the GOTO condition and any variables and states that it references.
|
void |
printOperator(Vertex expression,
java.io.Writer writer,
java.lang.String indent,
java.util.List<Vertex> functions,
java.util.List<Vertex> variables,
java.util.Set<Vertex> elements,
Network network)
Print the expression and any expressions it references that have not been printed.
|
void |
printPush(Vertex expression,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
java.util.List<Vertex> newVariables,
java.util.List<Vertex> newFunctions,
java.util.List<Vertex> newStates,
Network network)
Print the PUSH condition and any variables and states that it references.
|
void |
printReturn(Vertex expression,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
java.util.List<Vertex> newVariables,
java.util.List<Vertex> newFunctions,
java.util.List<Vertex> newStates,
Network network)
Print the RETURN condition and any variables it references.
|
void |
printState(Vertex state,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
Network network,
long start,
long timeout)
Print the state and any referenced states or variables that have not yet been printed.
|
void |
printStateMachine(Vertex state,
java.io.Writer writer,
Network network,
long start,
long timeout)
Print the Self code for the state machine.
|
void |
printTemplate(Vertex formula,
java.io.Writer writer,
java.lang.String indent,
java.util.List<Vertex> expressions,
java.util.List<Vertex> variables,
java.util.Set<Vertex> elements,
Network network) |
void |
printVariable(Vertex variable,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
Network network)
Print the variable and any variables it references that have not been printed.
|
createUniqueFormula, createUniqueTemplate, decompileEquation, decompileStateMachine, getDecompiler, getPrintIds, printArguments, printComments, printEquation, printFormula, printGoto, printPush, printReturn, setDecompiler, setPrintIds, toString
public static java.util.Map<Primitive,java.lang.String> BINARY_OPERATORS
public void printStateMachine(Vertex state, java.io.Writer writer, Network network, long start, long timeout)
printStateMachine
in class SelfDecompiler
public void printState(Vertex state, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, Network network, long start, long timeout) throws java.io.IOException
printState
in class SelfDecompiler
java.io.IOException
public void printData(Vertex vertex, java.io.Writer writer) throws java.io.IOException
printData
in class SelfDecompiler
java.io.IOException
public void printElement(Vertex vertex, java.io.Writer writer, java.lang.String indent, java.util.List<Vertex> functions, java.util.List<Vertex> variables, java.util.Set<Vertex> elements, Network network) throws java.io.IOException
printElement
in class SelfDecompiler
java.io.IOException
public void printTemplate(Vertex formula, java.io.Writer writer, java.lang.String indent, java.util.List<Vertex> expressions, java.util.List<Vertex> variables, java.util.Set<Vertex> elements, Network network) throws java.io.IOException
printTemplate
in class SelfDecompiler
java.io.IOException
public void printVariable(Vertex variable, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, Network network) throws java.io.IOException
printVariable
in class SelfDecompiler
java.io.IOException
public void printArguments(Vertex expression, Primitive type, int start, java.lang.String[] tokens, boolean reverse, boolean newLine, boolean unravel, boolean brackets, java.io.Writer writer, java.lang.String indent, java.util.List<Vertex> variables, java.util.List<Vertex> functions, java.util.Set<Vertex> elements, boolean space, Network network) throws java.io.IOException
java.io.IOException
public void parseArgumentsByteCode(Vertex expression, java.io.DataInputStream dataStream, Vertex type, Network network) throws java.io.IOException
parseArgumentsByteCode
in class SelfDecompiler
java.io.IOException
public void parseArgumentsByteCode(Vertex expression, java.io.DataInputStream dataStream, Vertex type, Vertex pop, Network network) throws java.io.IOException
java.io.IOException
public void parseArgumentByteCode(java.lang.Object[] result, java.io.DataInputStream dataStream, Vertex pop, Network network) throws java.io.IOException
java.io.IOException
public Vertex decompileFunction(Vertex function, Network network)
decompileFunction
in class SelfDecompiler
public Vertex decompileExpression(Vertex expression, Network network)
decompileExpression
in class SelfDecompiler
public Vertex decompileState(Vertex state, Network network)
decompileState
in class SelfDecompiler
public void printFunction(Vertex function, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, Network network) throws java.io.IOException
java.io.IOException
public Vertex parseFunctionByteCode(Vertex function, BinaryData data, Network network) throws java.io.IOException
parseFunctionByteCode
in class SelfDecompiler
java.io.IOException
public Vertex parseExpressionByteCode(Vertex expression, BinaryData data, Network network) throws java.io.IOException
parseExpressionByteCode
in class SelfDecompiler
java.io.IOException
public Vertex parseEquationByteCode(Vertex equation, BinaryData data, Network network) throws java.io.IOException
parseEquationByteCode
in class SelfDecompiler
java.io.IOException
public Vertex parseStateByteCode(Vertex state, BinaryData data, Network network) throws java.io.IOException
parseStateByteCode
in class SelfDecompiler
java.io.IOException
public Vertex parseStateByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseStateByteCode
in class SelfDecompiler
java.io.IOException
public Vertex parseCaseByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseCaseByteCode
in class SelfDecompiler
java.io.IOException
public Vertex parsePushByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parsePushByteCode
in class SelfDecompiler
java.io.IOException
public Vertex parseDoByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseDoByteCode
in class SelfDecompiler
java.io.IOException
public Vertex parseReturnByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseReturnByteCode
in class SelfDecompiler
java.io.IOException
public Vertex parseGotoByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseGotoByteCode
in class SelfDecompiler
java.io.IOException
public void parseQuotientByteCode(Vertex state, java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseQuotientByteCode
in class SelfDecompiler
java.io.IOException
public void printOperator(Vertex expression, java.io.Writer writer, java.lang.String indent, java.util.List<Vertex> functions, java.util.List<Vertex> variables, java.util.Set<Vertex> elements, Network network) throws java.io.IOException
printOperator
in class SelfDecompiler
java.io.IOException
public Vertex parseOperatorByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseOperatorByteCode
in class SelfDecompiler
java.io.IOException
public Vertex parseOperatorByteCode(java.io.DataInputStream dataStream, Vertex pop, Network network) throws java.io.IOException
java.io.IOException
public void printCase(Vertex expression, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, java.util.List<Vertex> newVariables, java.util.List<Vertex> newFunctions, java.util.List<Vertex> newStates, Network network) throws java.io.IOException
printCase
in class SelfDecompiler
java.io.IOException
public void printGoto(Vertex expression, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, java.util.List<Vertex> newVariables, java.util.List<Vertex> newFunctions, java.util.List<Vertex> newStates, Network network) throws java.io.IOException
java.io.IOException
public void printPush(Vertex expression, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, java.util.List<Vertex> newVariables, java.util.List<Vertex> newFunctions, java.util.List<Vertex> newStates, Network network) throws java.io.IOException
java.io.IOException
public void printDo(Vertex expression, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, java.util.List<Vertex> newVariables, java.util.List<Vertex> newFunctions, java.util.List<Vertex> newStates, Network network) throws java.io.IOException
java.io.IOException
public void printReturn(Vertex expression, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, java.util.List<Vertex> newVariables, java.util.List<Vertex> newFunctions, java.util.List<Vertex> newStates, Network network) throws java.io.IOException
java.io.IOException